query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
write the data to a commaseparatedvalues file
function WriteCSVFile($csv_file,$vars) { global $SPECIAL_FIELDS,$SPECIAL_VALUES; // // create an array of column values in the order specified // in $SPECIAL_VALUES["csvcolumns"] // $column_list = $SPECIAL_VALUES["csvcolumns"]; if (!isset($column_list) || empty($column_list) || !is_string($column_list)) return; if (!isset($csv_file) || empty($csv_file) || !is_string($csv_file)) return; @ $fp = fopen($csv_file,"a"); if (!$fp) return; $column_list = explode(",",$column_list); $n_columns = count($column_list); if (filesize($csv_file) == 0) { for ($ii = 0 ; $ii < $n_columns ; $ii++) { fwrite($fp,"\"".$column_list[$ii]."\""); if ($ii < $n_columns-1) fwrite($fp,","); } fwrite($fp,"\n"); } // $debug = ""; // $debug .= "gpc -> ".get_magic_quotes_gpc()."\n"; // $debug .= "runtime -> ".get_magic_quotes_runtime()."\n"; for ($ii = 0 ; $ii < $n_columns ; $ii++) { $value = $vars[$column_list[$ii]]; if (is_string($value)) // // truncate the string // $value = substr($value,0,MAXSTRING); $value = trim($value); if (LIMITED_IMPORT) { // // the target database doesn't understand escapes, so // remove slashes, and double quotes, and newlines // $value = Strip($value); } // $debug .= $column_list[$ii]." => ".$value."\n"; fwrite($fp,"\"".$value."\""); if ($ii < $n_columns-1) fwrite($fp,","); } fwrite($fp,"\n"); fclose($fp); // CreatePage($debug); // exit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function writeAll()\n {\n foreach( $this->values as $name => $value ){\n $this->_write( s($name), s($value) );\n }\n }", "function savefile($fname, $val){\n\t\t$fp = fopen($fname, 'a');\n\t\tfputcsv($fp, $val);\n\t\tfclose($fp);\n\t\t}", "public function writeToFile($data){\t\n\t\tfwrite($this->fptr,$data);\n\t}", "function store() {\r\n $this->reindex();\r\n //---------------------\r\n if (($handle = fopen($this->_origin, \"w\")) !== FALSE) {\r\n fputcsv($handle, $this->_fields);\r\n foreach ($this->_data as $key => $record)\r\n fputcsv($handle, array_values((array) $record));\r\n fclose($handle);\r\n }\r\n }", "function savefile($fname, $val){\n$fp = fopen($fname, 'a');\nfputcsv($fp, $val);\nfclose($fp);\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 }", "public function write()\n {\n $handle = fopen('data.csv', 'wb+');\n\n // write to output\n fputcsv($handle, [\n $this->user->getFirstname() . ' ' . $this->user->getLastname(),\n $this->user->getCountry(),\n $this->user->getEmail(),\n $this->user->getPhone(),\n ], ';', '\"');\n\n fclose($handle);\n }", "public function writeFile($data);", "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 }", "private function _writeValue($value)\n\t{\n\t\tfwrite($this->_stream, $value);\n\t}", "function writeFile(string $data): void {\n $file = fopen('data.csv', 'w');\n fwrite($file, $data);\n fclose($file);\n}", "static function writeFl($data,$file)\n {\n $filec = fopen($file,\"w\") or die(\"unable to open\");\n fwrite($filec,$data);\n }", "function writeToDestination($data) {\n\t\t$sqlInsertStatement = \"INSERT INTO UTVMEDL (UM_PNID, UM_UTVID, UM_FRADATO, UM_TILDATO, UM_FUNK, UM_RANGERING, UM_SORT, UM_VARAFOR) VALUES (\";\n\n\t\t$sqlInsertStatement .= \"'\" . $data->UM_PNID . \"', \";\n\t\t$sqlInsertStatement .= \"'\" . $data->UM_UTVID . \"', \";\n\t\t$sqlInsertStatement .= \"'\" . $data->UM_FRADATO . \"', \";\n\t\t$sqlInsertStatement .= \"'\" . $data->UM_TILDATO . \"', \";\n\t\t$sqlInsertStatement .= \"'\" . $data->UM_FUNK . \"', \";\n\t\t$sqlInsertStatement .= \"'\" . $data->UM_RANGERING . \"', \";\n\t\t$sqlInsertStatement .= \"'\" . $data->UM_SORT . \"', \";\t\t\n\t\t$sqlInsertStatement .= \"'\" . $data->UM_VARAFOR . \"'\";\n//\t\t$sqlInsertStatement .= \"'\" . $data->UM_MERKNAD. \"'\";\n\t\n\t\t$sqlInsertStatement .= \");\";\n\t\t\n\t\t$this->uttrekksBase->executeStatement($sqlInsertStatement);\n }", "public function write();", "public function write();", "function fwritecsv($filePointer, $dataArray, $delimiter, $enclosure)\r\n {\r\n // Write a line to a file\r\n // $filePointer = the file resource to write to\r\n // $dataArray = the data to write out\r\n // $delimeter = the field separator\r\n\r\n // Build the string\r\n $string = \"\";\r\n\r\n // No leading delimiter\r\n $writeDelimiter = FALSE;\r\n foreach($dataArray as $dataElement) {\r\n // Replaces a double quote with two double quotes\r\n $dataElement=str_replace(\"\\\"\", \"\\\"\\\"\", $dataElement);\r\n\r\n // Adds a delimiter before each field (except the first)\r\n if($writeDelimiter) $string .= $delimiter;\r\n\r\n // Encloses each field with $enclosure and adds it to the string\r\n $string .= $enclosure . $dataElement . $enclosure;\r\n\r\n // Delimiters are used every time except the first.\r\n $writeDelimiter = TRUE;\r\n } // end foreach($dataArray as $dataElement)\r\n\r\n // Append new line\r\n $string .= \"\\n\";\r\n\r\n // Write the string to the file\r\n fwrite($filePointer,$string);\r\n }", "function write_csv($array)\n {\n $handle = fopen($this->filename, \"w\");\n foreach ($address_array as $fields) \n {\n if ($fields != \"\") \n {\n fputcsv($handle, $fields);\n }\n }\n fclose($handle);\n }", "abstract public function write( $value );", "public function write(){\n\n\t\t$ACHFile = fopen($this->getFileLocation(), \"w\");\n\t\tfwrite($ACHFile, $this->getData());\n\t\tfclose($ACHFile);\n\n\t\treturn $this->getFileLocation();\t\n\t}", "abstract public function write($data);", "protected function _write() {}", "public function writeData($data, $instrument_code, $file)\n {\n\n $data = $data->groupBy('market_id');\n\n $strToadd = '';\n\n foreach ($data as $trade_date => $instrumentData) {\n\n $instrumentData = $instrumentData->unique('total_volume')->values();\n\n\n $i = 0;\n foreach ($instrumentData as $row) {\n $last_minute_total_volume = $row->total_volume;\n\n if (isset($instrumentData[$i + 1]))\n $prev_minute_of_lastminute_volume = $instrumentData[$i + 1]->total_volume;\n else\n {\n $prev_minute_of_lastminute_volume = 0;\n\n }\n\n\n $last_minute_traded_vol = $last_minute_total_volume - $prev_minute_of_lastminute_volume;\n\n if($last_minute_traded_vol<0) // skip some negative value specially for dsex\n continue;\n\n $time_formated = $row['lm_date_time']->format('H:i');\n $date_formated = $row['lm_date_time']->format('d/m/Y');\n\n\n if ($this->debug) {\n $strToadd .= $instrument_code . ',' . $time_formated . ',' . $date_formated . ',' . $row->close_price . ',' . $row->close_price . ',' . $row->close_price . ',' . $row->close_price . ',' . $last_minute_traded_vol . ',' . $row->total_volume . \"\\n\";\n dump(\"last_minute_total_volume=$last_minute_total_volume | prev_minute_of_lastminute_volume=$prev_minute_of_lastminute_volume = $last_minute_traded_vol\");\n } else {\n $strToadd .= $instrument_code . ',' . $time_formated . ',' . $date_formated . ',' . $row->close_price . ',' . $last_minute_traded_vol . \"\\n\";\n\n }\n\n $i++;\n }\n\n\n }\n\n Storage::append($file, $strToadd);\n\n if (!$this->debug) {\n $zipper = new \\Chumper\\Zipper\\Zipper;\n $files = glob(storage_path() . '/app/plugin/intra/*');\n $zipper->make(storage_path() . '/app/plugin/intra.zip')->add($files)->close();\n }\n\n\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 }", "private function write_csv($array)\n {\n $handle = fopen($this->filename, 'w');\n foreach ($array as $fields){\n fputcsv($handle,$fields);\n }\n fclose($handle);\n }", "abstract protected function _write();", "public function write($data);", "public function write($data);", "public function write($data);", "public function write($data);", "abstract function WriteDefData($defdata=NULL);", "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 WriteLogFile($fileName, &$questionData, &$tutorData, &$commentData)\n\t{\n\t\t$handle = fopen($fileName, 'c');\n\t\tif (!$handle)\n\t\t\treturn false;\n\t\t// write disclaimer and question data block identifier\n\t\t$fileData = \"# Automatically generated file - Do not Change ! #\\n###QuestionData###\\n\";\n\t\t// write all question data to the file\n\t\tforeach($questionData as $id => $entry)\n\t\t{\n\t\t\t// the order is id, question and the number of times each of the six answers was picked\n\t\t\t$fileData = $fileData . $id . \";\";\n\t\t\tfor ($i = 0; $i < 6; $i++)\n\t\t\t\t$fileData = $fileData . $entry[$i] . \";\";\n\t\t\t$fileData = $fileData . $entry[6] . \"\\n\";\n\t\t}\n\t\t// write tutor data block identifier\n\t\t$fileData = $fileData . \"###TutorData###\\n\";\n\t\t// write all tutor data to the file\n\t\tforeach($tutorData as $id => $entry)\n\t\t{\n\t\t\t// the order is tutor name and the number of times each of the six answers was picked\n\t\t\t$fileData = $fileData . $id . \";\";\n\t\t\tfor ($i = 0; $i < 5; $i++)\n\t\t\t\t$fileData = $fileData . $entry[$i] . \";\";\n\t\t\t$fileData = $fileData . $entry[5] . \"\\n\";\n\t\t}\n\t\t// write comment data block identifier\n\t\t$fileData = $fileData . \"###CommentData###\";\n\t\t// write comment data\n\t\tforeach($commentData as $comment)\n\t\t\t// each comment is escapd by a new line containing three tilde characters\n\t\t\t$fileData = $fileData . \"\\n\" . $comment . \"\\n~~~\";\n\t\t// write the generated data to the file and close it\n\t\t// use exclusive lock\n\t\tflock($handle, LOCK_EX);\n\t\tftruncate($handle, 0);\n\t\tfwrite($handle, $fileData);\n\t\tfflush($handle);\n\t\tflock($handle, LOCK_UN);\n\t\tfclose($handle);\n\t\treturn true;\n\t}", "public function writeCsv($data)\n {\n \t//create a file\n \t$file_path = WEBROOT_DIR.\"/files/postnotification/\";\n \t$filename = \"twitter_post_notification_\".date(\"Y.m.d\").\".csv\";\n \n \t//check if file exist\n \tif (file_exists($file_path.$filename)) {\n \t\t$fp = fopen($file_path.$filename, 'a'); //get the file object\n \t\tfputcsv($fp, $data); //write the file\n \t} else {\n \t\t$fp = fopen($file_path.$filename, 'a');\n \t\t$head_data = array(\"twitter_id\",\"content\");\n \t\tfputcsv($fp, $head_data);\n \t\tfputcsv($fp, $data);\n \t}\n \tfclose($fp); //close the file\n \treturn true;\n }", "function export_csv()\n {\n $filter_custom_fields = JRequest::getVar('filter_custom_fields');\n $a_custom_fields = $this->_build_a_custom_fields($filter_custom_fields);\n $data = array();\n $k=0;\n for($i=0; $i<count($a_custom_fields);$i++ )\n {\n $custom_field = $a_custom_fields[$i];\n $query = &$this->_buils_export_query($custom_field);\n $this->_db->setQuery((string)$query);\n $rows = $this->_db->loadAssocList();\n foreach ($rows as $row)\n {\n $data[$k]['virtuemart_custom_id'] = $row['virtuemart_custom_id'];\n $data[$k]['virtuemart_product_id'] = $row['virtuemart_product_id'];\n $data[$k]['product_name'] = iconv(\"utf-8\", \"windows-1251\",$row['product_name']);\n $data[$k]['intvalue'] = iconv(\"utf-8\", \"windows-1251\",str_replace('.', ',', $row['intvalue']));\n $data[$k]['custom_title'] = iconv(\"utf-8\", \"windows-1251\",$row['custom_title']);\n $k++;\n }\n }\n $name = 'com_condpower.csv';\n $path = JPATH_ROOT.DS.'tmp'.DS.$name;\n if ($fp = fopen($path, \"w+\"))\n {\n foreach ($data as $fields) {\n fputcsv($fp, $fields, ';', '\"');\n }\n fclose($fp);\n }\n else\n {\n return array(FALSE, JTEXT::_('COM_CONDPOWER_ERROR_OPEN_TO_EXPORT'));\n }\n// $href = str_replace('administrator/', '', JURI::base()).'tmp/'.$name;\n// $href = JURI::base().'components/com_condpower/download.php?path='.$path;\n return array(TRUE,'OK');\n\n }", "function fwritecsv($handle, $fields, $delimiter = ',', $enclosure = '\"', $null = '') {\n if (!is_array($fields)) { return false; }\n\n // Walk through the data array\n for ($i = 0, $n = count($fields); $i < $n; $i ++) {\n // Make sure the field data is compatible with output\n if (is_bool($fields[$i])) { $fields[$i] = ($fields[$i] === 'true' ? 'TRUE' : 'FALSE'); } // Convert Bools to string\n if (is_null($fields[$i])) { $fields[$i] = $null; } // Convert nulls to string\n if (!is_scalar($fields[$i])) { $field[$i] = ''; } // Field is not a single value\n\n if (!is_numeric($fields[$i]) || $delimiter == '.' || strpos($fields[$i], $delimiter) !== false) {\n // Clean up the data so it fits correctly into cells without whitespace issues or enclosure character problems\n $fields[$i] = trim($fields[$i]);\n $search = array($enclosure, \"\\r\\n\");\n $replace = array($enclosure.$enclosure, \"\\n\");\n $fields[$i] = $enclosure.str_replace($search, $replace, $fields[$i]).$enclosure;\n }\n }\n\n // Combine the data array with $delimiter and write it to the file\n $line = implode($delimiter, $fields) . \"\\r\\n\";\n fwrite($handle, $line);\n\n // Return the length of the written data\n return strlen($line);\n}", "private function writeOrdersData()\n {\n // counter that will remember number of orders that we did write\n $addedOrders = 0;\n\n // get collection of orders\n $ordersCollection = Mage::getModel('sales/order')->getCollection();\n\n // we want orders that do not have a proper customer instance\n $ordersCollection->addFieldToFilter('customer_id', array(\n 'eq' => 0, \n 'null' => true\n ));\n\n // we want to pick up from where we stoped\n $ordersCollection->addAttributeToFilter('entity_id', array (\n 'gt' => $this->currentStatus->getLastOrderId()\n ));\n\n // we want to get collection in certain order\n $ordersCollection->addAttributeToSort('entity_id', 'ASC');\n\n // set collections page size to write limit\n $ordersCollection->setPageSize($this->writesLimit);\n\n // iterate over all orders and write them to data file\n foreach ($ordersCollection as $order)\n {\n // write order\n $this->writeOrder($order);\n\n // increase order counter\n $addedOrders++;\n\n // remember what was last order Id\n $this->currentStatus->setLastOrderId($order->getEntityId());\n\n // if we are reaching time limit we should stop processing \n if ($this->isTimeLimitReached()) {\n throw new Exception('Time limit reached');\n }\n }\n\n // return number of orders that we added to data file\n return $addedOrders;\n }", "public function write_file ( $content ) {\r\n\r\n\t}", "public function writeRawAll()\n {\n foreach( $this->values as $name => $value ){\n $this->_write_raw( s($name), s($value) );\n }\n }", "abstract protected function write();", "private function fputcsvCustom($filePointer,$dataArray,$delimiter=\";\",$enclosure=\"\\\"\")\n {\n $string = \"\";\n\n // for each array element, which represents a line in the csv file...\n foreach($dataArray as $trsKey => $trsValue) {\n\n $elems = array($trsKey, $trsValue);\n // No leading delimiter\n $writeDelimiter = FALSE;\n\n foreach($elems as $dataElement){\n // Replaces a double quote with two double quotes\n $dataElement=str_replace(\"\\\"\", \"\\\"\\\"\", $dataElement);\n\n // Adds a delimiter before each field (except the first)\n if($writeDelimiter) $string .= $delimiter;\n\n // Encloses each field with $enclosure and adds it to the string\n $string .= $enclosure . $dataElement . $enclosure;\n\n // Delimiters are used every time except the first.\n $writeDelimiter = TRUE;\n }\n // Append new line\n $string .= \"\\n\";\n\n } // end foreach($dataArray as $line)\n\n // Write the string to the file\n fwrite($filePointer,$string);\n }", "function write_csv($arrays)\n {\n $handle = fopen($this->filename, \"w\");\n foreach ($arrays as $array) {\n fputcsv($handle, $array);\n }\n fclose($handle);\n }", "function s_m_put_txt_data_store($model_name, $filename, $rows, $columnames){\r\n // open in write mode\r\n $open = @fopen($filename, \"w\");\r\n if(!$open){\r\n $reply[\"alert\"][\"text\"] = \"System error (f102, $filename)\";\r\n f_return_json($reply);\r\n }\r\n // write the column names\r\n fwrite($open, implode(\";\", $columnames) . \"\\r\\n\");\r\n for($k = 0; $k < count($columnames); $k++){\r\n // must be trimt\r\n $columnames[$k] = trim($columnames[$k]);\r\n }\r\n // write the rows\r\n for($r = 0; $r < count($rows); $r++){\r\n for($k = 0; $k < count($columnames); $k++){\r\n // replace ; by |, needed for storing in csv files\r\n $rows[$r][$columnames[$k]] = str_replace(\";\", \"|\", $rows[$r][$columnames[$k]]);\r\n }\r\n fwrite($open, implode(\";\", $rows[$r]) . \"\\r\\n\");\r\n }\r\n fclose($open);\r\n}", "public function _write($data)\n {\n }", "public function write(array $values){\n // var_dump($values);\n $sql = \"INSERT INTO client(nom, prenom, mail, adresse, cp, ville, mdp)\n VALUES(:nom, :prenom, :mail, :adresse, :cp, :ville, :mdp)\";\n $this->database->executeSql($sql, $values);\n//POBLEME,COMMANDE N'A PAS DE VALEUR PAR DEFAUT\n }", "public function write($data) {\n\t}", "protected function csvAddData($data)\n {\n if (0==strlen($data)) {\n return;\n }\n if ($this->getDeployOption('download')) {\n // send first headers\n echo $data.\"\\n\";\n flush();\n ob_flush();\n }\n if ($this->getDeployOption('store')) {\n // open file handler\n fwrite($this->_outFile, $data.\"\\n\");\n }\n }", "protected function _write() {\n\n if ( !empty( $this->rid ) && $this->rid instanceof ID ) {\n $this->cluster_id = $this->rid->cluster;\n $this->cluster_position = $this->rid->position;\n }\n\n $this->record->setRid( new ID( $this->cluster_id, $this->cluster_position ) );\n\n $this->_writeShort( $this->cluster_id );\n $this->_writeLong( $this->cluster_position );\n\n if( $this->_transport->getProtocolVersion() >= 23 ){\n $this->_writeBoolean( $this->update_content );\n }\n\n $this->_writeBytes( CSV::serialize( $this->record ) );\n $this->_writeInt( $this->record_version );\n $this->_writeChar( $this->record_type );\n $this->_writeBoolean( $this->mode );\n\n }", "function file_write ($filename, $data) {\r\n $fd = fopen($filename, 'w') or die(\"Can't open file $filename for write!\");\r\n fwrite($fd, $data);\r\n fclose($fd);\r\n }", "function extract_fputcsv($filePointer,$dataArray,$delimiter,$enclosure)\n {\n // $filePointer = the file resource to write to\n // $dataArray = the data to write out\n // $delimeter = the field separator\n \n // Build the string\n $string = \"\";\n \n // No leading delimiter\n $writeDelimiter = FALSE;\n foreach($dataArray as $dataElement)\n {\n // Replaces a double quote with two double quotes\n $dataElement=str_replace(\"\\\"\", \"\\\"\\\"\", $dataElement);\n \n // Adds a delimiter before each field (except the first)\n if($writeDelimiter) $string .= $delimiter;\n \n // Encloses each field with $enclosure and adds it to the string\n $string .= $enclosure . $dataElement . $enclosure;\n \n // Delimiters are used every time except the first.\n $writeDelimiter = TRUE;\n } // end foreach($dataArray as $dataElement)\n \n // Append new line\n $string .= \"\\n\";\n \n // Write the string to the file\n fwrite($filePointer,$string);\n }", "protected function _writeFileHeader() {}", "function create_csv_string($data) {\n if (!$fp = fopen('php://temp', 'w+')) return FALSE;\n\n // Loop data and write to file pointer\n foreach ($data as $line) fputcsv($fp, $line);\n\n // Place stream pointer at beginning\n rewind($fp);\n\n // Return the data\n return stream_get_contents($fp);\n\n }", "private function writeToFile($Data){\n //Do not write to log files if Flag is turned off\n if($this->_status != self::OFF )\n {\n fwrite( $this->file_handle , $Data.PHP_EOL);\n }\n }", "public function saveDataToFile()\n {\n\n }", "function export_data_to_csv($data,$filename='export',$delimiter = ';',$enclosure = '\"')\n{\n // Tells to the browser that a file is returned, with its name : $filename.csv\n header(\"Content-disposition: attachment; filename=$filename.csv\");\n // Tells to the browser that the content is a csv file\n header(\"Content-Type: text/csv\");\n\n // I open PHP memory as a file\n $fp = fopen(\"php://output\", 'w');\n\n // Insert the UTF-8 BOM in the file\n fputs($fp, $bom =( chr(0xEF) . chr(0xBB) . chr(0xBF) ));\n\n // I add the array keys as CSV headers\n fputcsv($fp,array_keys($data[0]),$delimiter,$enclosure);\n\n // Add all the data in the file\n foreach ($data as $fields) {\n fputcsv($fp, $fields,$delimiter,$enclosure);\n }\n\n // Close the file\n fclose($fp);\n\n // Stop the script\n die();\n}", "public function saveDataIntoCSV($data = array())\n {\n if(!is_array($data) || count($data) <= 0) {\n throw new Exception('Please input a valid array data set');\n }\n\n $fileNameWithPath = $this->dir . '/' . $this->fileName;\n\n if(false === $this->isFileExists()) {\n $headers = array_keys($data);\n $file = fopen($fileNameWithPath, 'a');\n fputcsv($file, $headers);\n } else {\n $file = fopen($fileNameWithPath, 'a');\n }\n\n $row = array_values($data);\n fputcsv($file, $row);\n\tfclose($file);\n }", "private function write_csv($array) //public function write_address_book($addresses_array) //code to write $addresses_array to file $this->filenam\n {\n if(is_writeable($this->filename)){\n $handle = fopen($this->filename, 'w');\n foreach($addresses_array as $subArray){\n fputcsv($handle, $subArray); \n }\n }\n fclose($handle);\n }", "function writeData($db, $cnumber, $ctype, $cvv, $cname)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cid = substr($cnumber, 0, 3).$ctype.$cvv;\n\t\t\t\t\t\t$stmt = $db->prepare(\"INSERT INTO businessTransaction (number, type, cvv, name, cid) VALUES (:cnumber,:ctype,:cvv,:cname,:cid)\");\n\t\t\t\t\t\t$stmt->execute(array(':cnumber' => \"$cnumber\", ':ctype' => \"$ctype\", ':cvv' => \"$cvv\", ':cname' => \"$cname\", ':cid' => $cid));\n\t\t\t\t\t}", "public function write(array $data);", "private static function save() {\n\t\tif(self::$data===null) throw new Excepton('Save before load!');\n\t\t$fp=fopen(self::$datafile,'w');\n\t\tif(!$fp) throw new Exception('Could not write data file!');\n\t\tforeach (self::$data as $item) {\n\t\t\tfwrite($fp,$item); // we use the __toString() here\n\t\t}\n\t\tfclose($fp);\n\t}", "function csv_export() {\n\t\t$export = \"\";\n\n\t\t$record = $this->records[0];\n\t\t$export = \"ORD,5322048,\" . substr($record[\"batch_date\"],5,2) . substr($record[\"batch_date\"],8,2) . \n\t\t\t\t substr($record[\"batch_date\"],2,2) . \",,3,,,5322048,,5322048\\n\";\n\t\t\n\t\t$sequence = 0;\n\t\tforeach($this->records as $record) {\n//print_r($record);\n\t\t\t$sequence++;\n\t\t\t$line = \"DET,\" . $sequence . \",\" . $record[\"sku\"] . \",\" . $record[\"qty\"] . \",,,,,,\\n\";\n\t\t\t$export .= $line;\n\t\t}\n\n\t\treturn $export;\n\t}", "protected function _writeFileBody() {}", "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 }", "function LogArrayToFile($data = NULL){\n if($data == NULL){\n $data = JRequest::get('POST');\n }\n if( !($file = fopen( JPATH_BASE.\"/../log.txt\", \"a+\") )) { // Um diretorio acima da raiz do joomla\n echo 'Erro ao criar arquivo!'; \n } else {\n fwrite($file, date(\"Y-m-d h:i:s\"). \" | \");\n foreach($data AS $item => $value){\n $conteudo = $item . '> '.$value . ' | ';\n if( fwrite($file, $conteudo) === FALSE ){\n echo 'Erro ao escrever dados';\n }\n }\n fwrite($file, \"\\n\");\n } \n}", "function storeData(){\n global $data_file;\n $content = file_get_contents($data_file); //failo turinys\n $formData = implode(',', $_POST); //konvertuojame POST masyva i string\n $content .= $formData.\"\\n\"; //ivedame po kiekvieno submit pabaiga prie formos duomenu pridedame eilutes pabaigos zenkla\n file_put_contents($data_file, $content); //rasom i txt faila formos duomenis\n var_dump($content);\n}", "public function dataobjectfile($name) {\n\t\t$array = array();\n\t\t$array[] = \"#\" . implode(\"|\", $this->objectorder);\n\t\tforeach (array_keys($this->do_data) as $k1) {\n\t\t\t$ret = '';\n\t\t\t$i = 0;\n\t\t\tforeach ($this->objectorder as $key) {\n\t\t\t\tif ($i++)\n\t\t\t\t\t$ret .= '|';\n\t\t\t\tif ($this->do_data[$k1][$key] === \"\" || !isset($this->do_data[$k1][$key]))\n\t\t\t\t\t$this->do_data[$k1][$key] = \"NULL\";\n\t\t\t\t$ret .= $this->do_data[$k1][$key];\n\t\t\t}\n\t\t\t$array[] = $ret;\n\t\t}\n\t\tfile_put_contents($name, implode(\"\\n\", $array) . \"\\n\");\n\t\treturn;\n\t}", "function save_product_csv_db($csv_db_file){\n // echo '<pre>Saving file...</pre>';\n $fp = fopen($csv_db_file, 'w');\n foreach($this->db as $tmp){\n $val = $tmp->plu . \",\" . $tmp->name . \",\" . $tmp->picture;\n $val = explode(',', $val);\n fputcsv($fp, $val);\n }\n fclose($fp);\n }", "protected function saveToFile($data, $file)\n {\n file_put_contents($file, \"<?php\\nreturn \".var_export($data, true).\";\\n\", LOCK_EX);\n }", "private function write_csv($array)\n {\n if (is_writable($this->filename)) \n {\n $handle = fopen($this->filename, \"w\");\n foreach($array as $entries) \n {\n fputcsv($handle, $entries);\n }\n fclose($handle);\n }\n }", "function saveSQL($data,$filename,$remark)\r\n {\r\n $handle = fopen($filename,\"a\");\r\n fwrite($handle,\"-- --\".date(\"D M j G:i:s\").\" $remark\\n \".$data.\"\\n\");\r\n fclose($handle);\r\n }", "private function write_multi($data){\r\n $this->flag_multi = TRUE;\r\n if($this->TRNS !== NULL){\r\n if($data[0] == \"ENDTRNS\"){\r\n //add array of data to transaction object\r\n $this->lines[] = $data;\r\n $this->TRNS->add_list($this->lines);\r\n $this->lines = array();\r\n $this->flag_multi = FALSE;\r\n }else{\r\n //add row of data to parser object until the multi line transaction is complete.\r\n $this->lines[] = $data;\r\n }\r\n }else{\r\n $this->TRNS = new transaction_object(\"TRNS\");\r\n $this->TRNS->add_header(array($this->default_headers[\"TRNS\"], $this->default_headers[\"SPL\"]));\r\n $this->lines[] = $data;\r\n }\r\n }", "public function store() {\n $logData = \"=========================================\\n\";\n $logData .= \"Date Time: \".$this->record_date.\"\\n\";\n $logData .= $this->title.\" (\".$this->type.\") \\n\";\n if(!empty($this->data)) {\n $logData .= var_export($this->data, true).\"\\n\";\n }\n \n file_put_contents($this->file, $logData, FILE_APPEND);\n \n }", "private function writeToFile($data){\n \n $fp = fopen('../../json/results.json', 'w');\n fwrite($fp, json_encode($data));\n fclose($fp);\n \n }", "protected function _writeHeader() {\n $this->stream->write(\n implode ($this->colDelim, array_values ($this->colName))\n );\n // Insert Newline\n $this->stream->write($this->lineDelim);\n $this->headerWritten= TRUE;\n }", "function writePhp($dataArry, $fileName) {\n $langFile = fopen($fileName, \"w\") or die(\"Unable to open file!\");\n $txt = \"<?php\\r\\n\";\n fwrite($langFile, $txt);\n foreach ($dataArry as $key => $value) {\n if(strpos($key, 'comment') !== false) {\n $txt = \"\\r\\n\".$value.\"\\r\\n\";\n } else {\n $txt = \"$$key = $value;\\r\\n\";\n }\n fwrite($langFile, $txt);\n }\n $txt = \"?>\";\n fwrite($langFile, $txt);\n fclose($langFile);\n }", "protected function addRowToCsvData(array $values) {\n $outstream = fopen(\"php://temp\", 'r+');\n fputcsv($outstream, $values, $this->sep, '\"');\n rewind($outstream);\n $csv = stream_get_contents($outstream);\n fclose($outstream);\n $this->data .= $csv;\n }", "public function stream_write($data) {\n $stop_data = explode(\"\\n\", $data); //creates array of stop data from stream\n \n // $buff contains the incomplete last line of data that was present when\n // the last batch of data was written to the database (or nothing if there\n // were no incomplete lines). This is therefore prefixed to the first item\n // in the $stop_data array\n $stop_data[0] = $this->buff.$stop_data[0];\n \n // Save the last line of this batch of data to the buffer (in case it is\n // incomplete. Will be prefixed to first item in next batch\n $stop_data_count = count($stop_data);\n $this->buff = $stop_data[$stop_data_count - 1];\n unset($stop_data[$stop_data_count - 1]); //delete last item in $stop_data\n\n $insert = \"INSERT INTO \".$this->temporary_database.\" \".$this->stop_reference_schema;\n\n // For each stop_data item in turn:\n for ($i=0; $i < count($stop_data); $i++) {\n //remove characters from front and back ('[',']' and newline character)\n $trimmed = trim($stop_data[$i], \"[]\\n\\r\"); \n\n $entry = str_getcsv($trimmed); //parses the CSV string into an array\n\n // To be of interest, the line must have 12 pieces of data, and should \n // exclude the URA Version array (must start with a '0')\n if(count($entry) == 12 && $entry[0] == 0) {\n //place quotes around strings / escape special characters\n\t $entry[1] = $this->DBH->quote($entry[1]); //stoppointname\n\t $entry[2] = $this->DBH->quote($entry[2]); //stopid\n\t $entry[3] = $this->DBH->quote($entry[3]); //stopcode1\n\t $entry[4] = $this->DBH->quote($entry[4]); //stopcode2\n\t $entry[5] = $this->DBH->quote($entry[5]); //stopointtype\n\t $entry[6] = $this->DBH->quote($entry[6]); //towards\n\t $entry[8] = $this->DBH->quote($entry[8]); //stoppointindicator\n\n\t // Set up string to insert values\n $insert_entry = $insert.\"values ($entry[1],$entry[2],$entry[3],\"\n\t \t\t \t .\"$entry[4],$entry[5],$entry[6],$entry[7],\"\n\t\t\t\t .\"$entry[8],$entry[9],$entry[10],$entry[11])\";\n\n\t $this->database->execute_sql($insert_entry);\n }\n }\n return strlen($data);\n }", "function write($data) {\n if (!@fwrite($this->_handler, $data, strlen($data))) {\n \tFire_Error::throwError(sprintf('Failed to write %s data to %s file.',\n \t $data,\n \t $this->_file\n \t ), __FILE__, __LINE__\n \t);\n }\n }", "public function writeFile($path, $data);", "public function writeAll( array $data ) {\n\n\t\t$this->_data = $data;\n\t}", "public function write($data, $filename = '', $uploadDir = '');", "public function toCSV();", "public function csv()\n {\n // if dirty data exists\n $this->swallow();\n // if redirecting\n if ($this->redirect) {\n /*header(\"Location: {$this->redirect}\");\n // more headers\n foreach ( $this->headers as $header ) {\n header($header);\n }*/\n $this->redirect($this->redirect, array(), false);\n } else {\n // header xml data\n header('Content-Type: application/csv');\n //过滤$CFG\n if (!empty($this->vars['CFG'])) {\n unset($this->vars['CFG']);\n }\n // more headers\n foreach ($this->headers as $header) {\n header($header);\n }\n // set varibales data\n $results = Utility::array2CSV($this->vars);\n // send\n echo $results;\n }\n }", "function writeToCSV($url,$dataArray) {\n print_r(\"Opening CSV file ... \");\n $file = fopen($url,\"a\");\n if($file) {\n print_r(\"SUCCESS\\n\");\n } else {\n print_r(\"FAILED\\n\");\n }\n\n foreach($dataArray as $line) {\n print_r(\"Writing line to CSV ... \");\n\n if(fputcsv($file,$line)) {\n print_r(\"SUCCESS\\n\");\n } else {\n print_r(\"FAIL\\n\");\n }\n }\n fclose($file);\n}", "private function exportData($data) {\n foreach ($data as $info) {\n unset($info['password']);\n foreach ($info as $field => $value) {\n if (!(strpos($field, \"timestamp\") === false) || $field==\"hired_on\" || $field==\"left_on\") {\n $info[$field] = $this -> createDatesFromTimestamp($value);\n }\n }\n $this -> lines[] = implode($this -> separator, $info);\n }\n }", "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 }", "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 writeRecord($data) {\n if ($this->_hasHeader() && !$this->headerWritten)\n $this->_writeHeader();\n \n $cols= array_keys ($data);\n \n if ($this->_hasHeader())\n $cols= array_keys ($this->colName);\n \n foreach ($cols as $idx => $colName) {\n if (isset ($data[$colName]))\n $this->_writeColumn ($data[$colName]);\n else\n $this->_writeColumn('');\n }\n \n // Insert Newline\n $this->stream->write($this->lineDelim);\n $this->delimWritten= TRUE;\n }", "function writeToFile($handle, $cleanData){\n $username = htmlentities($cleanData['username']);\n $password = htmlentities($cleanData['password']);\n $title = htmlentities($cleanData['title']);\n $firstname = htmlentities($cleanData['firstname']);\n $surname = htmlentities($cleanData['surname']);\n $email = htmlentities($cleanData['email']);\n /* The verification process ensured that none of the inputs can contain commas, so they are an effective delimiter */\n $text = $username.','.$password.','. $title .','. $firstname.','. $surname.','. $email.PHP_EOL;\n fwrite( $handle , $text ) ;\n}", "public function save() {\n $tmpHandle = new \\SplFileObject('php://temp', 'w+');\n $tmpData = '';\n\n $tmpHandle->fputcsv($this->model->columns());\n\n foreach($this->all() as $record) {\n $tmpHandle->fputcsv($record->toArray());\n $record->exists = true;\n }\n\n $tmpHandle->rewind();\n\n while ( ! $tmpHandle->eof()) {\n $tmpData .= $tmpHandle->fgets();\n }\n\n $this->file->flock(\\LOCK_EX | \\LOCK_NB);\n $this->file->ftruncate(0);\n $this->file->rewind();\n $this->file->fwrite($tmpData);\n $this->file->flock(\\LOCK_UN);\n }", "public function saveData($location) {\n\n\t\tif (!isset($location)) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tfile_put_contents($location, \"\");\n\t\tforeach ($this->_data as $key => $val) {\n\t\t\tfile_put_contents($location, $key . \":\" . implode(\",\", $val) . PHP_EOL, FILE_APPEND);\n\t\t}\n\t}", "public function writeAndClose();", "function create_csv($info, $headers, $filename) {\n $new_file = fopen($_SERVER['DOCUMENT_ROOT'] . \"/php-tutors/csvs_for_download/\" . $filename, \"w\");\n\n foreach ($headers as $column) {\n fwrite($new_file, $column);\n fwrite($new_file, \",\");\n }\n fwrite($new_file, \"\\n\");\n\n foreach ($info as $one_row) {\n foreach ($one_row as $one_cell) {\n fwrite($new_file, $one_cell);\n fwrite($new_file, \",\");\n }\n fwrite($new_file, \"\\n\");\n }\n fclose($new_file);\n }", "function csv_export($extConf,$results,$q_data,$ff_data,$temp_file,$only_this_lang,$only_finished,$with_authcode,$feUserFields=array()){\r\n $this->extConf = $extConf;\r\n $this->results = $results;\r\n $this->q_data = $q_data;\r\n $this->ff_data = $ff_data;\r\n $this->temp_file = $temp_file;\r\n\t\t$this->only_this_lang = $only_this_lang;\r\n\t\t$this->only_finished = $only_finished;\r\n\t\t$this->with_authcode = $with_authcode;\r\n\t\t$this->feUserFields = $feUserFields;\r\n \r\n //t3lib_div::devLog('extConf', 'ke_questionnaire Export Mod', 0, $this->extConf);\r\n\t\t//t3lib_div::devLog('with_authcode', 'ke_questionnaire Export Mod', 0, array($this->with_authcode));\r\n }", "function str_putcsv($data, $delimiter = ';') {\n $fh = fopen('php://temp', 'rw'); # don't create a file, attempt\n # to use memory instead\n\n # write out the headers\n fputcsv($fh, $this->getArrayKeys($data[0]), $delimiter);\n\n # write out the data\n $count = 1;\n foreach ( $data as $row ) {\n $row = array_merge([$count++], $row);\n fputcsv($fh, $row, $delimiter);\n }\n rewind($fh);\n $csv = stream_get_contents($fh);\n fclose($fh);\n\n return $csv;\n }", "public function export($filename, $data, $options = array(),$headers_text=array()) {\n\t\t$options = array_merge($this->defaults, $options);\n\t\t\n\t\t// open the file\n\t\tif ($file = @fopen($filename, 'w')) {\n\t\t\t// Iterate through and format data\n\t\t\t$firstRecord = true;\n\t\t\tforeach ($data as $record) {\n\t\t\t\t$row = array();\n\t\t\t\tforeach ($record as $model => $fields) {\n\t\t\t\t\t// TODO add parsing for HABTM\n\t\t\t\t\tif($model==\"BusinessOwner\"){ $fields = array_reverse($fields);}\n\t\t\t\t\tforeach ($fields as $field => $value) {\n\t\t\t\t\t\tif (!is_array($value)) {\n\t\t\t\t\t\t\tif (strpos(strtolower($field),'date') !== false) {\n\t\t\t\t\t\t\t\t$value = date('m-d-Y',strtotime($value));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (strtolower($field) == \"is_active\") {\n\t\t\t\t\t\t\t\t$value = ($value==1) ? \"Active\" : \"Inactive\";\n\t\t\t\t\t\t\t\t$field = \"Status\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (strtolower($field) == \"is_registered\") {\n\t\t\t\t\t\t\t\t$value = ($value==1) ? \"Registered\" : \"Guest\";\n\t\t\t\t\t\t\t\t$field = \"Type\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($firstRecord) {\n\t\t\t\t\t\t\t\t//$headers[] = $this->_encode($model . '.' . $field);\n\t\t\t\t\t\t\t\t$field = ucwords(str_replace('_', ' ', $field));\n\t\t\t\t\t\t\t\t$headers[] = $this->_encode($field);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$row[] = $this->_encode($value);\n\t\t\t\t\t\t} // TODO due to HABTM potentially being huge, creating an else might not be plausible\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$rows[] = $row;\n\t\t\t\t$firstRecord = false;\n\t\t\t}\n\n\t\t\tif ($options['headers']) {\n\t\t\t\t// write the 1st row as headings\n\t\t\t\tif($headers_text){\n\t\t\t\t\tfputcsv($file, $headers_text, $options['delimiter'], $options['enclosure']);\n\t\t\t\t}else{\n\t\t\t\t\tfputcsv($file, $headers, $options['delimiter'], $options['enclosure']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t// Row counter\n\t\t\t$r = 0;\n\t\t\tforeach ($rows as $row) {\n\t\t\t\tfputcsv($file, $row, $options['delimiter'], $options['enclosure']);\n\t\t\t\t$r++;\n\t\t\t}\n\n\t\t\t// close the file\n\t\t\tfclose($file);\n\t\t\t$ok = @chmod($filename, 0777);\t\t\t\n\t\t\treturn $r;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "protected function format($data, $file_handle)\n {\n $header = false;\n foreach ($data as $idx => $row)\n {\n $row = WF::cast_array($row);\n $this->validateRow($row);\n\n if ($this->write_bom && ftell($file_handle) === 0)\n fwrite($file_handle, Encoding::getBOM('UTF8'));\n\n if (!$header && $this->write_header)\n {\n $keys = array_keys($row);\n fputcsv($file_handle, $keys, $this->delimiter, $this->enclosure, $this->escape_char);\n $header = true;\n }\n fputcsv($file_handle, $row, $this->delimiter, $this->enclosure, $this->escape_char);\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 function output() {\n\t\t$csvdata = '';\n\t\t// open temp output file\n\t\t$out = fopen('php://temp', 'rwb');\n\t\t// output column headers\n\t\t$n = 0;\n\t\tforeach($this->colheads as $col) {\n\t\t\t$l = $this->strdelim.$col.$this->strdelim;\n\t\t\tif(++$n!=1) fputs($out, $this->fldsep);\n\t\t\tfputs($out, $l);\n\t\t\t}\n\t\tfputs($out, \"\\n\"); // unix newline here, convert later\n\t\t// output data\n\t\t$buffer = '';\n\t\tforeach($this->data as $row)\n\t\t\tfputcsv($out, $row, $this->fldsep, $this->strdelim);\n\t\t// re-read output, replacing unix-newline with dos newline\n\t\tfseek($out, 0);\n\t\twhile (($buffer = fgets($out, 4096)) !== false)\n\t\t\t$csvdata .= str_replace(\"\\n\",\"\\r\\n\",$buffer);\n\t\tfclose($out);\n\n\t\treturn $csvdata;\n\t\t}", "protected function writeToFile($data, $filename){\n //only write to file if there's a record\n if($data!=NULL){\n $mode = 'a+';\n if(isset(Doo::conf()->LOG_PATH))\n $filename = Doo::conf()->LOG_PATH . $filename;\n\n if($this->rotate_size!=0){\n if(file_exists($filename) && filesize($filename) > $this->rotate_size ){\n $mode = 'w+';\n }\n }\n\t\t\tDoo::loadHelper('DooFile');\n\t\t\t$file = new DooFile(0777);\n\t\t\t$file->create($filename, $data, $mode);\n }\n }", "function writeToAFile(string $file,array $array)\n\t{\n\t\treturn file_put_contents($file, implode(\"\\n\",$array));\n\t}" ]
[ "0.65786767", "0.6216486", "0.61950886", "0.61232644", "0.6089931", "0.60873866", "0.6083243", "0.6011548", "0.5940351", "0.58324045", "0.57993186", "0.5794615", "0.5777572", "0.57719797", "0.57719797", "0.5762782", "0.5720562", "0.5653917", "0.56199753", "0.560083", "0.55959195", "0.55864406", "0.55621123", "0.5541972", "0.5540094", "0.55150235", "0.55150235", "0.55150235", "0.55150235", "0.5512931", "0.5499403", "0.5485478", "0.54777986", "0.54436344", "0.54409164", "0.5431067", "0.54208547", "0.5416969", "0.5412661", "0.541265", "0.5405167", "0.5401293", "0.5397341", "0.5395896", "0.53891957", "0.5356239", "0.53509223", "0.53501123", "0.5343528", "0.53401136", "0.53381044", "0.53376794", "0.5332078", "0.5322131", "0.53155124", "0.5303245", "0.5302914", "0.53026456", "0.52926934", "0.5265736", "0.52544135", "0.5250341", "0.52460486", "0.5244054", "0.52392435", "0.523659", "0.52362967", "0.52350116", "0.52327156", "0.52240676", "0.52134645", "0.5212178", "0.5208689", "0.519023", "0.5181741", "0.51716864", "0.5170416", "0.5163603", "0.51618695", "0.51594144", "0.51499873", "0.5145634", "0.51443106", "0.5138761", "0.51366824", "0.5130715", "0.5129509", "0.5128032", "0.51096004", "0.5107262", "0.5069965", "0.50655097", "0.5064716", "0.504305", "0.50378406", "0.5037138", "0.5034649", "0.50276786", "0.5022901", "0.50149685" ]
0.57318354
16
Constructor method for RiskFilterListType
public function __construct($_filters) { parent::__construct(array('Filters'=>$_filters)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this->rules = array(\n new ezcDocumentOdtEmphasisStyleFilterRule(),\n new ezcDocumentOdtListLevelStyleFilterRule(),\n );\n }", "public function __construct()\n {\n parent::__construct();\n self::$_listType[true][true] = 'all';\n self::$_listType[true][false] = 'uncommitted';\n self::$_listType[false][true] = 'committed';\n self::$_listType[false][false] = 'all';\n\n $this->_includeUncommittedBlobs = false;\n $this->_includeCommittedBlobs = false;\n }", "public function createFilter();", "public function __construct()\n {\n $this->setupFilters();\n }", "public function __construct() {\n $this->_residentTypeArray = array(ResidentType::all);\n }", "public function __construct()\n\t{\n\n\t\t$this->request = \\RPC\\HTTP\\Request::getInstance();\n\t\t$this->addFilter( new \\RPC\\View\\Filter\\Form\\Field\\Pass() );\n\t\t$this->addFilter( new \\RPC\\View\\Filter\\Form\\Field\\Text() );\n\t\t$this->addFilter( new \\RPC\\View\\Filter\\Form\\Field\\Hidden() );\n\t\t$this->addFilter( new \\RPC\\View\\Filter\\Form\\Field\\Radio() );\n\t\t$this->addFilter( new \\RPC\\View\\Filter\\Form\\Field\\Checkbox() );\n\t\t$this->addFilter( new \\RPC\\View\\Filter\\Form\\Field\\Textarea() );\n\t\t$this->addFilter( new \\RPC\\View\\Filter\\Form\\Field\\Select() );\n\n\n\t}", "public function _construct()\r\n {\r\n $this->_init('items/melicategoriesfilter', 'category_id');\r\n }", "public function __construct()\n {\n parent::__construct();\n $this->setType('smile_virtualcategories/rule_condition_combine');\n }", "public function __construct($filterParams = [])\n {\n $this->filterParams = $filterParams;\n $this->init();\n }", "public function __construct()\n {\n $this->strategies = new ArrayObject();\n $this->filterComposite = new Filter\\FilterComposite();\n }", "public function __construct(FilterInterface $filter)\n {\n $this->filter = $filter;\n $this->listIdentifier = $filter->getListIdentifier();\n }", "public function __construct()\n {\n Mage_Core_Block_Template::__construct();\n $this->setTemplate('sam_layerednavigation/catalog/layer/filter.phtml');\n\n $this->_filterModelName = 'catalog/layer_filter_price';\n }", "public function __construct($name)\n {\n parent::__construct($name, 'ApplyFilter', '-1');\n $this->filterExpressions = new IndexedCollection();\n }", "public function __construct (array $filters) {\n\t\t$this->_filters = $filters;\n\t}", "public function createDefaultListFinderFilters(){\n \n $filters = array();\n \n $filters['id'] = new EqualsFilter('id', 'text', array(\n 'label' => 'ID'\n ));\n \n return $filters;\n \n }", "public function __construct()\n {\n $this->filterGeneratedData = Ark()->webService()->getFilterGeneratedData();\n }", "public function __construct()\n {\n $this->beforefilter('auth', array('except'=>array('index','show','sitemap')));\n }", "public function __construct(\\Shield\\Filter $filter)\n {\n $this->filter = $filter;\n $this->load();\n }", "public function __construct() \n\t{\n\t\t$strSqlModel = \n\t\t'SELECT cat.*, prd.* \n\t\tFROM \n\t\t(\n\t\t\t(\n\t\t\t\t(\n\t\t\t\t\t(\n\t\t\t\t\t\tproducts prd INNER JOIN categories cat ON (prd.prd_cat_id = cat.cat_id)\n\t\t\t\t\t) INNER JOIN prices pri ON (prd.prd_id = pri.pri_prd_id)\n\t\t\t\t) INNER JOIN countries cnt ON (pri.pri_cnt_id = cnt.cnt_id)\n\t\t\t) INNER JOIN currencies cur ON (cnt.cnt_cur_id = cur.cur_id)\n\t\t)\n\t\tINNER JOIN stocks stk ON (prd.prd_id = stk.stk_prd_id) \n\t\t'.CONF_TAG_LIST_SQL_CRITERIA.' \n\t\tGROUP BY prd.prd_id \n\t\tORDER BY cat.cat_id ASC, prd.prd_id ASC \n\t\t'.CONF_TAG_LIST_SQL_LIMIT.'';\n\t\t\n\t\t$intPageNbRow = CONF_LIST_PAGE_COUNT_ROW_PROD;\n\t\t\n\t\t$tabCritOperation = array();\n\t\t$tabCritOperation['cur_id'] = \"(cur.cur_id = \".CONF_TAG_LIST_SQL_OPE_VALUE.\")\";\n\t\t\n\t\tparent::__construct($strSqlModel, $tabCritOperation, $intPageNbRow);\n\t}", "function __construct( GetFilteredRecommendationParam $param )\n {\n parent::__construct( $param);\n }", "protected function _construct()\n {\n $this->_init('commercers_profilers_rule', 'rule_id');\n }", "public function __construct(PriceListRepositoryInterface $price_list)\n {\n parent::__construct();\n $this->repository = $price_list;\n $this->repository\n ->pushCriteria(\\Litepie\\Repository\\Criteria\\RequestCriteria::class)\n ->pushCriteria(\\Litecms\\Pricelist\\Repositories\\Criteria\\PriceListResourceCriteria::class);\n }", "function __construct() {\n\n\t\tadd_filter( WpSolrFilters::WPSOLR_FILTER_INCLUDE_FILE, [ $this, 'wpsolr_filter_include_file' ], 10, 1 );\n\t}", "public function __construct(FilterModel $pipeline)\n {\n parent::__construct();\n $this->pipeline = $pipeline;\n }", "public function __construct($list)\n {\n parent::__construct();\n $this->setList($list);\n }", "public function __construct($filter, $priority = 0)\n {\n $this->filter = $filter;\n $this->priority = $priority;\n }", "public function initialize()\n {\n // attributes\n $this->setName('choice_filter');\n $this->setPhpName('ChoiceFilter');\n $this->setClassName('\\\\ChoiceFilter\\\\Model\\\\ChoiceFilter');\n $this->setPackage('ChoiceFilter.Model');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);\n $this->addForeignKey('FEATURE_ID', 'FeatureId', 'INTEGER', 'feature', 'ID', false, null, null);\n $this->addForeignKey('ATTRIBUTE_ID', 'AttributeId', 'INTEGER', 'attribute', 'ID', false, null, null);\n $this->addForeignKey('OTHER_ID', 'OtherId', 'INTEGER', 'choice_filter_other', 'ID', false, null, null);\n $this->addForeignKey('CATEGORY_ID', 'CategoryId', 'INTEGER', 'category', 'ID', false, null, null);\n $this->addForeignKey('TEMPLATE_ID', 'TemplateId', 'INTEGER', 'template', 'ID', false, null, null);\n $this->addColumn('POSITION', 'Position', 'INTEGER', true, null, 0);\n $this->addColumn('VISIBLE', 'Visible', 'BOOLEAN', false, 1, null);\n $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);\n $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);\n }", "public function __construct() {\n\n\t\t// init restriction options\n\t\t$this->restriction_mode = $this->get_restriction_mode();\n\t\t$this->hiding_restricted_products = $this->hiding_restricted_products();\n\t\t$this->showing_excerpts = $this->showing_excerpts();\n\n\t\t// load restriction handlers\n\t\tif ( ! is_admin() ) {\n\t\t\t$this->posts_restrictions = $this->get_posts_restrictions_instance();\n\t\t\t$this->products_restrictions = $this->get_products_restrictions_instance();\n\t\t}\n\t}", "public function create(string $type, array $data = []) : FilterableAttributeListInterface\n {\n if ($type === Resolver::CATALOG_LAYER_CATEGORY) {\n return $this->objectManager->create(CategoryFilterableAttributeList::class, $data);\n } elseif ($type === Resolver::CATALOG_LAYER_SEARCH) {\n return $this->objectManager->create(FilterableAttributeList::class, $data);\n }\n throw new \\InvalidArgumentException('Unknown filterable attribtues list type: ' . $type);\n }", "abstract protected function getFilters();", "public function __construct() {\n\t\tparent::__construct('CronJobsList');\n\n\t\t$this->_SetCronJobsListValidationRules();\n\t}", "protected function defineListFilter()\n {\n // Initialise the filter\n $filter = $this->initFilter();\n if (!isset($filter['limit'])) {\n $filter['limit'] = array();\n }\n\n // Handle the page browsing variables\n if (isset($this->piVars['max'])) {\n $filter['limit']['max'] = $this->piVars['max'];\n }\n $filter['limit']['offset'] = isset($this->piVars['page']) ? $this->piVars['page'] : 0;\n\n // If the limit is still empty after that, consider the default value from TypoScript\n if (empty($filter['limit']['max'])) {\n $filter['limit']['max'] = $this->conf['listView.']['limit'];\n }\n\n // Handle sorting variables\n if (isset($this->piVars['sort'])) {\n $sortParts = GeneralUtility::trimExplode('.', $this->piVars['sort'], 1);\n $table = '';\n $field = $sortParts[0];\n if (count($sortParts) == 2) {\n $table = $sortParts[0];\n $field = $sortParts[1];\n }\n $order = isset($this->piVars['order']) ? $this->piVars['order'] : 'asc';\n $orderby = array(0 => array('table' => $table, 'field' => $field, 'order' => $order));\n $filter['orderby'] = $orderby;\n\n // If there were no variables, check a default sorting configuration\n } elseif (!empty($this->conf['listView.']['sort'])) {\n $sortParts = GeneralUtility::trimExplode('.', $this->conf['listView.']['sort'], 1);\n $table = '';\n $field = $sortParts[0];\n if (count($sortParts) == 2) {\n $table = $sortParts[0];\n $field = $sortParts[1];\n }\n $order = isset($this->conf['listView.']['order']) ? $this->conf['listView.']['order'] : 'asc';\n $orderby = array(0 => array('table' => $table, 'field' => $field, 'order' => $order));\n $filter['orderby'] = $orderby;\n }\n\n // Save the filter's hash in session\n $cacheKey = $this->prefixId . '_filterCache_default_' . $this->cObj->data['uid'] . '_' . $GLOBALS['TSFE']->id;\n $GLOBALS['TSFE']->fe_user->setKey('ses', $cacheKey, $filter);\n\n return $filter;\n }", "public function __construct($config = array())\n\t{\n\n\t\tif (empty($config['filter_fields'])) {\n\t\t\t$config['filter_fields'] = array(\n\t\t\t\t'id', 'a.id',\n\t\t\t\t'name', 'a.name',\n\t\t\t\t'enabled', 'a.enabled',\n\t\t\t\t'state', 'a.state',\n\t\t\t\t'created', 'a.created',\n\t\t\t\t'subscribers', 'a.subscribers',\n\t\t\t\t'created_by', 'a.created_by',\n\t\t\t\t'ordering', 'a.ordering'\n\t\t\t);\n\t\t}\n\n\t\tparent::__construct($config);\n\t}", "function filter(){\r\n\r\n return new BFilter();\r\n\r\n}", "function __construct($parent){\n\n parent::__construct($parent);\n \n // Workaround - older php versions can't have string concatination in \"static\" \n $this->list_quering['s_rate'] .= ' ('.trim(CONST_currency).')';\n\n // Initialise if needed\n if ( @$_GET['drop_list_once'] == $this->ID) bList::deleteList($this->ID,True);\n if ((@$_GET['init_list_once'] === 'yes') || $this->parent_ID == myOrg_ID) $this->init();\n \n // Set flag \"Recalculate the travel estimate if the rates are changed\" \n if ($this->myPost_bList()) $this->set_flagToBeUpdated();\n\n // Sanity\n if ($this->parent_ID != myOrg_ID) $this->list_showing['_s_plc'] = 'Yes / No';\n }", "public function __construct()\n {\n $this->recepten = new ArrayCollection();\n }", "public function __construct()\n {\n $this->beforeFilter(function()\n {\n\n });\n }", "public function _construct()\n {\n $this->_initProductCollection();\n parent::_construct();\n }", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.iosWebContentFilterSpecificWebsitesAccess');\n }", "public function __construct() {\n if ( func_num_args() > 0 ) {\n $this->list = func_get_args();\n } else {\n $this->list = array();\n }\n }", "public function __construct()\n\t\t\t\t{\n\t\t\t\t\t$this->miLista \t=\tarray();\t\t\t\t\t\n\t\t\t\t}", "public function __construct($stringFilter)\n {\n foreach (explode(static::LOGIC_OPERATOR, $stringFilter) as $filter) {\n $this->conditions[] = explode(' ', trim($filter));\n }\n }", "public function __construct(Zend_Filter_Interface $filter, $recursive = false)\r\n {\r\n $this->_filter = $filter;\r\n $this->recursive = (bool) $recursive;\r\n }", "public function __construct()\n {\n $cats = get_categories();\n if(class_exists('Category'))\n {\n if( is_array($cats) && count($cats)>0 ){\n $idC = 0;\n foreach($cats as &$cat)\n {\n $category = new Category($cat->term_id, $cat->name, $cat->slug, $cat->parent);\n $this->lstCat[$idC] = $category->convertToArray(array('id', 'name', 'slug', 'parent'));\n $this->lstCat[$idC]['aff']=true;\n $idC++;\n }unset($cat);\n }\n }\n }", "public function __construct()\n\t{\n\t\t$this->roles = new ArrayCollection();\n\t}", "function xh_listFilters()\r\n\t{\r\n\t}", "public function __construct(FilterInterface $filter)\n {\n $this->filterExecutor = $filter;\n }", "public function __construct()\n\t{\n\t\t$this->filter('before', 'orchestra::manage');\n\t\t\n\t\tparent::__construct();\n\t}", "public function __construct(){\n add_action( 'init', [ $this, 'create_resource_lists' ], 0 ); \t\n \t\n \t//init the custom post type for record items\n add_action( 'init', [ $this, 'resource_list_generator' ], 0 ); \n \n\n }", "public function _init() {\n\n\tparent::_init();\n\n if (!isset($this->filterRowOptions['id'])) {\n $this->filterRowOptions['id'] = $this->id . '-filters';\n }\n\n\t//initialize columns\n foreach ($this->columns as $i => $column) {\n if (is_string($column)) {\n \t//create a default datacolumn\n\t\t$class = $this->dataColumnClass;\n\t\t$_config = array(\n \t 'grid' => $this,\n \t 'attribute' => $column,\n \t 'label' => null,\n\t\t);\n \t\t$column = new $class($_config);\n } else {\n \t$class = $this->dataColumnClass;\n\t\tif (!empty($column['class'])) {\n\t\t $class = $column['class'];\n\t\t unset($column['class']);\n\t\t}\n\t\t$_config = \\util\\Set::merge(array('grid' => $this), $column);\n $column = new $class($_config);\n }\n if (!$column->visible) {\n unset($this->columns[$i]);\n continue;\n }\n $this->columns[$i] = $column;\n }\n\n\t//prepare data for filtering\n\tif (!empty($this->filterModel) && $this->filterModel !== false) {\n\t //$this->_filter_form = new Form();\n\t //$this->_filter_form->config(array('binding' => $this->filterModel));\n\t self::form()->create($this->filterModel);\n\t}\n\n }", "protected function _construct()\n {\n $rates = Mage::getSingleton('avatax/session')->getAvatax16Rates();\n if (is_array($rates)) {\n foreach ($rates as $key => $rate) {\n if ($rate['timestamp'] < $this->_getDateModel()->timestamp('-' . self::CACHE_TTL . ' minutes')) {\n unset($rates[$key]);\n }\n }\n $this->_rates = $rates;\n }\n return parent::_construct();\n }", "public function buildFilters()\n {\n $this->addFilter('name', new ORM\\StringFilterType('name'), 'media.adminlist.configurator.filter.name');\n $this->addFilter('contentType', new ORM\\StringFilterType('contentType'), 'media.adminlist.configurator.filter.type');\n $this->addFilter('updatedAt', new ORM\\NumberFilterType('updatedAt'), 'media.adminlist.configurator.filter.updated_at');\n $this->addFilter('filesize', new ORM\\NumberFilterType('filesize'), 'media.adminlist.configurator.filter.filesize');\n }", "public function __construct()\n{\n\tparent::__construct();\n\t$this->load->helper('filter');\n}", "public function __construct(Context $context, Filter $filter, CollectionFactory $collectionFactory)\n {\n parent::__construct($context);\n $this->filter = $filter;\n $this->collectionFactory = $collectionFactory;\n }", "public function __construct()\n {\n $this->beforeFilter('csrf', ['except' => ['index', 'create', 'show', 'edit']]);\n $this->beforeFilter('auth');\n }", "public function __construct() {\n parent::__construct();\n $this->privileges = [\"page-all\", \"page-firewall-trafficshaper-limiter\"];\n $this->change_note = \"Added firewall traffic shaper limiter bandwidth via API\";\n }", "public function __construct($filterRules = false, $fields = false)\n {\n ($filterRules && ($this->filterRules = $filterRules));\n if(!$fields){\n $this->filters = &$this->filterRules;\n return;\n }\n ($fields && ($this->fields = (array)$fields));\n $rulesKeys = array_keys($this->filterRules);\n foreach ($this->fields as $key => $value) {\n $this->filters[$key] = $this->filterRules[$rulesKeys[$value]];\n }\n }", "public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true);", "public function __construct()\n\t{\n\t\t$this->beforeFilter('auth', ['except' => ['getIndex', 'getView']]);\n\t}", "public function __construct() {\n\t\tglobal $fsn_custom_lists;\n\t\t$fsn_custom_lists = array();\n\t\t\n\t\t// Populate Custom Lists global\n\t\tadd_action('fsn_extension_init', array($this, 'populate_custom_list_global'));\n\t\t\n\t\t//add custom list field type\n\t\tadd_filter('fsn_input_types', array($this, 'add_custom_list_field_type'), 10, 3);\n\t\t\n\t\t//add new custom list item via AJAX\n\t\tadd_action('wp_ajax_custom_list_add_item', array($this, 'add_custom_list_item'));\n\t\t\n\t\t//disable wpautop on admin shortcode content output\n\t\tadd_filter('fsn_admin_shortcode_content_output', array($this, 'shortcode_content_unautop'), 10, 3);\n\t\t\n\t\t//add custom list item shortcode\n\t\tadd_shortcode('fsn_custom_list_item', array($this, 'custom_list_item_shortcode'));\n\t\t\n\t\t//add filter to clean list items shortcode\n\t\tadd_filter('fsn_clean_shortcodes', array($this, 'clean_custom_list_shortcodes'));\n\t\t\t\t\n\t}", "public function __construct()\n {\n $categories = Category::orderBy('id', 'ASC')->get();\n\n $this->CategoryList = $categories;\n }", "public function init()\n {\n /*$collection = $this->getShippedTracks();\n foreach ($collection as $track) {\n if ($this->validateTrackNumber($track->getNumber())) {\n $this->_trackList[$track->getNumber()] = $track;\n continue;\n }*/\n Mage::log(\"{$track->getNumber()}: invalid tracking code\");\n //}\n return $this;\n }", "public function GetFilters ();", "public function __construct(){\n\n // Break, if disabled.\n if ( !WPP_FEATURE_FLAG_WPP_LISTING_CATEGORY ) {\n return;\n }\n\n // Register taxonomy.\n add_filter('wpp_taxonomies', array( $this, 'define_taxonomies'), 10 );\n\n }", "public function createFilter()\n\t{\n\t\treturn $this->controller->createFilter();\n\t}", "public function getFilter();", "public function getFilter();", "public function __construct() {\n $this->_pdata['jslist'] = array('custom');\n }", "public function __construct() {\n //parent::__construct();\n\n $model = new AclModel();\n //$sections = new Sections();\n $privileges = new PrivilegesModel();\n $roles = new Roles();\n\n $this->recursiveRolesFill($roles->getTree());\n\n foreach($privileges->getResourcesArray() as $name)\n {\n $this->addResource($name);\n }\n\n foreach($model->getRules() as $rule)\n {\n $this->allow($rule->role, $rule->resource, $rule->privilege);\n }\n }", "abstract public function getFilterClass();", "public function __construct()\n {\n $this->roles = new ArrayCollection();\n }", "public function getFilter(){ }", "public function __construct()\n {\n if (1 == func_num_args()) {\n $this->insuranceTypesCount = func_get_arg(0);\n }\n }", "public function __construct(Watchlist $watchlist, Stock $stock, GisRank $gis)\n\t{\n\t\t$this->watchlist = $watchlist;\n\t\t$this->stock = $stock;\n\t\t$this->gis = $gis;\n\t}", "public function __construct(StackTraceFilter $assertionFilter=null, StackTraceFilter $exceptionFilter=null)\n {\n $this->assertionFilter = $assertionFilter ?: new FirstExternalStackTraceFilter('Counterpart\\\\Assert');\n $this->exceptionFilter = $exceptionFilter ?: new FileStackTraceFilter();\n }", "public function __construct()\n {\n $this->productList = new ProductList();\n }", "protected function _construct()\n {\n $this->_init(CarrierModel::RATE_TABLE_NAME, 'rate_id');\n }", "public function __construct() {\n parent::__construct();\n $this->privileges = [\"page-all\", \"page-firewall-trafficshaper-limiter\"];\n $this->change_note = \"Deleted firewall traffic shaper limiter bandwidth via API\";\n }", "public function __construct()\n {\n $this->beforeFilter('csfr', array('on' => 'post'));\n }", "public function __construct()\n {\n $this->itemPrices = new ArrayCollection();\n }", "public function __construct() {\n \t$this->beforeFilter('csrf', array('on'=>'post'));\n \t// protect unauthorized users from getting to the dashboard\n \t$this->beforeFilter('auth', array('only'=>array('getDashboard')));\n }", "function rs_duotonefilters_init(){\n\n\tnew RsDuotoneFiltersBase();\n\t\n}", "abstract public function filters();", "public function __construct()\n {\n parent::init();\n $this->setColumnsList(array(\n 'id'=>'Id',\n 'username'=>'Username',\n 'password'=>'Password',\n 'email'=>'Email',\n 'id_role'=>'IdRole',\n 'status'=>'Status',\n 'recorddate'=>'Recorddate',\n 'luta'=>'Luta',\n ));\n\n $this->setParentList(array(\n ));\n\n $this->setDependentList(array(\n ));\n }", "public function addFilters()\n {\n }", "private function filters() {\n\n\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->filter('before', 'orchestra::auth');\n\t}", "protected function _construct() {\n add_filter( 'aal_filter_disallowed_http_request_types_for_background_cache_renewal', array( $this, 'replyToAddExceptedRequestType' ) );\n }", "public function __construct()\n {\n $this->link = 'contractors';\n $this->name = l('GLOB_CONTRACTORS_SETTINGS','admin');\n $this->parentElement = 'Index'; \n $this->directory_model = new Contractor(); \n $this->model_name = 'Contractor';\n $this->table_cols_headers = [ 'Number' => '№',\n 'Name' => l('CONTRACTOR_NAME','admin'),\n 'Region' => l('REGION_HEAD')];\n $this->cols_to_sort = ['Name','Region'];\n $this->filter_array = [\n 'present' => 1,\n 'category' => 0,\n ];\n parent::__construct(); \n }", "public function __construct() {\n $this->bestellijn = new ArrayCollection();\n }", "public function __construct() {\n\t\tparent::__construct(FALSE, array(), array(), array('resources'));\n\t\t$this->resources = array();\n\t\t$this->_restrict_write_access();\n\n\t}", "public function __construct()\n\t{\n\t\t$this->add(array(\n\t\t\t'name' => 'note', // 'usr_name'\n\t\t\t'required' => true,\n\t\t\t'filters' => array(\n\t\t\t\tarray('name' => 'StripTags'),\n\t\t\t),\n\t\t\t'validators' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'StringLength',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'encoding' => 'UTF-8',\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t), \n\t\t));\n \n $this->add(array(\n\t\t\t'name' => 'duration', // 'usr_name'\n\t\t\t'required' => true,\n\t\t\t'filters' => array(\n\t\t\t),\n 'validators' => array(\n array(\n 'name' => 'Int',\n ),\n array(\n 'name' => 'GreaterThan',\n 'options' => array(\n 'min' => 0,\n 'inclusive' => true\n ),\n ),\n array(\n 'name' => 'LessThan',\n 'options' => array(\n 'max' => 20160, // 14 days maximum\n 'inclusive' => true\n ),\n ),\n ), \n\t\t));\n\n\t}", "public function __construct() {\n\n\t\t$this->beforeFilter('csrf', array ('on'=>['post','put', 'delete']));\n\t}", "public function __construct() {\n parent::__construct();\n\n $this->setCManager(\n apply_filters('aam_ui_subjects', $this->getDefaultSubjects())\n );\n $this->setFeatures(\n apply_filters('aam_ui_features', $this->getDefaultFeatures())\n );\n }", "public function __construct()\n {\n \t\n \t # filter as we don't want to reauthenticate\n\t\t$this->beforeFilter('auth');\n\t\t\n\t\t$this->beforeFilter('csrf', array('on' => 'post')); # prevent cross site request forgery\n }", "public function __construct(Repository\\Job $jobRepository, ListFilter $searchForm)\n {\n $this->jobRepository = $jobRepository;\n $this->searchForm = $searchForm;\n }", "public function getFilterFormClass()\n {\n return 'ClientListFormFilter';\n }", "function __construct($name, $cond=null)\n\t{\n\t\tparent::__construct();\n\t\t\n\t\tGLOBAL $App;\n\n\t\tif (strlen($name))\n\t\t{\n\t\t\t$_SESSION['cms_cross_name'] = $name;\n\t\t\t$_SESSION['cms_cross_cond']\t= $cond;\n\t\t}\n\t\t\t\n\t\t$this->name = $_SESSION['cms_cross_name'];\n\t\t$this->cond\t= $_SESSION['cms_cross_cond'];\n\n\n\t\t$this->params = $App->ReadCrossList($this->name);\n\n\t\t$this->list = new CMSList($this->params['list']);\n\t\t$this->list->Init();\n\t\t\n\t\t$this->crossList = new CMSList($this->params['list']);\n\t\t$this->crossList->Init();\n\t\t\n\t\t$this->crossField\t= $this->params['cross_field'];\n\t\t$this->label\t\t= $this->params['name'];\n\t\t\n\t\t\n\t\t$this->crossList->SetCond(\"{$this->crossField}>0\");\n\t\t$this->crossList->order = $this->crossField;\n\t}", "public function __construct()\n\t{\n\t\t$this->incomeData = FieldMap::getFieldLabel(\"income_data\",\"\",1);\n\t\t$this->removeIncomeFlag = 0;\n\t}", "public function init()\n\t{\n\t\t$this->setup_filters();\n\t\t$this->list_table = new OrgHub_UploadListTable( $this );\n\t}" ]
[ "0.629571", "0.6220647", "0.618047", "0.60564685", "0.5997925", "0.5965302", "0.595028", "0.5937199", "0.5909159", "0.58479387", "0.5844332", "0.5836496", "0.58036125", "0.5779432", "0.5711334", "0.5672031", "0.56596136", "0.56560475", "0.56315076", "0.56041485", "0.5595179", "0.5566373", "0.55661005", "0.55580944", "0.55541354", "0.5535869", "0.55130327", "0.54873514", "0.5484755", "0.54741514", "0.5464093", "0.54531306", "0.5449681", "0.54494166", "0.5441904", "0.5432472", "0.53438675", "0.53414583", "0.5340303", "0.5315094", "0.53128564", "0.5306239", "0.53037006", "0.5300356", "0.52963364", "0.5293482", "0.528922", "0.5257476", "0.52493614", "0.5246147", "0.52366227", "0.52237356", "0.52213234", "0.5216808", "0.5215075", "0.52121836", "0.51978815", "0.51975435", "0.5197313", "0.5185999", "0.51803416", "0.51752186", "0.51740056", "0.5169779", "0.51692814", "0.5162776", "0.5162776", "0.5154364", "0.5152535", "0.5151142", "0.5139875", "0.5137453", "0.513221", "0.5123869", "0.5119756", "0.5114346", "0.5102544", "0.5100955", "0.5097827", "0.50942093", "0.5091337", "0.5090345", "0.5089717", "0.50890696", "0.5082576", "0.5079188", "0.5075138", "0.5071273", "0.50707126", "0.50615394", "0.5056526", "0.50546604", "0.50524086", "0.5051744", "0.5051184", "0.504368", "0.50433576", "0.50405437", "0.50371253", "0.50317246" ]
0.6469773
0
Method called when an object has been exported with var_export() functions It allows to return an object instantiated with the values
public static function __set_state(array $_array,$_className = __CLASS__) { return parent::__set_state($_array,$_className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ExportObject() {\n // Init object\n $plugin = new stdClass();\n // Set values\n $plugin->Name = $this->Name;\n $plugin->Version = $this->Version;\n $plugin->Author = $this->Author;\n $plugin->About = $this->About;\n $plugin->Root = $this->Root;\n $plugin->Identifier = $this->Identifier;\n \n // Return result\n return $plugin;\n }", "protected function constructExportObject()\n\t{\n\t\t//default export is \"all public fields\"\n\t\treturn (object) Arrays::getPublicPropertiesOfObject($this);\n\t}", "function from_export($value) {\n return $value;\n }", "public function export(): mixed;", "public function ExportObject() {\n // Init object\n $col = new stdClass();\n \n // Set values\n $col->id = $this->Id;\n $col->type = $this->Type;\n $col->label = $this->Label;\n $col->p = $this->P;\n \n // Return values\n return $col;\n }", "public function exportData() {\n\t\treturn $this->constructExportObject();\n\t}", "public function toObject();", "function ctools_export_new_object($table, $set_defaults = TRUE) {\r\n $schema = ctools_export_get_schema($table);\r\n $export = $schema['export'];\r\n\r\n $object = new $export['object'];\r\n foreach ($schema['fields'] as $field => $info) {\r\n if (isset($info['object default'])) {\r\n $object->$field = $info['object default'];\r\n }\r\n else if (isset($info['default'])) {\r\n $object->$field = $info['default'];\r\n }\r\n else {\r\n $object->$field = NULL;\r\n }\r\n }\r\n\r\n if ($set_defaults) {\r\n // Set some defaults so this data always exists.\r\n // We don't set the export_type property here, as this object is not saved\r\n // yet. We do give it NULL so we don't generate notices trying to read it.\r\n $object->export_type = NULL;\r\n $object->{$export['export type string']} = t('Local');\r\n }\r\n return $object;\r\n}", "public function export();", "public function export();", "public function export();", "public function export();", "public function export();", "public function createExport();", "public function newInstance(): object;", "public static function createFromGlobals();", "public function export (){\n\n }", "function &object(object $value, string $namespace = 'default'): object\n{\n $var = new Variable\\ObjectVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public function getObj();", "public static function toObject(){\r\n $args = func_get_args();\r\n \r\n if(count($args) >=2){\r\n $className = '\\\\'.str_replace('.', '\\\\', $args[0]);\r\n $refClass = new \\ReflectionClass($className);\r\n $toObjInstance = $refClass->newInstance();\r\n\r\n unset($args[0]);\r\n \r\n foreach($args as $arg){\r\n \r\n if(is_object($arg)){\r\n $arg = Obj::getProperties($arg);\r\n }\r\n \r\n if(is_array($arg)){\r\n foreach($arg as $propertyName=>$propertyValue){\r\n if($refClass->hasProperty($propertyName)){\r\n $property = $refClass->getProperty($propertyName);\r\n $property->setAccessible(true);\r\n $property->setValue($toObjInstance, $propertyValue);\r\n }\r\n }\r\n }\r\n }\r\n return $toObjInstance;\r\n }\r\n }", "public function export()\n {\n }", "function &stdClass(stdClass $value, string $namespace = 'default'): stdClass\n{\n $var = new Variable\\StdClassVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public function getExportableValues() {\n\t\telgg_deprecated_notice(__METHOD__ . ' has been deprecated by toObject()', 1.9);\n\t\treturn array(\n\t\t\t'id',\n\t\t\t'entity_guid',\n\t\t\t'name',\n\t\t\t'value',\n\t\t\t'value_type',\n\t\t\t'owner_guid',\n\t\t\t'type',\n\t\t);\n\t}", "public function ExportObject() {\n // Init object\n $overviewChart = new stdClass();\n \n // Set values\n $overviewChart->Types = $this->Types;\n $overviewChart->Chart = $this->Chart->ExportObject();\n \n //return result\n return $overviewChart;\n }", "public function export()\n {\n \n }", "public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }", "public function getter () {\n return (object)[\n get_plugin_name => $this->plugin_name,\n get_plugin_version => $this->plugin_version,\n get_translation_slug => $this->translation_slug,\n get_admin_page_slug => $this->admin_page_slug,\n get_api_namespace => $this->api_namespace,\n get_options_name => $this->options_name\n ];\n }", "public function getObject() {}", "public function getObject() {}", "public function export()\n {\n //\n }", "function _instantiateExportDeployment($context) {\n\t\t$exportDeploymentClassName = $this->getExportDeploymentClassName();\n\t\t$this->import($exportDeploymentClassName);\n\t\t$exportDeployment = new $exportDeploymentClassName($context, $this);\n\t\treturn $exportDeployment;\n\t}", "function get_obj()\n {\n $object = new ApiRest;\n return $object;\n }", "public function newInstance();", "public function newInstance();", "public function __CONSTRUCT(){\n\t}", "public function getInstance(): object;", "public function exportedVars(): iterable;", "public static function fromGlobals() {}", "public function ExportObject() {\n // Init object\n $submission = new stdClass();\n \n // Set values\n $submission->Id = $this->Id;\n $submission->DateTime = $this->DateTime;\n $submission->GitHash = $this->GitHash;\n $submission->Categories = array();\n \n // Export each category\n foreach ($this->Categories as $category) {\n $submission->Categories[] = $category->ExportObject();\n }\n \n // return result\n return $submission;\n }", "public function getInstance(): object\n {\n }", "function ctools_get_default_object($table, $name) {\r\n $schema = ctools_export_get_schema($table);\r\n $export = $schema['export'];\r\n\r\n if (!$export['default hook']) {\r\n return;\r\n }\r\n\r\n // Try to load individually from cache if this cache is enabled.\r\n if (!empty($export['cache defaults'])) {\r\n $defaults = _ctools_export_get_some_defaults($table, $export, array($name));\r\n }\r\n else {\r\n $defaults = _ctools_export_get_defaults($table, $export);\r\n }\r\n\r\n $status = variable_get($export['status'], array());\r\n\r\n if (!isset($defaults[$name])) {\r\n return;\r\n }\r\n\r\n $object = $defaults[$name];\r\n\r\n // Determine if default object is enabled or disabled.\r\n if (isset($status[$object->{$export['key']}])) {\r\n $object->disabled = $status[$object->{$export['key']}];\r\n }\r\n\r\n $object->{$export['export type string']} = t('Default');\r\n $object->export_type = EXPORT_IN_CODE;\r\n $object->in_code_only = TRUE;\r\n\r\n return $object;\r\n}", "public function toStdClass() {\n $stdClass = new stdClass();\n $stdClass->number = $this->_number;\n $stdClass->internal = $this->_internal;\n return $stdClass;\n }", "public function getObject(): object;", "public function get_export_data()\n {\n\n $l_sql = \"SELECT isys_obj_type__id, isys_obj_type__title, isys_verinice_types__title, isys_verinice_types__const \" . \"FROM isys_obj_type \" . \"INNER JOIN isys_verinice_types ON isys_obj_type__isys_verinice_types__id = isys_verinice_types__id \";\n\n return $this->retrieve($l_sql);\n\n }", "public function dataProviderExport()\n {\n // Regular :\n $data = [\n [\n 'test string',\n var_export('test string', true),\n ],\n [\n 75,\n var_export(75, true),\n ],\n [\n 7.5,\n var_export(7.5, true),\n ],\n [\n null,\n 'null',\n ],\n [\n true,\n 'true',\n ],\n [\n false,\n 'false',\n ],\n [\n [],\n '[]',\n ],\n ];\n // Arrays :\n $var = [\n 'key1' => 'value1',\n 'key2' => 'value2',\n ];\n $expectedResult = <<<'RESULT'\n[\n 'key1' => 'value1',\n 'key2' => 'value2',\n]\nRESULT;\n $data[] = [$var, $expectedResult];\n $var = [\n 'value1',\n 'value2',\n ];\n $expectedResult = <<<'RESULT'\n[\n 'value1',\n 'value2',\n]\nRESULT;\n $data[] = [$var, $expectedResult];\n $var = [\n 'key1' => [\n 'subkey1' => 'value2',\n ],\n 'key2' => [\n 'subkey2' => 'value3',\n ],\n ];\n $expectedResult = <<<'RESULT'\n[\n 'key1' => [\n 'subkey1' => 'value2',\n ],\n 'key2' => [\n 'subkey2' => 'value3',\n ],\n]\nRESULT;\n $data[] = [$var, $expectedResult];\n // Objects :\n $var = new \\StdClass();\n $var->testField = 'Test Value';\n $expectedResult = \"unserialize('\" . serialize($var) . \"')\";\n $data[] = [$var, $expectedResult];\n $var = function () {return 2;};\n $expectedResult = 'function () {return 2;}';\n $data[] = [$var, $expectedResult];\n return $data;\n }", "public static function export()\n {\n return null;\n }", "function create()\n\t{\n\t\t$names = $this->_fields;\n\t\t$object = new StdClass;\n\t\tforeach ($names as $name)\n\t\t\t$object->$name = \"\";\n\t\treturn $object;\n\t}", "public function construct()\n {\n return $this->object;\n }", "public function metaExport($object = false);", "public function vars()\n {\n \n return new ArrayWrapper(get_object_vars($this->object));\n \n }", "public function getValuesObject()\n {\n $obj = new \\stdClass;\n\n foreach ( $this->keyValues as $key => $value )\n {\n $obj->$key = $value;\n }\n\n return $obj;\n }", "public function getObject();", "public function getObject();", "function newDataObject() {\n\t\t$ofrPlugin =& PluginRegistry::getPlugin('generic', $this->parentPluginName);\n\t\t$ofrPlugin->import('classes.ObjectForReviewPerson');\n\t\treturn new ObjectForReviewPerson();\n\t}", "public function __construct(VariableExportInterface $variableExport)\n {\n $this->serialized = $variableExport->toSerialize();\n }", "public function as_object($class = TRUE, $arguments = array());", "function var_export($expression, $return = false)\n{\n}", "function getObject();", "function getObject();", "abstract public function object();", "public function __construct()\r\n {\r\n $this->_internalObject = new stdClass();\r\n\t\t$a=serialize($this->_internalObject);\r\n\t\t\"echo $a<br>\";\r\n }", "abstract protected function createObject();", "function &getInstance($module_srl)\n\t{\n\t\treturn new ExtraVar($module_srl);\n\t}", "abstract function exportData();", "function createProduct($name,$price,$qty,$id):stdClass\n{\n$product=new stdClass();\n$product->name=$name;\n$product->price=$price;\n$product->quantity= $qty;\n$product->id=$id;\n\nreturn $product;\n}", "abstract protected function exportFunctions();", "public static function factory()\n {\n $class = get_called_class();\n $object = new $class();\n foreach (static::getDefaults() as $field => $value) {\n $object->{$field} = $value;\n }\n return $object;\n }", "public function &__invoke()\r\n\t{\r\n\t\t$result = new stdClass();\r\n\t\tAdhoc::eachTrap('Registry',\r\n\t\t\tfunction ($trap) use (&$result)\r\n\t\t\t{\r\n\t\t\t\t$data =& $trap->GetList();\r\n\t\t\t\tforeach ($data as $k=>$v)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!isset($result->$k) and isset($v))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$result->$k = $v;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "public static function instantation($the_record){\n\n // can be used to retrieve a string with the name of the called class and static:: introduces its scope.\n $calling_class = get_called_class();\n\n $the_object = new $calling_class;\n\n\n // doing a loop to get all of the values in the object ]\n foreach($the_record as $key => $value) {\n\n if($the_object->has_the_key($key)){\n $the_object->$key = $value;\n \n }\n }\n\n return $the_object;\n }", "public static function get_object() {\n\t\treturn self::$object;\n\t}", "function adminer_object() {\r\n include_once \"./plugins/plugin.php\";\r\n \r\n // autoloader\r\n foreach (glob(\"plugins/*.php\") as $filename) {\r\n include_once \"./$filename\";\r\n }\r\n \r\n $plugins = array(\r\n // specify enabled plugins here\r\n // new AdminerDumpXml,\r\n // new AdminerTinymce,\r\n // new AdminerFileUpload(\"data/\"),\r\n // new AdminerSlugify,\r\n // new AdminerTranslation,\r\n // new AdminerForeignSystem,\r\n // new AdminerLoginPasswordLess(password_hash(\"\", PASSWORD_DEFAULT)),\r\n );\r\n \r\n /* It is possible to combine customization and plugins:\r\n class AdminerCustomization extends AdminerPlugin {\r\n }\r\n return new AdminerCustomization($plugins);\r\n */\r\n class AdminerCustomization extends AdminerPlugin {\r\n function login($login, $password) {\r\n // validate user submitted credentials\r\n return true;\r\n }\r\n }\r\n return new AdminerCustomization($plugins);\r\n \r\n // return new AdminerPlugin($plugins);\r\n}", "public function ExportItem() {\n // Init object\n $submission = new stdClass();\n \n // Set values\n $submission->Id = $this->Id;\n $submission->DateTime = $this->DateTime;\n $submission->ImportDateTime = $this->ImportDateTime;\n $submission->User = $this->User;\n $submission->Good = $this->Good;\n $submission->Bad = $this->Bad;\n $submission->Strange = $this->Strange;\n $submission->GitHash = $this->GitHash;\n $submission->SequenceNumber = $this->SequenceNumber;\n \n // Return result\n return $submission;\n }", "private static function _instantiateThisObject() {\r\n $className = get_called_class();\r\n return new $className();\r\n }", "function instance($obj) {\n\tif (is_string($obj)) {\n\t\t$obj = new $obj;\n\t}\n\treturn $obj;\n}", "function ctools_var_export($var, $prefix = '') {\r\n if (is_array($var)) {\r\n if (empty($var)) {\r\n $output = 'array()';\r\n }\r\n else {\r\n $output = \"array(\\n\";\r\n foreach ($var as $key => $value) {\r\n $output .= $prefix . \" \" . ctools_var_export($key) . \" => \" . ctools_var_export($value, $prefix . ' ') . \",\\n\";\r\n }\r\n $output .= $prefix . ')';\r\n }\r\n }\r\n else if (is_object($var) && get_class($var) === 'stdClass') {\r\n // var_export() will export stdClass objects using an undefined\r\n // magic method __set_state() leaving the export broken. This\r\n // workaround avoids this by casting the object as an array for\r\n // export and casting it back to an object when evaluated.\r\n $output = '(object) ' . ctools_var_export((array) $var, $prefix);\r\n }\r\n else if (is_bool($var)) {\r\n $output = $var ? 'TRUE' : 'FALSE';\r\n }\r\n else {\r\n $output = var_export($var, TRUE);\r\n }\r\n\r\n return $output;\r\n}", "public function getOutputObject()\n {\n $baseObject = parent::getOutputObject();\n $baseObject->name = $this->getName();\n\n return $baseObject;\n }", "public function init_objects() {\n $this->controller_oai = new \\Tainacan\\OAIPMHExpose\\OAIPMH_Expose();\n $this->list_sets = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Sets();\n $this->list_metadata_formats = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Metadata_Formats();\n $this->list_records = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Records();\n $this->get_record = new \\Tainacan\\OAIPMHExpose\\OAIPMH_Get_Record();\n $this->identify = new \\Tainacan\\OAIPMHExpose\\OAIPMH_Identify();\n $this->identifiers = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Identifiers();\n }", "public function _construct(){\n\t\treturn $this->data;\n\t}", "public function _construct(){\n\t\treturn $this->data;\n\t}", "public function regularNew() {}", "public function newInstance()\n {\n return $this->newInstanceArgs(func_get_args());\n }", "function data2Object($data) { \n\t\t\t$class_object = new getData($data); \n\t\t\treturn $class_object; \n\t\t}", "function _construct(){ }", "function ctools_export_object($table, $object, $indent = '', $identifier = NULL, $additions = array(), $additions2 = array()) {\r\n $schema = ctools_export_get_schema($table);\r\n if (!isset($identifier)) {\r\n $identifier = $schema['export']['identifier'];\r\n }\r\n\r\n $output = $indent . '$' . $identifier . ' = new ' . get_class($object) . \"();\\n\";\r\n\r\n if ($schema['export']['can disable']) {\r\n $output .= $indent . '$' . $identifier . '->disabled = FALSE; /* Edit this to true to make a default ' . $identifier . ' disabled initially */' . \"\\n\";\r\n }\r\n if (!empty($schema['export']['api']['current_version'])) {\r\n $output .= $indent . '$' . $identifier . '->api_version = ' . $schema['export']['api']['current_version'] . \";\\n\";\r\n }\r\n\r\n // Put top additions here:\r\n foreach ($additions as $field => $value) {\r\n $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . ctools_var_export($value, $indent) . \";\\n\";\r\n }\r\n\r\n $fields = $schema['fields'];\r\n if (!empty($schema['join'])) {\r\n foreach ($schema['join'] as $join) {\r\n if (!empty($join['load'])) {\r\n foreach ($join['load'] as $join_field) {\r\n $fields[$join_field] = $join['fields'][$join_field];\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Go through our schema and joined tables and build correlations.\r\n foreach ($fields as $field => $info) {\r\n if (!empty($info['no export'])) {\r\n continue;\r\n }\r\n if (!isset($object->$field)) {\r\n if (isset($info['default'])) {\r\n $object->$field = $info['default'];\r\n }\r\n else {\r\n $object->$field = '';\r\n }\r\n }\r\n\r\n // Note: This is the *field* export callback, not the table one!\r\n if (!empty($info['export callback']) && function_exists($info['export callback'])) {\r\n $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . $info['export callback']($object, $field, $object->$field, $indent) . \";\\n\";\r\n }\r\n else {\r\n $value = $object->$field;\r\n if ($info['type'] == 'int') {\r\n if (isset($info['size']) && $info['size'] == 'tiny') {\r\n $info['boolean'] = (!isset($info['boolean'])) ? $schema['export']['boolean'] : $info['boolean'];\r\n $value = ($info['boolean']) ? (bool) $value : (int) $value;\r\n }\r\n else {\r\n $value = (int) $value;\r\n }\r\n }\r\n\r\n $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . ctools_var_export($value, $indent) . \";\\n\";\r\n }\r\n }\r\n\r\n // And bottom additions here\r\n foreach ($additions2 as $field => $value) {\r\n $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . ctools_var_export($value, $indent) . \";\\n\";\r\n }\r\n\r\n return $output;\r\n}", "public function createValidObject() : object {\n\t\treturn (object) [\"tweetContent\" => bin2hex(random_bytes(12))];\n\t}", "public function _init_obj()\n {\n // dummy\n }", "protected function make_object( \\stdClass $data ) {\n\t\treturn new Purchase( $data );\n\t}", "public function as_object()\n {\n $this->return_as = 'object';\n return $this;\n }", "static public function fromObj($anObj) {\n\t\t$theClassName = get_called_class();\n\t\t$o = new $theClassName();\n\t\treturn $o->setDataFrom($anObj);\n\t}", "function adminer_object() {\n\t\tinclude_once \"plugins/plugin.php\";\n\t\t// autoloader\n\t\tforeach (glob(\"plugins/*.php\") as $filename) {\n\t\t\tinclude_once $filename;\n\t\t}\n\t\t$plugins = array(\n\t\t\t// specify enabled plugins here\n\t\t\tnew AdminerDatabaseHide(array('information_schema', 'mysql', 'performance_schema')),\n\t\t\t//new AdminerDumpJson,\n\t\t\t//new AdminerDumpBz2,\n\t\t\t//new AdminerDumpZip,\n\t\t\t//new AdminerDumpXml,\n\t\t\t//new AdminerDumpAlter,\n\t\t\t//~ new AdminerSqlLog(\"past-\" . rtrim(`git describe --tags --abbrev=0`) . \".sql\"),\n\t\t\t//new AdminerFileUpload(\"\"),\n\t\t\t//new AdminerJsonColumn,\n\t\t\t//new AdminerSlugify,\n\t\t\t//new AdminerTranslation,\n\t\t\t//new AdminerForeignSystem,\n\t\t\t//new AdminerEnumOption,\n\t\t\t//new AdminerTablesFilter,\n\t\t\t//new AdminerEditForeign,\n\t\t);\n\n\t\treturn new AdminerPlugin($plugins);\n\t}", "public function newCObj() {}", "private function PREPARE_OBJECT_VARIABLE_METHOD()\r\r {\r\r if($this->_type === 'POST')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_POST[$key])?$_POST[$key]:false;\r\r } \r\r } \r\r else if($this->_type === 'GET')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_GET[$key])?$_GET[$key]:false;\r\r } \r\r } \r\r }", "public function toStdClass() {\n $stdClass = new stdClass();\n $stdClass->amountInsuranceBase = $this->_amountInsuranceBase;\n $stdClass->fragile = $this->_fragile;\n $stdClass->parcelsCount = $this->_parcelsCount;\n $stdClass->serviceTypeId = $this->_serviceTypeId;\n return $stdClass;\n }", "public function toStdClass() {\n $stdClass = new stdClass();\n $stdClass->billOfLading = $this->_billOfLading;\n $stdClass->secondaryPickingType = $this->_secondaryPickingType;\n return $stdClass;\n }", "abstract public function prepare_new_object(array $args);", "protected function getRealScriptUserObj() {}", "public function export(bool $private = FALSE, bool $meta = FALSE) {\n\t\t$keys = [];\n\t\t$ret = [];\n\n\t\tif ($private) {\n\t\t\t$keys = static::$PRIVATE;\n\t\t} else {\n\t\t\t$keys = static::$PUBLIC;\n\t\t}\n\n\t\tif (!empty(array_intersect(EXP_RESERVED, $keys))) {\n\t\t\tthrow new ExportableException(\n\t\t\t\t\"Reserved key '\".EXP_CLASSNAME.\"' used in object.\"\n\t\t\t);\n\t\t}\n\n\t\tif ($meta) { // Add metadata.\n\t\t\t$ret[EXP_CLASSNAME] = get_class($this);\n\t\t\t$ret[EXP_VISIBILITY] = $private ? 'private' : 'public';\n\t\t}\n\n\t\tforeach ($keys as $k) {\n\t\t\t$current = $this->__exportable_get($k);\n\t\t\tswitch (gettype($current)) {\n\t\t\t\tcase 'object':\n\t\t\t\t\t$ret[$k] = $this->exp_obj(\n\t\t\t\t\t\t$current, $private, $meta\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'array':\n\t\t\t\t\t$ret[$k] = $this->exp_array(\n\t\t\t\t\t\t$current, $private, $meta\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$ret[$k] = $current;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "public static function & GetInstance ();", "public function getInstance(): mixed;", "public function convertToUserIntObject() {}", "function FetchObj() {}" ]
[ "0.6951056", "0.69235533", "0.6576406", "0.6377145", "0.61438453", "0.6123597", "0.60555947", "0.60385406", "0.5922576", "0.5922576", "0.5922576", "0.5922576", "0.5922576", "0.5859328", "0.58386916", "0.58126146", "0.5800945", "0.5715804", "0.571534", "0.5712997", "0.5688761", "0.5658427", "0.5640244", "0.56017965", "0.5525057", "0.5512275", "0.54624516", "0.54065686", "0.54065686", "0.5402593", "0.53759634", "0.5372155", "0.5371501", "0.5371501", "0.53698903", "0.5342519", "0.5334929", "0.5315758", "0.5307627", "0.5297458", "0.5262869", "0.5260146", "0.5248292", "0.5244241", "0.52275795", "0.51874787", "0.51795346", "0.5150348", "0.5141145", "0.513255", "0.5131906", "0.5117587", "0.5117587", "0.5117466", "0.5112706", "0.51077455", "0.50988156", "0.50935", "0.50935", "0.5078365", "0.50393796", "0.50392556", "0.5032243", "0.500829", "0.500578", "0.50021815", "0.49989748", "0.4986421", "0.4985877", "0.49773422", "0.49751663", "0.49675283", "0.4957486", "0.49566287", "0.49518955", "0.49497175", "0.49412116", "0.49269983", "0.49269983", "0.4919096", "0.4918042", "0.49162993", "0.4907476", "0.49073106", "0.48962304", "0.48928276", "0.4889555", "0.48821777", "0.48817694", "0.4876133", "0.48756412", "0.48639464", "0.48624778", "0.48621023", "0.48483175", "0.4845858", "0.48404086", "0.48386553", "0.48385635", "0.48351642", "0.4834503" ]
0.0
-1
Method returning the class name
public function __toString() { return __CLASS__; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClassName();", "public function getClassName();", "public function getClassName() ;", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName()\n {\n return __CLASS__;;\n }", "private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}", "public function getClassName() {\r\n\t\treturn($this->class_name);\r\n\t}", "public static function get_class_name() {\r\n\t\treturn __CLASS__;\r\n\t}", "public function getClassName() { return __CLASS__; }", "public static function getClassName() {\n\t\treturn get_called_class();\n\t}", "public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }", "public static function getClassName()\n\t{\n\t\treturn get_called_class();\n\t}", "public static function getClassName()\n {\n return get_called_class();\n }", "public function getClassName()\n {\n return $this->class;\n }", "public function getClassName()\n {\n return $this->class;\n }", "public static function className() : string {\n return get_called_class();\n }", "public function getName()\n {\n return __CLASS__;\n }", "public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}", "public function getClassName()\n {\n return $this->class_name;\n }", "public function class_name() {\n\t\treturn strtolower(get_class($this));\n\t}", "public function getName(): string\n {\n return __CLASS__;\n }", "public static function getClassName() {\n return get_called_class();\n }", "public function getClassname(){\n\t\treturn $this->classname;\n\t}", "public function getClassname()\n\t{\n\t\treturn $this->classname;\n\t}", "public function getClassName()\n {\n return $this->_sClass;\n }", "public function get_just_class_name() {\n\n\t\t$full_path = $this->get_called_class();\n\n\t\treturn substr( strrchr( $full_path, '\\\\' ), 1 );\n\n\t}", "protected function getClassName(): string\n {\n return $this->className;\n }", "public static function getClassName() {\n return self::$className;\n }", "public function getClassName(): string;", "public function getClassName() : string;", "public function getName() {\r\n $parsed = Parser::parseClassName(get_class());\r\n return $parsed['className'];\r\n }", "public function getClassName() : string\n {\n return $this->className;\n }", "public function getClassName()\n {\n $fullClass = get_called_class();\n $exploded = explode('\\\\', $fullClass);\n\n return end($exploded);\n }", "public static function getClassName()\n {\n $classNameArray = explode('\\\\', get_called_class());\n\n return array_pop($classNameArray);\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName() {\t\t\n\t\treturn MemberHelper::getClassName($this->classNumber);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}", "public function getClassName() : string\n {\n\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public static function staticGetClassName()\n {\n return __CLASS__;\n }", "public function getClassName() {\n return $this->className;\n }", "public function getClassName() {\n\t\treturn $this->className;\n\t}", "public function getClassName(): string\n {\n return $this->makeClassFromFilename($this->filename);\n }", "public function getClassName() {\n\t\treturn $this->_className;\n\t}", "public function getClassName() {\n return $this->className;\n }", "public function getClassName() {\n return $this->className;\n }", "public function getClassName ()\n {\n $className = explode('\\\\', get_class($this));\n\n return array_pop($className);\n }", "function getClassName()\n {\n // TODO: Implement getClassName() method.\n }", "public static function getClassName(){\n $parts = explode('\\\\', static::class);\n return end($parts);\n }", "function getClassName(){\n echo __CLASS__ . \"<br><br>\"; \n }", "public function name()\n {\n $name = get_class($this);\n\n return substr($name, strrpos($name, '\\\\') + 1);\n }", "public function class()\n {\n // @codingStandardsIgnoreLine\n return $this->class ?? \"\";\n }", "public function getClass()\n {\n return $this->_className;\n }", "private function getClassName() {\n return (new \\ReflectionClass(static::class))->getShortName();\n }", "public function getName() {\n\t\t\n\t\t// cut last part of class name\n\t\treturn substr( get_class( $this ), 0, -11 );\n\t\t\n\t}", "public function getClassNm()\r\n {\r\n\t\t$tabInfo = $this->getPathInfo();\r\n\t\treturn $tabInfo[1];\r\n }", "public function className()\n {\n $full_path = explode('\\\\', get_called_class());\n return end($full_path);\n }", "private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }", "public function getClass(): string\n {\n return $this->class;\n }", "public static function getFullyQualifiedClassName() {\n $reflector = new \\ReflectionClass(get_called_class());\n return $reflector->getName();\n }", "public function getClassName()\n\t{\n\t\tif (null === $this->_className) {\n\t\t\t$this->setClassName(get_class($this));\n\t\t}\n\t\t\n\t\treturn $this->_className;\n\t}", "public function getClassName() : string {\n if ($this->getType() != Router::CLOSURE_ROUTE) {\n $path = $this->getRouteTo();\n $pathExplode = explode(DS, $path);\n\n if (count($pathExplode) >= 1) {\n $fileNameExplode = explode('.', $pathExplode[count($pathExplode) - 1]);\n\n if (count($fileNameExplode) == 2 && $fileNameExplode[1] == 'php') {\n return $fileNameExplode[0];\n }\n }\n }\n\n return '';\n }", "public function getName(){\n\t\treturn get_class($this);\n\t}", "public function getClassName() {\r\n return $this->myCRUD()->getClassName();\r\n }", "public static function className()\n\t{\n\t\treturn static::class;\n\t}", "public function toClassName(): string\n {\n return ClassName::full($this->name);\n }", "public function getName()\n {\n return static::CLASS;\n }", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "function getName()\n {\n return get_class($this);\n }", "public function className(): string\n {\n return $this->taskClass->name();\n }", "public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }", "function getName()\r\n\t{\r\n\t\treturn get_class($this);\r\n\t}", "public function getName() {\n return get_class($this);\n }", "public function getName() {\n return get_class($this);\n }", "public function toString()\n {\n return __CLASS__;\n }", "public function getName()\n\t{\n\t\treturn $this->name ?: class_basename($this);\n\t}", "public function getNamespacedName()\n {\n return get_class();\n }", "protected function name() {\n\t\treturn strtolower(str_replace('\\\\', '_', get_class($this)));\n\t}", "protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }", "function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}", "public function getClassName(): ?string {\n\t\treturn Hash::get($this->_config, 'className');\n\t}", "public function __toString() {\n\t\treturn $this->className();\n\t}", "public static function name()\n {\n return lcfirst(self::getClassShortName());\n }" ]
[ "0.87522393", "0.87522393", "0.8751158", "0.87397957", "0.87397957", "0.87397957", "0.87397957", "0.8731564", "0.8696754", "0.8673495", "0.8638432", "0.8615335", "0.8603119", "0.8566906", "0.8562364", "0.8555002", "0.85503733", "0.85503733", "0.85425884", "0.8533183", "0.8529981", "0.85237026", "0.8502733", "0.8493115", "0.8491238", "0.8488943", "0.8484194", "0.847459", "0.8441478", "0.8418852", "0.8399611", "0.83950585", "0.83949184", "0.83853173", "0.8378261", "0.837777", "0.8372544", "0.8355432", "0.8355432", "0.83479965", "0.8325877", "0.8325877", "0.8312873", "0.83027107", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.82474744", "0.8242934", "0.8202995", "0.8185409", "0.8184752", "0.81829107", "0.81829107", "0.8176191", "0.81761754", "0.8162896", "0.8142928", "0.81323636", "0.8062757", "0.80528253", "0.8045769", "0.8033823", "0.8026215", "0.8001116", "0.79949147", "0.79779136", "0.79672754", "0.7957633", "0.790449", "0.78617185", "0.7860126", "0.7847096", "0.78195953", "0.7817044", "0.780094", "0.780094", "0.780094", "0.780094", "0.780094", "0.780094", "0.77821547", "0.7761565", "0.77588034", "0.7747239", "0.77409905", "0.77409905", "0.7710985", "0.76808393", "0.7670475", "0.76640886", "0.76514393", "0.76499707", "0.76323646", "0.76005036", "0.75937456" ]
0.0
-1
Draws a thick line Changing the thickness of a line using imagesetthickness doesn't produce as nice of result
function drawThickLine($img, $startX, $startY, $endX, $endY, $colour, $thickness) { $angle = (atan2(($startY - $endY), ($endX - $startX))); $dist_x = $thickness * (sin($angle)); $dist_y = $thickness * (cos($angle)); $p1x = ceil(($startX + $dist_x)); $p1y = ceil(($startY + $dist_y)); $p2x = ceil(($endX + $dist_x)); $p2y = ceil(($endY + $dist_y)); $p3x = ceil(($endX - $dist_x)); $p3y = ceil(($endY - $dist_y)); $p4x = ceil(($startX - $dist_x)); $p4y = ceil(($startY - $dist_y)); $array = array(0=>$p1x, $p1y, $p2x, $p2y, $p3x, $p3y, $p4x, $p4y); imagefilledpolygon($img, $array, (count($array)/2), $colour); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1)\n{\n if ($thick == 1) {\n return imageline($image, $x1, $y1, $x2, $y2, $color);\n }\n $t = $thick / 2 - 0.5;\n if ($x1 == $x2 || $y1 == $y2) {\n return imagefilledrectangle($image, round(min($x1, $x2) - $t), round(min($y1, $y2) - $t), round(max($x1, $x2) + $t), round(max($y1, $y2) + $t), $color);\n }\n $k = ($y2 - $y1) / ($x2 - $x1); //y = kx + q\n $a = $t / sqrt(1 + pow($k, 2));\n $points = array(\n round($x1 - (1+$k)*$a), round($y1 + (1-$k)*$a),\n round($x1 - (1-$k)*$a), round($y1 - (1+$k)*$a),\n round($x2 + (1+$k)*$a), round($y2 - (1-$k)*$a),\n round($x2 + (1-$k)*$a), round($y2 + (1+$k)*$a),\n );\n imagefilledpolygon($image, $points, 4, $color);\n return imagepolygon($image, $points, 4, $color);\n}", "function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1)\n{\n if ($thick == 1) {\n return imageline($image, $x1, $y1, $x2, $y2, $color);\n }\n $t = $thick / 2 - 0.5;\n if ($x1 == $x2 || $y1 == $y2) {\n return imagefilledrectangle($image, round(min($x1, $x2) - $t), round(min($y1, $y2) - $t), round(max($x1, $x2) + $t), round(max($y1, $y2) + $t), $color);\n }\n $k = ($y2 - $y1) / ($x2 - $x1); //y = kx + q\n $a = $t / sqrt(1 + pow($k, 2));\n $points = array(\n round($x1 - (1+$k)*$a), round($y1 + (1-$k)*$a),\n round($x1 - (1-$k)*$a), round($y1 - (1+$k)*$a),\n round($x2 + (1+$k)*$a), round($y2 - (1-$k)*$a),\n round($x2 + (1-$k)*$a), round($y2 + (1+$k)*$a),\n );\n imagefilledpolygon($image, $points, 4, $color);\n return imagepolygon($image, $points, 4, $color);\n}", "function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1)\n {\n if ($thick == 1) {\n return imageline($image, $x1, $y1, $x2, $y2, $color);\n }\n $t = $thick / 2 - 0.5;\n if ($x1 == $x2 || $y1 == $y2) {\n return imagefilledrectangle($image, round(min($x1, $x2) - $t), round(min($y1, $y2) - $t), round(max($x1, $x2) + $t), round(max($y1, $y2) + $t), $color);\n }\n $k = ($y2 - $y1) / ($x2 - $x1); //y = kx + q\n $a = $t / sqrt(1 + pow($k, 2));\n $points = array(\n round($x1 - (1+$k)*$a), round($y1 + (1-$k)*$a),\n round($x1 - (1-$k)*$a), round($y1 - (1+$k)*$a),\n round($x2 + (1+$k)*$a), round($y2 - (1-$k)*$a),\n round($x2 + (1-$k)*$a), round($y2 + (1+$k)*$a),\n );\n imagefilledpolygon($image, $points, 4, $color);\n return imagepolygon($image, $points, 4, $color);\n }", "public function setLineWidth($lineWidth = 1) {}", "public function setLineWidth($lineWidth) {}", "private function drawThickLine($im, $x1, $y1, $x2, $y2, $thickness, $col)\n {\n $dx = $x2 - $x1;\n $dy = $y2 - $y1;\n\n $d = sqrt($dx * $dx + $dy * $dy);\n\n if ($d == 0)\n return;\n\n $dx /= $d;\n $dy /= $d;\n\n $t = $thickness * 0.5;\n\n $p = array();\n\n $p[] = array($x1 + $dy * $t, $y1 - $dx * $t);\n $p[] = array($x2 + $dy * $t, $y2 - $dx * $t);\n $p[] = array($x2 - $dy * $t, $y2 + $dx * $t);\n $p[] = array($x1 - $dy * $t, $y1 + $dx * $t);\n\n $this->drawShadedConvexPolygon($im, $p, $col);\n }", "public function setUnderlineThickness($thickness) {}", "function setLineStyle($thickness = 4, $dot_size = 7)\n {\n if ($dot_size < 0) {\n $dot_size = 0;\n }\n if ($thickness < 0) {\n $thickness = 0;\n }\n\n if ($dot_size < $thickness) {\n $dot_size = $thickness;\n }\n\n $this->line_thickness = $thickness;\n $this->line_dot_size = $dot_size;\n\n $this->data[$this->series]['line_dot_size'] = $dot_size;\n $this->data[$this->series]['line_thickness'] = $thickness;\n }", "public function drawLine(int $x1, int $y1, int $x2, int $y2, int $thick = 1, int $r = 255, int $g = 255, int $b = 255, int $alpha = 0) {\r\n $colour = imagecolorallocatealpha($this->image, $r, $g, $b, $alpha);\r\n\r\n if ($thick == 1) {\r\n return imageline($this->image, $x1, $y1, $x2, $y2, $colour);\r\n }\r\n $t = $thick / 2 - 0.5;\r\n if ($x1 == $x2 || $y1 == $y2) {\r\n return imagefilledrectangle($this->image, round(min($x1, $x2) - $t), round(min($y1, $y2) - $t), round(max($x1, $x2) + $t), round(max($y1, $y2) + $t), $colour);\r\n }\r\n $k = ($y2 - $y1) / ($x2 - $x1); //y = kx + q\r\n $a = $t / sqrt(1 + pow($k, 2));\r\n $points = array(\r\n round($x1 - (1 + $k) * $a), round($y1 + (1 - $k) * $a),\r\n round($x1 - (1 - $k) * $a), round($y1 - (1 + $k) * $a),\r\n round($x2 + (1 + $k) * $a), round($y2 - (1 - $k) * $a),\r\n round($x2 + (1 - $k) * $a), round($y2 + (1 + $k) * $a),\r\n );\r\n imagefilledpolygon($this->image, $points, 4, $colour);\r\n imagepolygon($this->image, $points, 4, $colour);\r\n }", "function zbx_imageline($image, $x1, $y1, $x2, $y2, $color) {\n\t\timageline($image, round($x1), round($y1), round($x2), round($y2), $color);\n}", "function drawBorder(&$img, &$color, $thickness = 1) \n{\n $x1 = 0; \n $y1 = 0; \n $x2 = ImageSX($img) - 1; \n $y2 = ImageSY($img) - 1; \n\n for($i = 0; $i < $thickness; $i++) \n { \n ImageRectangle($img, $x1++, $y1++, $x2--, $y2--, $color); \n } \n}", "function imagesmoothline ( $image , $x1 , $y1 , $x2 , $y2 , $color )\n {\n $colors = imagecolorsforindex ( $image , $color );\n if ( $x1 == $x2 )\n {\n imageline ( $image , $x1 , $y1 , $x2 , $y2 , $color ); // Vertical line\n }\n else\n {\n $m = ( $y2 - $y1 ) / ( $x2 - $x1 );\n $b = $y1 - $m * $x1;\n if ( abs ( $m ) <= 1 )\n {\n $x = min ( $x1 , $x2 );\n $endx = max ( $x1 , $x2 );\n while ( $x <= $endx )\n {\n $y = $m * $x + $b;\n $y == floor ( $y ) ? $ya = 1 : $ya = $y - floor ( $y );\n $yb = ceil ( $y ) - $y;\n $tempcolors = imagecolorsforindex ( $image , imagecolorat ( $image , $x , floor ( $y ) ) );\n $tempcolors['red'] = $tempcolors['red'] * $ya + $colors['red'] * $yb;\n $tempcolors['green'] = $tempcolors['green'] * $ya + $colors['green'] * $yb;\n $tempcolors['blue'] = $tempcolors['blue'] * $ya + $colors['blue'] * $yb;\n if ( imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) == -1 ) imagecolorallocate ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] );\n imagesetpixel ( $image , $x , floor ( $y ) , imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) );\n $tempcolors = imagecolorsforindex ( $image , imagecolorat ( $image , $x , ceil ( $y ) ) );\n $tempcolors['red'] = $tempcolors['red'] * $yb + $colors['red'] * $ya;\n $tempcolors['green'] = $tempcolors['green'] * $yb + $colors['green'] * $ya;\n $tempcolors['blue'] = $tempcolors['blue'] * $yb + $colors['blue'] * $ya;\n if ( imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) == -1 ) imagecolorallocate ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] );\n imagesetpixel ( $image , $x , ceil ( $y ) , imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) );\n $x ++;\n }\n }\n else\n {\n $y = min ( $y1 , $y2 );\n $endy = max ( $y1 , $y2 );\n while ( $y <= $endy )\n {\n $x = ( $y - $b ) / $m;\n $x == floor ( $x ) ? $xa = 1 : $xa = $x - floor ( $x );\n $xb = ceil ( $x ) - $x;\n $tempcolors = imagecolorsforindex ( $image , imagecolorat ( $image , floor ( $x ) , $y ) );\n $tempcolors['red'] = $tempcolors['red'] * $xa + $colors['red'] * $xb;\n $tempcolors['green'] = $tempcolors['green'] * $xa + $colors['green'] * $xb;\n $tempcolors['blue'] = $tempcolors['blue'] * $xa + $colors['blue'] * $xb;\n if ( imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) == -1 ) imagecolorallocate ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] );\n imagesetpixel ( $image , floor ( $x ) , $y , imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) );\n $tempcolors = imagecolorsforindex ( $image , imagecolorat ( $image , ceil ( $x ) , $y ) );\n $tempcolors['red'] = $tempcolors['red'] * $xb + $colors['red'] * $xa;\n $tempcolors['green'] = $tempcolors['green'] * $xb + $colors['green'] * $xa;\n $tempcolors['blue'] = $tempcolors['blue'] * $xb + $colors['blue'] * $xa;\n if ( imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) == -1 ) imagecolorallocate ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] );\n imagesetpixel ( $image , ceil ( $x ) , $y , imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) );\n $y ++;\n }\n }\n }\n }", "function drawLine(&$im, $x1, $y1, $x2, $y2, $c1, $c2)\n\t{\n\t\timageline($im, $x1+1, $y1, $x2+1, $y2, $c1);\n\t\timageline($im, $x1-1, $y1, $x2-1, $y2, $c1);\n\t\timageline($im, $x1, $y1+1, $x2, $y2+1, $c1);\n\t\timageline($im, $x1, $y1-1, $x2, $y2-1, $c1);\n\t\timageline($im, $x1, $y1, $x2, $y2, $c2);\n\t}", "private function traceLine() {\n $this->lineJump();\n $this->currentPage->rectangle(self::HMARGIN + $this->hOffset, $this->PAGE_HEIGHT - self::VMARGIN - $this->vOffset, $this->PAGE_WIDTH - 2*$this->hOffset - 2*self::HMARGIN, 1);\n $this->currentPage->stroke();\n }", "private function _addLines() {\r\n\t\t// Reset line thickness to one pixel.\r\n\t\timagesetthickness($this->_resource, 1);\r\n\t\t\r\n\t\t// Reset foreground color to default. \r\n\t\t$foreground = imagecolorallocate($this->_resource, $this->_fg_color['R'], $this->_fg_color['G'], $this->_fg_color['B']);\r\n\t\t\r\n\t\t// Get dimension of image\r\n\t\t$width = imagesx($this->_resource);\r\n\t\t$height = imagesy($this->_resource);\r\n\t\t\r\n\t\tfor ($i = 0; $i < abs($this->_linesModifier); $i++) {\r\n\t\t\t// Set random foreground color if desired.\r\n\t\t\t($this->useRandomColorLines) ? $foreground = $this->_setRandomColor() : null;\r\n\t\t\t\r\n\t\t\t// Add some randomly colored lines.\r\n\t\t\timageline($this->_resource, 0, rand(0, $height), $width, rand(0, $height), $foreground); // horizontal\r\n\t\t\timageline($this->_resource, rand(0, $width), 0, rand(0, $width), $height, $foreground); // vertical\r\n\t\t}\r\n\t}", "abstract protected function renderStroke($image, $params, int $color, float $strokeWidth): void;", "public function setLineHeightFactor($lineHeightFactor) {}", "function draw_average_line($average, $max_w, $min_w, $im){\r\n \r\n global $width, $height, $offset_w, $offset_h;\r\n $red = imagecolorallocate($im, 220, 0, 200);\r\n $y = $height - ($average - $min_w) * $height / ($max_w - $min_w) + $offset_h;\r\n imageline($im, $offset_w, $y, $offset_w + $width, $y, $red); \r\n imagestring($im, 2, $offset_w+$width+10, $y, round($average,2), $red);\r\n}", "function SetLineStyle($style) {\r\n\t\textract($style);\r\n\t\tif (isset($width)) {\r\n\t\t\t$width_prev = $this->LineWidth;\r\n\t\t\t$this->SetLineWidth($width);\r\n\t\t\t$this->LineWidth = $width_prev;\r\n\t\t}\r\n\t\tif (isset($cap)) {\r\n\t\t\t$ca = array('butt' => 0, 'round'=> 1, 'square' => 2);\r\n\t\t\tif (isset($ca[$cap]))\r\n\t\t\t\t$this->_out($ca[$cap] . ' J');\r\n\t\t}\r\n\t\tif (isset($join)) {\r\n\t\t\t$ja = array('miter' => 0, 'round' => 1, 'bevel' => 2);\r\n\t\t\tif (isset($ja[$join]))\r\n\t\t\t\t$this->_out($ja[$join] . ' j');\r\n\t\t}\r\n\t\tif (isset($dash)) {\r\n\t\t\t$dash_string = '';\r\n\t\t\tif ($dash) {\r\n\t\t\t\t$tab = explode(',', $dash);\r\n\t\t\t\t$dash_string = '';\r\n\t\t\t\tforeach ($tab as $i => $v) {\r\n\t\t\t\t\tif ($i > 0)\r\n\t\t\t\t\t\t$dash_string .= ' ';\r\n\t\t\t\t\t$dash_string .= sprintf('%.2F', $v);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!isset($phase) || !$dash)\r\n\t\t\t\t$phase = 0;\r\n\t\t\t$this->_out(sprintf('[%s] %.2F d', $dash_string, $phase));\r\n\t\t}\r\n\t\tif (isset($color)) {\r\n\t\t\tlist($r, $g, $b) = $color;\r\n\t\t\t$this->SetDrawColor($r, $g, $b);\r\n\t\t}\r\n\t}", "public function getLineHeightFactor() {}", "function drawLine($lineRange, $type, $colour = 'D9D9D9') {\n $border_style = array('borders' => array($type =>\n array('style' =>\n \\PHPExcel_Style_Border::BORDER_THIN,\n 'color' => array('rgb' => $colour)\n )));\n $this->objWorksheet->getStyle($lineRange)->applyFromArray($border_style);\n }", "function svgline($x1,$y1,$x2,$y2,$xmul,$ymul)\n{\n global $colors;\n $str=\"\";\n $strokew=$xmul*0.1;\n \n $col=$colors[$y1%count($colors)];\n\n if((abs($x2-$x1)>1)&&($y1!=$y2)){\n $str.=\"<line x1='\".($x1*$xmul).\"' y1='\".($y1*$ymul).\"' x2='\".(($x2-1)*$xmul).\"' y2='\".($y1*$ymul).\"' stroke='\".$col.\"' style='stroke-width:\".$strokew.\"' />\";\n $str.=\"<line x1='\".(($x2-1)*$xmul).\"' y1='\".($y1*$ymul).\"' x2='\".($x2*$xmul).\"' y2='\".($y2*$ymul).\"' stroke='\".$col.\"' style='stroke-width:\".$strokew.\"' />\";\n }else{\n $str.=\"<line x1='\".($x1*$xmul).\"' y1='\".($y1*$ymul).\"' x2='\".($x2*$xmul).\"' y2='\".($y2*$ymul).\"' stroke='\".$col.\"' style='stroke-width:\".$strokew.\"' />\";\n }\n\n return($str);\n}", "public function generatePictureLine()\n {\n $values = $this->data;\n\n // Get the total number of columns we are going to plot\n $columns = count($values);\n\n // Get the height and width of the diagram itself\n $width = round($this->w*0.75);\n $height = round($this->h*0.75);\n\n //$padding = 0;\n //$padding_l = 5;\n $padding_h = round(($this->w - $width) / 2);\n $padding_v = round(($this->h - $height) / 2); \n\n // Get the width of 1 column\n $column_width = round ($width / $columns) ;\n \n \n // Fill in the background of the image\n imagefilledrectangle($this->im,0,0,$this->w,$this->h,$this->white);\n\n $maxv = 0;\n\n // Calculate the maximum value we are going to plot\n\n foreach($values as $key => $value) \n {\n $maxv = max($value,$maxv); \n }\n \n $this->drawAxesLabels($width, $height, $column_width, $padding_h,$padding_v, $maxv);\n \n //diagram itself\n $i=0;\n //for ($i = 0;$i<count($values);)\n foreach ($values as $key => $value)\n {\n //if ($i==count($values))\n // break;\n $column_height1 = ($height / 100) * (( $value / $maxv) *100);\n $x1 = $i*$column_width + $padding_h + $column_width/2;\n $y1 = $height-$column_height1 + $padding_v;\n $i++;\n if ($i<2)\n {\n $column_height2 = ($height / 100) * (( $value / $maxv) *100);\n $x2 = (($i)*$column_width) + $padding_h + $column_width/2;\n $y2 = $height-$column_height2 + $padding_v;\n }\n if ($i>1)\n imageline($this->im,$x1,$y1,$x2,$y2,$this->color_helper->img_colorallocate($this->im, $this->color_helper->nextColor()));\n $x2 = $x1; \n\t\t$y2 = $y1;\n }\n \n return $this->im;\n }", "private function addLines()\n {\n\n $lines = rand(1, 3);\n for ($i = 0; $i < $lines; $i++) {\n imageline($this->imageResource, rand(0, 200), rand(0, -77), rand(0, 200), rand(77, 144), imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)));\n }\n\n for ($i = 0; $i < 5 - $lines; $i++) {\n imageline($this->imageResource, rand(0, -200), rand(0, 77), rand(200, 400), rand(0, 77), imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)));\n }\n }", "protected function _ensureUnderlineThickness() {}", "public function setMaxLineWidth(int $value) {\n $this->_maxLineWidth = $value;\n return $this;\n }", "public function setMaxLineWidth(int $value) {\n $this->_maxLineWidth = $value;\n return $this;\n }", "public function getUnderlineThickness();", "public function getUnderlineThickness() {}", "public function setLineWidth($series, $width) {\n\t\t$this->Data[$series]['lines']['lineWidth'] = $width;\n\t}", "public function getLineWidth($line = false) {\n if (!$line) {\n $line = $this->_lineIndex;\n }\n return $this->_lines[$this->_lineIndex]['width'];\n }", "public function getLineWidth($line = false) {\n if (!$line) {\n $line = $this->_lineIndex;\n }\n return $this->_lines[$this->_lineIndex]['width'];\n }", "public function setLineHeight($lineHeight) {}", "function line($x1, $y1, $x2, $y2)\r\n {\r\n $this->forcePen();\r\n echo \"$this->_canvas.drawLine($x1, $y1, $x2, $y2);\\n\";\r\n }", "private function drawAxis() : void\n\t{\n\t\timageline($this->im, 0 , $this->shiftY , $this->sizeX , $this->shiftY, $this->colorAxisX);\n\t\timageline($this->im, $this->shiftX , 0 , $this->shiftX, $this->sizeY , $this->colorAxisX);\n\t}", "public function setLineStyleProperties($line_width = null, $compound_type = null, $dash_type = null, $cap_type = null, $join_type = null, $head_arrow_type = null, $head_arrow_size = null, $end_arrow_type = null, $end_arrow_size = null)\n {\n ($line_width !== null) ? $this->lineStyleProperties['width'] = $this->getExcelPointsWidth((float) $line_width) : null;\n ($compound_type !== null) ? $this->lineStyleProperties['compound'] = (string) $compound_type : null;\n ($dash_type !== null) ? $this->lineStyleProperties['dash'] = (string) $dash_type : null;\n ($cap_type !== null) ? $this->lineStyleProperties['cap'] = (string) $cap_type : null;\n ($join_type !== null) ? $this->lineStyleProperties['join'] = (string) $join_type : null;\n ($head_arrow_type !== null) ? $this->lineStyleProperties['arrow']['head']['type'] = (string) $head_arrow_type : null;\n ($head_arrow_size !== null) ? $this->lineStyleProperties['arrow']['head']['size'] = (string) $head_arrow_size : null;\n ($end_arrow_type !== null) ? $this->lineStyleProperties['arrow']['end']['type'] = (string) $end_arrow_type : null;\n ($end_arrow_size !== null) ? $this->lineStyleProperties['arrow']['end']['size'] = (string) $end_arrow_size : null;\n }", "function lineheight($args) {\r\n\t\t$args['selections'] = array('6'=>'6px','7'=>'7px', '8'=>'8px', '9'=>'9px', '10'=>'10px', '11'=>'11px','12'=>'12px', '14'=>'14px', '16'=>'16px', '18'=>'18px');\r\n\t\t$args['multiple'] = false;\r\n\t\t$args['width'] = '70';\r\n\t\t$args['tooltip'] = 'Choose the line height';\r\n\t\t$this->select($args);\r\n\t}", "private function getLine(Point $point1, Point $point2, $color, $thickness)\n {\n $line = new SVGLine($point1->x, $point1->y, $point2->x, $point2->y);\n $line->setStyle('stroke', $color);\n $line->setStyle('stroke-width', $thickness);\n $line->setStyle('fill', 'none');\n\n return $line;\n }", "protected function draw_border(&$im) {\n imagerectangle($im, 0, 0, $this->width - 1, $this->height - 1, imagecolorallocate($im, 0, 0, 0));\n }", "function arrow($im, $x1, $y1, $x2, $y2, $alength, $awidth, $color) \n\t{\n\t\tif( $alength > 1 )\n\t\t\tarrow( $im, $x1, $y1, $x2, $y2, $alength - 1, $awidth - 1, $color );\n\n\t\t$distance = sqrt(pow($x1 - $x2, 2) + pow($y1 - $y2, 2));\n\n\t\t$dx = $x2 + ($x1 - $x2) * $alength / $distance;\n\t\t$dy = $y2 + ($y1 - $y2) * $alength / $distance;\n\n\t\t$k = $awidth / $alength;\n\n\t\t$x2o = $x2 - $dx;\n\t\t$y2o = $dy - $y2;\n\t\t\n\t\t$x3 = $y2o * $k + $dx;\n\t\t$y3 = $x2o * $k + $dy;\n\n\t\t$x4 = $dx - $y2o * $k;\n\t\t$y4 = $dy - $x2o * $k;\n\n\t\timageline($im, $x1, $y1, $dx, $dy, $color);\n\t\timageline($im, $x3, $y3, $x4, $y4, $color);\n\t\timageline($im, $x3, $y3, $x2, $y2, $color);\n\t\timageline($im, $x2, $y2, $x4, $y4, $color);\n\t}", "public function fillAndStrokeEvenOdd() {}", "public function border(string $color = '#000', int $thickness = 5): Image\n\t{\n\t\t$this->processor->border($color, $thickness);\n\n\t\treturn $this;\n\t}", "function StrokeFascia($img) {\n\t$r = $this->iRadius;\n\n\t// If the border width > 1 we have no choice but to\n\t// draw to filled circles since GD 1.x at does not support\n\t// a width for a circle. For the special case with a border\n\t// of width==1 it looks aestethically better to just draw a \n\t// normal circle.\n\tif( $this->iBorderWidth > 1 ) {\n\t $this->FilledCircle($img,\n\t $this->xc,$this->yc,$r,\n\t $this->iColor);\n\t $this->FilledCircle($img,\n\t $this->xc,$this->yc,$r-$this->iBorderWidth,\n\t $this->iFillColor);\n\t}\n\telse {\n\t $this->FilledCircle($img,$this->xc,$this->yc,$r,$this->iFillColor);\n\t}\n\t$doarcborder = $this->iBorderWidth == 1 ;\n\n\t// Stroke colored indicator band\n\t$n = count($this->iInd);\n\t$r = $this->iRadius - ($this->iBorderWidth == 1 ? 0 : $this->iBorderWidth);\n\tfor( $i=0; $i<$n; ++$i) {\n\t $ind = $this->iInd[$i];\n\t $as = 360-$this->scale->Translate($ind[0])*180/M_PI;\n\t $ae = 360-$this->scale->Translate($ind[1])*180/M_PI;\n\t $img->PushColor($ind[2]);\n\t $img->FilledArc($this->xc,$this->yc,$r*2,$r*2,$as,$ae);\n\t $img->PopColor();\t\n\t}\n $this->FilledCircle($img,\n\t $this->xc,$this->yc,$this->iCenterAreaWidth*$this->iRadius,\n\t $this->iFillColor); \n\tif( $doarcborder ) \n\t $img->Arc($this->xc,$this->yc, 2*$r, 2*$r, $this->iStyle==ODO_HALF ? 180 : 0 , 360);\n\n\t// Finally draw bottom line if ODO_HALF\n\tif( $this->iStyle == ODO_HALF && $this->iBorderWidth > 0 ) {\n\t $img->SetLineWeight($this->iBorderWidth);\n\t $img->PushColor($this->iColor);\n\t $img->Line($this->xc-$this->iRadius,$this->yc,$this->xc+$this->iRadius,$this->yc);\n\t $img->PopColor();\n\t}\n }", "function stretchDraw($x1, $y1, $x2, $y2, $image)\r\n {\r\n echo \"$this->_canvas.drawImage(\\\"$image\\\", $x1, $y1, $x2-$x1+1, $y2-$y1+1);\\n\";\r\n }", "function Line($x1, $y1, $x2, $y2, $style = null) {\r\n if ($style)\r\n $this->SetLineStyle($style);\r\n parent::Line($x1, $y1, $x2, $y2);\r\n }", "public function setLineCap($lineCap = self::LINE_CAP_BUTT) {}", "public function getLineGap() {}", "public function createLine($x1, $y1, $x2, $y2){\n imageline($this->img, $x1, $y1, $x2, $y2, $this->color);\t\n }", "public function fillAndStroke() {}", "public function lineWidth()\n {\n return isset($this->data->graphicElement->pen[\"lineWidth\"]) ? (float) $this->data->graphicElement->pen[\"lineWidth\"] : 1.0;\n }", "public function getLineHeight() {}", "public function line($x1, $y1, $x2, $y2) {}", "private function makeTickMarks() : void \n\t{\n\t\t$tickX = 0;\n\n\t\t$tickY = 0;\n\n\t\tif($this->ticks) {\n\n\t\t\t$tickSizeX = $this->scaleY/6;\n\t\t\t$tickSizeY = $this->scaleX/6;\n\n\t\t\twhile($tickX <= $this->sizeX) {\n\t\t\t\timageline($this->im, $tickX, 0-$tickSizeX+$this->shiftY, $tickX, 0+$tickSizeX+$this->shiftY, $this->colorTickX);\n\t\t\t\t$tickX += $this->scaleX;\n\t\t\t}\n\n\t\t\twhile($tickY <= $this->sizeY) {\n\t\t\t\timageline($this->im, 0-$tickSizeY+$this->shiftX, $tickY, 0+$tickSizeY+$this->shiftX, $tickY, $this->colorTickY);\n\t\t\t\t$tickY += $this->scaleY;\n\t\t\t}\n\t\t}\n\t}", "public function lineStyle()\n {\n return isset($this->data->graphicElement->pen[\"lineStyle\"]) ? (string) $this->data->graphicElement->pen[\"lineStyle\"] : \"Solid\";\n }", "function bevelLine($color, $x1, $y1, $x2, $y2)\r\n {\r\n $this->forcePen();\r\n echo \"$this->_canvas.setColor(\\\"\" . $color . \"\\\");\\n\";\r\n echo \"$this->_canvas.drawLine($x1, $y1, $x2, $y2);\\n\";\r\n }", "public function drawLine($xFrom, $xTo, $yFrom, $yTo, $lineWidth = 0.3, $unit = null);", "public function addBorderLine()\r\n {\r\n $this->rowIndex++;\r\n $this->data[$this->rowIndex] = self::HR;\r\n\r\n return $this;\r\n }", "public function addLine($startPoint = ADD_LINE_POINT_DEFAULT, $endPoint = ADD_LINE_POINT_DEFAULT)\n {\n $this->pdf->setlinewidth(1);\n $this->pdf->setcolor(\"stroke\", \"rgb\", 0, 0, 0, 0);\n\n if ($startPoint && $endPoint) {\n $this->pdf->moveto($startPoint[\"x\"], $startPoint[\"y\"]);\n $this->pdf->lineto($endPoint[\"x\"], $endPoint[\"y\"]);\n } else {\n $this->cursorX = $this->minX;\n $this->cursorY -= $this->margin['top'];\n $this->pdf->moveto($this->cursorX, $this->cursorY);\n $this->cursorX = $this->maxX;\n $this->pdf->lineto($this->cursorX, $this->cursorY);\n }\n $this->pdf->stroke();\n $this->pdf->fit_textline(\"\", 0, 0, \"fillcolor={black}\");\n }", "function ncurses_mvvline($y, $x, $attrchar, $n)\n{\n}", "function draw_boxes2 ($image, $colorid=0, $offset=0) {\r\n \r\n $color[0]= imagecolorallocate($image, 0, 0, 0);\r\n $color[1]= imagecolorallocate($image, 255, 0, 0);\r\n $color[2]= imagecolorallocate($image, 0, 255, 0);\r\n $color[3]= imagecolorallocate($image, 0, 0, 255);\r\n $color[4]= imagecolorallocate($image, 255, 255, 0);\r\n \r\n $linecolor=$color[$colorid];\r\n \r\n foreach($this->text_blocks as $text_block) {\r\n imageline ( $image , $text_block->ordered['x1'] -$offset, $text_block->ordered['y1'] -$offset, $text_block->ordered['x2'] +$offset, $text_block->ordered['y2'] -$offset, $linecolor);\r\n imageline ( $image , $text_block->ordered['x2'] +$offset, $text_block->ordered['y2'] -$offset, $text_block->ordered['x3'] +$offset, $text_block->ordered['y3']+$offset , $linecolor);\r\n imageline ( $image , $text_block->ordered['x3'] +$offset, $text_block->ordered['y3'] +$offset, $text_block->ordered['x4'] -$offset, $text_block->ordered['y4']+$offset , $linecolor);\r\n imageline ( $image , $text_block->ordered['x4'] -$offset, $text_block->ordered['y4'] +$offset, $text_block->ordered['x1'] -$offset, $text_block->ordered['y1']-$offset , $linecolor);\r\n }\r\n $this->image_drawn=$image;\r\n }", "public function drawLine($start = null, $finish = null, $height = 3) {\n $this->_writeLine('<hr />', '#FFFFFF', $height);\n return $this;\n }", "function getLineHeight() { return $this->_lineheight; }", "private function cutFill($im, $line_numbers, $line_width, $start, $end, $direction, $step = 0) {\n if ($step) $this->step = $step;\n list($r1,$g1,$b1) = self::hex2rgb($start);\n list($r2,$g2,$b2) = self::hex2rgb($end);\n\n/*\n switch($direction) {\n case 'horizontal':\n $line_numbers = imagesx($im);\n $line_width = imagesy($im);\n break;\n case 'vertical':\n $line_numbers = imagesy($im);\n $line_width = imagesx($im);\n break;\n case 'ellipse':\n $width = imagesx($im);\n $height = imagesy($im);\n $rh=$height>$width?1:$width/$height;\n $rw=$width>$height?1:$height/$width;\n $line_numbers = min($width,$height);\n $center_x = $width/2;\n $center_y = $height/2;\n list($r1,$g1,$b1) = $this->hex2rgb($end);\n list($r2,$g2,$b2) = $this->hex2rgb($start);\n imagefill($im, 0, 0, imagecolorallocate( $im, $r1, $g1, $b1 ));\n break;\n case 'ellipse2':\n $width = imagesx($im);\n $height = imagesy($im);\n $rh=$height>$width?1:$width/$height;\n $rw=$width>$height?1:$height/$width;\n $line_numbers = sqrt(pow($width,2)+pow($height,2));\n $center_x = $width/2;\n $center_y = $height/2;\n list($r1,$g1,$b1) = $this->hex2rgb($end);\n list($r2,$g2,$b2) = $this->hex2rgb($start);\n break;\n case 'circle':\n $width = imagesx($im);\n $height = imagesy($im);\n $line_numbers = sqrt(pow($width,2)+pow($height,2));\n $center_x = $width/2;\n $center_y = $height/2;\n $rh = $rw = 1;\n list($r1,$g1,$b1) = $this->hex2rgb($end);\n list($r2,$g2,$b2) = $this->hex2rgb($start);\n break;\n case 'circle2':\n $width = imagesx($im);\n $height = imagesy($im);\n $line_numbers = min($width,$height);\n $center_x = $width/2;\n $center_y = $height/2;\n $rh = $rw = 1;\n list($r1,$g1,$b1) = $this->hex2rgb($end);\n list($r2,$g2,$b2) = $this->hex2rgb($start);\n imagefill($im, 0, 0, imagecolorallocate( $im, $r1, $g1, $b1 ));\n break;\n case 'square':\n case 'rectangle':\n $width = imagesx($im);\n $height = imagesy($im);\n $line_numbers = max($width,$height)/2;\n list($r1,$g1,$b1) = $this->hex2rgb($end);\n list($r2,$g2,$b2) = $this->hex2rgb($start);\n break;\n case 'diamond':\n list($r1,$g1,$b1) = $this->hex2rgb($end);\n list($r2,$g2,$b2) = $this->hex2rgb($start);\n $width = imagesx($im);\n $height = imagesy($im);\n $rh=$height>$width?1:$width/$height;\n $rw=$width>$height?1:$height/$width;\n $line_numbers = min($width,$height);\n break;\n default:\n }\n*/\n\n $r = $g = $b = 255;\n $colors = [];\n $fill = '';\n for ( $i = 0; $i < $line_numbers; $i=$i+$this->step ) {\n // old values :\n $old_r=$r;\n $old_g=$g;\n $old_b=$b;\n // new values :\n $r = ( $r2 - $r1 != 0 ) ? intval( $r1 + ( $r2 - $r1 ) * ( $i / $line_numbers ) ): $r1;\n $g = ( $g2 - $g1 != 0 ) ? intval( $g1 + ( $g2 - $g1 ) * ( $i / $line_numbers ) ): $g1;\n $b = ( $b2 - $b1 != 0 ) ? intval( $b1 + ( $b2 - $b1 ) * ( $i / $line_numbers ) ): $b1;\n\n\n if ( \"$old_r,$old_g,$old_b\" != \"$r,$g,$b\")\n $fill = imagecolorallocate( $im, $r, $g, $b );\n $colors[] = $fill;\n }\n return $colors;\n }", "protected function forcePen()\r\n {\r\n if ($this->_pen->isModified())\r\n {\r\n echo \"$this->_canvas.setStroke(\" . $this->_pen->Width . \");\\n\";\r\n echo \"$this->_canvas.setColor(\\\"\" . $this->_pen->Color . \"\\\");\\n\";\r\n $this->_pen->resetModified();\r\n $this->_brush->modified();\r\n }\r\n }", "public function setLineSpacing(int $height = null)\n {\n if ($height === null) {\n // Reset to default\n $this -> connector -> write(self::ESC . \"2\"); // Revert to default line spacing\n return;\n }\n self::validateInteger($height, 1, 255, __FUNCTION__);\n $this -> connector -> write(self::ESC . \"3\" . chr($height));\n }", "function nectar_font_line_height($typography_item, $line_height, $nectar_options) {\n\t\tif( $nectar_options[$typography_item.'_line_height'] != '-' ) { \n\t\t\t$the_line_height = $nectar_options[$typography_item.'_line_height'];\n\t\t} \n\t\t// Auto Line Height.\n\t\telse if( !empty($line_height) ) {\n\t\t\t$the_line_height = $line_height;\n\t\t} \n\t\telse { \n\t\t\t$the_line_height = null; \n\t\t}\n\t\t\n\t\treturn $the_line_height;\n\t\t\n\t}", "function DottedRect($x=100,$y=150,$w=50,$h=50)\n\t\t{\n\t\t $x *= $this->k ;\n\t\t $y = ($this->h-$y)*$this->k;\n\t\t $w *= $this->k ;\n\t\t $h *= $this->k ;// - h?\n\t\t \n\t\t $herex = $x;\n\t\t $herey = $y;\n\n\t\t //Make fillcolor == drawcolor\n\t\t $bak_fill = $this->FillColor;\n\t\t $this->FillColor = $this->DrawColor;\n\t\t $this->FillColor = str_replace('RG','rg',$this->FillColor);\n\t\t $this->_out($this->FillColor);\n\t\t \n\t\t while ($herex < ($x + $w)) //draw from upper left to upper right\n\t\t {\n\t\t $this->DrawDot($herex,$herey);\n\t\t $herex += (3*$this->k);\n\t\t }\n\t\t $herex = $x + $w;\n\t\t while ($herey > ($y - $h)) //draw from upper right to lower right\n\t\t {\n\t\t $this->DrawDot($herex,$herey);\n\t\t $herey -= (3*$this->k);\n\t\t }\n\t\t $herey = $y - $h;\n\t\t while ($herex > $x) //draw from lower right to lower left\n\t\t {\n\t\t $this->DrawDot($herex,$herey);\n\t\t $herex -= (3*$this->k);\n\t\t }\n\t\t $herex = $x;\n\t\t while ($herey < $y) //draw from lower left to upper left\n\t\t {\n\t\t $this->DrawDot($herex,$herey);\n\t\t $herey += (3*$this->k);\n\t\t }\n\t\t $herey = $y;\n\n\t\t $this->FillColor = $bak_fill;\n\t\t $this->_out($this->FillColor); //return fillcolor back to normal\n\t\t}", "public function setLineJoinStyle($lineJoinStyle) {}", "public function drawSeparationLine($options = [\n 'padding-top' => true,\n 'padding-bottom' => true,\n 'fg' => 'grey',\n 'bg' => 'black',\n 'middle' => '',\n ])\n {\n $defaultOptions = [\n 'padding-top' => true,\n 'padding-bottom' => true,\n 'fg' => 'grey',\n 'bg' => 'black',\n 'middle' => '',\n ];\n\n $options = array_merge($defaultOptions, $options);\n $padLength = 25;\n $sides = 2;\n $length = strlen($options['middle']) + ($sides * $padLength);\n $line = str_pad($options['middle'], $length, '-', STR_PAD_BOTH);\n $line = $options['padding-top'] ? \"\\n\".$line : $line;\n $line = $options['padding-bottom'] ? $line.\"\\n\" : $line;\n\n $this->writeln($line);\n }", "public function getStrokeWidth(): int\n {\n return $this->strokeWidth;\n }", "public function closeFillAndStrokeEvenOdd() {}", "function setLineBetweenColumns() {\t \r\n\t \t$this->lineBetweenColumns = true;\t\r\n\t}", "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 setLineWidth($width)\n {\n $this->_pdfDocument->data['lineWidth'] = $width;\n $this->pageBuffer .= sprintf(\"%.2F w\\n\", $width * $this->getDocument()->getScaleFactor());\n\n return $this->_pdfDocument;\n }", "public function setLineJoin($lineJoin = self::LINE_JOIN_MITER) {}", "function __paintCodeline($class, $num, $line) {\n\t\t$line = h($line);\n\n\t\tif (trim($line) == '') {\n\t\t\t$line = '&nbsp;'; // Win IE fix\n\t\t}\n\t\treturn '<div class=\"code-line ' . trim($class) . '\"><span class=\"line-num\">' . $num . '</span><span class=\"content\">' . $line . '</span></div>';\n\t}", "function bevelLine($color, $x1, $y1, $x2, $y2)\r\n {\r\n $resp = $this->forcePen();\r\n $resp .= $this->_getJavascriptVar() . \".strokeStyle = \\\"\" . $color . \"\\\";\\n\";\r\n $resp .= $this->drawLine(array($x1, $y1), array($x2, $y2));\r\n\r\n return $resp;\r\n }", "function mond($depth, $split, &$lines, $x1, $y1, $x2, $y2, &$boxes) {\n\n\t// 1 out of $splitty single lines is just a line, not a\n\t// divider between two sub-zones.\n\t// $buffer is the distance from a previously-existing line that\n\t// we'll draw another line.\n\tglobal $splitty, $buffer;\n\n\tif ($depth == 0) {\n\t\tif (!$split)\n\t\t\t$boxes[] = array($x1, $y1, $x2, $y2);\n\t\treturn;\n\t}\n\n\t$line_choice = mt_rand(0,2);\n\n\tif ($line_choice == 0 && abs($x1 - $x2) < 2*$buffer) {\n\t\t// Can't draw a horizontal line, but maybe a vertical?\n\t\tif (abs($y1 - $y2) < 2*$buffer) {\n\t\t\tif (!$split)\n\t\t\t\t$boxes[] = array($x1, $y1, $x2, $y2);\n\t\t\treturn;\n\t\t}\n\t\t$line_choice = 1;\n\t}\n\n\tif ($line_choice == 1 && abs($y1 - $y2) < 2*$buffer) {\n\t\t// Can't draw a vertical line, but maybe a horizontal?\n\t\tif (abs($x1 - $x2) < 2*$buffer) {\n\t\t\tif (!$split)\n\t\t\t\t$boxes[] = array($x1, $y1, $x2, $y2);\n\t\t\treturn;\n\t\t}\n\t\t$line_choice = 0;\n\t}\n\n\tif ($line_choice == 2 && (abs($y1 - $y2) < 2*$buffer\n\t\t|| abs($x1 - $x2) < 2*$buffer)) {\n\t\tif (!$split)\n\t\t\t$boxes[] = array($x1, $y1, $x2, $y2);\n\t\treturn;\n\t}\n\n\tswitch ($line_choice) {\n\tcase 0: // Draw a line horizontally across current zone.\n\t\t$x3 = rand($x1 + $buffer, $x2 - $buffer);\n\t\t$lines[] = array(array($x3,$y1), array($x3,$y2));\n\t\t// Either just draw a line, or split zone into two sub-zones\n\t\tif (mt_rand(0,$splitty) == 0)\n\t\t\tmond($depth, 1, $lines, $x1, $y1, $x2, $y2, $boxes);\n\t\telse {\n\t\t\t// Split current zone into 2 sub-zones.\n\t\t\tmond($depth - 1, 0, $lines, $x1,$y1,$x3,$y2, $boxes);\n\t\t\tmond($depth - 1, 0, $lines, $x3,$y1,$x2,$y2, $boxes);\n\t\t}\n\t\tbreak;\n\tcase 1: // Draw a line vertically across current zone.\n\t\t$y3 = rand($y1 + $buffer, $y2 - $buffer);\n\t\t$lines[] = array(array($x1,$y3), array($x2,$y3));\n\t\t// Either just draw the line, or split zone into two sub-zones\n\t\tif (mt_rand(0,$splitty) == 0)\n\t\t\tmond($depth, 1, $lines, $x1, $y1, $x2, $y2, $boxes);\n\t\telse {\n\t\t\t// Split current zone into 2 sub-zones.\n\t\t\tmond($depth - 1, 0, $lines, $x1,$y1,$x2,$y3, $boxes);\n\t\t\tmond($depth - 1, 0, $lines, $x1,$y3,$x2,$y2, $boxes);\n\t\t}\n\t\tbreak;\n\n\tcase 2: // Draw both horizontal and vertical lines across zone.\n\n\t\t$x3 = mt_rand($x1 + $buffer, $x2 - $buffer);\n\t\t$y3 = mt_rand($y1 + $buffer, $y2 - $buffer);\n\n\t\t$lines[] = array(array($x3,$y1), array($x3,$y2));\n\t\t$lines[] = array(array($x1,$y3), array($x2,$y3));\n\n\t\t// Draw lines in 4 sub-zones.\n\t\tmond($depth - 1, 0, $lines, $x1,$y1,$x3,$y3, $boxes);\n\t\tmond($depth - 1, 0, $lines, $x3,$y1,$x2,$y3, $boxes);\n\t\tmond($depth - 1, 0, $lines, $x1,$y3,$x3,$y2, $boxes);\n\t\tmond($depth - 1, 0, $lines, $x3,$y3,$x2,$y2, $boxes);\n\n\t\tbreak;\n\t}\n}", "function RenderLyricsOnlyLine($line) {\r\n $this->SetLyricsFont();\r\n $this->Cell(0, 0, $line[\"lyrics\"]);\r\n return $this->GetStringWidth($line[\"lyrics\"]);\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 set_approx_line_gap($value)\n\t{\n\t\t$this->approx_line_gap = $value;\n\t}", "public function set_approx_line_gap($value)\n\t{\n\t\t$this->approx_line_gap = $value;\n\t}", "protected function _drawBorderAndBackground(\\SetaPDF_Core_Canvas $canvas, $x, $y) {}", "public function setLineCapStyle($lineCapStyle) {}", "public function lineTo($x, $y) {}", "public function setOutlineWidth($outlineWidth) {}", "function imagettfstroketext(&$image, $size, $angle, $x, $y, &$textcolor, &$strokecolor, $fontfile, $text, $px)\n{\n for($c1 = ($x-abs($px)); $c1 <= ($x+abs($px)); $c1++)\n for($c2 = ($y-abs($px)); $c2 <= ($y+abs($px)); $c2++)\n $bg = imagettftext($image, $size, $angle, $c1, $c2, $strokecolor, $fontfile, $text);\n\n return imagettftext($image, $size, $angle, $x, $y, $textcolor, $fontfile, $text);\n}", "protected function _drawStyle($style) {}", "function lineInterceptWithSet($line, $set) {\n $line1XStart = $line[0][0];\n $line1XEnd = $line[1][0];\n $line1YStart = $line[0][1];\n $line1YEnd = $line[1][1];\n\n\n foreach($set AS $item) {\n $line2XStart = $item[0][0];\n $line2XEnd = $item[1][0];\n $line2YStart = $item[0][1];\n $line2YEnd = $item[1][1];\n\n\n }\n return true;\n}", "public function lineWithSteps() {\n\t\t$this->Options['series']['lines']['steps'] = true;\n\t}", "public function getLineEndingStyle() {}", "private function custom_round_pixelate($blocksize)\n\t{\n\t\t$imagex = imagesx($this->image);\n\t\t$imagey = imagesy($this->image);\n\n\t\tfor ($x=0; $x<$imagex; $x+=$blocksize)\n\t\t{\n\t\t\tfor ($y = 0; $y < $imagey; $y += $blocksize)\n\t\t\t{\n\t\t\t\t$colour = imagecolorat($this->image, $x, $y);\n\t\t\t\timagefilledellipse($this->image, $x - $blocksize / 2, $y - $blocksize / 2, $blocksize, $blocksize, $colour);\n\t\t\t}\n\t\t}\n\t}", "protected function lineToPdf(): void\n {\n $this->pdf->SetDrawColor($this->color['r'], $this->color['g'], $this->color['b']);\n $this->Line($this->x1, $this->y1, $this->x2, $this->y2);\n }", "function roundRect($x1, $y1, $x2, $y2, $w, $h)\r\n {\r\n $cx = $w/2;\r\n $cy = $h/2;\r\n $rw = $x2 - $x1 + 1;\r\n $rh = $y2 - $y1 + 1;\r\n $wp = $this->_pen->Width;\r\n // draw shape\r\n $this->forceBrush();\r\n echo \"$this->_canvas.fillRect($x1 + $cx, $y1, $rw - $w, $rh);\\n\";\r\n echo \"$this->_canvas.fillRect($x1, $y1 + $cy, $rw, $rh - $h);\\n\";\r\n // draw border\r\n $this->forcePen();\r\n echo \"$this->_canvas.drawLine($x1 + $cx, $y1, $x2 - $cx, $y1);\\n\";\r\n echo \"$this->_canvas.drawLine($x1 + $cx, $y2, $x2 - $cx, $y2);\\n\";\r\n echo \"$this->_canvas.drawLine($x1, $y1 + $cy, $x1, $y2 - $cy);\\n\";\r\n echo \"$this->_canvas.drawLine($x2, $y1 + $cy, $x2, $y2 - $cy);\\n\";\r\n\r\n $this->forcePen();\r\n echo \"$this->_canvas.fillArc($x1, $y1, $w, $h, 90, 180);\\n\";\r\n echo \"$this->_canvas.fillArc($x2 - $w + $wp, $y1, $w, $h + $wp, 0, 90);\\n\";\r\n echo \"$this->_canvas.fillArc($x1, $y2 - $h + $wp, $w, $h, 180, 270);\\n\";\r\n echo \"$this->_canvas.fillArc($x2 - $w + $wp, $y2 - $h + $wp, $w, $h, 270, 360);\\n\";\r\n\r\n $this->forceBrush();\r\n echo \"$this->_canvas.fillArc($x1 + $wp, $y1 + $wp, $w - $wp, $h - $wp, 90, 180);\\n\";\r\n echo \"$this->_canvas.fillArc($x2 - $w + $wp, $y1 + $wp, $w - $wp, $h - $wp, 0, 90);\\n\";\r\n echo \"$this->_canvas.fillArc($x1 + $wp, $y2 - $h, $w, $h, 180, 270);\\n\";\r\n echo \"$this->_canvas.fillArc($x2 - $w, $y2 - $h, $w, $h, 270, 360);\\n\";\r\n\r\n\r\n //echo \"$this->_canvas.drawArc($x2 - $r * 2, $y1, $r * 2, $r * 2, 270, 360);\\n\";\r\n //echo \"$this->_canvas.drawArc($x1, $y2 - $r * 2, $r * 2, $r * 2, 90, 180);\\n\";\r\n //echo \"$this->_canvas.drawArc($x2 - $r * 2, $y2 - $r * 2, $r * 2, $r * 2, 360, 90);\\n\";\r\n }", "private function drawHorizontalLine(Canvas $canvas, Shape $line)\n {\n // Get line coordinates.\n $coordinates = $line->getCoordinates();\n // Get canvas grid.\n $grid = $canvas->getGrid();\n // Get the line distance between the coordinates.\n $line_distance = $line->getLineDistance();\n\n for ($col = 0; $col < $line_distance; $col++)\n {\n $grid[$coordinates['y1']][$coordinates['x1'] + $col] = 'x';\n }\n\n // Write data to the canvas grid.\n $canvas->setGrid($grid);\n }", "public function setLine($var)\n {\n GPBUtil::checkInt32($var);\n $this->line = $var;\n\n return $this;\n }", "function ps_set_border_style($psdoc, $style, $width)\n{\n}", "function RenderChordLine($line) {\r\n $lheight = 4.5;\r\n $lyrics = $line[\"lyrics\"];\r\n $chords = $line[\"chords\"];\r\n\r\n $offset = 0;\r\n $minsegwidth = 0;\r\n foreach ($chords as $position => $crd) {\r\n $this->SetLyricsFont();\r\n $seg = substr($lyrics, $offset, ($position - $offset));\r\n $segw = $this->GetStringWidth($seg);\r\n\r\n // determine minimum width from previous chord\r\n $width = ($segw < $minsegwidth) ? $minsegwidth : $segw;\r\n if ($width > 0) {\r\n // print the segment on the line below the current\r\n $this->Text((float) ($this->GetX()), (float) ($this->GetY() + $lheight), $seg);\r\n }\r\n\r\n // print the chord on the current line\r\n $this->SetChordsFont();\r\n $crdw = $this->GetStringWidth($crd);\r\n $this->Text((float) ($this->GetX() + $width), (float) ($this->GetY()), $crd);\r\n\r\n // update for next iteration\r\n $offset = $position;\r\n $minsegwidth = $crdw + 2;\r\n $this->SetXY((float) ($this->GetX() + $width), (float) ($this->GetY()));\r\n }\r\n\r\n // print any remaining information\r\n $this->SetLyricsFont();\r\n $seg = substr($lyrics, $offset);\r\n $this->Text((float) ($this->GetX()), (float) ($this->GetY() + $lheight), $seg);\r\n\r\n $this->Ln(3);\r\n }", "public function drawLine($start = null, $finish = null, $height = 3) {\n $x1 = $this->getDriver()->GetX();\n $y1 = $this->getDriver()->GetY();\n ;\n $y2 = $y1;\n if ($start !== null) {\n $y1+= $start;\n }\n if ($finish !== null) {\n $x2 = $finish;\n } else {\n $x2 = $this->getDriver()->w - $this->getDriver()->lMargin - $this->getDriver()->rMargin;\n }\n $this->getDriver()->Line($x1, $y1, $x2, $y2);\n //$this->getDriver()->Ln($height);\n return $this;\n }", "public function setTextLineSpacing($value)\n {\n $this->_textLineSpacing = $value;\n }" ]
[ "0.74529386", "0.74191296", "0.7258595", "0.7055428", "0.7030043", "0.6994356", "0.6969234", "0.65007085", "0.6385935", "0.6333521", "0.6234594", "0.61639994", "0.6093685", "0.60896534", "0.60439724", "0.60207534", "0.597951", "0.5968797", "0.592622", "0.5825955", "0.5748873", "0.5713136", "0.55924165", "0.55812746", "0.5573225", "0.55453855", "0.55453855", "0.55311745", "0.5530919", "0.55088645", "0.54819214", "0.54819214", "0.547115", "0.542256", "0.53363407", "0.53158844", "0.53104144", "0.5292412", "0.52660304", "0.5259127", "0.5251826", "0.52171", "0.5203187", "0.5190317", "0.5179215", "0.5174369", "0.51638466", "0.51309556", "0.5119167", "0.5065625", "0.50353044", "0.50285625", "0.50274426", "0.50215685", "0.50045055", "0.49974564", "0.49905655", "0.49869516", "0.49844763", "0.49801612", "0.49768037", "0.4947871", "0.4909828", "0.48952892", "0.48951688", "0.4875599", "0.48745546", "0.48605213", "0.48600644", "0.48600578", "0.48555508", "0.48162526", "0.48100886", "0.48005438", "0.4792117", "0.47791773", "0.47757077", "0.47754312", "0.47708023", "0.47698894", "0.47545555", "0.47545555", "0.47389057", "0.47252452", "0.47142583", "0.4710669", "0.47072047", "0.470182", "0.4699619", "0.46992335", "0.46940377", "0.4688812", "0.4688077", "0.46860257", "0.46694383", "0.46609604", "0.46580613", "0.4640131", "0.46307465", "0.46204126" ]
0.74610996
0
Attaching pagetitle and subtitle to view.
public function index(){ view()->share(['pageTitle' => 'A List of References', 'subTitle' => 'List of all References']); $directors = Director::orderBy('created_at', 'asc')->get(); return view('admin.director.index', compact('directors')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_subtitle($subtitle) \r\n\t{\r\n\t\t//$this->subtitle = $subtitle;\r\n\t\t$this->data['subtitle_for_layout'] = $subtitle;\r\n\t\t$this;\r\n\t}", "function minorite_views_pre_render(&$view) {\n $view->set_title(t($view->get_title()));\n}", "public function Pagetitle($options = array()) {\n\n return $this->view->partial('partial/pagetitle.phtml', array('pagetitle' => $this->view->pagetitle\n ));\n }", "public function setTitle($title){\n $this->p_title = $title;\n }", "function set_title($title) \r\n\t{\r\n\t\t//$this->title = $title;\r\n\t\t$this->data['title_for_layout'] = $title;\r\n\t\t$this;\r\n\t}", "function setup_title() {\n\t\tglobal $bp;\n\n\t\tif ( bp_is_messages_component() ) {\n\t\t\tif ( bp_is_my_profile() ) {\n\t\t\t\t$bp->bp_options_title = __( 'My Messages', 'buddypress' );\n\t\t\t} else {\n\t\t\t\t$bp->bp_options_avatar = bp_core_fetch_avatar( array(\n\t\t\t\t\t'item_id' => bp_displayed_user_id(),\n\t\t\t\t\t'type' => 'thumb',\n\t\t\t\t\t'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )\n\t\t\t\t) );\n\t\t\t\t$bp->bp_options_title = bp_get_displayed_user_fullname();\n\t\t\t}\n\t\t}\n\n\t\tparent::setup_title();\n\t}", "protected function setPageTitle() {\r\n\t\t$pageTitleText = (empty($this->settings['news']['semantic']['general']['pageTitle']['useAlternate'])) ? $this->newsItem->getTitle() : $this->newsItem->getAlternativeTitle();\r\n\t\t$pageTitleAction = $this->settings['news']['semantic']['general']['pageTitle']['action'];\r\n\r\n\t\tif (!empty($pageTitleAction)) {\r\n\t\t\tswitch ($pageTitleAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$pageTitleText .= ': ' . $GLOBALS['TSFE']->page['title'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$pageTitleText = $GLOBALS['TSFE']->page['title'] . ': ' . $pageTitleText;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t\t$this->pageTitle = html_entity_decode($pageTitleText, ENT_QUOTES, \"UTF-8\");\r\n\t\t\t$GLOBALS['TSFE']->page['title'] = $this->pageTitle;\r\n\t\t\t$GLOBALS['TSFE']->indexedDocTitle = $this->pageTitle;\r\n\t\t}\r\n\t}", "function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "public function set_title($text){\n $this->title=$text;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "protected function view($view) {\n\n //Page subtitle\n switch($view) {\n case \"create\" :\n $this->page_subtitle = \"Create \".$this->model_name;\n break;\n case \"edit\" :\n $this->page_subtitle = \"Amend \".$this->model_name;\n break;\n\n case \"show\" :\n $this->page_subtitle =\"View \".$this->model_name;\n break;\n case \"list\" :\n $this->page_subtitle = \"List \".$this->model_name;\n break;\n case \"permissions\" :\n $this->page_subtitle = $this->model_name. \" Permissions\";\n break;\n }\n \n }", "public function setTitle($title){\n $this->title = $title;\n }", "public function setTitle($title){\n \t$this->title = $title;\n }", "public function setTitle($title){\n $this->title = $title;\n }", "function setTitle($title)\r\n\t{\r\n\t\t$this->title = $title;\r\n\t}", "public function setTitle($newTitle) { $this->Title = $newTitle; }", "function setTitle($title)\n {\n $this->m_title = $title;\n }", "public function setTitle($title) {\r\n $this->title = $title;\r\n }", "public function setTitle($var)\n {\n $this->_title = $var;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "function setTitle($a_title)\n\t{\n\t\t$this->title = $a_title;\n\t}", "function append_title($title){\r\n\t\t$this->_title .= \" - {$title}\";\r\n\t}", "public function setTitle($title) {\n $this->title = $title ;\n }", "private function configureTemplate(){\n\t\t$template = $this->getTemplate();\n\t\t$template->setPageSubtitle($this->getModule()->getDisplayedName());\n\t}", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setPageTitle($title);", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function set_pagetitle($title)\n {\n $this->pagetitle = $title;\n }", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n $this->_title = $title;\n }", "public function setTitle($t){\n\t\t$this->title = $t;\n\t}", "public function setTitle($title) {\r\n $this->_title = $title;\r\n }", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "function setTitle($title) {\n\t\t$this->_title = $title;\n\t}", "function setTitlelink($v) {\n\t\t$this->set(\"titlelink\",$v);\n\t}", "protected function setDetails($subTitle, $title)\n {\n $this->setViewData(compact('subTitle', 'title'));\n }", "public function specialization() {\n if (isset($this->config->progressTitle) && trim($this->config->progressTitle) != '') {\n $this->title = format_string($this->config->progressTitle);\n }\n }", "function ts_set_custom_title( $title ) {\r\n \r\n\tif (is_single() || is_page())\r\n\t{\r\n\t\t$subtitle = get_post_meta (get_the_ID(), 'subtitle', true);\r\n\t\tif (!empty($subtitle))\r\n\t\t{\r\n\t\t\t$title .= $subtitle.' | ';\r\n\t\t}\r\n\t}\r\n return $title;\r\n}", "public function setTitle($title = ''){\n $this->setVar('TITLE', $title);\n }", "public function setTitle($title)\r\n\t\t{\r\n\t\t\t$this->_title = $title;\r\n\t\t}", "public function loadPageTitle()\n \t\t{\n echo \"<title>Add Item</title>\";\n }", "public function setTitle($title = '')\n {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->_title = $title;\n }", "public function setSubtitle($v)\n { $this->getCurrentTranslation()->setSubtitle($v);\n\n return $this;\n }", "public function setTitle($title)\n {\n $this->_title = $title;\n }", "public function setTitle($title)\n {\n $this->_title = $title;\n }", "public function setPageTitle(array $config): void\n {\n foreach ($config as $item) {\n if (isset($item['active']) && $item['active']) {\n $this->_View->assign('title', $item['title']);\n break;\n }\n }\n }", "public function setTtitle($title)\n {\n $this->title = $title;\n }", "public function compose(View $view)\n {\n $title = !empty($view->getData()[\"title\"]) ? $view->getData()[\"title\"] : \"\";\n $view->with('title', $title);\n }", "function prepend_title($title){\r\n\t\t$this->_title = \"{$title} - {$this->_title}\";\r\n\t}", "public function title($title) {\n return $this->view->title = $title;\n }", "function set_title($title){\r\n\t\t$this->_title = $title;\r\n\t}", "public function setTitleTag($title)\n {\n $this->_title_tag = $title;\n }", "public function setTitle($title){\n\t\t$this->mail_title = $title;\n\t}", "public function setTitle($title) {\n\t\t\n\t\t\t$this->_title = $title;\n\t\t\n\t\t}", "public function set_viewtitle($param)\n\t{\n\t\t$this->viewtitle = (string)$param;\n\t\treturn $this;\n\t}", "public function init()\n {\n\t\t$this->view->headTitle(Zend_Registry::get('Default Page Title'));\n\t\t$this->view->headTitle()->prepend('Partners');\n }", "public function setTitle($title)\n{\n $this->title= $title;\n}", "public function set_title($title)\n {\n $this->title = $title;\n }", "function subtitle( $post ) {\n\n\tif ( ! in_array( $post->post_type, [ 'post', 'page' ], true ) ) {\n\t\treturn;\n\t}\n\n\t// The subtitle field.\n\t$_stitle = sanitize_text_field( get_post_meta( $post->ID, '_subtitle', true ) );\n\t\n echo '<div class=\"inside\">';\n\techo '<div id=\"edit-slug-box\" class=\"hide-if-no-js\">';\n\techo '<label for=\"subtitle\"><strong>' . __( 'Sub Title: ' ) . '</strong></label>';\n echo '<input type=\"text\" name=\"subtitle\" id=\"subtitle\" value=\"' . $_stitle . '\" size=\"30\" spellcheck=\"true\" autocomplete=\"off\" />';\n\techo '</div>';\n echo '</div>';\t\n}", "public function set_pub_subtitle( $post_meta ){\n\t\t\n\t\t$subtitle = ( ! empty( $post_meta['_cwpp_subtitle'] ) )? $post_meta['_cwpp_subtitle'][0] : '';\n\t\t\n\t\t$this->pub_subtitle = $subtitle;\n\t\t\n\t}", "private function setTitle()\n {\n $this->title = $this->start_date;\n\n if ($this->start_date != $this->end_date) {\n $this->title .= ' - '.$this->end_date;\n }\n }", "public function setTitle($title){ $this->setSeoTitle($title)->setContentTitle($title); return $this; }", "protected function setTitle()\n\t{\n\t\tglobal $APPLICATION;\n\n\t\tif ($this->arParams[\"SET_TITLE\"] == 'Y')\n\t\t\t$APPLICATION->SetTitle(Localization\\Loc::getMessage(\"SPOL_DEFAULT_TITLE\"));\n\t}", "function link() {\n $this->title = \"link\";\n }", "public function setTitle($title)\n\t{\n\t\t$this->setBodyTitle($title);\n\t\t$this->setPageTitle($title);\n\t}", "public function setTitle($title = '', $prepend = true) {\n $this->response->setTitle($title . ($prepend ? $this->title['d'] . $this->title['t'] : ''), false);\n }", "function appendTitle($a_title_str)\n\t{\n\t\t$this->title.= $a_title_str;\n\t}", "public function setTitle($value)\n {\n $this->title = $value;\n }", "protected function prepareMetadata(AppContext $app, View $view): void\n {\n $type = $app->input('type');\n\n $langKey = \"luna.$type.category.edit.title\";\n $appLangKey = \"app.$type.category.edit.title\";\n\n if ($this->lang->has($langKey)) {\n $title = $this->trans($langKey);\n } elseif ($this->lang->has($appLangKey)) {\n $title = $this->trans($appLangKey);\n } else {\n $title = $this->trans(\n 'luna.category.edit.title',\n title: $this->trans('luna.' . $type . '.title')\n );\n }\n\n $view->setTitle($title);\n }", "public function setTitle($value)\n {\n $this->_title = $value;\n }", "function setTitle(string $title): void\n {\n $this->data['head']['title'] = $title;\n }", "function get_subtitle() \t{\n \t\treturn $this->subtitle;\t\n \t}", "function titel_show()\n{\n global $tpl;\n global $db;\n $sFormTitle = \"Brochure aanvraag beheer\";\n\n//-------------------------------\n// titel Open Event begin\n// titel Open Event end\n//-------------------------------\n\n//-------------------------------\n// Set URLs\n//-------------------------------\n//-------------------------------\n// titel Show begin\n//-------------------------------\n\n $tpl->set_var(\"FormTitle\", $sFormTitle);\n\n//-------------------------------\n// titel BeforeShow Event begin\n// titel BeforeShow Event end\n//-------------------------------\n\n//-------------------------------\n// Show fields\n//-------------------------------\n $tpl->parse(\"Formtitel\", false);\n\n//-------------------------------\n// titel Show end\n//-------------------------------\n}", "public function showAction()\n {\n if (! isset($this->showParameters['contentTitle'])) {\n $this->showParameters['contentTitle'] = $this->getShowTitle();\n }\n\n parent::showAction();\n }", "function setTitle($title, $append = false, $default = false) {\n\n if ($default && $this->title) return;\n\n if ($append) {\n $title = $this->title . $append . $title;\n }\n $this->title = $title;\n }", "public function setsubtitleAction() {\n\t\t$story_id \t\t= $this->getRequest()->getParam(\"story\");\n\t\t\n\t\t// TODO We should also filter and strip tags here\n\t\t$title\t \t\t= substr($this->getRequest()->getParam(\"value\"),0, 50); \n\t\t\n\t\t//Verify if the requested story exist\n\t\t$stories\t\t= new Stories();\n\t\tif (!($story\t= $stories->getStory($story_id))) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\n\t\t// Check if we are the owner\n\t\tif ($this->_application->user->id != $story->user_id) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\t\t\n\t\t// Ok, we can set the title\n\t\t$stories->setSubTitle($story_id, $title);\n\t\t\n\t\t// Die with the string\n\t\tif (!$title) $title = '[Edit Subtitle]';\n\t\tdie($title);\n\t}", "public function setTitle($v)\n {\n $this['name'] = $v;\n }", "function titel_show()\n{\n global $tpl;\n global $db;\n $sFormTitle = \"Voorraadsysteem beheer\";\n\n//-------------------------------\n// titel Open Event begin\n// titel Open Event end\n//-------------------------------\n\n//-------------------------------\n// Set URLs\n//-------------------------------\n//-------------------------------\n// titel Show begin\n//-------------------------------\n\n $tpl->set_var(\"FormTitle\", $sFormTitle);\n\n//-------------------------------\n// titel BeforeShow Event begin\n// titel BeforeShow Event end\n//-------------------------------\n\n//-------------------------------\n// Show fields\n//-------------------------------\n $tpl->parse(\"Formtitel\", false);\n\n//-------------------------------\n// titel Show end\n//-------------------------------\n}" ]
[ "0.6476592", "0.6069538", "0.60232484", "0.6004264", "0.5897737", "0.58782864", "0.5852842", "0.5742078", "0.5741877", "0.5719141", "0.5719141", "0.5719141", "0.57070184", "0.56869936", "0.56514406", "0.5649367", "0.56419945", "0.56380624", "0.5631553", "0.5629909", "0.56293017", "0.56224173", "0.5613037", "0.5601376", "0.5601376", "0.5598686", "0.5591504", "0.55758613", "0.5558629", "0.55566376", "0.55453885", "0.55453885", "0.55453885", "0.55453885", "0.55453885", "0.55453885", "0.55453885", "0.55389494", "0.55389494", "0.5529079", "0.5515517", "0.5515517", "0.5515517", "0.5515517", "0.5515517", "0.5515517", "0.5511138", "0.5487056", "0.5487056", "0.5487056", "0.54807746", "0.5475123", "0.5463944", "0.5447267", "0.5447267", "0.5446222", "0.54440546", "0.5441393", "0.5439821", "0.54229534", "0.5406578", "0.54026586", "0.5399614", "0.5398841", "0.53932345", "0.53837436", "0.53752416", "0.53752416", "0.5353021", "0.53409666", "0.53373694", "0.5336939", "0.5336871", "0.53306353", "0.5327749", "0.53260416", "0.5324038", "0.53139347", "0.53122807", "0.53065574", "0.5305167", "0.52935505", "0.5291981", "0.5287056", "0.5283796", "0.52621627", "0.5261586", "0.5260775", "0.5260144", "0.52425563", "0.5230962", "0.52219987", "0.52118325", "0.5208596", "0.5201105", "0.5194721", "0.51931554", "0.51901823", "0.51880777", "0.51780623", "0.51725155" ]
0.0
-1
Attaching pagetitle and subtitle to view.
public function create(){ view()->share(['pageTitle' => 'A List of References', 'subTitle' => 'Add Reference Details' ]); return view('admin.director.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_subtitle($subtitle) \r\n\t{\r\n\t\t//$this->subtitle = $subtitle;\r\n\t\t$this->data['subtitle_for_layout'] = $subtitle;\r\n\t\t$this;\r\n\t}", "function minorite_views_pre_render(&$view) {\n $view->set_title(t($view->get_title()));\n}", "public function Pagetitle($options = array()) {\n\n return $this->view->partial('partial/pagetitle.phtml', array('pagetitle' => $this->view->pagetitle\n ));\n }", "public function setTitle($title){\n $this->p_title = $title;\n }", "function set_title($title) \r\n\t{\r\n\t\t//$this->title = $title;\r\n\t\t$this->data['title_for_layout'] = $title;\r\n\t\t$this;\r\n\t}", "function setup_title() {\n\t\tglobal $bp;\n\n\t\tif ( bp_is_messages_component() ) {\n\t\t\tif ( bp_is_my_profile() ) {\n\t\t\t\t$bp->bp_options_title = __( 'My Messages', 'buddypress' );\n\t\t\t} else {\n\t\t\t\t$bp->bp_options_avatar = bp_core_fetch_avatar( array(\n\t\t\t\t\t'item_id' => bp_displayed_user_id(),\n\t\t\t\t\t'type' => 'thumb',\n\t\t\t\t\t'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )\n\t\t\t\t) );\n\t\t\t\t$bp->bp_options_title = bp_get_displayed_user_fullname();\n\t\t\t}\n\t\t}\n\n\t\tparent::setup_title();\n\t}", "protected function setPageTitle() {\r\n\t\t$pageTitleText = (empty($this->settings['news']['semantic']['general']['pageTitle']['useAlternate'])) ? $this->newsItem->getTitle() : $this->newsItem->getAlternativeTitle();\r\n\t\t$pageTitleAction = $this->settings['news']['semantic']['general']['pageTitle']['action'];\r\n\r\n\t\tif (!empty($pageTitleAction)) {\r\n\t\t\tswitch ($pageTitleAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$pageTitleText .= ': ' . $GLOBALS['TSFE']->page['title'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$pageTitleText = $GLOBALS['TSFE']->page['title'] . ': ' . $pageTitleText;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t\t$this->pageTitle = html_entity_decode($pageTitleText, ENT_QUOTES, \"UTF-8\");\r\n\t\t\t$GLOBALS['TSFE']->page['title'] = $this->pageTitle;\r\n\t\t\t$GLOBALS['TSFE']->indexedDocTitle = $this->pageTitle;\r\n\t\t}\r\n\t}", "function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "public function set_title($text){\n $this->title=$text;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "protected function view($view) {\n\n //Page subtitle\n switch($view) {\n case \"create\" :\n $this->page_subtitle = \"Create \".$this->model_name;\n break;\n case \"edit\" :\n $this->page_subtitle = \"Amend \".$this->model_name;\n break;\n\n case \"show\" :\n $this->page_subtitle =\"View \".$this->model_name;\n break;\n case \"list\" :\n $this->page_subtitle = \"List \".$this->model_name;\n break;\n case \"permissions\" :\n $this->page_subtitle = $this->model_name. \" Permissions\";\n break;\n }\n \n }", "public function setTitle($title){\n $this->title = $title;\n }", "public function setTitle($title){\n \t$this->title = $title;\n }", "public function setTitle($title){\n $this->title = $title;\n }", "function setTitle($title)\r\n\t{\r\n\t\t$this->title = $title;\r\n\t}", "public function setTitle($newTitle) { $this->Title = $newTitle; }", "function setTitle($title)\n {\n $this->m_title = $title;\n }", "public function setTitle($title) {\r\n $this->title = $title;\r\n }", "public function setTitle($var)\n {\n $this->_title = $var;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "function setTitle($a_title)\n\t{\n\t\t$this->title = $a_title;\n\t}", "function append_title($title){\r\n\t\t$this->_title .= \" - {$title}\";\r\n\t}", "public function setTitle($title) {\n $this->title = $title ;\n }", "private function configureTemplate(){\n\t\t$template = $this->getTemplate();\n\t\t$template->setPageSubtitle($this->getModule()->getDisplayedName());\n\t}", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setPageTitle($title);", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function set_pagetitle($title)\n {\n $this->pagetitle = $title;\n }", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n $this->_title = $title;\n }", "public function setTitle($t){\n\t\t$this->title = $t;\n\t}", "public function setTitle($title) {\r\n $this->_title = $title;\r\n }", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "function setTitle($title) {\n\t\t$this->_title = $title;\n\t}", "function setTitlelink($v) {\n\t\t$this->set(\"titlelink\",$v);\n\t}", "protected function setDetails($subTitle, $title)\n {\n $this->setViewData(compact('subTitle', 'title'));\n }", "public function specialization() {\n if (isset($this->config->progressTitle) && trim($this->config->progressTitle) != '') {\n $this->title = format_string($this->config->progressTitle);\n }\n }", "function ts_set_custom_title( $title ) {\r\n \r\n\tif (is_single() || is_page())\r\n\t{\r\n\t\t$subtitle = get_post_meta (get_the_ID(), 'subtitle', true);\r\n\t\tif (!empty($subtitle))\r\n\t\t{\r\n\t\t\t$title .= $subtitle.' | ';\r\n\t\t}\r\n\t}\r\n return $title;\r\n}", "public function setTitle($title = ''){\n $this->setVar('TITLE', $title);\n }", "public function setTitle($title)\r\n\t\t{\r\n\t\t\t$this->_title = $title;\r\n\t\t}", "public function loadPageTitle()\n \t\t{\n echo \"<title>Add Item</title>\";\n }", "public function setTitle($title = '')\n {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->_title = $title;\n }", "public function setSubtitle($v)\n { $this->getCurrentTranslation()->setSubtitle($v);\n\n return $this;\n }", "public function setTitle($title)\n {\n $this->_title = $title;\n }", "public function setTitle($title)\n {\n $this->_title = $title;\n }", "public function setPageTitle(array $config): void\n {\n foreach ($config as $item) {\n if (isset($item['active']) && $item['active']) {\n $this->_View->assign('title', $item['title']);\n break;\n }\n }\n }", "public function setTtitle($title)\n {\n $this->title = $title;\n }", "public function compose(View $view)\n {\n $title = !empty($view->getData()[\"title\"]) ? $view->getData()[\"title\"] : \"\";\n $view->with('title', $title);\n }", "function prepend_title($title){\r\n\t\t$this->_title = \"{$title} - {$this->_title}\";\r\n\t}", "public function title($title) {\n return $this->view->title = $title;\n }", "function set_title($title){\r\n\t\t$this->_title = $title;\r\n\t}", "public function setTitleTag($title)\n {\n $this->_title_tag = $title;\n }", "public function setTitle($title){\n\t\t$this->mail_title = $title;\n\t}", "public function setTitle($title) {\n\t\t\n\t\t\t$this->_title = $title;\n\t\t\n\t\t}", "public function set_viewtitle($param)\n\t{\n\t\t$this->viewtitle = (string)$param;\n\t\treturn $this;\n\t}", "public function init()\n {\n\t\t$this->view->headTitle(Zend_Registry::get('Default Page Title'));\n\t\t$this->view->headTitle()->prepend('Partners');\n }", "public function setTitle($title)\n{\n $this->title= $title;\n}", "public function set_title($title)\n {\n $this->title = $title;\n }", "function subtitle( $post ) {\n\n\tif ( ! in_array( $post->post_type, [ 'post', 'page' ], true ) ) {\n\t\treturn;\n\t}\n\n\t// The subtitle field.\n\t$_stitle = sanitize_text_field( get_post_meta( $post->ID, '_subtitle', true ) );\n\t\n echo '<div class=\"inside\">';\n\techo '<div id=\"edit-slug-box\" class=\"hide-if-no-js\">';\n\techo '<label for=\"subtitle\"><strong>' . __( 'Sub Title: ' ) . '</strong></label>';\n echo '<input type=\"text\" name=\"subtitle\" id=\"subtitle\" value=\"' . $_stitle . '\" size=\"30\" spellcheck=\"true\" autocomplete=\"off\" />';\n\techo '</div>';\n echo '</div>';\t\n}", "public function set_pub_subtitle( $post_meta ){\n\t\t\n\t\t$subtitle = ( ! empty( $post_meta['_cwpp_subtitle'] ) )? $post_meta['_cwpp_subtitle'][0] : '';\n\t\t\n\t\t$this->pub_subtitle = $subtitle;\n\t\t\n\t}", "private function setTitle()\n {\n $this->title = $this->start_date;\n\n if ($this->start_date != $this->end_date) {\n $this->title .= ' - '.$this->end_date;\n }\n }", "public function setTitle($title){ $this->setSeoTitle($title)->setContentTitle($title); return $this; }", "protected function setTitle()\n\t{\n\t\tglobal $APPLICATION;\n\n\t\tif ($this->arParams[\"SET_TITLE\"] == 'Y')\n\t\t\t$APPLICATION->SetTitle(Localization\\Loc::getMessage(\"SPOL_DEFAULT_TITLE\"));\n\t}", "function link() {\n $this->title = \"link\";\n }", "public function setTitle($title)\n\t{\n\t\t$this->setBodyTitle($title);\n\t\t$this->setPageTitle($title);\n\t}", "public function setTitle($title = '', $prepend = true) {\n $this->response->setTitle($title . ($prepend ? $this->title['d'] . $this->title['t'] : ''), false);\n }", "function appendTitle($a_title_str)\n\t{\n\t\t$this->title.= $a_title_str;\n\t}", "public function setTitle($value)\n {\n $this->title = $value;\n }", "protected function prepareMetadata(AppContext $app, View $view): void\n {\n $type = $app->input('type');\n\n $langKey = \"luna.$type.category.edit.title\";\n $appLangKey = \"app.$type.category.edit.title\";\n\n if ($this->lang->has($langKey)) {\n $title = $this->trans($langKey);\n } elseif ($this->lang->has($appLangKey)) {\n $title = $this->trans($appLangKey);\n } else {\n $title = $this->trans(\n 'luna.category.edit.title',\n title: $this->trans('luna.' . $type . '.title')\n );\n }\n\n $view->setTitle($title);\n }", "public function setTitle($value)\n {\n $this->_title = $value;\n }", "function setTitle(string $title): void\n {\n $this->data['head']['title'] = $title;\n }", "function get_subtitle() \t{\n \t\treturn $this->subtitle;\t\n \t}", "function titel_show()\n{\n global $tpl;\n global $db;\n $sFormTitle = \"Brochure aanvraag beheer\";\n\n//-------------------------------\n// titel Open Event begin\n// titel Open Event end\n//-------------------------------\n\n//-------------------------------\n// Set URLs\n//-------------------------------\n//-------------------------------\n// titel Show begin\n//-------------------------------\n\n $tpl->set_var(\"FormTitle\", $sFormTitle);\n\n//-------------------------------\n// titel BeforeShow Event begin\n// titel BeforeShow Event end\n//-------------------------------\n\n//-------------------------------\n// Show fields\n//-------------------------------\n $tpl->parse(\"Formtitel\", false);\n\n//-------------------------------\n// titel Show end\n//-------------------------------\n}", "public function showAction()\n {\n if (! isset($this->showParameters['contentTitle'])) {\n $this->showParameters['contentTitle'] = $this->getShowTitle();\n }\n\n parent::showAction();\n }", "function setTitle($title, $append = false, $default = false) {\n\n if ($default && $this->title) return;\n\n if ($append) {\n $title = $this->title . $append . $title;\n }\n $this->title = $title;\n }", "public function setsubtitleAction() {\n\t\t$story_id \t\t= $this->getRequest()->getParam(\"story\");\n\t\t\n\t\t// TODO We should also filter and strip tags here\n\t\t$title\t \t\t= substr($this->getRequest()->getParam(\"value\"),0, 50); \n\t\t\n\t\t//Verify if the requested story exist\n\t\t$stories\t\t= new Stories();\n\t\tif (!($story\t= $stories->getStory($story_id))) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\n\t\t// Check if we are the owner\n\t\tif ($this->_application->user->id != $story->user_id) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\t\t\n\t\t// Ok, we can set the title\n\t\t$stories->setSubTitle($story_id, $title);\n\t\t\n\t\t// Die with the string\n\t\tif (!$title) $title = '[Edit Subtitle]';\n\t\tdie($title);\n\t}", "public function setTitle($v)\n {\n $this['name'] = $v;\n }", "function titel_show()\n{\n global $tpl;\n global $db;\n $sFormTitle = \"Voorraadsysteem beheer\";\n\n//-------------------------------\n// titel Open Event begin\n// titel Open Event end\n//-------------------------------\n\n//-------------------------------\n// Set URLs\n//-------------------------------\n//-------------------------------\n// titel Show begin\n//-------------------------------\n\n $tpl->set_var(\"FormTitle\", $sFormTitle);\n\n//-------------------------------\n// titel BeforeShow Event begin\n// titel BeforeShow Event end\n//-------------------------------\n\n//-------------------------------\n// Show fields\n//-------------------------------\n $tpl->parse(\"Formtitel\", false);\n\n//-------------------------------\n// titel Show end\n//-------------------------------\n}" ]
[ "0.6476592", "0.6069538", "0.60232484", "0.6004264", "0.5897737", "0.58782864", "0.5852842", "0.5742078", "0.5741877", "0.5719141", "0.5719141", "0.5719141", "0.57070184", "0.56869936", "0.56514406", "0.5649367", "0.56419945", "0.56380624", "0.5631553", "0.5629909", "0.56293017", "0.56224173", "0.5613037", "0.5601376", "0.5601376", "0.5598686", "0.5591504", "0.55758613", "0.5558629", "0.55566376", "0.55453885", "0.55453885", "0.55453885", "0.55453885", "0.55453885", "0.55453885", "0.55453885", "0.55389494", "0.55389494", "0.5529079", "0.5515517", "0.5515517", "0.5515517", "0.5515517", "0.5515517", "0.5515517", "0.5511138", "0.5487056", "0.5487056", "0.5487056", "0.54807746", "0.5475123", "0.5463944", "0.5447267", "0.5447267", "0.5446222", "0.54440546", "0.5441393", "0.5439821", "0.54229534", "0.5406578", "0.54026586", "0.5399614", "0.5398841", "0.53932345", "0.53837436", "0.53752416", "0.53752416", "0.5353021", "0.53409666", "0.53373694", "0.5336939", "0.5336871", "0.53306353", "0.5327749", "0.53260416", "0.5324038", "0.53139347", "0.53122807", "0.53065574", "0.5305167", "0.52935505", "0.5291981", "0.5287056", "0.5283796", "0.52621627", "0.5261586", "0.5260775", "0.5260144", "0.52425563", "0.5230962", "0.52219987", "0.52118325", "0.5208596", "0.5201105", "0.5194721", "0.51931554", "0.51901823", "0.51880777", "0.51780623", "0.51725155" ]
0.0
-1
the autoloader function must exist for the plugin installer in the admin area it is in no ways used at run time. naming rule: $productShortName_autoloader
function testplugin_autoloader() { return new TestPlugin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function helper_autoloader($class)\n {\n\n }", "function _manually_load_plugin() {\n\trequire dirname( dirname( __FILE__ ) ) . '/tyk_dev_portal.php';\n}", "function include_wbf_autoloader(){\n\t$wbf_path = get_wbf_path();\n\n\tif(!is_dir($wbf_path)){\n\t\t$wbf_path = ABSPATH.\"wp-content/plugins/wbf\";\n\t}\n\n\t//Require the base autoloader\n\t$wbf_base_autoloader = $wbf_path.\"/wbf-autoloader.php\";\n\tif(is_file($wbf_base_autoloader)){\n\t\trequire_once $wbf_base_autoloader;\n\t}\n}", "function commonwp_autoloader( $class ) {\n\t$pairs = [\n\t\t'WP_Temporary' => '/lib/wp-temporary/class-wp-temporary.php',\n\t\t'Temporary_Command' => '/lib/wp-temporary/cli/Temporary_Command.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Clean' => '/inc/Clean.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Expiration' => '/inc/Expiration.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Lock' => '/inc/Lock.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Main' => '/inc/Main.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\NPM' => '/inc/NPM.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Paths' => '/inc/Paths.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Privacy' => '/inc/Privacy.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Process' => '/inc/Process.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Queue' => '/inc/Queue.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Rewrite' => '/inc/Rewrite.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Singleton' => '/inc/Singleton.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\SRI' => '/inc/SRI.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Store' => '/inc/Store.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Utils' => '/inc/Utils.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Versions' => '/inc/Versions.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\WPCLI' => '/inc/WPCLI.php',\n\t\t'dimadin\\WP\\Library\\Backdrop\\Main' => '/lib/backdrop/inc/Main.php',\n\t\t'dimadin\\WP\\Library\\Backdrop\\Server' => '/lib/backdrop/inc/Server.php',\n\t\t'dimadin\\WP\\Library\\Backdrop\\Task' => '/lib/backdrop/inc/Task.php',\n\t];\n\n\tif ( array_key_exists( $class, $pairs ) ) {\n\t\tinclude __DIR__ . $pairs[ $class ];\n\t}\n}", "function supernova_autoloader($className){\r\n\t\t$root_path = ROOT . DS;\r\n\t\t$app_path=$root_path.'application' . DS;\r\n\t\t$library_path=$root_path.'library' . DS . 'extensions' . DS;\r\n\t\t$str = $className;\r\n\t\t$str[0] = strtolower($str[0]);\r\n\t\t$func = create_function('$c', 'return \"_\" . strtolower($c[1]);');\r\n\t\t$strName = preg_replace_callback('/([A-Z])/', $func, $str);\r\n\t\t$name = strtolower($strName);\r\n\t\t$file = $library_path.$name.'.class.php';\r\n\t\t$controllerFile = $app_path. 'controllers' . DS . $name . '.php';\r\n\t\t$modelFile = $app_path. 'models' . DS . $name . '.php';\r\n\t\t$appFile = $app_path.'app'.'.controller.php';\r\n\t\tif (file_exists($file)){\r\n\t\t\trequire_once($file);\r\n\t\t}else if (file_exists($controllerFile)){\r\n\t\t\trequire_once($controllerFile);\r\n\t\t}else if (file_exists($modelFile)){\r\n\t\t\trequire_once($modelFile);\r\n\t\t}else if (file_exists($appFile)){\r\n\t\t \trequire_once($appFile);\r\n\t\t}\r\n\t}", "function admin_load()\n {\n }", "public function registerAutoloaders()\n {\n }", "function saleforce_scripts_plug() {\n if (is_admin()) {\n wp_register_script('backcallscc', plugins_url('js/cussaleforce.js', __FILE__), array('jquery'));\n \n wp_enqueue_script('backcallscc');\n \n $file_for_jav = admin_url('admin-ajax.php');\n $tran_arr = array('jaxfile' => $file_for_jav);\n wp_localize_script('backcallscc', 'fromphp', $tran_arr);\n }\n}", "function enqueue_auto_click_script() \n{\n wp_register_script('auto_click_script', plugin_dir_url(__FILE__).'/assets/tf-op-auto-click-script.js', array('jquery'), '1.1', true);\n\n wp_enqueue_script('auto_click_script', 9999);\n}", "function bp_theme_autoloader($class) {\n\n if (strpos($class,'Theme') !== 0) {return false;}\n $class = str_replace('Theme\\\\','',$class);\n $file = strtolower(str_replace('\\\\','-',$class));\n $file = str_replace('_','-',$file);\n $file = array_unique(explode('-',$file));\n $file = implode('-',$file);\n $file = get_template_directory() . '/inc/' . $file;\n $file .= '.php';\n require $file;\n\n}", "function wp_metadata_lazyloader()\n {\n }", "function wp_simplepie_autoload($class)\n {\n }", "static function _shfw_autoloader()\n {\n\t\tinclude_once(BASEPATH.'config'.DIRECTORY_SEPARATOR.'autoload.php');\n\n\t\tif ( ! isset($autoload))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Autoload helpers.\n\t\tforeach ($autoload['helper'] as $type)\n\t\t{\t\t\t\n\t\t\tself::loadHelper($type);\n\t\t}\n\n\t\t// Autoload core components.\n\t\tforeach ($autoload['core'] as $type)\n\t\t{\t\t\t\n\t\t\tself::initCoreComponent($type);\n\t\t}\n\n\t\t/*\n\t\tif(SHIN_Core::$_benchmark){\n\t\t\tSHIN_Core::$_benchmark->mark('code_start');\n\t\t}\n\t\t*/\n\t\t\n\t\t// Autoload libraries.\n\t\tforeach ($autoload['libraries'] as $type)\n\t\t{\n\t\t\tself::loadLibrary($type, TRUE);\n\t\t}\n\n\t\t// Autoload models.\n\t\tforeach ($autoload['models'] as $type)\n\t\t{\n\t\t\tself::loadModel($type, TRUE);\n\t\t}\n\t}", "function _manually_load_plugin() {\n\trequire dirname( dirname( __FILE__ ) ) . '/plugin.php';\n}", "static function AjaxAutoload()\r\n\t{\r\n\t\t\r\n\t}", "function load_wp_auto_tagging(){\n\t\tif ( is_admin() ) {\n\t\t\tif ( apply_filters( 'wp_auto_tag_pre_check', class_exists( 'wp_auto_tagging' ) && wp_auto_tagging::prerequisites() ) ) {\n\t\t\t\trequire_once 'settings.php';\n\t\t\t\tregister_activation_hook( __FILE__, array('wp_auto_tagging_settings', 'register_defaults'));\n\t\t\t\tadd_action('init', array('wp_auto_tagging', 'instance'), -100, 0); \n\t\t\t} else {\n\t\t\t\t// let the user know prerequisites weren't met\n\t\t\t\tadd_action('admin_head', array('wp_auto_tagging', 'fail_notices'), 0, 0);\n\t\t\t}\n\t\t}\n\t}", "function bbboing_activation() {\r\n static $plugin_basename = null;\r\n if ( !$plugin_basename ) {\r\n $plugin_basename = plugin_basename(__FILE__);\r\n add_action( \"after_plugin_row_bbboing/bbboing.php\", \"bbboing_activation\" ); \r\n if ( !function_exists( \"oik_plugin_lazy_activation\" ) ) { \r\n require_once( \"admin/oik-activation.php\" );\r\n } \r\n } \r\n $depends = \"oik:2.2\";\r\n //bw_backtrace();\r\n oik_plugin_lazy_activation( __FILE__, $depends, \"oik_plugin_plugin_inactive\" );\r\n}", "function admin_load() {\n\n\t}", "public function afterInstall()\r\n {\r\n\r\n // $test = $this::getInstance();\r\n//print_r(Yii::getAlias('@'.($this->id)));\r\n\r\n\r\n // $fileName2 = (new \\ReflectionClass(new \\panix\\engine\\WebModule($this->id)))->getFileName();\r\n\r\n // $fileName = (new \\ReflectionClass(get_called_class()))->getFileName();\r\n // print_r($fileName2);\r\n\r\n\r\n /// print_r($reflectionClass->getNamespaceName());\r\n //die;\r\n\r\n // if ($this->uploadAliasPath && !file_exists(Yii::getPathOfAlias($this->uploadAliasPath)))\r\n // CFileHelper::createDirectory(Yii::getPathOfAlias($this->uploadAliasPath), 0777);\r\n //Yii::$app->cache->flush();\r\n // Yii::app()->widgets->clear();\r\n return true;\r\n }", "private function load_admin_scripts() {\n\n\t}", "private function initRequirePlugin(){\n\t\t$this->addRequiredPlugin(array(\n\t\t\t'name' => 'Options Framework', // The plugin name\n\t\t 'slug' => 'options-framework', // The plugin slug (typically the folder name)\n\t\t 'required' => true, // If false, the plugin is only 'recommended' instead of required\n\t\t));\n\n\t\t$this->addRequiredPlugin(array(\n\t\t\t'name' => 'WooCommerce', // The plugin name\n\t\t 'slug' => 'woocommerce', // The plugin slug (typically the folder name)\n\t\t 'required' => true, // If false, the plugin is only 'recommended' instead of required\n\t\t));\n\n\t\t$this->addRequiredPlugin(array(\n\t\t\t'name' => 'Contact Form 7', // The plugin name\n\t\t 'slug' => 'contact-form-7', // The plugin slug (typically the folder name)\n\t\t 'required' => true, // If false, the plugin is only 'recommended' instead of required\n\t\t 'source'\t\t\t\t => get_stylesheet_directory_uri() . '/sub/plugins/contact-form-7.zip', // The plugin source\n\t\t));\n\n\t\t$this->addRequiredPlugin(array(\n\t\t\t'name' => 'WPBakery Visual Composer', // The plugin name\n\t\t 'slug' => 'js_composer', // The plugin slug (typically the folder name)\n\t\t 'required' => true,\n\t\t 'source' => get_stylesheet_directory_uri() . '/sub/plugins/js_composer.zip', // The plugin source\n\t\t));\n\n\t\t$this->addRequiredPlugin(array(\n\t\t\t'name' => 'Revolution Slider', // The plugin name\n 'slug' => 'revslider', // The plugin slug (typically the folder name)\n 'required' => true, // If false, the plugin is only 'recommended' instead of required\n 'source' => get_stylesheet_directory_uri() . '/sub/plugins/revslider.zip', // The plugin source\n\t\t));\n\n\t\t$this->addRequiredPlugin(array(\n\t\t\t'name' => 'YITH WooCommerce Wishlist', // The plugin name\n 'slug' => 'yith-woocommerce-wishlist', // The plugin slug (typically the folder name)\n 'required' => true\n\t\t));\n\n\t\t$this->addRequiredPlugin(array(\n\t\t\t'name' => 'YITH Woocommerce Compare', // The plugin name\n 'slug' => 'yith-woocommerce-compare', // The plugin slug (typically the folder name)\n 'required' => true\n\t\t));\n\n\t\t$this->addRequiredPlugin(array(\n\t\t\t'name' => 'YITH WooCommerce Zoom Magnifier', // The plugin name\n\t\t 'slug' => 'yith-woocommerce-zoom-magnifier', // The plugin slug (typically the folder name)\n\t\t 'required' => true\n\t\t));\n\n\t\t$this->addRequiredPlugin(array(\n\t\t\t'name' => 'MailChimp', // The plugin name\n\t\t 'slug' => 'mailchimp-for-wp', // The plugin slug (typically the folder name)\n\t\t 'required' => true\n\t\t));\n\t}", "function autoloader( $class_name ) {\n\t\tglobal $jetpack_packages_classes;\n\n\t\tif ( isset( $jetpack_packages_classes[ $class_name ] ) ) {\n\t\t\tif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {\n\t\t\t\t// TODO ideally we shouldn't skip any of these, see: https://github.com/Automattic/jetpack/pull/12646.\n\t\t\t\t$ignore = in_array(\n\t\t\t\t\t$class_name,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'Automattic\\Jetpack\\JITM',\n\t\t\t\t\t\t'Automattic\\Jetpack\\Connection\\Manager',\n\t\t\t\t\t\t'Automattic\\Jetpack\\Connection\\Manager_Interface',\n\t\t\t\t\t\t'Automattic\\Jetpack\\Connection\\XMLRPC_Connector',\n\t\t\t\t\t\t'Jetpack_Options',\n\t\t\t\t\t\t'Jetpack_Signature',\n\t\t\t\t\t\t'Automattic\\Jetpack\\Sync\\Main',\n\t\t\t\t\t\t'Automattic\\Jetpack\\Constants',\n\t\t\t\t\t\t'Automattic\\Jetpack\\Tracking',\n\t\t\t\t\t\t'Automattic\\Jetpack\\Plugin\\Tracking',\n\t\t\t\t\t),\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tif ( ! $ignore && function_exists( 'did_action' ) && ! did_action( 'plugins_loaded' ) ) {\n\t\t\t\t\t_doing_it_wrong(\n\t\t\t\t\t\tesc_html( $class_name ),\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %s Name of a PHP Class */\n\t\t\t\t\t\t\tesc_html__( 'Not all plugins have loaded yet but we requested the class %s', 'jetpack' ),\n\t\t\t\t\t\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t\t\t\t\t$class_name\n\t\t\t\t\t\t),\n\t\t\t\t\t\tesc_html( $jetpack_packages_classes[ $class_name ]['version'] )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( file_exists( $jetpack_packages_classes[ $class_name ]['path'] ) ) {\n\t\t\t\trequire_once $jetpack_packages_classes[ $class_name ]['path'];\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "private function load_dependencies() {\n\n /**\n * The class responsible for defining options functionality\n * of the plugin.\n */\n include plugin_dir_path(dirname(__FILE__)) . 'envato_setup/envato_setup.php';\n include plugin_dir_path(dirname(__FILE__)) . 'envato_setup/envato_setup_init.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/class-form-fields.php';\n // common functions file\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/careerfy-detail-pages.php';\n \n include plugin_dir_path(dirname(__FILE__)) . 'includes/careerfyframe-end-jsfile.php';\n\n // redux frameworks extension loader files\n include plugin_dir_path(dirname(__FILE__)) . 'admin/redux-ext/loader.php';\n\n // icons manager\n include plugin_dir_path(dirname(__FILE__)) . 'icons-manager/icons-manager.php';\n\n // visual composer files\n include plugin_dir_path(dirname(__FILE__)) . 'includes/vc-support/vc-actions.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/vc-support/vc-shortcodes.php';\n // visual icon files\n include plugin_dir_path(dirname(__FILE__)) . 'includes/vc-icons/icons.php';\n // Mailchimp\n include plugin_dir_path(dirname(__FILE__)) . 'includes/mailchimp/vendor/autoload.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/mailchimp/mailchimp-functions.php';\n\n // post types\n include plugin_dir_path(dirname(__FILE__)) . 'includes/post-types/faq.php';\n\n // meta box file\n include plugin_dir_path(dirname(__FILE__)) . 'admin/meta-boxes.php';\n\n // Custom Typography\n include plugin_dir_path(dirname(__FILE__)) . 'includes/custom-typography.php';\n\n // twitter oauth\n include plugin_dir_path(dirname(__FILE__)) . 'includes/twitter-tweets/twitteroauth.php';\n // maintenace mode\n include plugin_dir_path(dirname(__FILE__)) . 'includes/maintenance-mode/maintenance-mode.php';\n\n // redux frameworks files\n include plugin_dir_path(dirname(__FILE__)) . 'admin/ReduxFramework/class-redux-framework-plugin.php';\n include plugin_dir_path(dirname(__FILE__)) . 'admin/ReduxFramework/careerfy-options/options-config.php';\n\n include plugin_dir_path(dirname(__FILE__)) . 'admin/user/user-custom-fields.php';\n\n // instagram admin actions\n include plugin_dir_path(dirname(__FILE__)) . 'admin/instagram.php';\n // load Elementor Extension\n require plugin_dir_path(dirname(__FILE__)) . 'includes/class-careerfy-elementor.php';\n\n }", "function medialib_autoloader($class_name)\n{\n $class_name = str_replace('\\\\', '/', $class_name) . '.php';\n require_once $class_name;\n}", "function add_support_script_frontend(){\n}", "function ad_activate(){\r\n\trequire_once(dirname(__FILE__).'/installer.php');\r\n}", "function clientAutoload() {\n\t\n\tforeach ($this->config->item('client_autoload') as $call=>$fileNames) {\n\t if (method_exists($this,$call) && count($fileNames)) {\n\t\tforeach ($fileNames as $f) {\n\t\t $this->$call($f);\n\t\t}\n\t }\n\t}\n\t\n }", "function _wp_customize_loader_settings()\n {\n }", "function qpi_admin_enqueue_scripts( $hook_suffix ) {\n\tif ( 'plugin-install.php' == $hook_suffix ) {\n\t\twp_enqueue_script( 'qpi-script', plugin_dir_url( __FILE__ ) . 'quick-plugin-installer.js', array( 'jquery' ) );\n\t\twp_localize_script( 'qpi-script', 'QPI', array(\n\t\t\t'activated' => __( 'Activated', 'qpi-i18n' ),\n\t\t\t'error' => __( 'Error', 'qpi-i18n' ),\n\t\t) );\n\t}\n}", "function my_autoloader($class) {\r\n\t require_once ($class.'.php');\r\n\t}", "function __mashineAutoload($class_name)\n{\n if (preg_match(\"/([a-zA-Z0-9]*)ApiController$/\", $class_name, $matches)) {\n $api_path = preg_replace(\"/plugins.*/\", \"controllers\".DS.\"api\", __FILE__);\n\n $file = $api_path.DS.strtolower($matches[1]).\".php\";\n if (is_file($file)) {\n include $file;\n }\n }\n}", "function ad_activate(){\n\trequire_once(dirname(__FILE__).'/installer.php');\n}", "protected function _initAutoload () {\n\t\t// configure new autoloader\n\t\t$autoloader = new Zend_Application_Module_Autoloader (array ('namespace' => 'Admin', 'basePath' => APPLICATION_PATH.\"/modules/admin\"));\n\n\t\t// autoload validators definition\n\t\t$autoloader->addResourceType ('Validate', 'validators', 'Validate_');\n\t}", "function rtasset_admin_notice_dependency_not_installed() {\n\tif ( ! rtasset_is_plugin_installed( 'rtbiz' ) ) {\n\t\t$path = rtasset_get_path_for_plugin( 'rtbiz' );\n\t\t?>\n\t\t<div class=\"error rtasset-plugin-not-installed-error\">\n\t\t\t<p>\n\t\t\t\t<b><?php _e( 'rtBiz Assets:' ) ?></b> <?php _e( esc_attr( $path ) . ' plugin is not found on this site. Please install & activate it in order to use this plugin.', RT_ASSET_TEXT_DOMAIN ); ?>\n\t\t\t</p>\n\t\t</div>\n\t<?php\n\t} else {\n\t\tif ( rtasset_is_plugin_installed( 'rtbiz' ) && ! rtasset_is_plugin_active( 'rtbiz' ) ) {\n\t\t\t$path = rtasset_get_path_for_plugin( 'rtbiz' );\n\t\t\t$nonce = wp_create_nonce( 'rtasset_activate_plugin_' . $path );\n\t\t\t?>\n\t\t\t<div class=\"error rtasset-plugin-not-installed-error\">\n\t\t\t\t<p><b><?php _e( 'rtBiz Assets:' ) ?></b> <?php _e( 'Click' ) ?>\n\t\t\t\t\t<a href=\"#\" onclick=\"activate_rtasset_plugin('<?php echo esc_attr( $path ); ?>','rtasset_activate_plugin','<?php echo esc_attr( $nonce ); ?>')\">here</a> <?php _e( 'to activate rtBiz.', 'rtbiz' ) ?>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t<?php\n\t\t}\n\t}\n}", "function my_autoloader($class) {\n if ( $class != \"ACF\" )\n include 'classes/' . $class . '.class.php';\n }", "function insta_f_install(){\n}", "public function bootPlugin();", "function load_admin_script() {\r\n\r\n\t\t\t$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';\r\n\r\n\t\t\twp_enqueue_script( 'wc-tfls-admin', plugin_dir_url( TFLS_FILE ) . 'assets/js/tfls-admin' . $suffix . '.js', array( 'jquery' ), WC_VERSION, true );\r\n\r\n\t\t}", "function qpi_load() {\n\tadd_action( 'wp_ajax_qpi-install-plugin', 'qpi_install_plugin' );\n\tadd_action( 'wp_ajax_qpi-activate', 'qpi_activate_plugin' );\n\n\tadd_action( 'admin_enqueue_scripts', 'qpi_admin_enqueue_scripts' );\n}", "function wp_default_packages_vendor($scripts)\n {\n }", "function admin_enqueues( $hook_suffix ) {\r\n\t\tif ( 'tools_page_regenthumbs-stamina' != $hook_suffix )\r\n\t\t\treturn;\r\n\r\n\t\twp_enqueue_script( 'jquery-ui-custom', plugins_url( 'jquery-ui-js/jquery-ui-1.8.5.custom.min.js', __FILE__ ), array('jquery'), '1.8.5' );\r\n\t\twp_enqueue_style( 'jquery-ui-regenthumbs', plugins_url( 'jquery-ui-css/start/jquery-ui-1.8.5.custom.css', __FILE__ ), array(), '1.8.5' );\r\n\t}", "private function define_admin_hooks()\n {\n $this->loader->add_action('init',$this,'load_options');\n $this->loader->add_action('plugins_loaded','WordPress_Reactro_Admin', 'load_framework');\n }", "function acf_register_admin_tool($class)\n{\n}", "static function autoload()\r\n\t{\r\n\t\t\r\n\t}", "function my_autoloader($class) {\r\n require 'libs/' . $class . '.php';\r\n}", "protected function _initAutoload() {\n\t\t$resourceLoader = new Zend_Loader_Autoloader_Resource(array(\n\t\t\t'basePath' => dirname(__FILE__),\n\t\t\t'namespace' => false\n\t\t));\n\t\t$resourceLoader->addResourceType('model', 'models', 'Model_');\n\t\t$resourceLoader->addResourceType('default-form', 'modules/default/forms', 'Form_');\n\t}", "function onAutoload($cls) {\n $base = dirname(__FILE__);\n $lower = strtolower($cls);\n $files = array(\n \"$base/classes/$cls.php\",\n \"$base/lib/$lower.php\"\n );\n if (substr($lower, -6) == 'action') {\n $files[] = \"$base/actions/\" . substr($lower, 0, -6) . \".php\";\n }\n foreach ($files as $file) {\n if (file_exists($file)) {\n include_once $file;\n return false;\n }\n }\n return true;\n }", "function glu_class_autoloader($c) {\n include dirname(__FILE__). DIRECTORY_SEPARATOR . strtolower($c) . '.php';\n}", "function sobrapaev() {\n\t if (!is_admin()) {\n\t wp_enqueue_script('sobrapaev', WP_PLUGIN_URL . '/sobrapaev/' . 'sobrapaev.js', false, '1.41');\n\t }\n\t}", "public abstract function get_loader_name();", "function EDD_Per_Product_Button_load() {\n\tif( ! class_exists( 'Easy_Digital_Downloads' ) ) {\n\t\tif( ! class_exists( 'EDD_Extension_Activation' ) ) {\n\t\t\trequire_once 'includes/class.extension-activation.php';\n\t\t}\n\n\t\t$activation = new EDD_Extension_Activation( plugin_dir_path( __FILE__ ), basename( __FILE__ ) );\n\t\t$activation = $activation->run();\n\t\treturn EDD_Per_Product_Button::instance();\n\t} else {\n\t\treturn EDD_Per_Product_Button::instance();\n\t}\n}", "static function PageAutoload()\r\n\t{\r\n\t\t\r\n\t}", "private function setAutoLoader() {\n \n spl_autoload_register(array('self', 'autoLoader'));\n \n }", "protected function _initAutoload(){\n\t $autoLoader = Zend_Loader_Autoloader::getInstance();\n\t $autoLoader->registerNamespace('CMS_');\n\t $resourceLoader = new Zend_Loader_Autoloader_Resource(\n\t \tarray(\n\t\t\t 'basePath' => APPLICATION_PATH,\n\t\t\t 'namespace' => '',\n\t\t\t 'resourceTypes' => array(\n\t\t\t \t'form' => array(\n\t\t\t\t \t'path' => 'forms/',\n\t\t\t\t \t'namespace' => 'Form_',\n\t\t\t\t ),\n\t \t\t\t\n\t \t\t),\n\t \t)\n\t );\n\t // Return it so that it can be stored b the bootstrap\n\t return $autoLoader;\n\t }", "function sacf_autoloader($class) { ///< autoload a sacf class\n\t$class = ltrim($class, '\\\\');\n\n\t// bail if namespace doesn't match\n\tif (strpos($class, __NAMESPACE__) !== 0) {\n\t\treturn;\n\t}\n\n\t// remove main namespace and force lowerspace string\n\t$class = strtolower(str_replace(__NAMESPACE__, '', $class));\n\n\tif (strpos($class, '\\fclayout') === 0) {\n\t\t// load sacf flex content modules\n\t\t$path = str_replace('\\\\', DIRECTORY_SEPARATOR, $class);\n\t\t// $path = str_replace('/module/', paths()['modules'], $path) . '.php';\n\t\t$path = str_replace('/fclayout/', settings::paths()['layouts'], $path) . '.php';\n\t\t// $path = str_replace('/module/', settings::paths['modules'], $path) . '.php';\n\t} else {\n\t\t// @todo load plugins from theme folder first\n\t\t// load sacf core classes\n\t\t$path = __DIR__ . str_replace('\\\\', DIRECTORY_SEPARATOR, $class) . '.php';\n\t}\n\trequire_once $path;\n}", "function microdata_manager_functions_init() {\n\n\t\trequire_once plugin_dir_path( __FILE__ ) . '/microdata-manager-functions.php';\n}", "function rtasset_check_plugin_dependecy() {\n\n\tglobal $rtasset_plugin_check;\n\t$rtasset_plugin_check = array(\n\t\t'rtbiz' => array(\n\t\t\t'project_type' => 'all',\n\t\t\t'name' => esc_html__( 'WordPress for Business.', RT_ASSET_TEXT_DOMAIN ),\n\t\t\t'active' => class_exists( 'Rt_Biz' ),\n\t\t\t'filename' => 'index.php',\n\t\t),\n\t);\n\n\t$flag = true;\n\n\tif ( ! class_exists( 'Rt_Biz' ) || ! did_action( 'rt_biz_init' ) ) {\n\t\t$flag = false;\n\t}\n\n\tif ( ! $flag ) {\n\t\tadd_action( 'admin_enqueue_scripts', 'rtasset_plugin_check_enque_js' );\n\t\tadd_action( 'wp_ajax_rtasset_activate_plugin', 'rtasset_activate_plugin_ajax' );\n\t\tadd_action( 'admin_notices', 'rtasset_admin_notice_dependency_not_installed' );\n\t}\n\n\treturn $flag;\n}", "function _manually_load_plugin() {\n\t// Load plugin\n\trequire_once __DIR__ . '/../../wp-separate-user-base.php';\n}", "public static function register_autoloader()\n {\n }", "function boiler_dependencies() {\n if( ! function_exists('acf_add_options_page') )\n echo '<div class=\"error\"><p> Warning: The theme needs ACF Plugin installed and activated to function </p></div>';\n}", "function smart_slider_3_pro_plugins_loaded() {\r\n remove_action('plugins_loaded', 'smart_slider_3_plugins_loaded', 30);\r\n\r\n define('N2PRO', 1);\r\n define('N2SSPRO', 1);\r\n\r\n define('NEXTEND_SMARTSLIDER_3__FILE__', __FILE__);\r\n define('NEXTEND_SMARTSLIDER_3', dirname(__FILE__) . DIRECTORY_SEPARATOR);\r\n define('NEXTEND_SMARTSLIDER_3_BASENAME', plugin_basename(__FILE__));\r\n\r\n require_once dirname(NEXTEND_SMARTSLIDER_3__FILE__) . DIRECTORY_SEPARATOR . 'includes/smartslider3.php';\r\n }", "function wp_ajax_install_plugin()\n {\n }", "function omega_admin_scripts( $hook_suffix ) {\r\n \r\n \r\n}", "function install_plugin_information()\n {\n }", "function functionality_autoload( $class_name ) {\n\n\t/* Only autoload classes from this plugin */\n\tif ( 'Functionality' !== substr( $class_name, 0, 13 ) ) {\n\t\treturn;\n\t}\n\n\t/* Remove namespace from class name */\n\t$class_file = str_replace( 'Functionality_', '', $class_name );\n\n\t/* Convert class name format to file name format */\n\t$class_file = strtolower( $class_file );\n\t$class_file = str_replace( '_', '-', $class_file );\n\n\n\t/* Load the class */\n\trequire_once dirname( __FILE__ ) . \"/php/class-{$class_file}.php\";\n}", "function activator()\n{\n require_once plugin_dir_path( __FILE__ ) . 'includes/Activator.php';\n\tActivator::activate();\n}", "function tb_load_tagBeepAdmin() { \r\n require_once 'tagBeepAdmin.php'; //za admin\r\n}", "function install_plugins_upload()\n {\n }", "function script_enqueuer() {\n wp_register_script( \"generator\", WP_PLUGIN_URL.'/ninja_name_generator/generator.js', array('jquery') );\n wp_localize_script( 'generator', 'name_generator', array( \n \t\t'restURL' => rest_url(),\n \t\t'restNonce' => wp_create_nonce(\"wp_rest\")\n \t));\n\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'generator' );\n\n}", "private function _enableAutoloader()\n {\n Zend_Loader_Autoloader::getInstance()->pushAutoloader(array('P4Cms_Loader', 'autoload'));\n }", "private function autoload_scripts() {\n\t\t\n\t}", "function Syllable_autoloader($class) {\n\t\tif (!class_exists($class) && is_file(dirname(__FILE__). '/' . $class . '.php')) {\n\t\t\trequire dirname(__FILE__). '/' . $class . '.php';\n\t\t}\n\t}", "function wpcom_vip_load_helper_wpcom() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "abstract protected function activate_plugin();", "function <%= functionPrefix %>_admin_conditional_scripts() { }", "public function set_up_dependencies () {\n\t\tif (!Upfront_Permissions::current(Upfront_Permissions::BOOT)) wp_die(\"Nope.\");\n\t\tadd_action('admin_enqueue_scripts', array($this, 'enqueue_dependencies'));\n\t}", "function plugin_admin_scripts() {\r\n\t\t\t// Register & enqueue our admin.js file along with its dependancies\r\n\t\t\twp_register_script('framework', $this->framework_url .'framework.js', array('jquery','media-upload','thickbox','editor'));\r\n\t\t\twp_enqueue_script('framework');\r\n\t\t\t\t\twp_enqueue_script('farbtastic'); \r\n\t\t\twp_enqueue_script('suggest'); // Allow Jquery Chosen\r\n\t\t}", "public function addonAutoloads(){\n\n if($this->addonAutoloads==null){\n $p = $this->path.'/'.$this->config['COMPOSER_PATH'].'/discophp/framework/addon-autoloads.php';\n if(is_file($p)){\n $this->addonAutoloads = unserialize(file_get_contents($p));\n if(!is_array($this->addonAutoloads)){\n $this->addonAutoloads = Array();\n }//if\n }//if\n else {\n $this->addonAutoloads = Array();\n }//el\n }//el\n\n return $this->addonAutoloads;\n\n }", "function skShortIncludeJs() {\r\n\t\tglobal $ShortcodeKidPath;\r\n\t\tif(!is_admin()) {\r\n\t\t\t\r\n\t\t\t//shortcodes.js\r\n\t\t\twp_register_script('skshortcodes', DT_PLUGINS_URL.'/shortcodes/shortcodekid/js/shortcodes.js');\r\n\t\t\t\r\n\t\t\t//Enqueue our script\r\n\t\t\twp_enqueue_script('jquery');\r\n\t\t\twp_enqueue_script('skshortcodes');\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "function dev_missing_dependencies() { ?>\n\t<div class=\"error\">\n <p><?php printf( __( 'Awesome Support dependencies are missing. The plugin can’t be loaded properly. Please run %s before anything else. If you don’t know what this is you should <a href=\"%s\" class=\"thickbox\">install the production version</a> of this plugin instead.', 'awesome-support' ), '<a href=\"https://getcomposer.org/doc/00-intro.md#using-composer\" target=\"_blank\"><code>composer install</code></a>', esc_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'awesome-support', 'TB_iframe' => 'true', 'width' => '772', 'height' => '935' ), admin_url( 'plugin-install.php' ) ) ) ); ?></p>\n </div>\n<?php }", "function __autoload($pClassName) {\r\n if (file_exists($pClassName.'.php')) {\r\n require_once($pClassName.'.php');\r\n return true;\r\n } else if (file_exists('wrapper/'.$pClassName.'.php')) {\r\n require_once('wrapper/'.$pClassName.'.php');\r\n return true;\r\n }\r\n return false; \r\n}", "function serviceAutoloader($class) {\r\n $class = strtolower($class);\r\n switch (substr($class, 0, 2)) {\r\n case 'm_' : {\r\n include_once APPLICATION_MODEL_PATH . $class . \".class.php\";\r\n }\r\n break;\r\n case 'v_' : {\r\n include_once APPLICATION_VIEW_PATH . $class . \".class.php\";\r\n }\r\n break;\r\n case 'c_' : {\r\n include_once APPLICATION_CONTROLLER_PATH . $class . \".class.php\";\r\n }\r\n break;\r\n default : {\r\n if (file_exists(APPLICATION_EXTENSION_PATH . $class . \"/\" . $class . \".class.php\")) {\r\n include_once (APPLICATION_EXTENSION_PATH . $class . \"/\" . $class . \".class.php\");\r\n }\r\n }\r\n break;\r\n }\r\n}", "function sbrb_plugin_admin_scripts() {\n if ( !is_admin() ) \n return;\n\n global $hook_suffix;\n if ( $hook_suffix != 'settings_page_sbrb-url-shortener' ) \n return;\n\n wp_register_script(\n 'sbrb-admin-functions', \n plugin_dir_url(__FILE__) . 'js/url-shortener-admin-functions.js', \n array('jquery'), \n '1.0', \n true\n );\n wp_enqueue_script( 'sbrb-admin-functions' );\n }", "function get_plugin_update($basename = '', $force_check = \\false)\n {\n }", "private static function install_addon() {\n\t\trequire_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );\n\n\t\t$download_url = FrmAppHelper::get_param( 'plugin', '', 'post', 'esc_url_raw' );\n\n\t\t// Create the plugin upgrader with our custom skin.\n\t\t$installer = new Plugin_Upgrader( new FrmInstallerSkin() );\n\t\t$installer->install( $download_url );\n\n\t\t// Flush the cache and return the newly installed plugin basename.\n\t\twp_cache_flush();\n\n\t\treturn $installer->plugin_info();\n\t}", "protected function _initLoadPlugin() {\n\t\t$front = Zend_Controller_Front::getInstance();\n\t\t$front->registerPlugin(new Plugins_Myplugin() );\t\n\t}", "function __autoload($class) {\r\n \r\n $class = strtolower($class);\r\n\r\n\t//if call from within assets adjust the path\r\n $classpath = 'classes/class.'.$class . '.php';\r\n if ( file_exists($classpath)) {\r\n require_once $classpath;\r\n\t} \t\r\n\t\r\n\t//if call from within admin adjust the path\r\n $classpath = '../classes/class.'.$class . '.php';\r\n if ( file_exists($classpath)) {\r\n require_once $classpath;\r\n\t}\r\n\t\r\n\t//if call from within admin adjust the path\r\n $classpath = '../../classes/class.'.$class . '.php';\r\n if ( file_exists($classpath)) {\r\n require_once $classpath;\r\n\t} \t\t\r\n\t \r\n}", "public function installPlugin()\n\t{\n\t\treturn true;\t\n\t}", "public function registerAutoloaders(DiInterface $di = null)\n {\n //$mod = $di->get('modules')->admin;\n //\\Pcan\\mod_LoaderService($di, [$mod->namespace => $mod->dir ]);\n }", "function GTPress_preInit(){\r\n\tglobal $wp_version;\r\n\tif ( version_compare($wp_version, '3.1', '<') ) {\r\n\t\tdeactivate_plugins( basename(__FILE__) );\r\n\t\twp_die(\"Sorry, this plugin requires WordPress 3.1 or greater!<br>Please update your WordPress install before attempting to re-activate!\");\r\n\t}\r\n\tif ( is_plugin_active('./ozh-admin-drop-down-menu/wp_ozh_adminmenu.php') ) {\r\n\t\tdeactivate_plugins( basename(__FILE__) );\r\n\t\twp_die(\"Sorry, the plugin <a href=\\\"http://wordpress.org/extend/plugins/ozh-admin-drop-down-menu/\\\" alt=\\\"Ozh' Admin Drop Down Menu\\\">Ozh' Admin Drop Down Menu</a> is required!<br>Please install this plugin before attempting to re-activate!\");\r\n\t}\r\n\r\n}", "private function initAutoLoader()\n\t{\n\t\tJLoader::registerNamespace('Jdideal', JPATH_LIBRARIES);\n\n\t\tif (class_exists(Gateway::class) === false)\n\t\t{\n\t\t\tJLoader::registerNamespace('Jdideal', JPATH_LIBRARIES . '/Jdideal');\n\t\t}\n\n\t\t$classes = [\n\t\t\t'RSFormProHelper' => JPATH_ADMINISTRATOR . '/components/com_rsform/helpers/rsform.php',\n\t\t\t'RSFormProPaymentHelper' => JPATH_ADMINISTRATOR . '/components/com_rsform/helpers/payment.php',\n\t\t\t'RSFormProField' => JPATH_ADMINISTRATOR\n\t\t\t\t. '/components/com_rsform/helpers/field.php',\n\t\t\t'RSFormProFieldMultiple' => JPATH_ADMINISTRATOR . '/components/com_rsform/helpers/fieldmultiple.php',\n\t\t\t'RSFormProFieldCheckboxGroup' => JPATH_ADMINISTRATOR\n\t\t\t\t. '/components/com_rsform/helpers/fields/checkboxgroup.php',\n\t\t\t'RSFormProFieldRadioGroup' => JPATH_ADMINISTRATOR\n\t\t\t\t. '/components/com_rsform/helpers/fields/radiogroup.php',\n\t\t\t'RSFormProFieldSelectList' => JPATH_ADMINISTRATOR\n\t\t\t\t. '/components/com_rsform/helpers/fields/selectlist.php',\n\t\t\t'RSFormProFieldTextbox' => JPATH_ADMINISTRATOR\n\t\t\t\t. '/components/com_rsform/helpers/fields/textbox.php',\n\t\t\t'RSFormProFieldDiscount' => JPATH_ADMINISTRATOR\n\t\t\t\t. '/components/com_rsform/helpers/fields/discount.php',\n\t\t\t'RsfpjdidealMultipleProducts' => __DIR__ . '/helpers/RsfpjdidealMultipleProducts.php',\n\t\t];\n\n\t\t$layouts = [\n\t\t\t'Bootstrap2',\n\t\t\t'Bootstrap3',\n\t\t\t'Bootstrap4',\n\t\t\t'Bootstrap5',\n\t\t\t'Foundation',\n\t\t\t'Responsive',\n\t\t\t'Uikit',\n\t\t\t'Uikit3',\n\t\t];\n\n\t\tforeach ($layouts as $layout)\n\t\t{\n\t\t\t$layout = strtolower($layout);\n\t\t\t$classes['RSFormProField' . $layout . 'CheckboxGroup'] = JPATH_ADMINISTRATOR\n\t\t\t\t. '/components/com_rsform/helpers/fields/' . $layout . '/checkboxgroup.php';\n\n\t\t\t$classes['RSFormProField' . $layout . 'RadioGroup'] = JPATH_ADMINISTRATOR\n\t\t\t\t. '/components/com_rsform/helpers/fields/' . $layout . '/radiogroup.php';\n\t\t}\n\n\t\tforeach ($classes as $class => $path)\n\t\t{\n\t\t\tJLoader::register($class, $path);\n\t\t}\n\t}", "function autoloader($classname){\n $lastSlash = strpos($classname, '\\\\') + 1;\n $classname = substr($classname, $lastSlash);\n $directory = str_replace('\\\\' , '/' , $classname);\n $filename = __DIR__ . '/' . $directory . '.php';\n\n require_once $filename;\n }", "static function _RequireFile($name) {\n require_once(LIBS_DIR . '/apifunctions/' . $name);\n }", "function wpcom_vip_load_helper() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "protected function __init_func_loader()\n {\n require_once(INIT_FUNC_FILE);\n }", "function WPTime_plugin_preloader_init(){\r\n\tif( !get_option('wptpreloader_screen') ){\r\n\t\tupdate_option('wptpreloader_screen', 'full');\r\n\t}\r\n\r\n\tif( !function_exists('is_woocommerce') and get_option('wptpreloader_screen') == 'woocommerce' ){\r\n update_option('wptpreloader_screen', 'full');\r\n }\r\n}", "function spreadshop_article_detail()\n{\ninclude(plugin_dir_path(__FILE__).'/spreadarticledetail.php');\n}", "protected function _initAutoload()\n {\n // It is necessary to manually add all of the new components as they are created in the application architecture\n $nameSpaceToPath = array(\n// Example of Game package contained under module\n// 'Model_Game' => 'models/Game'\n );\n\n $autoLoaderResource = $this->getResourceLoader();\n\n /* The Autoloader resource comes with the following mappings to assume subdirectories under the module directory:\n forms/, models/, models/mapper, models/DbTable, plugins/, services/, and views/.\n Create references to the others (in this case, the \"controllers/\" directory since it contains the Abstract */\n $autoLoaderResource\n ->addResourceType('controller', 'controllers', 'Controller');\n\n // now loop through and load the mapper and DbTable for each of the model components\n foreach($nameSpaceToPath as $ns => $path) {\n $autoLoaderResource->addResourceType('mapper',$path.'/mappers',$ns.'_Mapper');\n $autoLoaderResource->addResourceType('DbTable',$path.'/DbTable',$ns.'_DbTable');\n }\n\n return $autoLoaderResource;\n }", "abstract public function register_plugin();", "function mp_theme_bundle_activation_set_up_plugin(){\n\n\tglobal $mp_core_options;\n\n\tif ( !isset( $mp_core_options['mp_theme_bundle_activation_set_up_plugin'] ) ){\n\t\treturn;\n\t}\n\n\tif ( !$mp_core_options['mp_theme_bundle_activation_set_up_plugin'] ){\n\t\treturn;\n\t}\n\n\t$theme_bundle_info = mp_get_theme_bundle_info();\n\n\t//Set the method for the wp filesystem\n\t$method = ''; // Normally you leave this an empty string and it figures it out by itself, but you can override the filesystem method here\n\n\t//Get credentials for wp filesystem\n\tif (false === ($creds = request_filesystem_credentials( admin_url(), $method, false, false) ) ) {\n\n\t\t// if we get here, then we don't have credentials yet,\n\t\t// but have just produced a form for the user to fill in,\n\t\t// so stop processing for now\n\n\t\treturn true; // stop the normal page form from displaying\n\t}\n\n\t//Now we have some credentials, try to get the wp_filesystem running\n\tif ( ! WP_Filesystem($creds) ) {\n\t\t// our credentials were no good, ask the user for them again\n\t\trequest_filesystem_credentials($url, $method, true, false);\n\t\treturn true;\n\t}\n\n\t//By this point, the $wp_filesystem global should be working, so let's use it get our plugin.\n\tglobal $wp_filesystem;\n\n\t$plugins_dir = $wp_filesystem->wp_plugins_dir();\n\n\t// Zip file name\n\t$zip_file_name = $theme_bundle_info['dashed_slug'] . '.zip';\n\n\t$plugin_file_name = $plugins_dir . '/' . $theme_bundle_info['dashed_slug'] . '/' . $theme_bundle_info['plugin_filename'];\n\n\t//If this corresponding Theme Bundle plugin is already active, de-activate it now:\n\tdeactivate_plugins( $plugin_file_name );\n\n\t//Create a zip containing this \"theme\" in the plugins directory\n\tmp_core_zip_directory( realpath( get_template_directory() ), $plugins_dir . '/' . $zip_file_name );\n\n\t//Unzip it\n\t$unzip_result = unzip_file( $plugins_dir . '/' . $zip_file_name, $plugins_dir . '/' );\n\n\t//Delete the temp zipped file\n\t$wp_filesystem->rmdir( $plugins_dir . '/' . $zip_file_name );\n\n\t//Now that the plugin is where it needs to be, activate it.\n\tactivate_plugin( $plugin_file_name );\n\n\tunset( $mp_core_options['mp_theme_bundle_activation_set_up_plugin'] );\n\tupdate_option( 'mp_core_options', $mp_core_options );\n\n\techo '<style type=\"text/css\">';\n\n\t\techo '#mp_theme_bundle_installation_overlay{\n\n\t\t\ttop:0px;\n\t\t\tright:0px;\n\t\t\tbottom:0px;\n\t\t\tleft:0px;\n\t\t\tposition:absolute;\n\t\t\twidth:100%;\n\t\t\tbackground-color: #222222;\n z-index: 999999999999;\n\t\t\tcolor:#ffffff;\n\t\t\tfont-size:30px;\n\n\t\t\theight: 100%;\n\t\t\t display: -webkit-box;\n\t\t\t display: -webkit-flex;\n\t\t\t display: -ms-flexbox;\n\t\t\t display: flex;\n\t\t\t -webkit-box-pack: center;\n\t\t\t -webkit-justify-content: center;\n\t\t\t\t -ms-flex-pack: center;\n\t\t\t\t\t justify-content: center;\n\t\t\t -webkit-box-align: center;\n\t\t\t -webkit-align-items: center;\n\t\t\t\t -ms-flex-align: center;\n\t\t\t\t\t align-items: center;\n\n\t\t}';\n\n\techo '</style>';\n\n\techo '<div id=\"mp_theme_bundle_installation_overlay\">' . __( 'Starting Activation...', 'mp_core' ) . '</div>';\n\n}" ]
[ "0.6162595", "0.6089092", "0.60438347", "0.59748924", "0.59523016", "0.59011537", "0.5897351", "0.58831924", "0.5857214", "0.58398527", "0.58336", "0.5829964", "0.58154035", "0.5815382", "0.58033884", "0.5799519", "0.5792013", "0.57876164", "0.5784904", "0.5783519", "0.5760228", "0.5756708", "0.57482094", "0.57315165", "0.5721924", "0.57117414", "0.56964713", "0.5688596", "0.5683151", "0.5682224", "0.5681804", "0.5677986", "0.56779605", "0.5677671", "0.5675673", "0.5666632", "0.5665865", "0.56645745", "0.56616604", "0.5660617", "0.56407154", "0.56381", "0.5636788", "0.56169975", "0.56046486", "0.56039846", "0.5601995", "0.5594973", "0.5592578", "0.5590392", "0.558794", "0.55835503", "0.55790615", "0.5575984", "0.55698466", "0.55661327", "0.5558959", "0.55531436", "0.55420494", "0.55407065", "0.55401945", "0.55309033", "0.5530208", "0.55253756", "0.55243903", "0.5521605", "0.5517149", "0.5508693", "0.5508604", "0.5498236", "0.54968554", "0.54962015", "0.54933685", "0.54845184", "0.5482816", "0.5480133", "0.54703027", "0.5463752", "0.5461959", "0.5450786", "0.5445124", "0.54450774", "0.54417753", "0.5433243", "0.5432155", "0.5428499", "0.5425761", "0.5422435", "0.54220444", "0.54141", "0.54128397", "0.54037213", "0.5402225", "0.5395815", "0.5395359", "0.5392028", "0.53878117", "0.53872836", "0.5385305", "0.53839624" ]
0.6091275
1
/ runs in messageindex.php 1) fetch our data 2) allow side bar 3) specify side bar template to use
public static function messageindex(&$board_info) { global $context, $txt, $sourcedir, $user_info; loadLanguage('Activities'); // add our plugin directory to the list of directories to search for templates. EoS_Smarty::addTemplateDir(dirname(__FILE__)); // register two hook templates for the side bar top and bottom areas EoS_Smarty::getConfigInstance()->registerHookTemplate('sidebar_top', 'testplugin_sidebar_top'); EoS_Smarty::getConfigInstance()->registerHookTemplate('sidebar_bottom', 'testplugin_sidebar_bottom'); // register some global variable (that's optional though, it would be totally ok to use $context) // You should always assignByRef(), because it's faster and doesn't create a copy // of the variable EoS_Smarty::getSmartyInstance()->assignByRef('MYDATA', self::$mydata); // enable side bar in the message index display if($user_info['is_admin'] && $board_info['allow_topics']) { $context['show_sidebar'] = true; $context['sidebar_template'] = 'sidebars/sidebar_on_messageindex.tpl'; $context['sidebar_class'] = 'messageindex'; GetSidebarVisibility('messageindex'); } else $context['show_sidebar'] = false; $ignoreusers = !empty($user_info['ignoreusers']) ? $user_info['ignoreusers'] : array(0); // .. and set the name of the template self::$mydata['testvalue'] = 'Foo'; @require_once($sourcedir . '/lib/Subs-Activities.php'); $context['act_global'] = false; $request = smf_db_query('SELECT a.*, t.*, b.name AS board_name FROM {db_prefix}log_activities AS a LEFT JOIN {db_prefix}activity_types AS t ON (t.id_type = a.id_type) LEFT JOIN {db_prefix}boards AS b ON (b.id_board = a.id_board) WHERE a.id_board = {int:id_board} AND a.id_member NOT IN({array_int:ignoredusers}) ORDER BY a.id_act DESC LIMIT 5', array('id_board' => $context['current_board'], 'ignoredusers' => $ignoreusers) ); aStreamOutput($request, false, true); /* if(isset($context['activities'])) { usort($context['activities'], function($a, $b) { if ($a['updated'] == $b['updated']) return 0; return ($a['updated'] < $b['updated']) ? -1 : 1; }); }*/ $request = smf_db_query('SELECT m.* FROM {db_prefix}messages AS m WHERE m.id_board = {int:id_board} AND m.id_member NOT IN ({array_int:ignoredusers}) ORDER BY m.id_msg DESC LIMIT 10', array('id_board' => $context['current_board'], 'ignoredusers' => $ignoreusers)); mysql_free_result($request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSideBar(){\r\n $barContent = \"\";\r\n \r\n if(!isUserLoggedIn())\r\n {\r\n $barContent .= '<BR/><HR><img src=\"spartan_logo.gif\" width=\"100%\"></img><HR>';\r\n $barContent .= '<blockquote><p>Please login . . .</p></blockquote><HR><BR/>';\r\n }\r\n else\r\n {\r\n\t\t$barContent .= '<HR><ul class=\"nav nav-pills nav-stacked\">';\r\n\t\t$barContent .= \t\t'<li><font color=\"black\"><B>Menu</B></font></li>';\r\n\t\t$barContent .= \t\t'<li> <A HREF=\"#\" onClick=\"MyHome()\">&nbsp;<i class=\"glyphicon glyphicon-home\"></i>&nbsp;&nbsp;Home</a> </li>';\r\n\t\t//$barContent .= \t\t'<li> <A HREF=\"#\" onClick=\"myGraph()\">&nbsp;<i class=\"icon-list\"></i>Tran</a> </li>';\r\n\t\t//$barContent .= \t\t'<li> <A HREF=\"#\" onClick=\"MyInfo()\">&nbsp;<i class=\"glyphicon glyphicon-user\"></i>&nbsp;&nbsp;Profile</a> </li>';\r\n\t\t$barContent .= '<li> <A HREF=\"#\" onClick=\"MyInfo()\">&nbsp;<i class=\"glyphicon glyphicon-user\"></i>&nbsp;&nbsp;Profile</a> </li>';\r\n $barContent .= '<li> <A HREF=\"#\" onClick=\"readlogfile()\">&nbsp;<i class=\"glyphicon glyphicon-road\"></i>&nbsp;&nbsp;Mail Log</a> </li>';\r\n\r\n $barContent .= '</ul>';\r\n \r\n $barContent .= '<HR><ul class=\"nav nav-list\">';\r\n $barContent .= \t'<li><font color=\"black\"><B>Event Menu</B></font></li>';\r\n $barContent .= \t'<li> <A HREF=\"#\" onClick=\"eventsButtonHandler(0)\">&nbsp;<i class=\"glyphicon glyphicon-eye-open\"></i>&nbsp;&nbsp;View</a> </li>';\r\n $barContent .= \t'<li> <A HREF=\"#\" onClick=\"eventsButtonHandler(1)\">&nbsp;<i class=\"glyphicon glyphicon-plus\"></i>&nbsp;&nbsp;Create</a> </li>';\r\n $barContent .= \t'<li> <A HREF=\"#\" onClick=\"eventsButtonHandler(2)\">&nbsp;<i class=\"glyphicon glyphicon-list-alt\"></i>&nbsp;&nbsp;View Multi</a> </li>';\r\n\t$barContent .= '<li> <A HREF=\"#\" onClick=\"eventsButtonHandler(3)\">&nbsp;<i class=\"glyphicon glyphicon-tower\"></i>&nbsp;&nbsp;Multi Create</a> </li>';\r\n\t$barContent .= '</ul><HR>';\r\n\r\n $barContent .= '<img src=\"spartan_logo.gif\" width=\"90%\"></img>';\r\n $barContent .= '<HR/>';\r\n }\r\n\r\n return $barContent;\r\n}", "public function index()\n { $data['lists']['news'] = ($this->options['show_news'] == 'y') ? self::_show_news() : false;\n\n // should we show personal logs?\n $data['lists']['logs'] = ($this->options['show_logs'] == 'y') ? self::_show_logs() : false;\n\n // should we show mission posts?\n $data['lists']['posts'] = ($this->options['show_posts'] == 'y') ? self::_show_posts() : false;\n\n // make sure only real content is in the set of lists\n foreach ($data['lists'] as $key => $list) {\n if ($list === false) {\n unset($data['lists'][$key]);\n }\n }\n\n // header and welcome message\n $data['header'] = $this->msgs->get_message('welcome_head');\n $data['msg_welcome'] = $this->msgs->get_message('welcome_msg');\n\n // labels\n $data['label'] = array(\n 'logs' => ucwords(lang('status_latest') .' '. lang('global_personallogs')),\n 'news' => ucwords(lang('status_latest') .' '. lang('global_newsitems')),\n 'posts' => ucwords(lang('status_latest') .' '. lang('global_missionposts')),\n 'posted' => ucfirst(lang('actions_posted') .' '. lang('labels_on')),\n 'by' => lang('labels_by'),\n 'in' => lang('labels_in'),\n 'mission' => ucfirst(lang('global_mission')),\n );\n\n $this->_regions['content'] = Location::view('main_index', $this->skin, 'main', $data);\n $this->_regions['javascript'] = Location::js('main_index_js', $this->skin, 'main');\n $this->_regions['title'].= ucfirst(lang('labels_main'));\n\n Template::assign($this->_regions);\n\n Template::render();\n }", "function Pmx_SideBar()\n{\n\tglobal $options, $context, $txt, $scripturl, $settings, $sourcedir;\n\n\tif(!empty($context['PmxBlog']['Manager']['showcalendar']) || !empty($context['PmxBlog']['Manager']['showarchive']) || !empty($context['PmxBlog']['Manager']['showcategories']))\n\t{\n\t\techo '\n\t\t<td valign=\"top\">\n\t\t<div id=\"upshrinkPmxBlogSideBar\" style=\"margin-left:6px; width:170px;'. (empty($options['collapse_PmxBlogSideBar']) ? '' : ' display:none;') .'\">';\n\n\t\t$margintop = '';\n\t\t$blogdate = getdate($context['PmxBlog']['Manager']['blogcreated']);\n\t\t$currTime = getdate(forum_time());\n\t\tif(!empty($context['PmxBlog']['Archivdate']))\n\t\t{\n\t\t\t$now = $context['PmxBlog']['Archivdate'];\n\t\t\t$today = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$now = getdate(forum_time());\n\t\t\t$today = $now['mday'];\n\t\t}\n\n\t\t// The Calendar\n\t\tif(isset($context['PmxBlog']['Manager']['showcalendar']) && $context['PmxBlog']['Manager']['showcalendar'] == 1)\n\t\t{\n\t\t\tinclude_once($sourcedir .'/Subs-Calendar.php');\n\t\t\t$calOpt = array(\n\t\t\t\t'start_day' => !empty($options['calendar_start_day']) ? $options['calendar_start_day'] : 0,\n\t\t\t\t'show_week_num' => 1,\n\t\t\t\t'short_day_titles' => 1,\n\t\t\t\t'show_holidays' => 0,\n\t\t\t\t'show_events' => 0,\n\t\t\t\t'show_birthdays' => 0,\n\t\t\t);\n\t\t\t$calData = getCalendarGrid($now['mon'], $now['year'], $calOpt);\n\t\t\t$title = $txt['months'][(int) $now['mon']] .' '. $now['year'];\n\n\t\t\t$calendar = '\n\t\t\t\t<table class=\"table_grid pmxblog_th\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr class=\"catbg\">\n\t\t\t\t\t\t\t<th class=\"first_th\" scope=\"col\" width=\"97%\">\n\t\t\t\t\t\t\t\t<div style=\"text-align:center;\">';\n\n\t\t\tif(PmxCompareDate($blogdate, $now, array('year', 'mon')) == -1)\n\t\t\t{\n\t\t\t\tif($now['mon'] > 1)\n\t\t\t\t\t$calaction = ';arch='. mktime(0, 1, 0, ($now['mon'] -1), $now['mday'], $now['year']);\n\t\t\t\telse\n\t\t\t\t\t$calaction = ';arch='. mktime(0, 1, 0, 12, $now['mday'], ($now['year'] -1));\n\t\t\t\t$calendar .= '\n\t\t\t\t\t\t<span style=\"margin-right:4px;\"><a href=\"'. $scripturl .'?action=pmxblog;sa='.$context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\" title=\"'. $txt['PmxBlog_blogview_prevmon'] .'\">&laquo;</a></span>';\n\t\t\t}\n\n\t\t\tif(PmxCompareDate($currTime, $now, array('seconds', 'minutes', 'year', 'mon', 'mday')) != 0)\n\t\t\t{\n\t\t\t\t$calaction = ';arch=0';\n\t\t\t\t$calendar .= '\n\t\t\t\t\t\t<a href=\"'. $scripturl .'?action=pmxblog;sa='.$context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\" title=\"'. $txt['PmxBlog_blogview_resetdate'] .'\">'.$title.'</a>';\n\t\t\t}\n\t\t\telse\n\t\t\t\t$calendar .= $title;\n\n\t\t\tif(PmxCompareDate($now, $currTime, array('year', 'mon')) == -1)\n\t\t\t{\n\t\t\t\tif($now['mon'] < 12)\n\t\t\t\t\t$calaction = ';arch='. mktime(0, 1, 0, ($now['mon'] +1), $now['mday'], $now['year']);\n\t\t\t\telse\n\t\t\t\t\t$calaction = ';arch='. mktime(0, 1, 0, 1, $now['mday'], ($now['year'] +1));\n\n\t\t\t\t$calendar .= '\n\t\t\t\t\t\t<span style=\"margin-right:4px;\"><a href=\"'. $scripturl .'?action=pmxblog;sa='.$context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\" title=\"'. $txt['PmxBlog_blogview_nextmon'] .'\">&raquo;</a></span>';\n\t\t\t}\n\n\t\t\t$calendar .= '\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<th class=\"last_th\" scope=\"col\" width=\"3%\"></th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tr><td colspan=\"2\" class=\"pmxblog_empty\"></td></tr></table>\n\n\t\t\t\t\t<div class=\"plainbox pmxblog_border\">\n\t\t\t\t\t<table class=\"windowbg2\" width=\"100%\" align=\"center\" border=\"0\" cellspacing=\"4\" cellpadding=\"0\">\n\t\t\t\t\t\t<tr>';\n\n\t\t\tforeach($calData['week_days'] as $day)\n\t\t\t\t$calendar .= '\n\t\t\t\t\t\t\t<td class=\"smalltext\" align=\"center\">'. substr($txt['days'][$day], 0, 2) .'</td>';\n\n\t\t\t$calendar .= '\n\t\t\t\t\t\t</tr>';\n\n\t\t\tforeach($calData['weeks'] as $week)\n\t\t\t{\n\t\t\t\t$calendar .= '\n\t\t\t\t\t\t<tr>';\n\n\t\t\t\t$dayspan = 0;\n\t\t\t\tforeach($week['days'] as $days)\n\t\t\t\t{\n\t\t\t\t\tif(empty($days['day']))\n\t\t\t\t\t\t$dayspan++;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!empty($dayspan))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$calendar .= '\n\t\t\t\t\t\t\t<td class=\"smalltext\" colspan=\"'. $dayspan .'\"></td>';\n\t\t\t\t\t\t\t$dayspan = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$calendar .= '\n\t\t\t\t\t\t\t<td align=\"right\" valign=\"middle\" class=\"smalltext';\n\n\t\t\t\t\t\tif($days['day'] == $today)\n\t\t\t\t\t\t\t$calendar .= ' plainbox\" style=\"padding:0 2px 2px 0;\">';\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$calendar .= '\" style=\"padding:0px 2px;\">';\n\n\t\t\t\t\t\tif(!empty($context['PmxBlog']['cal'][$now['year']][$now['mon']][$days['day']]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$calaction = ';arch='. mktime(0, 0, 1, $now['mon'], $days['day'], $now['year']);\n\t\t\t\t\t\t\t$calendar .= '\n\t\t\t\t\t\t\t\t<a href=\"'. $scripturl .'?action=pmxblog;sa='. $context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\"><u><b>'. $days['day'] .'</b></u></a>\n\t\t\t\t\t\t\t</td>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$calendar .= $days['day'] .'\n\t\t\t\t\t\t\t</td>';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$calendar .= '\n\t\t\t\t\t\t</tr>';\n\t\t\t}\n\t\t\t$calendar .= '\n\t\t\t\t\t</table>\n\t\t\t\t</div>';\n\n\t\t\techo $calendar;\n\t\t\t$margintop = 'margin-top:5px; ';\n\t\t}\n\n\t\t// The Archive\n\t\tif(isset($context['PmxBlog']['Manager']['showarchive']) && $context['PmxBlog']['Manager']['showarchive'] == 1)\n\t\t{\n\t\t\techo '\n\t\t\t\t<table class=\"table_grid pmxblog_th\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" style=\"'.$margintop.'\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr class=\"catbg\">\n\t\t\t\t\t\t\t<th class=\"first_th\" scope=\"col\" width=\"97%\"><div style=\"text-align:center;\">';\n\n\t\t\tif(PmxCompareDate($blogdate, $now, array('year')) == -1)\n\t\t\t{\n\t\t\t\t$calaction = ';arch='. mktime(0, 0, 0, $now['mon'], 1, ($now['year'] -1));\n\t\t\t\tif($calaction < $context['PmxBlog']['Manager']['blogcreated'])\n\t\t\t\t\t$calaction = ';arch='. mktime(0, 0, 0, $blogdate['mon'], $blogdate['mday'], $blogdate['year']);\n\t\t\t\techo '\n\t\t\t\t\t<a href=\"'. $scripturl .'?action=pmxblog;sa='.$context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\" title=\"'. $txt['PmxBlog_blogview_prevyear'] .'\">&laquo;</a>';\n\t\t\t}\n\n\t\t\techo '\n\t\t\t\t\t<span style=\"margin:0px 4px;\">';\n\n\t\t\tif(PmxCompareDate($currTime, $now, array('seconds', 'minutes', 'year', 'mon', 'mday')) != 0)\n\t\t\t{\n\t\t\t\t$calaction = ';arch=0';\n\t\t\t\techo '\n\t\t\t\t\t\t<a href=\"'. $scripturl .'?action=pmxblog;sa='.$context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\" title=\"'. $txt['PmxBlog_blogview_resetdate'] .'\">'. $txt['PmxBlog_archive'] .' '. $now['year'] .'</a>';\n\t\t\t}\n\t\t\telse\n\t\t\t\techo $txt['PmxBlog_archive'] .' '. $now['year'];\n\n\t\t\techo '\n\t\t\t\t\t</span>';\n\n\t\t\tif(PmxCompareDate($currTime, $now, array('year')) == 1)\n\t\t\t{\n\t\t\t\t$calaction = mktime(0, 0, 0, $now['mon'], 1, ($now['year'] +1));\n\t\t\t\tif(PmxCompareDate(getdate($calaction), $currTime, array('year')) == -1)\n\t\t\t\t\t$calaction = mktime(0, 0, 0, $currTime['mon'], 1, $currTime['year']);\n\t\t\t\techo '\n\t\t\t\t\t<a href=\"'. $scripturl .'?action=pmxblog;sa='.$context['PmxBlog']['mode'] .';arch='.$calaction.$context['PmxBlog']['UserLink'].'\" title=\"'. $txt['PmxBlog_blogview_nextyear'] .'\">&raquo;</a>';\n\t\t\t}\n\n\t\t\techo '\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<th class=\"last_th\" scope=\"col\" width=\"3%\"></th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t<tr><td colspan=\"2\" class=\"pmxblog_empty\"></td></tr></table>\n\t\t\t\t<div class=\"plainbox pmxblog_border\">\n\t\t\t\t<div class=\"windowbg2\" style=\"padding:5px 5px;\">\n\t\t\t\t\t<span class=\"smalltext\">';\n\n\t\t\tfor ($m=1; $m <= 12; $m++)\n\t\t\t{\n\t\t\t\tif(isset($context['PmxBlog']['arch'][$now['year']][$m]))\n\t\t\t\t{\n\t\t\t\t\t$calaction = ';arch='. mktime(0, 1, 0, $m, 1, $now['year']);\n\t\t\t\t\techo '\n\t\t\t\t\t\t<a href=\"'. $scripturl .'?action=pmxblog;sa='. $context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\"><b>'. $txt['months'][$m] .'</b></a>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo $txt['months'][$m];\n\n\t\t\t\techo '<br />';\n\t\t\t}\n\n\t\t\techo '\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</div>';\n\t\t\t$margintop = 'margin-top:5px; ';\n\t\t}\n\n\t\t// Categorie List\n\t\tif(isset($context['PmxBlog']['Manager']['showcategories']) && $context['PmxBlog']['Manager']['showcategories'] == 1 && !empty($context['PmxBlog']['categorie']))\n\t\t{\n\t\t\techo '\n\t\t\t\t<table class=\"table_grid pmxblog_th\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" style=\"'.$margintop.'\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr class=\"catbg\">\n\t\t\t\t\t\t\t<th class=\"first_th\" scope=\"col\" width=\"97%\"><div style=\"text-align:center;\">'. $txt['PmxBlog_categorie_title'] .'</div></th>\n\t\t\t\t\t\t\t<th class=\"last_th\" scope=\"col\" width=\"3%\"></th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t<tr><td colspan=\"2\" class=\"pmxblog_empty\"></td></tr></table>';\n\n\t\t\tif(!empty($context['PmxBlog']['categorie']))\n\t\t\t{\n\t\t\t\techo '\n\t\t\t\t<div class=\"plainbox pmxblog_border\">\n\t\t\t\t\t<div class=\"windowbg2\" style=\"padding:5px 5px;\">';\n\t\t\t\tforeach($context['PmxBlog']['categorie'] as $fbcat)\n\t\t\t\t{\n\t\t\t\t\t$d = str_pad('', $fbcat['depth']*2, '.');\n\t\t\t\t\techo '\n\t\t\t\t\t\t<div class=\"smalltext\">'.\n\t\t\t\t\t\t\t(!empty($fbcat['ContCat']) ? '<a href=\"'. $scripturl .'?action=pmxblog;sa='. $context['PmxBlog']['mode']. ';ca='. $fbcat['id'] .$context['PmxBlog']['UserLink'].'\"><b>'.$d.$fbcat['name'] .'</b></a>' : $d.$fbcat['name']) .\n\t\t\t\t\t\t'</div>';\n\t\t\t\t}\n\t\t\t\techo '\n\t\t\t\t\t</div>';\n\t\t\t}\n\t\t\techo '\n\t\t\t</div>';\n\t\t}\n\t\techo '\n\t</div>\n\t</td>';\n\t}\n}", "function messaging_inbox_page_output() {\n\tglobal $wpdb, $wp_roles, $current_user, $user_ID, $current_site, $messaging_official_message_bg_color, $messaging_max_inbox_messages, $messaging_max_reached_message, $wp_version;\n\n\tif (isset($_GET['updated'])) {\n\t\t?><div id=\"message\" class=\"updated fade\"><p><?php echo stripslashes(sanitize_text_field($_GET['updatedmsg'])) ?></p></div><?php\n\t}\n\n\t$action = isset($_GET[ 'action' ]) ? $_GET[ 'action' ] : '';\n\n\techo '<div class=\"wrap\">';\n\tswitch( $action ) {\n\t\t//---------------------------------------------------//\n\t\tdefault:\n\t\t\tif ( isset($_POST['Remove']) ) {\n\t\t\t\tmessaging_update_message_status(intval($_POST['mid']),'removed');\n\t\t\t\techo \"\n\t\t\t\t<SCRIPT LANGUAGE='JavaScript'>\n\t\t\t\twindow.location='admin.php?page=messaging&updated=true&updatedmsg=\" . urlencode(__('Message removed.', 'messaging')) . \"';\n\t\t\t\t</script>\n\t\t\t\t\";\n\t\t\t}\n\t\t\tif ( isset($_POST['Reply']) ) {\n\t\t\t\techo \"\n\t\t\t\t<SCRIPT LANGUAGE='JavaScript'>\n\t\t\t\twindow.location='admin.php?page=messaging&action=reply&mid=\" . intval($_POST['mid']) . \"';\n\t\t\t\t</script>\n\t\t\t\t\";\n\t\t\t}\n\t\t\t$tmp_message_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"messages WHERE message_to_user_ID = %d AND message_status != %s\", $user_ID, 'removed'));\n\t\t\t$tmp_unread_message_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"messages WHERE message_to_user_ID = %d AND message_status = %s\", $user_ID, 'unread'));\n\t\t\t$tmp_read_message_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"messages WHERE message_to_user_ID = %d AND message_status = %s\", $user_ID, 'read'));\n\t\t\t?>\n <h2><?php _e('Inbox', 'messaging') ?> <a class=\"add-new-h2\" href=\"admin.php?page=messaging_new\"><?php _e('New Message', 'messaging') ?></a></h2>\n <?php\n\t\t\tif ($tmp_message_count == 0){\n\t\t\t?>\n <p><?php _e('No messages to display', 'messaging') ?></p>\n <?php\n\t\t\t} else {\n\t\t\t\t?>\n\t\t\t\t<h3><?php _e('Usage', 'messaging') ?></h3>\n <p>\n\t\t\t\t<?php _e('Maximum inbox messages', 'messaging') ?>: <strong><?php echo $messaging_max_inbox_messages; ?></strong>\n <br />\n <?php _e('Current inbox messages', 'messaging') ?>: <strong><?php echo $tmp_message_count; ?></strong>\n </p>\n <?php\n\t\t\t\tif ($tmp_message_count >= $messaging_max_inbox_messages){\n\t\t\t\t?>\n <p><strong><center><?php _e($messaging_max_reached_message, 'messaging') ?></center></strong></p>\n\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\tif ($tmp_unread_message_count > 0){\n\t\t\t\t?>\n\t\t\t\t<h3><?php _e('Unread', 'messaging') ?></h3>\n\t\t\t\t<?php\n\t\t\t\t$query = $wpdb->prepare(\"SELECT * FROM \" . $wpdb->base_prefix . \"messages WHERE message_to_user_ID = %s AND message_status = %s ORDER BY message_ID DESC\", $user_ID, 'unread');\n\t\t\t\t$tmp_messages = $wpdb->get_results( $query, ARRAY_A );\n\t\t\t\techo \"\n\t\t\t\t<table cellpadding='3' cellspacing='3' width='100%' class='widefat'>\n\t\t\t\t<thead><tr>\n\t\t\t\t<th scope='col'>\" . __(\"From\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'>\" . __(\"Subject\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'>\" . __(\"Recieved\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'>\" . __(\"Actions\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'></th>\n\t\t\t\t<th scope='col'></th>\n\t\t\t\t</tr></thead>\n\t\t\t\t<tbody id='the-list'>\n\t\t\t\t\";\n\t\t\t\t$class = '';\n\t\t\t\tif (count($tmp_messages) > 0){\n\t\t\t\t\t$class = ('alternate' == $class) ? '' : 'alternate';\n\t\t\t\t\tforeach ($tmp_messages as $tmp_message){\n\t\t\t\t\tif ($tmp_message['message_official'] == 1){\n\t\t\t\t\t\t$style = \"'style=background-color:\" . $messaging_official_message_bg_color . \";'\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$style = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t//=========================================================//\n\t\t\t\t\techo \"<tr class='\" . $class . \"' \" . $style . \">\";\n\t\t\t\t\tif ($tmp_message['message_official'] == 1){\n\t\t\t\t\t\t$tmp_username = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\t$tmp_display_name = $wpdb->get_var($wpdb->prepare(\"SELECT display_name FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\tif ( $tmp_display_name == '' ) {\n\t\t\t\t\t\t\t$tmp_display_name = $tmp_username;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tmp_user_url = messaging_user_primary_blog_url($tmp_message['message_from_user_ID']);\n\t\t\t\t\t\tif ($tmp_user_url == ''){\n\t\t\t\t\t\t\techo \"<td valign='top'><strong>\" . $tmp_display_name . \"</strong></td>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"<td valign='top'><strong><a href='\" . $tmp_user_url . \"'>\" . $tmp_display_name . \"</a></strong></td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"<td valign='top'><strong>\" . stripslashes($tmp_message['message_subject']) . \"</strong></td>\";\n\t\t\t\t\t\techo \"<td valign='top'><strong>\" . date_i18n(get_option('date_format') . ' ' . get_option('time_format'),$tmp_message['message_stamp']) . \"</strong></td>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$tmp_username = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\t$tmp_display_name = $wpdb->get_var($wpdb->prepare(\"SELECT display_name FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\tif ( $tmp_display_name == '' ) {\n\t\t\t\t\t\t\t$tmp_display_name = $tmp_username;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tmp_user_url = messaging_user_primary_blog_url($tmp_message['message_from_user_ID']);\n\t\t\t\t\t\tif ($tmp_user_url == ''){\n\t\t\t\t\t\t\techo \"<td valign='top'>\" . $tmp_display_name . \"</td>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"<td valign='top'><a href='\" . $tmp_user_url . \"'>\" . $tmp_display_name . \"</a></td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"<td valign='top'>\" . stripslashes($tmp_message['message_subject']) . \"</td>\";\n\t\t\t\t\t\techo \"<td valign='top'>\" . date_i18n(get_option('date_format') . ' ' . get_option('time_format'),$tmp_message['message_stamp']) . \"</td>\";\n\t\t\t\t\t}\n\t\t\t\t\tif ($tmp_message_count >= $messaging_max_inbox_messages){\n\t\t\t\t\t\techo \"<td valign='top'><a class='edit'>\" . __('View', 'messaging') . \"</a></td>\";\n\t\t\t\t\t\techo \"<td valign='top'><a class='edit'>\" . __('Reply', 'messaging') . \"</a></td>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<td valign='top'><a href='admin.php?page=messaging&action=view&mid=\" . $tmp_message['message_ID'] . \"' rel='permalink' class='edit'>\" . __('View', 'messaging') . \"</a></td>\";\n\t\t\t\t\t\techo \"<td valign='top'><a href='admin.php?page=messaging&action=reply&mid=\" . $tmp_message['message_ID'] . \"' rel='permalink' class='edit'>\" . __('Reply', 'messaging') . \"</a></td>\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"<td valign='top'><a href='admin.php?page=messaging&action=remove&mid=\" . $tmp_message['message_ID'] . \"' rel='permalink' class='delete'>\" . __('Remove', 'messaging') . \"</a></td>\";\n\t\t\t\t\techo \"</tr>\";\n\t\t\t\t\t$class = ('alternate' == $class) ? '' : 'alternate';\n\t\t\t\t\t//=========================================================//\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</tbody></table>\n\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t//=========================================================//\n\t\t\t\tif ($tmp_read_message_count > 0){\n\t\t\t\t?>\n\t\t\t\t<h3><?php _e('Read', 'messaging') ?></h3>\n\t\t\t\t<?php\n\t\t\t\t$query = $wpdb->prepare(\"SELECT * FROM \" . $wpdb->base_prefix . \"messages WHERE message_to_user_ID = %d AND message_status = %s ORDER BY message_ID DESC\", $user_ID, 'read');\n\t\t\t\t$tmp_messages = $wpdb->get_results( $query, ARRAY_A );\n\t\t\t\techo \"\n\t\t\t\t<table cellpadding='3' cellspacing='3' width='100%' class='widefat'>\n\t\t\t\t<thead><tr>\n\t\t\t\t<th scope='col'>\" . __(\"From\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'>\" . __(\"Subject\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'>\" . __(\"Recieved\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'>\" . __(\"Actions\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'></th>\n\t\t\t\t<th scope='col'></th>\n\t\t\t\t</tr></thead>\n\t\t\t\t<tbody id='the-list'>\n\t\t\t\t\";\n\t\t\t\t$class = '';\n\t\t\t\tif (count($tmp_messages) > 0){\n\t\t\t\t\t$class = ('alternate' == $class) ? '' : 'alternate';\n\t\t\t\t\tforeach ($tmp_messages as $tmp_message){\n\t\t\t\t\tif ($tmp_message['message_official'] == 1){\n\t\t\t\t\t\t$style = \"'style=background-color:\" . $messaging_official_message_bg_color . \";'\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$style = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t//=========================================================//\n\t\t\t\t\techo \"<tr class='\" . $class . \"' \" . $style . \">\";\n\t\t\t\t\tif ($tmp_message['message_official'] == 1){\n\t\t\t\t\t\t$tmp_username = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\t$tmp_display_name = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\tif ( $tmp_display_name == '' ) {\n\t\t\t\t\t\t\t$tmp_display_name = $tmp_username;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tmp_user_url = messaging_user_primary_blog_url($tmp_message['message_to_user_ID']);\n\t\t\t\t\t\tif ($tmp_user_url == ''){\n\t\t\t\t\t\t\techo \"<td valign='top'><strong>\" . $tmp_display_name . \"</strong></td>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"<td valign='top'><strong><a href='\" . $tmp_user_url . \"'>\" . $tmp_display_name . \"</a></strong></td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"<td valign='top'><strong>\" . stripslashes($tmp_message['message_subject']) . \"</strong></td>\";\n\t\t\t\t\t\techo \"<td valign='top'><strong>\" . date_i18n(get_option('date_format') . ' ' . get_option('time_format'),$tmp_message['message_stamp']) . \"</strong></td>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$tmp_username = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\t$tmp_display_name = $wpdb->get_var($wpdb->prepare(\"SELECT display_name FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\tif ( $tmp_display_name == '' ) {\n\t\t\t\t\t\t\t$tmp_display_name = $tmp_username;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tmp_user_url = messaging_user_primary_blog_url($tmp_message['message_to_user_ID']);\n\t\t\t\t\t\tif ($tmp_user_url == ''){\n\t\t\t\t\t\t\techo \"<td valign='top'>\" . $tmp_display_name . \"</td>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"<td valign='top'><a href='\" . $tmp_user_url . \"'>\" . $tmp_display_name . \"</a></td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"<td valign='top'>\" . stripslashes($tmp_message['message_subject']) . \"</td>\";\n\t\t\t\t\t\techo \"<td valign='top'>\" . date_i18n(get_option('date_format') . ' ' . get_option('time_format'),$tmp_message['message_stamp']) . \"</td>\";\n\t\t\t\t\t}\n\t\t\t\t\tif ($tmp_message_count >= $messaging_max_inbox_messages){\n\t\t\t\t\t\techo \"<td valign='top'><a class='edit'>\" . __('View', 'messaging') . \"</a></td>\";\n\t\t\t\t\t\techo \"<td valign='top'><a class='edit'>\" . __('Reply', 'messaging') . \"</a></td>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<td valign='top'><a href='admin.php?page=messaging&action=view&mid=\" . $tmp_message['message_ID'] . \"' rel='permalink' class='edit'>\" . __('View', 'messaging') . \"</a></td>\";\n\t\t\t\t\t\techo \"<td valign='top'><a href='admin.php?page=messaging&action=reply&mid=\" . $tmp_message['message_ID'] . \"' rel='permalink' class='edit'>\" . __('Reply', 'messaging') . \"</a></td>\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"<td valign='top'><a href='admin.php?page=messaging&action=remove&mid=\" . $tmp_message['message_ID'] . \"' rel='permalink' class='delete'>\" . __('Remove', 'messaging') . \"</a></td>\";\n\t\t\t\t\techo \"</tr>\";\n\t\t\t\t\t$class = ('alternate' == $class) ? '' : 'alternate';\n\t\t\t\t\t//=========================================================//\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</tbody></table>\n\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\t//---------------------------------------------------//\n\t\tcase \"view\":\n\t\t\t$tmp_total_message_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"messages WHERE message_to_user_ID = %d\", $user_ID));\n\t\t\t$tmp_message_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d AND message_to_user_ID = %d\", $_GET['mid'], $user_ID));\n\t\t\tif ($tmp_message_count > 0){\n\t\t\t\tif ($tmp_total_message_count >= $messaging_max_inbox_messages){\n\t\t\t\t\t?>\n\t\t\t\t\t<p><strong><center><?php _e($messaging_max_reached_message, 'messaging') ?></center></strong></p>\n\t\t\t\t\t<?php\n\t\t\t\t\t} else {\n\t\t\t\t\tmessaging_update_message_status(intval($_GET['mid']),'read');\n\t\t\t\t\t$tmp_message_subject = stripslashes($wpdb->get_var($wpdb->prepare(\"SELECT message_subject FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid'])));\n\t\t\t\t\t$tmp_message_content = stripslashes($wpdb->get_var($wpdb->prepare(\"SELECT message_content FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid'])));\n\t\t\t\t\t$tmp_message_from_user_ID = $wpdb->get_var($wpdb->prepare(\"SELECT message_from_user_ID FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid']));\n\t\t\t\t\t$tmp_username = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message_from_user_ID));\n\t\t\t\t\t$tmp_message_status = $wpdb->get_var($wpdb->prepare(\"SELECT message_status FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid']));\n\t\t\t\t\t$tmp_message_status = ucfirst($tmp_message_status);\n\t\t\t\t\t$tmp_message_status = __($tmp_message_status, 'messaging');\n\t\t\t\t\t$tmp_message_stamp = $wpdb->get_var($wpdb->prepare(\"SELECT message_stamp FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid']));\n\t\t\t\t\t?>\n\n\t\t\t\t\t<h2><?php _e('View Message: ', 'messaging') ?><?php echo intval($_GET['mid']); ?></h2>\n\t\t\t\t\t<form name=\"new_message\" method=\"POST\" action=\"admin.php?page=messaging\">\n\t\t\t\t\t<input type=\"hidden\" name=\"mid\" value=\"<?php echo intval($_GET['mid']); ?>\" />\n\t\t\t\t\t<h3><?php _e('Sent', 'messaging') ?></h3>\n\t\t\t\t\t<p><?php echo date_i18n(get_option('date_format') . ' ' . get_option('time_format'),$tmp_message_stamp); ?></p>\n\t\t\t\t\t<h3><?php _e('Status', 'messaging') ?></h3>\n\t\t\t\t\t<p><?php echo $tmp_message_status; ?></p>\n\t\t\t\t\t<h3><?php _e('From', 'messaging') ?></h3>\n\t\t\t\t\t<p><?php echo $tmp_username; ?></p>\n\t\t\t\t\t<h3><?php _e('Subject', 'messaging') ?></h3>\n\t\t\t\t\t<p><?php echo $tmp_message_subject; ?></p>\n\t\t\t\t\t<h3><?php _e('Content', 'messaging') ?></h3>\n\t\t\t\t\t<p><?php echo $tmp_message_content; ?></p>\n <p class=\"submit\">\n\t\t\t\t\t<input class=\"button button-secondary\" type=\"submit\" name=\"Submit\" value=\"<?php _e('Back', 'messaging') ?>\" />\n\t\t\t\t\t<input class=\"button button-secondary\" type=\"submit\" name=\"Remove\" value=\"<?php _e('Remove', 'messaging') ?>\" />\n\t\t\t\t\t<input class=\"button button-primary\" type=\"submit\" name=\"Reply\" value=\"<?php _e('Reply', 'messaging') ?>\" />\n </p>\n\t\t\t\t\t</form>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t?>\n <p><?php _e('You do not have permission to view this message', 'messaging') ?></p>\n <?php\n\t\t\t}\n\t\tbreak;\n\t\t//---------------------------------------------------//\n\t\tcase \"remove\":\n\t\t\t//messaging_update_message_status($_GET['mid'],'removed');\n\t\t\tmessaging_remove_message(intval($_GET['mid']));\n\t\t\techo \"\n\t\t\t<SCRIPT LANGUAGE='JavaScript'>\n\t\t\twindow.location='admin.php?page=messaging&updated=true&updatedmsg=\" . urlencode('Message removed.') . \"';\n\t\t\t</script>\n\t\t\t\";\n\t\tbreak;\n\t\t//---------------------------------------------------//\n\t\tcase \"reply\":\n\t\t\t$tmp_message_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d AND message_to_user_ID = %d\", $_GET['mid'], $user_ID));\n\t\t\tif ($tmp_message_count > 0){\n\t\t\t$tmp_message_from_user_ID = $wpdb->get_var($wpdb->prepare(\"SELECT message_from_user_ID FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid']));\n\t\t\t$tmp_username = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message_from_user_ID));\n\t\t\t$tmp_message_subject = stripslashes($wpdb->get_var($wpdb->prepare(\"SELECT message_subject FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid'])));\n\t\t\t$tmp_message_subject = __('RE: ', 'messaging') . $tmp_message_subject;\n\t\t\t$tmp_message_content = stripslashes($wpdb->get_var($wpdb->prepare(\"SELECT message_content FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid'])));\n\t\t\t//$tmp_message_content = \"\\n\\n\" . $tmp_username . __(' wrote:') . '<hr>' . $tmp_message_content;\n\n\t\t\t$rows = get_option('default_post_edit_rows');\n if (($rows < 3) || ($rows > 100)){\n $rows = 12;\n\t\t\t}\n $rows = \"rows='$rows'\";\n\n if ( user_can_richedit() ){\n add_filter('the_editor_content', 'wp_richedit_pre');\n\t\t\t}\n\t\t\t//\t$the_editor_content = apply_filters('the_editor_content', $content);\n ?>\n\t\t\t<h2><?php _e('Send Reply', 'messaging') ?></h2>\n\t\t\t<form name=\"reply_to_message\" method=\"POST\" action=\"admin.php?page=messaging&action=reply_process\">\n <input type=\"hidden\" name=\"message_to\" value=\"<?php echo $tmp_username; ?>\" class=\"messaging-suggest-user ui-autocomplete-input\" autocomplete=\"off\" />\n <input type=\"hidden\" name=\"message_subject\" value=\"<?php echo $tmp_message_subject; ?>\" />\n <table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\"><?php _e('To', 'messaging') ?></th>\n <td><input disabled=\"disabled\" type=\"text\" name=\"message_to\" id=\"message_to_disabled\" style=\"width: 95%\" maxlength=\"200\" value=\"<?php echo $tmp_username; ?>\" />\n <br />\n <?php //_e('Required - seperate multiple usernames by commas Ex: demouser1,demouser2') ?></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><?php _e('Subject', 'messaging') ?></th>\n <td><input disabled=\"disabled\" type=\"text\" name=\"message_subject\" id=\"message_subject_disabled\" style=\"width: 95%\" maxlength=\"200\" value=\"<?php echo $tmp_message_subject; ?>\" />\n <br />\n <?php //_e('Required') ?></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><?php echo $tmp_username . __(' wrote', 'messaging'); ?></th>\n <td><?php echo $tmp_message_content; ?>\n <br />\n <?php _e('Required', 'messaging') ?></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><?php _e('Content', 'messaging') ?></th>\n <td>\n\t\t\t<?php if (version_compare($wp_version, \"3.3\") >= 0 && user_can_richedit()) { ?>\n\t\t\t\t<?php wp_editor('', 'message_content'); ?>\n\t\t\t<?php } else { ?>\n\t\t\t\t<textarea <?php if ( user_can_richedit() ){ echo \"class='mceEditor'\"; } ?> <?php echo $rows; ?> style=\"width: 95%\" name='message_content' tabindex='1' id='message_content'></textarea>\n\t\t\t<?php } ?>\n\n\t\t<br />\n <?php _e('Required', 'messaging') ?></td>\n </tr>\n </table>\n <p class=\"submit\">\n <input class=\"button button-primary\" type=\"submit\" name=\"Submit\" value=\"<?php _e('Send', 'messaging') ?>\" />\n </p>\n </form> <?php\n\t\t\t} else {\n\t\t\t?>\n\t\t\t<p><?php _e('You do not have permission to view this message', 'messaging') ?></p>\n\t\t\t<?php\n\t\t\t}\n\t\tbreak;\n\t\t//---------------------------------------------------//\n\t\tcase \"reply_process\":\n\t\t\tif ($_POST['message_to'] == '' || $_POST['message_subject'] == '' || $_POST['message_content'] == ''){\n\t\t\t\t$rows = get_option('default_post_edit_rows');\n\t\t\t\tif (($rows < 3) || ($rows > 100)){\n\t\t\t\t\t$rows = 12;\n\t\t\t\t}\n\t\t\t\t$rows = \"rows='$rows'\";\n\n\t\t\t\tif ( user_can_richedit() ){\n\t\t\t\t\tadd_filter('the_editor_content', 'wp_richedit_pre');\n\t\t\t\t}\n\t\t\t\t//\t$the_editor_content = apply_filters('the_editor_content', $content);\n\t\t\t\t?>\n\t\t\t\t<h2><?php _e('Send Reply', 'messaging') ?></h2>\n <p><?php _e('Please fill in all required fields', 'messaging') ?></p>\n\t\t\t\t<form name=\"reply_to_message\" method=\"POST\" action=\"admin.php?page=messaging&action=reply_process\">\n <input type=\"hidden\" name=\"message_to\" value=\"<?php echo sanitize_text_field($_POST['message_to']); ?>\" />\n <input type=\"hidden\" name=\"message_subject\" value=\"<?php echo stripslashes(sanitize_text_field($_POST['message_subject'])); ?>\" />\n\t\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('To', 'messaging') ?></th>\n\t\t\t\t\t<td><input disabled=\"disabled\" type=\"text\" name=\"message_to\" id=\"message_to_disabled\"\n\t\t\t\t\t\tclass=\"messaging-suggest-user ui-autocomplete-input\" autocomplete=\"off\"\n\t\t\t\t\t\tstyle=\"width: 95%\" maxlength=\"200\"\n\t\t\t\t\t\tvalue=\"<?php echo sanitize_text_field($_POST['message_to']); ?>\" />\n\t\t\t\t\t<br />\n\t\t\t\t\t<?php //_e('Required - seperate multiple usernames by commas Ex: demouser1,demouser2') ?></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Subject', 'messaging') ?></th>\n\t\t\t\t\t<td><input disabled=\"disabled\" type=\"text\" name=\"message_subject\" id=\"message_subject_disabled\" style=\"width: 95%\" maxlength=\"200\" value=\"<?php echo stripslashes(sanitize_text_field($_POST['message_subject'])); ?>\" />\n\t\t\t\t\t<br />\n\t\t\t\t\t<?php //_e('Required') ?></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Content', 'messaging') ?></th>\n\t\t\t\t\t<td><textarea <?php if ( user_can_richedit() ){ echo \"class='mceEditor'\"; } ?> <?php echo $rows; ?> style=\"width: 95%\" name='message_content' tabindex='1' id='message_content'><?php echo wp_kses_post($_POST['message_content']); ?></textarea>\n\t\t\t\t\t<br />\n\t\t\t\t\t<?php _e('Required', 'messaging') ?></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n <p class=\"submit\">\n <input class=\"button button-primary\" type=\"submit\" name=\"Submit\" value=\"<?php _e('Send', 'messaging') ?>\" />\n </p>\n\t\t\t\t</form>\n\t\t<?php\n\t\t\t\t\tif ( user_can_richedit() ){\n\t\t\t\t\t\twp_print_scripts( array( 'wpdialogs-popup' ) );\n\t\t\t\t\t\twp_print_styles('wp-jquery-ui-dialog');\n\n\t\t\t\t\t\trequire_once ABSPATH . 'wp-admin/includes/template.php';\n\t\t\t\t\t\trequire_once ABSPATH . 'wp-admin/includes/internal-linking.php';\n\t\t\t\t\t\t?><div style=\"display:none;\"><?php wp_link_dialog(); ?></div><?php\n\t\t\t\t\t\twp_print_scripts('wplink');\n\t\t\t\t\t\twp_print_styles('wplink');\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//==========================================================//\n\t\t\t\t$tmp_usernames = sanitize_text_field($_POST['message_to']);\n\t\t\t\t//$tmp_usernames = str_replace( \",\", ', ', $tmp_usernames );\n\t\t\t\t//$tmp_usernames = ',,' . $tmp_usernames . ',,';\n\t\t\t\t//$tmp_usernames = str_replace( \" \", '', $tmp_usernames );\n\t\t\t\t$tmp_usernames_array = explode(\",\", $tmp_usernames);\n\t\t\t\t$tmp_usernames_array = array_unique($tmp_usernames_array);\n\n\t\t\t\t$tmp_username_error = 0;\n\t\t\t\t$tmp_error_usernames = '';\n\t\t\t\t$tmp_to_all_uids = '|';\n\n\t\t\t\tforeach ($tmp_usernames_array as $tmp_username){\n\t\t\t\t\t$tmp_username = trim($tmp_username);\n\t\t\t\t\tif ($tmp_username != ''){\n\t\t\t\t\t\t$tmp_username_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->users . \" WHERE user_login = %s\", $tmp_username));\n\t\t\t\t\t\tif ($tmp_username_count > 0){\n\t\t\t\t\t\t\t$tmp_user_id = $wpdb->get_var($wpdb->prepare(\"SELECT ID FROM \" . $wpdb->users . \" WHERE user_login = %s\", $tmp_username));\n\t\t\t\t\t\t\t$tmp_to_all_uids = $tmp_to_all_uids . $tmp_user_id . '|';\n\t\t\t\t\t\t\t//found\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$tmp_username_error = $tmp_username_error + 1;\n\t\t\t\t\t\t\t$tmp_error_usernames = $tmp_error_usernames . $tmp_username . ', ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$tmp_error_usernames = trim($tmp_error_usernames, \", \");\n\t\t\t\t//==========================================================//\n\t\t\t\tif ($tmp_username_error > 0){\n\t\t\t\t\t$rows = get_option('default_post_edit_rows');\n\t\t\t\t\tif (($rows < 3) || ($rows > 100)){\n\t\t\t\t\t\t$rows = 12;\n\t\t\t\t\t}\n\t\t\t\t\t$rows = \"rows='$rows'\";\n\t\t\t\t\t?>\n\t\t\t\t\t<h2><?php _e('Send Reply', 'messaging') ?></h2>\n\t\t\t\t\t<p><?php _e('The following usernames could not be found in the system', 'messaging') ?> <em><?php echo $tmp_error_usernames; ?></em></p>\n <form name=\"new_message\" method=\"POST\" action=\"admin.php?page=messaging&action=reply_process\">\n <input type=\"hidden\" name=\"message_to\" value=\"<?php echo sanitize_text_field($_POST['message_to']); ?>\" />\n <input type=\"hidden\" name=\"message_subject\" value=\"<?php echo stripslashes(sanitize_text_field($_POST['message_subject'])); ?>\" />\n <table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\"><?php _e('To', 'messaging') ?></th>\n <td><input disabled=\"disabled\" type=\"text\" name=\"message_to\" id=\"message_to_disabled\"\n \tclass=\"messaging-suggest-user ui-autocomplete-input\" autocomplete=\"off\"\n \tstyle=\"width: 95%\" tabindex='1' maxlength=\"200\"\n \tvalue=\"<?php echo sanitize_text_field($_POST['message_to']); ?>\" />\n <br />\n <?php //_e('Required - seperate multiple usernames by commas Ex: demouser1,demouser2') ?></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><?php _e('Subject', 'messaging') ?></th>\n <td><input disabled=\"disabled\" type=\"text\" name=\"message_subject\" id=\"message_subject_disabled\" style=\"width: 95%\" tabindex='2' maxlength=\"200\" value=\"<?php echo stripslashes(sanitize_text_field($_POST['message_subject'])); ?>\" />\n <br />\n <?php //_e('Required') ?></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><?php _e('Content', 'messaging') ?></th>\n <td><textarea <?php if ( user_can_richedit() ){ echo \"class='mceEditor'\"; } ?> <?php echo $rows; ?> style=\"width: 95%\" name='message_content' tabindex='3' id='message_content'><?php echo wp_kses_post($_POST['message_content']); ?></textarea>\n\t\t\t<br />\n <?php _e('Required', 'messaging') ?></td>\n </tr>\n </table>\n <p class=\"submit\">\n <input class=\"button button-primary\" type=\"submit\" name=\"Submit\" value=\"<?php _e('Send', 'messaging') ?>\" />\n </p>\n </form>\n\t\t <?php\n\t\t\t\t\tif ( user_can_richedit() ){\n\t\t\t\t\t\twp_print_scripts( array( 'wpdialogs-popup' ) );\n\t\t\t\t\t\twp_print_styles('wp-jquery-ui-dialog');\n\n\t\t\t\t\t\trequire_once ABSPATH . 'wp-admin/includes/template.php';\n\t\t\t\t\t\trequire_once ABSPATH . 'wp-admin/includes/internal-linking.php';\n\t\t\t\t\t\t?><div style=\"display:none;\"><?php wp_link_dialog(); ?></div><?php\n\t\t\t\t\t\twp_print_scripts('wplink');\n\t\t\t\t\t\twp_print_styles('wplink');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t//everything checked out - send the messages\n\t\t\t\t\t?>\n\t\t\t\t\t<p><?php _e('Sending message(s)...', 'messaging') ?></p>\n <?php\n\t\t\t\t\tforeach ($tmp_usernames_array as $tmp_username){\n\t\t\t\t\t\tif ($tmp_username != ''){\n\t\t\t\t\t\t\t$tmp_to_uid = $wpdb->get_var($wpdb->prepare(\"SELECT ID FROM \" . $wpdb->users . \" WHERE user_login = %s\", $tmp_username));\n\t\t\t\t\t\t\tmessaging_insert_message($tmp_to_uid,$tmp_to_all_uids,$user_ID, stripslashes(sanitize_text_field($_POST['message_subject'])), wp_kses_post($_POST['message_content']), 'unread', 0);\n\t\t\t\t\t\t\tmessaging_new_message_notification($tmp_to_uid,$user_ID, stripslashes(sanitize_text_field($_POST['message_subject'])), wp_kses_post($_POST['message_content']));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tmessaging_insert_sent_message($tmp_to_all_uids,$user_ID, sanitize_text_field($_POST['message_subject']),wp_kses_post($_POST['message_content']),0);\n\t\t\t\t\techo \"\n\t\t\t\t\t<SCRIPT LANGUAGE='JavaScript'>\n\t\t\t\t\twindow.location='admin.php?page=messaging&updated=true&updatedmsg=\" . urlencode('Reply Sent.') . \"';\n\t\t\t\t\t</script>\n\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\t//---------------------------------------------------//\n\t\tcase \"test\":\n\t\tbreak;\n\t\t//---------------------------------------------------//\n\t}\n\techo '</div>';\n}", "public function MyMessages(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/myMessage';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Messages',\n\t\t\t'londontec' => $this->setting_model->Get_All('londontec_users'),\n\t\t\t'student' => $this->setting_model->Get_All('students'),\n\t\t\t'message' => $this->setting_model->Get_All_DESCENDING('message','message_id'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "public function sidebarAction()\n {\n return $this->templating->renderResponse('ProcessingBundle:Index:sidebar.html.twig', array(\n 'queues' => $this->processor->listQueues()\n ));\n\n }", "function main()\n {\n $this->page_id = 113;\n $this->get_text();\n $this->body .= \"<table cellpadding=5 cellspacing=1 border=0 width=\\\"100%\\\">\\n\";\n if (strlen(trim($this->messages[500021])) > 0) {\n $this->body .= \"<tr class=\\\"browse_sellers_main_page_title\\\">\\n\\t<td valign=top height=20>\" . $this->messages[500021] . \"</td>\\n</tr>\\n\";\n }\n if (strlen(trim($this->messages[500022])) > 0) {\n $this->body .= \"<tr class=\\\"browse_sellers_main_page_message\\\">\\n\\t<td valign=top height=20>\" . $this->messages[500022] . \"</td>\\n</tr>\\n\";\n }\n $this->body .= \"<tr>\\n\\t<td valign=top>\\n\\t\";\n if (!$this->browse_main()) {\n $this->browse_error();\n }\n $this->body .= \"</td>\\n</tr>\\n\";\n $this->body .= \"</table>\\n\";\n $this->display_page();\n return true;\n }", "public function action_messageindex_fp()\n\t{\n\t\tglobal $modSettings, $board;\n\n\t\t$board = $modSettings['message_index_frontpage'];\n\t\tloadBoard();\n\n\t\t$this->action_messageindex();\n\t}", "public function showMessage($msg){\n// $message += ($msg +\"<br/>\");\n// require APP . 'view/_templates/header.php';\n// require APP . 'view/home/message.php';\n// require APP . 'view/post/index.php';\n// require APP . 'view/_templates/footer.php';\n// return;\n }", "function mrl_display() {\r\n mrl_load_template('sidebar.php');\r\n}", "public function action_messageindex()\n\t{\n\t\tglobal $txt, $board, $modSettings, $context, $options, $settings, $board_info;\n\n\t\t// Fairly often, we'll work with boards. Current board, sub-boards.\n\t\trequire_once(SUBSDIR . '/Boards.subs.php');\n\n\t\t// If this is a redirection board head off.\n\t\tif ($board_info['redirect'])\n\t\t{\n\t\t\tincrementBoard($board, 'num_posts');\n\t\t\tredirectexit($board_info['redirect']);\n\t\t}\n\n\t\ttheme()->getTemplates()->load('MessageIndex');\n\t\tloadJavascriptFile('topic.js');\n\n\t\t$bbc = ParserWrapper::instance();\n\n\t\t$context['name'] = $board_info['name'];\n\t\t$context['sub_template'] = 'topic_listing';\n\t\t$context['description'] = $bbc->parseBoard($board_info['description']);\n\t\t$template_layers = theme()->getLayers();\n\n\t\t// How many topics do we have in total?\n\t\t$board_info['total_topics'] = allowedTo('approve_posts') ? $board_info['num_topics'] + $board_info['unapproved_topics'] : $board_info['num_topics'] + $board_info['unapproved_user_topics'];\n\n\t\t// View all the topics, or just a few?\n\t\t$context['topics_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['topics_per_page']) ? $options['topics_per_page'] : $modSettings['defaultMaxTopics'];\n\t\t$context['messages_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];\n\t\t$maxindex = isset($this->_req->query->all) && !empty($modSettings['enableAllMessages']) ? $board_info['total_topics'] : $context['topics_per_page'];\n\n\t\t// Right, let's only index normal stuff!\n\t\t$session_name = session_name();\n\t\tforeach ($this->_req->query as $k => $v)\n\t\t{\n\t\t\t// Don't index a sort result etc.\n\t\t\tif (!in_array($k, array('board', 'start', $session_name)))\n\t\t\t{\n\t\t\t\t$context['robot_no_index'] = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($this->_req->query->start) && (!is_numeric($this->_req->query->start) || $this->_req->query->start % $context['messages_per_page'] !== 0))\n\t\t{\n\t\t\t$context['robot_no_index'] = true;\n\t\t}\n\n\t\t// If we can view unapproved messages and there are some build up a list.\n\t\tif (allowedTo('approve_posts') && ($board_info['unapproved_topics'] || $board_info['unapproved_posts']))\n\t\t{\n\t\t\t$untopics = $board_info['unapproved_topics'] ? '<a href=\"' . getUrl('action', ['action' => 'moderate', 'area' => 'postmod', 'sa' => 'topics', 'brd' => $board]) . '\">' . $board_info['unapproved_topics'] . '</a>' : 0;\n\t\t\t$unposts = $board_info['unapproved_posts'] ? '<a href=\"' . getUrl('action', ['action' => 'moderate', 'area' => 'postmod', 'sa' => 'posts', 'brd' => $board]) . '\">' . ($board_info['unapproved_posts'] - $board_info['unapproved_topics']) . '</a>' : 0;\n\t\t\t$context['unapproved_posts_message'] = sprintf($txt['there_are_unapproved_topics'], $untopics, $unposts, getUrl('action', ['action' => 'moderate', 'area' => 'postmod', 'sa' => ($board_info['unapproved_topics'] ? 'topics' : 'posts'), 'brd' => $board]));\n\t\t}\n\n\t\t// And now, what we're here for: topics!\n\t\trequire_once(SUBSDIR . '/MessageIndex.subs.php');\n\n\t\t// Known sort methods.\n\t\t$sort_methods = messageIndexSort();\n\t\t$default_sort_method = 'last_post';\n\n\t\t// We only know these.\n\t\tif (isset($this->_req->query->sort) && !isset($sort_methods[$this->_req->query->sort]))\n\t\t{\n\t\t\t$this->_req->query->sort = $default_sort_method;\n\t\t}\n\n\t\t// Make sure the starting place makes sense and construct the page index.\n\t\t$sort_string = '';\n\t\tif (isset($this->_req->query->sort))\n\t\t{\n\t\t\t$sort_string = ';sort=' . $this->_req->query->sort . (isset($this->_req->query->desc) ? ';desc' : '');\n\t\t}\n\n\t\t$context['page_index'] = constructPageIndex('{scripturl}?board=' . $board . '.%1$d' . $sort_string, $this->_req->query->start, $board_info['total_topics'], $maxindex, true);\n\t\t$context['start'] = &$this->_req->query->start;\n\n\t\t// Set a canonical URL for this page.\n\t\t$context['canonical_url'] = getUrl('board', ['board' => $board, 'start' => $context['start'], 'name' => $board_info['name']]);\n\n\t\t$context['links'] += array(\n\t\t\t'prev' => $this->_req->query->start >= $context['topics_per_page'] ? getUrl('board', ['board' => $board, 'start' => $this->_req->query->start - $context['topics_per_page'], 'name' => $board_info['name']]) : '',\n\t\t\t'next' => $this->_req->query->start + $context['topics_per_page'] < $board_info['total_topics'] ? getUrl('board', ['board' => $board, 'start' => $this->_req->query->start + $context['topics_per_page'], 'name' => $board_info['name']]) : '',\n\t\t);\n\n\t\tif (isset($this->_req->query->all) && !empty($modSettings['enableAllMessages']) && $maxindex > $modSettings['enableAllMessages'])\n\t\t{\n\t\t\t$maxindex = $modSettings['enableAllMessages'];\n\t\t\t$this->_req->query->start = 0;\n\t\t}\n\n\t\t// Build a list of the board's moderators.\n\t\t$context['moderators'] = &$board_info['moderators'];\n\t\t$context['link_moderators'] = array();\n\t\tif (!empty($board_info['moderators']))\n\t\t{\n\t\t\tforeach ($board_info['moderators'] as $mod)\n\t\t\t{\n\t\t\t\t$context['link_moderators'][] = '<a href=\"' . getUrl('profile', ['action' => 'profile', 'u' => $mod['id'], 'name' => $mod['name']]) . '\" title=\"' . $txt['board_moderator'] . '\">' . $mod['name'] . '</a>';\n\t\t\t}\n\t\t}\n\n\t\t// Mark current and parent boards as seen.\n\t\tif ($this->user->is_guest === false)\n\t\t{\n\t\t\t// We can't know they read it if we allow prefetches.\n\t\t\tstop_prefetching();\n\n\t\t\t// Mark the board as read, and its parents.\n\t\t\tif (!empty($board_info['parent_boards']))\n\t\t\t{\n\t\t\t\t$board_list = array_keys($board_info['parent_boards']);\n\t\t\t\t$board_list[] = $board;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$board_list = array($board);\n\t\t\t}\n\n\t\t\t// Mark boards as read. Boards alone, no need for topics.\n\t\t\tmarkBoardsRead($board_list, false, false);\n\n\t\t\t// Clear topicseen cache\n\t\t\tif (!empty($board_info['parent_boards']))\n\t\t\t{\n\t\t\t\t// We've seen all these boards now!\n\t\t\t\tforeach ($board_info['parent_boards'] as $k => $dummy)\n\t\t\t\t{\n\t\t\t\t\tif (isset($_SESSION['topicseen_cache'][$k]))\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($_SESSION['topicseen_cache'][$k]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($_SESSION['topicseen_cache'][$board]))\n\t\t\t{\n\t\t\t\tunset($_SESSION['topicseen_cache'][$board]);\n\t\t\t}\n\n\t\t\t// From now on, they've seen it. So we reset notifications.\n\t\t\t$context['is_marked_notify'] = resetSentBoardNotification($this->user->id, $board);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$context['is_marked_notify'] = false;\n\t\t}\n\n\t\t// 'Print' the header and board info.\n\t\t$context['page_title'] = strip_tags($board_info['name']);\n\n\t\t// Set the variables up for the template.\n\t\t$context['can_mark_notify'] = allowedTo('mark_notify') && $this->user->is_guest === false;\n\t\t$context['can_post_new'] = allowedTo('post_new') || ($modSettings['postmod_active'] && allowedTo('post_unapproved_topics'));\n\t\t$context['can_post_poll'] = !empty($modSettings['pollMode']) && allowedTo('poll_post') && $context['can_post_new'];\n\t\t$context['can_moderate_forum'] = allowedTo('moderate_forum');\n\t\t$context['can_approve_posts'] = allowedTo('approve_posts');\n\n\t\t// Prepare sub-boards for display.\n\t\t$boardIndexOptions = array(\n\t\t\t'include_categories' => false,\n\t\t\t'base_level' => $board_info['child_level'] + 1,\n\t\t\t'parent_id' => $board_info['id'],\n\t\t\t'set_latest_post' => false,\n\t\t\t'countChildPosts' => !empty($modSettings['countChildPosts']),\n\t\t);\n\t\t$boardlist = new BoardsList($boardIndexOptions);\n\t\t$context['boards'] = $boardlist->getBoards();\n\n\t\t// Nosey, nosey - who's viewing this board?\n\t\tif (!empty($settings['display_who_viewing']))\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/Who.subs.php');\n\t\t\tformatViewers($board, 'board');\n\t\t}\n\n\t\t// They didn't pick one, default to by last post descending.\n\t\tif (!isset($this->_req->query->sort) || !isset($sort_methods[$this->_req->query->sort]))\n\t\t{\n\t\t\t$context['sort_by'] = $default_sort_method;\n\t\t\t$ascending = isset($this->_req->query->asc);\n\t\t}\n\t\t// Otherwise sort by user selection and default to ascending.\n\t\telse\n\t\t{\n\t\t\t$context['sort_by'] = $this->_req->query->sort;\n\t\t\t$ascending = !isset($this->_req->query->desc);\n\t\t}\n\n\t\t$sort_column = $sort_methods[$context['sort_by']];\n\n\t\t$context['sort_direction'] = $ascending ? 'up' : 'down';\n\t\t$context['sort_title'] = $ascending ? $txt['sort_desc'] : $txt['sort_asc'];\n\n\t\t// Trick\n\t\t$txt['starter'] = $txt['started_by'];\n\n\t\t// todo: Need to move this to theme.\n\t\tforeach ($sort_methods as $key => $val)\n\t\t{\n\t\t\tswitch ($key)\n\t\t\t{\n\t\t\t\tcase 'subject':\n\t\t\t\tcase 'starter':\n\t\t\t\tcase 'last_poster':\n\t\t\t\t\t$sorticon = 'alpha';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sorticon = 'numeric';\n\t\t\t}\n\n\t\t\t$context['topics_headers'][$key] = array(\n\t\t\t\t'url' => getUrl('board', ['board' => $context['current_board'], 'start' => $context['start'], 'sort' => $key, 'name' => $board_info['name'], $context['sort_by'] == $key && $context['sort_direction'] === 'up' ? 'desc' : '']),\n\t\t\t\t'sort_dir_img' => $context['sort_by'] == $key ? '<i class=\"icon icon-small i-sort-' . $sorticon . '-' . $context['sort_direction'] . '\" title=\"' . $context['sort_title'] . '\"><s>' . $context['sort_title'] . '</s></i>' : '',\n\t\t\t);\n\t\t}\n\n\t\t// Calculate the fastest way to get the topics.\n\t\t$start = (int) $this->_req->query->start;\n\t\tif ($start > ($board_info['total_topics'] - 1) / 2)\n\t\t{\n\t\t\t$ascending = !$ascending;\n\t\t\t$fake_ascending = true;\n\t\t\t$maxindex = $board_info['total_topics'] < $start + $maxindex + 1 ? $board_info['total_topics'] - $start : $maxindex;\n\t\t\t$start = $board_info['total_topics'] < $start + $maxindex + 1 ? 0 : $board_info['total_topics'] - $start - $maxindex;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fake_ascending = false;\n\t\t}\n\n\t\t$context['topics'] = array();\n\n\t\t// Set up the query options\n\t\t$indexOptions = array(\n\t\t\t'only_approved' => $modSettings['postmod_active'] && !allowedTo('approve_posts'),\n\t\t\t'previews' => !empty($modSettings['message_index_preview']) ? (empty($modSettings['preview_characters']) ? -1 : $modSettings['preview_characters']) : 0,\n\t\t\t'include_avatars' => $settings['avatars_on_indexes'],\n\t\t\t'ascending' => $ascending,\n\t\t\t'fake_ascending' => $fake_ascending\n\t\t);\n\n\t\t// Allow integration to modify / add to the $indexOptions\n\t\tcall_integration_hook('integrate_messageindex_topics', array(&$sort_column, &$indexOptions));\n\n\t\t$topics_info = messageIndexTopics($board, $this->user->id, $start, $maxindex, $context['sort_by'], $sort_column, $indexOptions);\n\n\t\t$context['topics'] = TopicUtil::prepareContext($topics_info, false, !empty($modSettings['preview_characters']) ? $modSettings['preview_characters'] : 128);\n\n\t\t// Allow addons to add to the $context['topics']\n\t\tcall_integration_hook('integrate_messageindex_listing', array($topics_info));\n\n\t\t// Fix the sequence of topics if they were retrieved in the wrong order. (for speed reasons...)\n\t\tif ($fake_ascending)\n\t\t{\n\t\t\t$context['topics'] = array_reverse($context['topics'], true);\n\t\t}\n\n\t\t$topic_ids = array_keys($context['topics']);\n\n\t\tif (!empty($modSettings['enableParticipation']) && $this->user->is_guest === false && !empty($topic_ids))\n\t\t{\n\t\t\t$topics_participated_in = topicsParticipation($this->user->id, $topic_ids);\n\t\t\tforeach ($topics_participated_in as $participated)\n\t\t\t{\n\t\t\t\t$context['topics'][$participated['id_topic']]['is_posted_in'] = true;\n\t\t\t\t$context['topics'][$participated['id_topic']]['class'] = 'my_' . $context['topics'][$participated['id_topic']]['class'];\n\t\t\t}\n\t\t}\n\n\t\t$context['jump_to'] = array(\n\t\t\t'label' => addslashes(un_htmlspecialchars($txt['jump_to'])),\n\t\t\t'board_name' => htmlspecialchars(strtr(strip_tags($board_info['name']), array('&amp;' => '&')), ENT_COMPAT, 'UTF-8'),\n\t\t\t'child_level' => $board_info['child_level'],\n\t\t);\n\n\t\t// Is Quick Moderation active/needed?\n\t\tif (!empty($options['display_quick_mod']) && !empty($context['topics']))\n\t\t{\n\t\t\t$context['can_markread'] = $context['user']['is_logged'];\n\t\t\t$context['can_lock'] = allowedTo('lock_any');\n\t\t\t$context['can_sticky'] = allowedTo('make_sticky');\n\t\t\t$context['can_move'] = allowedTo('move_any');\n\t\t\t$context['can_remove'] = allowedTo('remove_any');\n\t\t\t$context['can_merge'] = allowedTo('merge_any');\n\n\t\t\t// Ignore approving own topics as it's unlikely to come up...\n\t\t\t$context['can_approve'] = $modSettings['postmod_active'] && allowedTo('approve_posts') && !empty($board_info['unapproved_topics']);\n\n\t\t\t// Can we restore topics?\n\t\t\t$context['can_restore'] = allowedTo('move_any') && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] == $board;\n\n\t\t\t// Set permissions for all the topics.\n\t\t\tforeach ($context['topics'] as $t => $topic)\n\t\t\t{\n\t\t\t\t$started = $topic['first_post']['member']['id'] == $this->user->id;\n\t\t\t\t$context['topics'][$t]['quick_mod'] = array(\n\t\t\t\t\t'lock' => allowedTo('lock_any') || ($started && allowedTo('lock_own')),\n\t\t\t\t\t'sticky' => allowedTo('make_sticky'),\n\t\t\t\t\t'move' => allowedTo('move_any') || ($started && allowedTo('move_own')),\n\t\t\t\t\t'modify' => allowedTo('modify_any') || ($started && allowedTo('modify_own')),\n\t\t\t\t\t'remove' => allowedTo('remove_any') || ($started && allowedTo('remove_own')),\n\t\t\t\t\t'approve' => $context['can_approve'] && $topic['unapproved_posts']\n\t\t\t\t);\n\t\t\t\t$context['can_lock'] |= ($started && allowedTo('lock_own'));\n\t\t\t\t$context['can_move'] |= ($started && allowedTo('move_own'));\n\t\t\t\t$context['can_remove'] |= ($started && allowedTo('remove_own'));\n\t\t\t}\n\n\t\t\t// Can we use quick moderation checkboxes?\n\t\t\tif ($options['display_quick_mod'] == 1)\n\t\t\t{\n\t\t\t\t$context['can_quick_mod'] = $context['user']['is_logged'] || $context['can_approve'] || $context['can_remove'] || $context['can_lock'] || $context['can_sticky'] || $context['can_move'] || $context['can_merge'] || $context['can_restore'];\n\t\t\t}\n\t\t\t// Or the icons?\n\t\t\telse\n\t\t\t{\n\t\t\t\t$context['can_quick_mod'] = $context['can_remove'] || $context['can_lock'] || $context['can_sticky'] || $context['can_move'];\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1)\n\t\t{\n\t\t\t$context['qmod_actions'] = array('approve', 'remove', 'lock', 'sticky', 'move', 'merge', 'restore', 'markread');\n\t\t\tcall_integration_hook('integrate_quick_mod_actions');\n\t\t}\n\n\t\tif (!empty($context['boards']) && $context['start'] == 0)\n\t\t{\n\t\t\t$template_layers->add('display_child_boards');\n\t\t}\n\n\t\t// If there are children, but no topics and no ability to post topics...\n\t\t$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'];\n\t\t$template_layers->add('topic_listing');\n\n\t\ttheme()->addJavascriptVar(array('notification_board_notice' => $context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']), true);\n\n\t\t// Build the message index button array.\n\t\t$context['normal_buttons'] = array(\n\t\t\t'new_topic' => array('test' => 'can_post_new',\n\t\t\t\t\t\t\t\t 'text' => 'new_topic',\n\t\t\t\t\t\t\t\t 'lang' => true,\n\t\t\t\t\t\t\t\t 'url' => getUrl('action', ['action' => 'post', 'board' => $context['current_board'] . '.0']),\n\t\t\t\t\t\t\t\t 'active' => true),\n\t\t\t'notify' => array('test' => 'can_mark_notify',\n\t\t\t\t\t\t\t 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify',\n\t\t\t\t\t\t\t 'lang' => true, 'custom' => 'onclick=\"return notifyboardButton(this);\"',\n\t\t\t\t\t\t\t 'url' => getUrl('action', ['action' => 'notifyboard', 'sa' => ($context['is_marked_notify'] ? 'off' : 'on'), 'board' => $context['current_board'] . '.' . $context['start'], '{session_data}'])),\n\t\t);\n\n\t\ttheme()->addJavascriptVar(array(\n\t\t\t'txt_mark_as_read_confirm' => $txt['mark_these_as_read_confirm']\n\t\t), true);\n\n\t\t// They can only mark read if they are logged in and it's enabled!\n\t\tif ($this->user->is_guest === false && $settings['show_mark_read'])\n\t\t{\n\t\t\t$context['normal_buttons']['markread'] = array(\n\t\t\t\t'text' => 'mark_read_short',\n\t\t\t\t'lang' => true,\n\t\t\t\t'url' => getUrl('action', ['action' => 'markasread', 'sa' => 'board', 'board' => $context['current_board'] . '.0', '{session_data}']),\n\t\t\t\t'custom' => 'onclick=\"return markboardreadButton(this);\"'\n\t\t\t);\n\t\t}\n\n\t\t// Allow adding new buttons easily.\n\t\tcall_integration_hook('integrate_messageindex_buttons');\n\t}", "function sidebar(){\n\n\t\t\t//code for checking the trial period days left for Provider/AA\n\t\t\t$freetrialstr=$this->getFreeTrialDaysLeft($this->userInfo('user_id'));\n\t\t\t$data = array(\n\n\t\t\t\t'name_first' => $this->userInfo('name_first'),\n\n\t\t\t\t'name_last' => $this->userInfo('name_last'),\n\n\t\t\t\t'sysadmin_link' => $this->sysadmin_link(),\n\n\t\t\t\t'therapist_link' => $this->therapist_link(),\n\n\t\t\t\t'freetrial_link' => $freetrialstr\n\n\t\t\t);\n\n\t\t\t\n\n\t\t\treturn $this->build_template($this->get_template(\"sidebar\"),$data);\n\n\t\t}", "public function index()\n \t{\n \t\t// load the header\n \t\t$this->displayHeader();\n\n \t\t// load the view\n \t\t$this->displayView(\"chat/index.php\");\n\n \t\t// load the footer\n \t\t$this->displayFooter();\n \t}", "function ajax_message() {\n\t\t$message_path = $this->get_message_path();\n\t\t$query_string = _http_build_query( $_GET, '', ',' );\n\t\t$current_screen = wp_unslash( $_SERVER['REQUEST_URI'] );\n\t\t?>\n\t\t<div class=\"jetpack-jitm-message\"\n\t\t\t data-nonce=\"<?php echo wp_create_nonce( 'wp_rest' ); ?>\"\n\t\t\t data-message-path=\"<?php echo esc_attr( $message_path ); ?>\"\n\t\t\t data-query=\"<?php echo urlencode_deep( $query_string ); ?>\"\n\t\t\t data-redirect=\"<?php echo urlencode_deep( $current_screen ); ?>\"\n\t\t></div>\n\t\t<?php\n\t}", "function index($message='')\n{\n $statement = selectFromDB('SELECT * FROM projecten');\n\n $content = $message.'<table border=\"1\">\n <tr>\n <td>Naam</td>\n <td>Datum</td>\n </tr>\n ';\n while ($data = $statement->fetch(PDO::FETCH_ASSOC)) {\n ob_start();\n include (__DIR__ . '/../template/project/index.php');\n $content .= ob_get_clean();\n\n }\n $content .= \"</table>\";\n return page_show($content);\n}", "function sidebar() {\n\t\t}", "public function sidebarAction();", "function handler_index()\r\n {\r\n\t\tif (!$this->check_login()) {\r\n\t\t\treturn $this->handler_login();\r\n\t\t}\r\n\t\t$vars['logged'] = true;\r\n\t\t$vars['CONTAIN_VIEW'] = 'download_list';\r\n $this->load_view('frame_layout', $vars);\r\n }", "public function loadSideBar($userId)\n {\n if (!empty($userId)) {\n $query = \"SELECT * FROM total_message WHERE user1 = '$userId'\n or user2 = '$userId' ORDER BY id DESC\";\n if ($result = $this->connect->query($query)) {\n if ($result->num_rows > 0) {\n while ($row = $result->fetch_assoc()) {\n $identifier = $row['identifier'];\n $substring = explode(\":\", $identifier);\n if ($substring[0] != $userId) {\n $this->data($substring[0], $row);\n } else {\n $this->data($substring[1], $row);\n }\n }\n return json_encode($this->array);\n }\n return json_encode(null);\n }\n return \"Query Failed\";\n }\n return \"Invalid Authentication\";\n }", "public function index()\n\t{\n $this->data[ 'menubar' ] = build_menu_bar( $this->choices, 'contact' );\n $this->data[ 'pagebody' ] = 'contact';\n $this->render();\n\t}", "function index($message='') {\r\n $this->rdAuth->noStudentsAllowed();\r\n // Set the top message\r\n $this->set('message', $message);\r\n // Set up the basic static ajax list variables\r\n $this->setUpAjaxList();\r\n // Set the display list\r\n $this->set('paramsForList', $this->AjaxList->getParamsForList());\r\n }", "function warquest_home_messages() {\r\n \r\n\t/* input */\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\tglobal $offset;\r\n\t\r\n\t/* output */\r\n\tglobal $page;\r\n\tglobal $player;\r\n\tglobal $output;\r\n\t\r\n\t/* Clear new flag */\r\n\t$player->comment_notification=0;\r\n\t\t\r\n\t$output->title = t('HOME_MESSAGES_TITLE');\r\n\t\r\n\t$limit=30;\r\n\t\r\n\t$query = 'select pid1 from comment where pid2='.$player->pid.' and deleted=0';\r\n\t$result = warquest_db_query($query); \r\n\t$total = warquest_db_num_rows($result);\r\n\t\r\n\t$query = 'select a.id, a.pid1, a.pid2, a.date, a.comment, a.cid, b.name, b.country from comment a, player b ';\r\n $query .= 'where ((a.pid1=b.pid and pid2='.$player->pid.') or (a.pid2=b.pid and pid1='.$player->pid.')) ';\r\n\t$query .= 'and deleted=0 order by a.date desc ';\r\n\t$query .= 'limit '.$offset.','.$limit;\r\n\t$result = warquest_db_query($query);\r\n\t$count = warquest_db_num_rows($result);\r\n\t\t\t\r\n\t$page .= '<div class=\"subparagraph\">'.t('HOME_MESSAGES_TITLE').'</div>';\r\n\t\r\n\tif ($count==0) {\r\n\t\t\r\n\t\t$page .= warquest_box_icon(\"info\",t('HOME_NO_MESSAGES'));\r\n\t\t\r\n\t} else {\r\n\t\t\r\n\t\t$page .= '<div class=\"box rows\">';\r\n\t\r\n\t\t$count=0;\r\n\t\t\r\n\t\t$page .= warquest_page_control($offset, $limit, $total, 1);\r\n\t\t\r\n\t\t$page .= '<table>';\r\n\t\t\r\n\t\t$page .= '<tr>';\r\n\t\t$page .= '<th width=\"75\" >'.t('GENERAL_AGO').'</th>';\r\n\t\t$page .= '<th width=\"390\">'.t('GENERAL_MESSAGE').'</th>';\r\n\t\t$page .= '<th width=\"55\" align=\"right\">'.t('GENERAL_ACTION').'</th>';\r\n\t\t$page .= '</tr>';\r\n\t\t\r\n\t\twhile ($data=warquest_db_fetch_object($result)) {\r\n\t\r\n\t\t\t$count++;\r\n\t\t\r\n\t\t\t$page .= '<tr valign=\"top\">';\r\n\t\t\t$page .= '<td>';\r\n\t\t\t$page .= warquest_ui_ago($data->date);\r\n\t\t\t$page .= '</td>';\r\n\t\t\t\r\n\t\t\t$page .= '<td>';\r\n\t\t\t\r\n\t\t\t$page .= '<span class=\"subparagraph2\">';\r\n\t\t\tif ($player->pid==$data->pid2) {\r\n\t\t\t\t$page .= player_format($data->pid1, $data->name, $data->country);\r\n\t\t\t\t$page .= ' -> '.player_format($player->pid, $player->name, $player->country);\r\n\t\t\t} else {\r\n\t\t\t\t$page .= player_format($player->pid, $player->name, $player->country);\r\n\t\t\t\t$page .= ' -> ';\r\n\t\t\t\t\r\n\t\t\t\tif ($data->cid > 0) {\r\n\t\t\t\t\t$clan = warquest_db_clan($data->cid);\r\n\t\t\t\t\t$page .= clan_format($clan).' clan';\r\n\t\t\t\t\t\r\n\t\t\t\t} else if ($data->pid2==0) {\r\n\t\t\t\t\t$page .= t('GENERAL_ALL');\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$page .= player_format($data->pid2, $data->name, $data->country);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$page .= '</span>';\r\n\t\t\t$page .= '<br/>';\r\n\t\t\t$page .= warquest_parse_smilies(wordwrap($data->comment, 40, \"\\n\\r\", true));\r\n\t\t\t\r\n\t\t\t$page .= '</td>';\r\n\t\t\t\r\n\t\t\t$page .= '<td align=\"right\">';\r\n\t\t\t\r\n\t\t\tif ($player->pid==$data->pid2) {\r\n\t\t\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_EDIT.'&oid='.$data->pid1, t('LINK_REPLY'), \"reply\".$count);\t\r\n\t\t\t} else if ($player->pid==$data->pid1) {\r\n\t\t\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_EDIT.'&oid='.$data->pid2.'&uid='.$data->id, t('LINK_EDIT'), 'edit'.$count);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$page .= '</td>';\r\n\t\t\t\r\n\t\t\t$page .= '</tr>';\r\n\t\t}\r\n\t\t\r\n\t\t$page .= '</table>';\r\n\t\t\r\n\t\t$page .= warquest_page_control($offset, $limit, $total, 0);\r\n\t\t$page .= '</div>';\n\t\r\n\t} \r\n}", "function main($content,$conf)\t{\n\t\t$this->conf=$conf;\n\t\t$this->pi_setPiVarDefaults();\n\t\t$this->pi_loadLL();\n\t\t\n\t\tif(t3lib_div::_GET('mode') == 'showmessage'){\n\t\t\techo $this->getThemengebietesById(t3lib_div::_POST('messageid'));\n\t\t\texit();\n\t\t}\n\t\n\t\t$content = $this->getThemengebietes();\n\t\treturn $this->pi_wrapInBaseClass($content);\n\t}", "public function notificationAction(){\n\t\t$this->loadLayout(); \n\t\t$this->renderLayout();\n\t}", "public function run()\r\n\t{\r\n $this->render('MessageDisplay');\r\n\t}", "function index($args, &$request) {\n\t\t$this->setupTemplate();\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\treturn $templateMgr->fetchJson('sidebar/sidebar.tpl');\n\t}", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function omn_superadmin_overview_page() {\n\n\tif( isset($_REQUEST['action']) ) {\n $action = $_REQUEST['action'];\n } else {\n $action = 'default';\n }\n \n switch( $action ) {\n case 'add':\n \tomn_superadmin_overview_page_add();\n \tbreak;\n case 'delete-notification':\n \tomn_delete_notification( $_GET['user'], $_GET['message'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n case 'expire-message':\n \tomn_delete_notifications( $_GET['id'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n case 'delete-message':\n \tomn_delete_message( $_GET['id'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n default:\n \tomn_superadmin_overview_page_default();\n \tbreak;\n }\n}", "public function PostsSideBar()\n\t{\tob_start();\n\t\techo '<div id=\"sidebar\" class=\"col\">', \n\t\t\t$this->GetCategorySubmenu(), \n\t\t\t$this->GetArchiveSubmenu(), \n\t\t\t$this->GetSidebarCourses(), \n\t\t\t$this->GetSidebarQuote(), '</div>';\n\t\treturn ob_get_clean();\n\t}", "function show_single_message($id, $board){\n\t\tglobal $print, $x7s, $x7c, $db, $prefix;\n\t\t$body=\"<script language=\\\"javascript\\\" type=\\\"text/javascript\\\">\n function do_delete(url){\n if(!confirm('Vuoi davvero cancellare il messaggio?'))\n return;\n\n window.location.href=url;\n }\n </script>\n\t\t\";\n\t\t$indice=indice_board();\n\t\t$maxmsg=10;\n\t\t$navigator='';\n\t\t\n\t\tif(isset($_GET['startfrom'])){\n\t\t\t$limit=$_GET['startfrom'];\n\t\t}\n\t\telse\n\t\t\t$limit=0;\n\t\t\n\t\t$query = $db->DoQuery(\"SELECT count(*) AS total FROM {$prefix}boardmsg WHERE id='{$id}' OR father='{$id}'\");\n\t\t$row = $db->Do_Fetch_Assoc($query);\n\t\t$total = $row['total'];\n\n\t\t\n\t\t\n\t\tif($total > $maxmsg){\n\t\t\t$i=0;\n\t\t\twhile($total > 0){\n\t\t\t\tif((isset($_GET['startfrom']) && $_GET['startfrom'] == $i) || (!isset($_GET['startfrom']) && $i == 0))\n\t\t\t\t\t$navigator .= \"<a href=\\\"index.php?act=boards&board=$board[id]&message=$id&startfrom=$i\\\"><b>[\".($i+1).\"]</b></a> \";\n\t\t\t\telse\n\t\t\t\t\t$navigator .= \"<a href=\\\"index.php?act=boards&board=$board[id]&message=$id&startfrom=$i\\\">\".($i+1).\"</a> \";\n\t\t\t\t$i++;\n\t\t\t\t$total -= $maxmsg;\n\t\t\t\t\n\t\t\t}\n\t\t\t$navigator.=\"<br>\";\n\t\t}\n\t\t\n\t\t\t\n\t\t$limit_min = $limit * $maxmsg;\n\t\t$limit_max = $maxmsg;\n\t\t\n\t\t$query = $db->DoQuery(\"SELECT \tb.id AS id,\n\t\t\t\t\t\tb.father AS father,\n\t\t\t\t\t\tb.user AS user,\n\t\t\t\t\t\tb.body AS body,\n\t\t\t\t\t\tb.board AS board,\n\t\t\t\t\t\tb.time AS time,\n\t\t\t\t\t\tb.replies AS replies,\n\t\t\t\t\t\tu.avatar AS avatar,\n\t\t\t\t\t\tb.anonymous as anonymous\n\t\t\t\t\tFROM {$prefix}boardmsg b, {$prefix}users u\n\t\t\t\t\tWHERE\tb.user = u.username AND\n\t\t\t\t\t\t(b.id='{$id}' OR father='{$id}')\n\t\t\t\t\t\tORDER BY time DESC LIMIT $limit_min, $maxmsg\");\n\t\t\n\t\t//Head message\n\t\t$unread='';\n\t\t$unreads = get_unread();\n\n\t\tif(!$board['readonly'] || checkIfMaster()){\n\t\t\t$body .=\"<a href=./index.php?act=boards&send=\".$board['id'].\"&reply=\".$id.\">Replica</a><br>\";\n\t\t}\n\t\t$body.=\"<a href=\\\"index.php?act=boards&board=\".$board['id'].\"\\\">Torna alla board</a><br>\";\n\t\t\n\t\t$body .= $navigator;\n\t\t$object = \"\";\n\t\t$url_regexp = \"/http(s)?:\\/\\/[^[:space:]]+/i\";\n\n\t\t$body .=\"<table width=\\\"100%\\\" cellspacing=0>\";\n\n\t\twhile($row = $db->Do_Fetch_Assoc($query)){\n\t\t\t$avatar=\"<br>\".date(\"j/n/Y G:i\", $row['time']);\n\t\t\tif($row['avatar']!=''){\n\t\t\t\t$avatar.=\"<br><img src=\\\"$row[avatar]\\\" width=\\\"100\\\" height=\\\"100\\\">\";\n\t\t\t}\n\t\t\t\n\t\t\t$unread='';\n\t\t\tif(isset($unreads[$row['id']])){\n\t\t\t\t$unread = \"<b>(Nuovo)</b>\";\n\t\t\t\t$db->DoQuery(\"DELETE FROM {$prefix}boardunread WHERE id='{$row['id']}' AND user='{$x7s->username}'\");\n\t\t\t}\n\t\t\t\n\t\t\t$nb = board_msg_split($row['body']);\n\t\t\t$msg = $nb[0];\n\t\t\t$object = $nb[1];\n\n\t\t\t$user = \"<a onClick=\\\"\".\n\t\t\t\tpopup_open(500, 680, \"index.php?act=sheet&pg={$row['user']}\",\n\t\t\t\t\t\t'sheet_other').\"\\\" >\".$row['user'].\"</a>\".$avatar;\n\n\t\t\tif ($row['anonymous']) {\n\t\t\t\tif (checkIfMaster()) {\n\t\t\t\t\t$user = \"<a onClick=\\\"\".\n\t\t\t\t\t\tpopup_open(500, 680, \"index.php?act=sheet&pg={$row['user']}\",\n\t\t\t\t\t\t\t\t'sheet_other').\"\\\" >\".$row['user'].\"</a><br>(anonimo)\".$avatar;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$user = \"Anonimo\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$body.=\"<tr><td class=\\\"msg_row\\\"><b>Utente:</b> $user</td><td class=\\\"msg_row\\\"><b>Oggetto:</b> \".$object.\" \".$unread;\n\t\t\t$msgid=$row['id'];\n\t\t\t$user=$row['user'];\n\t\t\t\n\t\t\tif(($user == $x7s->username && !$board['readonly']) || checkIfMaster()){\n\t\t\t\t$body .=\" <a href=./index.php?act=boards&send=\".$board['id'].\"&modify=\".$msgid.\">[Modify]</a>\";\n\t\t\t}\n\t\t\tif(checkIfMaster()){\n\t\t\t\t$body .=\" <a href=\\\"#\\\" onClick=\\\"javascript: do_delete('./index.php?act=boards&delete=\".$msgid.\"')\\\">[Delete]</a>\";\n\t\t\t}\n\n\t\t\t$msg = preg_replace($url_regexp, '<a href=\"\\\\0\" target=\"_blank\">\\\\0</a>', $msg);\t\n\t\t\t$body.= \"<br><br>\".$msg.\"<br><br><br><br></td></tr>\\n\";\n\t\t}\n\n\t\t$body .= \"</table>\";\n\t\t\n\t\tif(!$board['readonly'] || checkIfMaster()){\n\t\t\t$body .=\"<br><br><a href=./index.php?act=boards&send=\".$board['id'].\"&reply=\".$id.\">Replica</a><br>\";\n\t\t}\n\t\t\n\t\t$body.=\"<a href=\\\"index.php?act=boards&board=\".$board['id'].\"\\\">Torna alla board</a><br>\";\n\t\t\n\t\t$body.=$navigator;\n\t\t$head = \"Board \".$board['name'].\" messaggio: \".$object;\n\t\t\n\t\t$print->board_window($head,$body,$indice);\n\t\t\n\t}", "public function index() {\n // navbar, {body} and footer. NOTE: {body} is the view referenced in $this->uri->segment(1) \n // If no value exists we send dashboard to take us back to the index page\n $this->data['modal'] = TRUE;\n $this->load->library('template',$this->data);\n $this->template->load_page($this->data);\n }", "function message()\r\n\t{\r\n\t\tglobal $IN, $INFO, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;\r\n\t\t$ibforums = Ibf::app();\r\n\r\n\t\t$this->common_header('domessage', 'Board Message', 'You may change the configuration below. HTML is enabled, and BBCode will be enabled in later versions.');\r\n\r\n\t\t$ADMIN->html .= $SKIN->add_td_row(array(\r\n\t\t \"<b>Turn the message system off?</b>\",\r\n\t\t $SKIN->form_yes_no(\"global_message_on\", $INFO['global_message_on'])\r\n\t\t ));\r\n\r\n\t\t$ADMIN->html .= $SKIN->add_td_row(array(\r\n\t\t \"<b>The message to display</b>\",\r\n\t\t $SKIN->form_textarea(\"global_message\", $INFO['global_message'])\r\n\t\t ));\r\n\r\n\t\t$this->common_footer();\r\n\r\n\t}", "public function _index()\n\t{\t\t\t\n\t\t# allowed actions and their methods.\n\t\t$action_mapper = array(\n\t\t\t'category'\t=> 'posts_wrapper',\n\t\t\t'view'\t\t\t=> 'comments_wrapper',\n\t\t\t'submit'\t\t=> 'add_post',\n\t\t\t'vote'\t\t\t=> 'vote',\n\t\t\t'edit'\t\t\t=> 'edit',\n\t\t\t'my'\t\t\t\t=> 'my',\n\t\t);\n\n\t\tif(!array_key_exists($this->action, $action_mapper))\n\t\t\tEvent::run('system.404');\n\t\t\n\t\t$wrapper = new View('public_forum/index');\n\t\t$method = $action_mapper[$this->action];\n\t\t$wrapper->content = $this->$method(); \n\t\t$wrapper->categories\t= $this->categories();\n\t\t\n\t\t/*\n\t\t# define your logged in user.\n\t\t# Note: this just makes it easier to change here.\n\t\t$wrapper->user = ($this->owner->logged_in())\n\t\t\t? $this->owner->get_user()\n\t\t\t: FALSE;\n\t\t*/\n\t\t\n\t\t$wrapper->user = FALSE;\n\t\t\n\t\t$this->template->content = $wrapper;\n\t\tdie($this->template);\n\t}", "public function index()\n {\n $this->content = 'pages/unsubscribe';\n $this->layout();\n }", "public function index() {\n // if we have POST data to create a new song entry\n\n\n $listings = $this->fetchListings();\n\n require APP . 'view/_templates/header.php';\n require APP . 'view/dashboard/index.php';\n require APP . 'view/_templates/footer.php';\n }", "public function actionIndex()\n {\n\n $craft = \\Craft::$app;\n\n if((bool)$craft->config->general->enablePushDb==true){\n $template = 'pushdb/index';\n } else {\n $template = 'pushdb/disabled';\n }\n $this->renderTemplate($template);\n }", "function index() {\n UserConfigOptions::setValue('status_update_last_visited', new DateTimeValue(), $this->logged_user);\n \n // Popup\n if($this->request->isAsyncCall()) {\n $this->skip_layout = true;\n \n $this->setTemplate(array(\n 'template' => 'popup',\n 'controller' => 'status',\n 'module' => STATUS_MODULE,\n ));\n \n $last_visit = UserConfigOptions::getValue('status_update_last_visited', $this->logged_user);\n $new_messages_count = StatusUpdates::countNewMessagesForUser($this->logged_user, $last_visit);\n \n $limit = $new_messages_count > 10 ? $new_messages_count : 10;\n \n $latest_status_updates = StatusUpdates::findVisibleForUser($this->logged_user, $limit);\n $this->smarty->assign(array(\n 'status_updates' => $latest_status_updates,\n \"rss_url\" => assemble_url('status_updates_rss', array(\n 'token' => $this->logged_user->getToken(true),\n )),\n ));\n \n // Archive\n } else {\n $this->setTemplate(array(\n 'template' => 'messages',\n 'controller' => 'status',\n 'module' => STATUS_MODULE,\n ));\n \n $visible_users = $this->logged_user->visibleUserIds();\n $selected_user_id = $this->request->getId('user_id');\n if($selected_user_id) {\n if(!in_array($selected_user_id, $visible_users)) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n \n $selected_user = Users::findById($selected_user_id);\n if(!instance_of($selected_user, 'User')) {\n $this->httpError(HTTP_ERR_NOT_FOUND);\n } // if\n } else {\n $selected_user = null;\n } // if\n \n if($this->request->isApiCall()) {\n if($selected_user) {\n $this->serveData(StatusUpdates::findByUser($selected_user), 'messages');\n } else {\n $this->serveData(StatusUpdates::findVisibleForUser($this->logged_user, 50), 'messages');\n } // if\n } else {\n $per_page = $this->status_updates_per_page; // Messages per page\n $page = (integer) $this->request->get('page');\n if($page < 1) {\n $page = 1;\n } // if\n \n if($selected_user) {\n $rss_url = assemble_url('status_updates_rss', array(\n \"user_id\" => $selected_user_id,\n 'token' => $this->logged_user->getToken(true),\n ));\n $rss_title = clean($selected_user->getDisplayName()). ': '.lang('Status Updates');\n list($status_updates, $pagination) = StatusUpdates::paginateByUser($selected_user, $page, $per_page);\n $this->smarty->assign(array(\n \"selected_user\" => $selected_user,\n \"rss_url\" => $rss_url\n ));\n } else {\n $rss_url = assemble_url('status_updates_rss', array('token' => $this->logged_user->getToken(true)));\n $rss_title = lang('Status Updates');\n list($status_updates, $pagination) = StatusUpdates::paginateByUserIds($visible_users, $page, $per_page);\n $this->smarty->assign(array(\n \"rss_url\" => $rss_url\n ));\n } // if\n \n $this->wireframe->addRssFeed(\n $rss_title,\n $rss_url,\n FEED_RSS \n );\n \n $this->smarty->assign(array(\n \"visible_users\" => Users::findUsersDetails($visible_users),\n \"status_updates\" => $status_updates,\n \"pagination\" => $pagination\n ));\n } // if\n } // if\n }", "public function indexAction()\n\t{\n\t\t// Render\n\t\t/*$this->_helper->content\n\t\t\t//->setNoRender()\n\t\t\t->setEnabled()\n\t\t\t;*/\n\t}", "function w2s_dashboard_widget_content() {\n\t$way2sms = get_option( 'way2sms' );\n\tif ( $way2sms ) {\n\t\t// If its a POST submit, send message\n\t\tif ( isset( $_POST['way2sms_recipient'] ) && isset( $_POST['way2sms_message'] ) ) {\n\t\t\trequire 'way2sms-api.php';\n\t\t\t$message = trim( $_POST['way2sms_message'] );\n\t\t\t$messge_length = strlen( $message );\n\t\t\t$counter = 1;\n\t\t\t$part = array();\n\t\t\tif ( strlen( $message ) > 160 ) { // dont fall for adding header counter first and then sending a few chars in next message if the message is 157-160 chars\n\t\t\t\twhile ( strlen( $message ) > 0 ) {\n\t\t\t\t\t// This adds a (1) (2) (3) before the message content indicating the order\n\t\t\t\t\t$counter_header = \"<$counter> \";\n\t\t\t\t\t// Good to check the length once it gets in two digits\n\t\t\t\t\t$counter_len = strlen( $counter_header );\n\t\t\t\t\t// Only stuff the content it can\n\t\t\t\t\t$part[$counter] = substr( $message, 0, 160 - $counter_len );\n\t\t\t\t\t// remove the extracted part from the message itself\n\t\t\t\t\t$message = str_replace( $part[$counter], '', $message );\n\t\t\t\t\t// append the header counter\n\t\t\t\t\t$part[$counter] = $counter_header . $part[$counter];\n\t\t\t\t\t// increment the counter\n\t\t\t\t\t$counter++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$part[1] = $message;\n\t\t\t}\n\t\t\t/*\n\t\t\techo '<pre>';\n\t\t\tprint_r($part);\n\t\t\techo '</pre>';\n\t\t\t*/\n\t\t\tforeach( $part as $sms ) {\n\t\t\t\t$result = sendWay2SMS( $way2sms['username'] , $way2sms['password'] , $_POST['way2sms_recipient'] , $sms );\n\t\t\t}\n\t\t\techo '<div id=\"message\">';\n\t\t\techo '<ul>';\n\t\t\tforeach ( $result as $r ) {\n\t\t\t\tif ( $r['result'] == 1 )\n\t\t\t\t\techo \"<li>Message to {$r['phone']} was sent successfully!</li>\";\n\t\t\t\telse\n\t\t\t\t\techo \"<li>Error sending message to {$r['phone']}. Error has been logged to your error log.</li>\";\n\t\t\t\t\terror_log( \"way2sms wp plugin error - phone={$r['phone']} result={$r['result']} msg={$r['msg']}\" );\n\t\t\t}\n\t\t\techo '</ul>';\n\t\t\techo '</div>';\n\t\t}\n?>\n\t\t<style type=\"text/css\">\n\t\t\t#way2sms-wp-plugin input[type=\"text\"], #way2sms-wp-plugin textarea {\n\t\t\t\tmargin-bottom:5px;\n\t\t\t\twidth:99%;\n\t\t\t}\n\t\t\t#way2sms-wp-plugin label {\n\t\t\t\tmargin-bottom:5px;\n\t\t\t\tdisplay:inline-block;\n\t\t\t}\n\t\t\t#way2sms-wp-plugin em {\n\t\t\t\tdisplay:block;\n\t\t\t}\n\t\t\t#way2sms-wp-plugin #message {\n\t\t\t\tbackground-color:lightYellow;\n\t\t\t\tpadding:5px 5px 1px;\n\t\t\t\tborder:solid 1px #E6DB55;\n\t\t\t\tborder-radius:5px;\n\t\t\t\t-moz-border-radius:5px;\n\t\t\t\t-webkit-border-radius:5px;\n\t\t\t\t-khtml-border-radius:5px;\n\t\t\t\tmargin-bottom:10px;\n\t\t\t}\n\t\t</style>\n\t\t<form action=\"\" method=\"POST\">\n\t\t\t<label for=\"way2sms_recipient\">Recipient's mobile no</label>\n\t\t\t<br />\n\t\t\t<input type=\"text\" name=\"way2sms_recipient\" id=\"way2sms_recipient\" width=\"500\" />\n\t\t\t<em>(Separate multiple nos with comma)</em>\n\t\t\t<br />\n\t\t\t<label for=\"way2sms_message\">Message</label><br />\n\t\t\t<textarea name=\"way2sms_message\" id=\"way2sms_message\" rows=\"10\" cols=\"60\"></textarea>\n\t\t\t<br />\n\t\t\t<input type=\"submit\" class=\"button-primary\" id=\"way2sms-submit\" value=\"Send SMS\" />\n\t\t</form>\n<?php\n\t} else {\n\t\techo '<p>Hover over the title of this widget, click on configure link on the right side and enter your Way2SMS credentials</p>';\n\t}\n}", "function xgb_manage_articles_main_menu_page() {\n\t\trequire_once( plugin_dir_path(__FILE__) . \"manage-requests-incoming.php\" );\n\t}", "public function load() {\n\t\techo \"<h3 style=\\\"margin-left:20px;\\\">Your Message Centre</h3>\";\n\t\techo \"<div class=\\\"message-centre\\\">\";\n\t\t$this -> configure();\n\t\t$this -> template = TemplateManager::load(\"MessageCentre\");\n\t\t$messageTemplate = TemplateManager::load(\"Messages\");\n\t\t\n\t\t$messageTemplate -> insert(\"first\", \"From\");\n\t\t$messageTemplate -> insert(\"messages\", $this -> getMessages(\"received\"));\n\t\t$this -> template -> insert(\"received\", $messageTemplate -> getContents());\n\t\t\n\t\t$messageTemplate -> reset();\n\t\t$messageTemplate -> insert(\"first\", \"To\");\n\t\t$messageTemplate -> insert(\"messages\", $this -> getMessages(\"sent\"));\n\t\t$this -> template -> insert(\"sent\", $messageTemplate -> getContents());\n\t\t\n\t\t$messageTemplate -> reset();\n\t\t$messageTemplate -> insert(\"first\", \"From\");\n\t\t$messageTemplate -> insert(\"messages\", $this -> getMessages(\"read\"));\n\t\t$this -> template -> insert(\"read\", $messageTemplate -> getContents());\n\t\t$this -> display();\n\t\techo \"</div>\";\n\t}", "function sidebars_page() \n{\n?>\t\n <?php if(isset($_POST['name']) && $_POST['name'] != '') : ?>\n\t\t<?php if(isset($_POST['name']) && $_POST['name'] != '') $name = $_POST['name']; ?>\n <?php if(isset($_POST['description'])) $desc = $_POST['description']; else 'Sidebar created by duotive sidebar generator.' ?> \n <?php if(isset($_POST['name'])) insert_sidebar_in_db($name,$desc); ?>\n <?php if(isset($_GET['delete'])) delete_sidebar($_GET['delete']); // IF CALLED DELETES A SIDEBAR ?> \n <?php endif; ?>\n <?php if(isset($_GET['delete'])) delete_sidebar($_GET['delete']); // IF CALLED DELETES A SIDEBAR ?> \n <?php // ADD INCLUDED CSS AND JS FILES ?>\n\t<script language=\"javascript\">\n\t/* function for confirming you want to delete */\n function confirmAction() {\n return confirm(\"Are you sure you want to delete this sidebar?\")\n }\n\t</script> \n <link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo get_bloginfo('template_directory'); ?>/includes/duotive-admin-skin/css/duotive-admin.css\" />\n <link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo get_bloginfo('template_directory'); ?>/includes/duotive-admin-skin/css/jqtransform.css\" /> \n <script type=\"text/javascript\" src=\"<?php echo get_bloginfo('template_directory'); ?>/includes/duotive-admin-skin/js/jquery.js\" /></script>\n <script type=\"text/javascript\" src=\"<?php echo get_bloginfo('template_directory'); ?>/includes/duotive-admin-skin/js/jquery.jqtransform.js\" /></script>\n <script type=\"text/javascript\" src=\"<?php echo get_bloginfo('template_directory'); ?>/includes/duotive-admin-skin/js/jquery.tools.min.js\" /></script>\n <script type=\"text/javascript\" src=\"<?php echo get_bloginfo('template_directory'); ?>/includes/duotive-admin-skin/js/jquery-ui.min.js\" /></script> \n <script type=\"text/javascript\">\n\t\t$(document).ready(function() {\n\t\t\t$(\".transform\").jqTransform();\n\t\t\t$( \"#duotive-admin-panel\" ).tabs();\n\t\t\t$(\"#duotive-admin-panel div.table-row:even\").addClass('table-row-alternative');\n\t\t\t$('#addsidebar .table-row-last').prev('div').addClass('table-row-beforelast');\n\t\t\t$('#sidebars .table-row-last').prev('div').addClass('table-row-beforelast');\n\t\t});\n\t</script> \n<div class=\"wrap\">\n <div id=\"duotive-logo\">Duotive Admin Panel</div>\n <div id=\"duotive-main-menu\">\n <ul>\n <li><a href=\"admin.php?page=duotive-panel\">General settings</a></li>\n <li><a href=\"admin.php?page=duotive-front-page-manager\">Frontpage</a></li>\n <li><a href=\"admin.php?page=duotive-slider\">Slideshow</a></li>\n <li class=\"active\"><a href=\"admin.php?page=duotive-sidebars\">Sidebars</a></li>\n\t\t\t<li><a href=\"admin.php?page=duotive-portfolios\">Portfolios</a></li> \n\t\t\t<li><a href=\"admin.php?page=duotive-blogs\">Blogs</a></li>\n\t\t\t<li><a href=\"admin.php?page=duotive-pricing-table\">Pricing tables</a></li>\n <li><a href=\"admin.php?page=duotive-contact\">Contact page</a></li> \n </ul>\n </div>\n <div id=\"duotive-admin-panel\">\n <h3>Sidebars</h3>\n <ul>\n <li><a href=\"#sidebars\">Current sidebars</a></li> \n <li class=\"plus\"><a class=\"plus\" href=\"#addsidebar\"><span class=\"deco\"></span>Add a new sidebars</a></li> \n\t</ul> \n <div id=\"sidebars\">\n\t\t\t<?php $sidebars = sidebars_require();?>\n <?php if ( count($sidebars) > 0 ): ?>\n <table cellpadding=\"0\">\n <thead>\n <tr>\n <th>Name</th>\n <th>Description</th>\n <th align=\"center\">Delete</th> \n </tr>\n </thead>\n <tbody> \n <?php $i = 0; ?>\n <?php foreach ( $sidebars as $sidebar): ?>\n <tr <?php if ( $i%2 == 0 ) echo ' class = \"alternate\"'; ?>>\n <td align=\"center\">\n <?php echo $sidebar->NAME; ?>\n </td>\n <td align=\"center\">\n <?php echo $sidebar->DESCRIPTION; ?>\n </td>\n <td align=\"center\">\n <a class=\"delete\" title=\"Delete Sidebar\" onClick=\"return confirmAction()\" href=\"?page=duotive-sidebars&delete=<?php echo $sidebar->ID; ?>\">DELETE</a> \n </td>\n </tr>\n <?php $i++; ?> \n <?php endforeach; ?> \n </tbody> \n <tfoot>\n <tr>\n <th>Name</th>\n <th>Description</th>\n <th>Delete</th> \n </tr>\n </tfoot> \n </table> \n\t\t\t<?php else: ?>\n <div class=\"page-error\">There aren't any custom sidebars added yet.</div> \n <?php endif; ?> \n </div>\n <div id=\"addsidebar\">\n <form action=\"\" method=\"post\" class=\"transform\">\n <div class=\"table-row clearfix\">\n <label for=\"name\">Sidebar name:</label>\n <input size=\"50\" name=\"name\" type=\"text\" />\n </div>\n <div class=\"table-row clearfix\">\n <label for=\"description\">Sidebar description:</label>\n <textarea class=\"fullwidth\" name=\"description\" cols=\"50\" rows=\"4\"></textarea>\n </div>\n <div class=\"table-row table-row-last clearfix\">\n <input type=\"submit\" name=\"search\" value=\"Add sidebar\" class=\"button\" />\t\n </div>\t \n </form>\n </div> \n </ul>\n </div>\n</div>\n<?php\n}", "public function index_action() {\n \\TPL::output('/pl/be/sns/wx/main');\n exit;\n }", "function index() {\n $identifier = $this->input->get('rid');\n $request_id = convert_to_string($identifier);\n $request = $this->orequest->get_request_data($request_id);\n\n if ($request) {\n $this->addjs(theme_url(\"js/app/visitors/orequest.js\"), TRUE);\n $this->add_js_inline(array('request' => $request));\n\n $this->bulid_layout(\"visitors/reply\");\n } else {\n $this->bulid_layout(\"no-permission\");\n }\n }", "public function action_index() {\r\n\r\n\t$main_content = View::forge(\"account/simpleauth\");\r\n $main_sidebar = View::forge(\"vlog/sidebar\");\r\n\r\n\t$this->template->page_content = $main_content;\r\n $this->template->page_sidebar = $main_sidebar;\r\n }", "function newsletters_dashboard_page() {\r\n //including file for send newsletter\r\n if ( \"send_newsletter\" == $_REQUEST['newsletter_action'] && ( $_REQUEST['newsletter_id'] || $_REQUEST['send_id'] ) ) {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-send-newsletter.php\" );\r\n return;\r\n }\r\n\r\n require_once( $plugin_dir . \"email-newsletter-files/page-newsletters-dashboard.php\" );\r\n }", "public function index() {\n $data = array();\n $data['leftside'] = $this->load->view('template/asideleft', $data, true);\n $this->load->view('template/base', $data);\n }", "protected function renderPage()\n {\n $this->requestCallback();\n require_once \\dirname(__FILE__) . '/../../views/settings.php';\n }", "public function index()\n\t{\n\n $sender_id = 2;\n $recipients = 1;\n $subject = 'Test message '.uniqid();\n $body = 'hellow world, Welcome';\n //$this->message->send_new_message($sender_id,$recipients,$subject,$body,PRIORITY_NORMAL);\n $this->global['message_threads'] = $this->message->get_all_threads($this->userId);\n $this->global['pageTitle'] = 'Mail';\n \n $this->loadViews(\"mailbox/inbox\", $this->global, NULL , NULL);\n\n\t}", "function index() {\n ConfigOptions::setValueFor('fmn_last_visited', $this->logged_user, new DateTimeValue());\n\t \n // Popup\n if($this->request->isAsyncCall()) {\n $this->setView(array(\n 'template' => 'popup',\n 'controller' => 'frosso_mail_notify',\n 'module' => FROSSO_MAILN_MODULE,\n ));\n\t\t\n\t\t// $this->response->assign(array(\n // 'mail_updates' => time(),\n // ));\n\n\t } else {\n\t \t// $this->response->forbidden();\n } // if\n }", "function plugin_page() {\n\n echo '<div class=\"wrap\">';\n echo '<h2>'.esc_html__( 'WC Sales Notification Settings','wc-sales-notification-pro' ).'</h2>';\n $this->save_message();\n $this->settings_api->show_navigation();\n $this->settings_api->show_forms();\n echo '</div>';\n\n }", "function index() {\n\t\t$this->set('messageType', \"all\");\n\n\t\t$allMessages['dis'] = array($this->__loadMessage(\"dis\"),\"Discussion\");\n\t\t$allMessages['inf'] = array($this->__loadMessage(\"inf\"),\"Information\");\n\n\t\t$this->set('allMessages', $allMessages);\n\t}", "protected function getHeaderFlashMessagesForCurrentPid()\n {\n $content = '';\n $lang = $this->getLanguageService();\n\n $view = GeneralUtility::makeInstance(StandaloneView::class);\n $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/InfoBox.html'));\n\n // If page is a folder\n if ($this->pageinfo['doktype'] == PageRepository::DOKTYPE_SYSFOLDER) {\n $moduleLoader = GeneralUtility::makeInstance(ModuleLoader::class);\n $moduleLoader->load($GLOBALS['TBE_MODULES']);\n $modules = $moduleLoader->modules;\n if (is_array($modules['web']['sub']['list'])) {\n $title = $lang->getLL('goToListModule');\n $message = '<p>' . $lang->getLL('goToListModuleMessage') . '</p>';\n $message .= '<a class=\"btn btn-info\" href=\"javascript:top.goToModule(\\'web_list\\',1);\">' . $lang->getLL('goToListModule') . '</a>';\n $view->assignMultiple([\n 'title' => $title,\n 'message' => $message,\n 'state' => InfoboxViewHelper::STATE_INFO\n ]);\n $content .= $view->render();\n }\n } elseif ($this->pageinfo['doktype'] === PageRepository::DOKTYPE_SHORTCUT) {\n $shortcutMode = (int)$this->pageinfo['shortcut_mode'];\n $pageRepository = GeneralUtility::makeInstance(PageRepository::class);\n $targetPage = [];\n\n if ($this->pageinfo['shortcut'] || $shortcutMode) {\n switch ($shortcutMode) {\n case PageRepository::SHORTCUT_MODE_NONE:\n $targetPage = $pageRepository->getPage($this->pageinfo['shortcut']);\n break;\n case PageRepository::SHORTCUT_MODE_FIRST_SUBPAGE:\n $targetPage = reset($pageRepository->getMenu($this->pageinfo['shortcut'] ?: $this->pageinfo['uid']));\n break;\n case PageRepository::SHORTCUT_MODE_PARENT_PAGE:\n $targetPage = $pageRepository->getPage($this->pageinfo['pid']);\n break;\n }\n\n $message = '';\n if ($shortcutMode === PageRepository::SHORTCUT_MODE_RANDOM_SUBPAGE) {\n $message .= sprintf($lang->getLL('pageIsRandomInternalLinkMessage'));\n } else {\n $linkToPid = $this->local_linkThisScript(['id' => $targetPage['uid']]);\n $path = BackendUtility::getRecordPath($targetPage['uid'], $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW), 1000);\n $linkedPath = '<a href=\"' . htmlspecialchars($linkToPid) . '\">' . htmlspecialchars($path) . '</a>';\n $message .= sprintf($lang->getLL('pageIsInternalLinkMessage'), $linkedPath);\n }\n\n $message .= ' (' . htmlspecialchars($lang->sL(BackendUtility::getLabelFromItemlist('pages', 'shortcut_mode', $shortcutMode))) . ')';\n\n $view->assignMultiple([\n 'title' => $this->pageinfo['title'],\n 'message' => $message,\n 'state' => InfoboxViewHelper::STATE_INFO\n ]);\n $content .= $view->render();\n } else {\n if (empty($targetPage) && $shortcutMode !== PageRepository::SHORTCUT_MODE_RANDOM_SUBPAGE) {\n $view->assignMultiple([\n 'title' => $this->pageinfo['title'],\n 'message' => $lang->getLL('pageIsMisconfiguredInternalLinkMessage'),\n 'state' => InfoboxViewHelper::STATE_ERROR\n ]);\n $content .= $view->render();\n }\n }\n } elseif ($this->pageinfo['doktype'] === PageRepository::DOKTYPE_LINK) {\n if (empty($this->pageinfo['url'])) {\n $view->assignMultiple([\n 'title' => $this->pageinfo['title'],\n 'message' => $lang->getLL('pageIsMisconfiguredExternalLinkMessage'),\n 'state' => InfoboxViewHelper::STATE_ERROR\n ]);\n $content .= $view->render();\n } else {\n $externalUrl = htmlspecialchars(GeneralUtility::makeInstance(PageRepository::class)->getExtURL($this->pageinfo));\n if ($externalUrl !== false) {\n $externalUrlHtml = '<a href=\"' . $externalUrl . '\" target=\"_blank\" rel=\"noopener\">' . $externalUrl . '</a>';\n $view->assignMultiple([\n 'title' => $this->pageinfo['title'],\n 'message' => sprintf($lang->getLL('pageIsExternalLinkMessage'), $externalUrlHtml),\n 'state' => InfoboxViewHelper::STATE_INFO\n ]);\n $content .= $view->render();\n }\n }\n }\n // If content from different pid is displayed\n if ($this->pageinfo['content_from_pid']) {\n $contentPage = BackendUtility::getRecord('pages', (int)$this->pageinfo['content_from_pid']);\n $linkToPid = $this->local_linkThisScript(['id' => $this->pageinfo['content_from_pid']]);\n $title = BackendUtility::getRecordTitle('pages', $contentPage);\n $link = '<a href=\"' . htmlspecialchars($linkToPid) . '\">' . htmlspecialchars($title) . ' (PID ' . (int)$this->pageinfo['content_from_pid'] . ')</a>';\n $message = sprintf($lang->getLL('content_from_pid_title'), $link);\n $view->assignMultiple([\n 'title' => $title,\n 'message' => $message,\n 'state' => InfoboxViewHelper::STATE_INFO\n ]);\n $content .= $view->render();\n } else {\n $links = $this->getPageLinksWhereContentIsAlsoShownOn($this->pageinfo['uid']);\n if (!empty($links)) {\n $message = sprintf($lang->getLL('content_on_pid_title'), $links);\n $view->assignMultiple([\n 'title' => '',\n 'message' => $message,\n 'state' => InfoboxViewHelper::STATE_INFO\n ]);\n $content .= $view->render();\n }\n }\n return $content;\n }", "public function quickSidebarAction();", "function show_all_messages($board){\n\t\tglobal $print, $x7s, $x7c, $db, $prefix;\n\n\t\t$head=\"Board \".$board['name'];\n\t\t$body=\"<script language=\\\"javascript\\\" type=\\\"text/javascript\\\">\n function do_delete(url){\n if(!confirm('Vuoi davvero cancellare il messaggio?'))\n return;\n\n window.location.href=url;\n }\n </script>\n\t\t\";\n\t\t$indice = indice_board();\n\t\t\n\t\t$maxmsg=10;\n\t\t$navigator='<p style=\"text-align: center;\">';;\n\t\t\n\t\tif(isset($_GET['startfrom'])){\n\t\t\t$limit=$_GET['startfrom'];\n\t\t}\n\t\telse\n\t\t\t$limit=0;\n\t\t\n\t\t$query = $db->DoQuery(\"SELECT count(*) AS total FROM {$prefix}boardmsg WHERE board='{$board['id']}' AND father='0'\");\n\t\t$row = $db->Do_Fetch_Assoc($query);\n\t\t$total = $row['total'];\n\t\t\n\t\tif($total > $maxmsg){\n\t\t\t$i=0;\n\t\t\twhile($total > 0){\n\t\t\t\tif((isset($_GET['startfrom']) && $_GET['startfrom'] == $i) || (!isset($_GET['startfrom']) && $i == 0))\n\t\t\t\t\t$navigator .= \"<a href=\\\"index.php?act=boards&board=$board[id]&startfrom=$i\\\"><b>[\".($i+1).\"]</b></a> \";\n\t\t\t\telse\n\t\t\t\t\t$navigator .= \"<a href=\\\"index.php?act=boards&board=$board[id]&startfrom=$i\\\">\".($i+1).\"</a> \";\n\t\t\t\t$i++;\n\t\t\t\t$total -= $maxmsg;\n\t\t\t\t\n\t\t\t}\n\t\t\t$navigator.=\"</p>\";\n\t\t}\n\t\t\n\t\t\t\n\t\t$limit_min = $limit * $maxmsg;\n\t\t$limit_max = $maxmsg;\t\t\n\t\t\n\t\t$query = $db->DoQuery(\"SELECT * FROM {$prefix}boardmsg \n\t\t\t\tWHERE board='{$board['id']}' \n\t\t\t\tAND father='0' ORDER BY last_update DESC LIMIT $limit_min, $limit_max\");\n\n\t\t\n\t\tif(!$board['readonly'] || checkIfMaster()){\n\t\t\t$body .=\"<a href=./index.php?act=boards&send=\".$board['id'].\">Nuova comunicazione</a><br>\";\n\t\t}\n\t\t\n\t\t$body.=$navigator;\n\t\t$unreads = get_unread();\n\t\twhile($row = $db->Do_Fetch_Assoc($query)){\n\t\t\t$q_new = $db->DoQuery(\"SELECT count(*) AS cnt FROM {$prefix}boardmsg msg, {$prefix}boardunread un\n\t\t\t\t\t\tWHERE\tmsg.id=un.id\n\t\t\t\t\t\tAND un.user='{$x7s->username}'\n\t\t\t\t\t\tAND board='{$board['id']}' AND father='$row[id]'\");\n\t\t\t$new_replies = $db->Do_Fetch_Assoc($q_new);\n\t\t\t\n\t\t\t$unread='';\n\t\t\tif(isset($unreads[$row['id']]))\n\t\t\t\t$unread = \"<b>(Nuovo) </b>\";\n\n\t\t\tif($new_replies['cnt']>0){\n\t\t\t\t$unread .= \"<b>(Nuove repliche: $new_replies[cnt])</b>\";\n\t\t\t}\n\t\t\t\n\t\t\t$nb = board_msg_split($row['body']);\n\t\t\t$msg = $nb[0];\n\t\t\t$object = $nb[1];\n\t\t\t$msgid=$row['id'];\n\t\t\t$user=$row['user'];\n\n\t\t\tif ($row['anonymous']) {\n\t\t\t\tif (checkIfMaster()) {\n\t\t\t\t\t$user .= \" (anonimo)\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$user = \"Anonimo\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$body.=\"<p>\".$user.\"<br><a href=./index.php?act=boards&board=\".$board['id'].\"&message=\".$row['id'].\">\n\t\t\t\t <b>\".$object.\"</b> \".$unread.\"</a>\";\n\t\t\t\t\n\t\t\tif(checkIfMaster()){\n\t\t\t\t$startfrom = \"\";\n\t\t\t\tif (isset($_GET['startfrom']))\n\t\t\t\t\t$startfrom = \"&startfrom=\".$_GET['startfrom'];\n\n\t\t\t\t$body.=\" <a href=\\\"#\\\" onClick=\\\"javascript: do_delete('./index.php?act=boards&delete=$msgid$startfrom')\\\">[Delete]</a>\";\n\t\t\t\t$body.=\" <a href=./index.php?act=boards&move=$msgid>[Sposta]</a>\";\n }\n\t\t\t\n\t\t\t$body.=\"</p><hr>\";\n\t\t\n\t\t}\n\t\t$body.=$navigator;\n\t\tif(!$board['readonly'] || checkIfMaster()){\n\t\t\t$body .=\"<br><br><a href=./index.php?act=boards&send=\".$board['id'].\">Nuova comunicazione</a><br>\";\n\t\t}\n\t\t\n\t\t$print->board_window($head,$body,$indice);\n\t\t\n\t}", "public function index()\n\t{\n\t\t$uuid = $this->get_uuid();\n\t\t$peers = $this->get_peers();\n\t\t$next_msg = 0;\n\n\t\tif (isset($peers[site_url('lab5/receive_message')]))\n\t\t{\n\t\t\t$next_msg = $peers[site_url('lab5/receive_message')][\"WeHave\"] + 1;\n\t\t}\n\n\t\t$this->load->view(\"header\");\n\t\t$this->load->view(\"view_messages\", \n\t\t\tarray(\"messages\" => $this->get_ordered_messages(), \n\t\t\t\t\"peers\" => $peers,\n\t\t\t\t\"uuid\" => $uuid,\n\t\t\t\t\"next_msg\" => $next_msg));\n\t}", "function the_champ_notify(){\r\n\tif(isset($_GET['message'])){\r\n\t\t?>\r\n\t\t<div><?php echo esc_attr($_GET['message']) ?></div>\r\n\t\t<?php\r\n\t}\r\n\tdie;\r\n}", "public function main() {\r\n // Access check!\r\n // The page will show only if there is a valid page and if this page may be viewed by the user\r\n $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);\r\n $access = is_array($this->pageinfo) ? 1 : 0;\r\n\r\n if (($this->id && $access) || ($GLOBALS['BE_USER']->user['admin'] && !$this->id)) {\r\n\r\n // Draw the header.\r\n $this->doc = t3lib_div::makeInstance('bigDoc');\r\n $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('medbootstraptools').'res/css/bemodul.css'); \r\n $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('medbootstraptools').'res/bootstrap/css/bootstrap.min.css'); \r\n $this->doc->backPath = $GLOBALS['BACK_PATH'];\r\n $this->doc->form = '<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\r\n\r\n // JavaScript\r\n $this->doc->JScode = '\r\n <script src=\"../typo3conf/ext/medbootstraptools/res/js/jquery-1.8.3.min.js\"></script>\r\n <script src=\"../typo3conf/ext/medbootstraptools/res/js/functions.js\"></script>\r\n <script language=\"javascript\" type=\"text/javascript\">\r\n script_ended = 0;\r\n function jumpToUrl(URL) {\r\n document.location = URL;\r\n }\r\n </script>\r\n ';\r\n $this->doc->postCode = '\r\n <script language=\"javascript\" type=\"text/javascript\">\r\n script_ended = 1;\r\n if (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\r\n </script>\r\n ';\r\n\r\n $headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />'\r\n . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\r\n\r\n $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));\r\n //$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));\r\n //$this->content .= $this->doc->spacer(5);\r\n //$this->content .= $this->doc->section('', $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));\r\n //$this->content .= $this->doc->divider(5);\r\n // Render content:\r\n $this->moduleContent();\r\n\r\n // Shortcut\r\n if ($GLOBALS['BE_USER']->mayMakeShortcut()) {\r\n $this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));\r\n }\r\n\r\n $this->content .= $this->doc->spacer(10);\r\n } else {\r\n // If no access or if ID == zero\r\n\r\n $this->doc = t3lib_div::makeInstance('bigDoc');\r\n $this->doc->backPath = $GLOBALS['BACK_PATH'];\r\n\r\n $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));\r\n $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));\r\n $this->content .= $this->doc->spacer(5);\r\n $this->content .= $this->doc->spacer(10);\r\n }\r\n }", "public function action_index()\n {\n $this->request->response = $this->render_layout($this->widget_privileges());\n }", "public function index(){\r\n\r\n\t\t$this->masterpage->setMasterPage(get_option('template') );\r\n\r\n\t\t$data = array('logs'=> $this->logs_m->get_last_logs(100) );\r\n\r\n\t\t$this->masterpage->addContentPage('logs', 'contentmain', $data);\r\n\r\n\t\t$this->masterpage->show( );\r\n\t}", "public function atmf_html_backend(){\n\n $template_loader = new Uou_Atmf_Load_Template();\n ob_start();\n $template = $template_loader->locate_template( 'popup.php' );\n\n if(is_user_logged_in() ){\n include( $template );\n }\n echo ob_get_clean();\n\n }", "public function index()\n {\n require_once('views/layouts/admin/components/header.php');\n require_once('views/layouts/admin/components/navbar.php');\n require_once('views/layouts/admin/components/sidebar-left.php');\n /*\n content\n */\n require_once('views/tcredito/index.php');\n /*\n sidebar-right, footer\n */\n require_once(\"views/layouts/admin/components/sidebar-right.php\");\n require_once(\"views/layouts/admin/components/footer.php\");\n\n }", "function Admin_Messages_admin_main()\n{\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing. For the\n // main function we want to check that the user has at least edit privilege\n // for some item within this component, or else they won't be able to do\n // anything and so we refuse access altogether. The lowest level of access\n // for administration depends on the particular module, but it is generally\n // either 'edit' or 'delete'\n if (!pnSecAuthAction(0, 'Admin_Messages::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n\n // Create output object - this object will store all of our output so that\n // we can return it easily when required\n\t$pnRender =& new pnRender('Admin_Messages');\n\n\t// As Admin output changes often, we do not want caching.\n\t$pnRender->caching = false;\n\n // Return the output that has been generated by this function\n return $pnRender->fetch('admin_messages_admin_main.htm');\n}", "public function pre_run()\n {\n $type = get_param_string('type', 'browse');\n\n require_lang('messaging');\n\n set_helper_panel_tutorial('tut_support_desk');\n\n if ($type == 'view') {\n breadcrumb_set_parents(array(array('_SELF:_SELF:browse', do_lang_tempcode('CONTACT_US_MESSAGING'))));\n breadcrumb_set_self(do_lang_tempcode('MESSAGE'));\n }\n\n if ($type == 'take') {\n $id = get_param_string('id', false, true);\n $message_type = get_param_string('message_type');\n breadcrumb_set_parents(array(array('_SELF:_SELF:browse', do_lang_tempcode('CONTACT_US_MESSAGING')), array('_SELF:_SELF:view:' . $id . ':message_type=' . $message_type, do_lang_tempcode('MESSAGE'))));\n breadcrumb_set_self(do_lang_tempcode('_TAKE_RESPONSIBILITY'));\n }\n\n $this->title = get_screen_title('CONTACT_US_MESSAGING');\n\n return null;\n }", "function setup_notifsidebar() {\n\n\tglobal $AccountId, $DB, $AccountName, $DefaultImage;\n\n\tif(!is_numeric($AccountId) || $AccountId < 1) {\n\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\techo \"Invalid account id\\n\";\n\t\t}\n\t\treturn 0;\n\t}\n\n\t$title = $DB->EscapeQueryStmt($AccountName);\n\n\t$sql = \"INSERT INTO NotificationSideBar (Id, AccId, Title, Width, HeaderStyle, MainStyle, IconImg, ChatBubbleStyle, Active, Del) VALUES\n\t\t\t(NULL, {$AccountId}, '{$title}', NULL, NULL, NULL, '{$DefaultImage}', NULL, 1, 0)\";\n\n\tif(!$DB->Query($sql)) {\n\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\techo \"Insert error: {$DB->GetLastErrorMsg()}\\n\";\n\t\t}\n\t\treturn 0;\n\t}\n\n\treturn $DB->GetLastInsertedId();\n\n}", "function display_warning_page($message)\r\n {\r\n $this->display_header();\r\n $this->display_warning_message($message);\r\n $this->display_footer();\r\n }", "public function admin_page() {\n\t\tif ( ! isset( $_REQUEST['settings-updated'] ) )\n\t\t\t$_REQUEST['settings-updated'] = false;\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2><?php _e('Manage Sidebars', self::TEXT_DOMAIN) ?></h2>\n\t\t\t<?php if ( false !== $_REQUEST['settings-updated'] ) : ?>\n\t\t\t<div class=\"updated fade\"><p><strong><?php _e('Sidebar settings saved.', self::TEXT_DOMAIN) ?></strong> <?php printf( __('You can now go manage the <a href=\"%swidgets.php\">widgets</a> for your sidebars.', self::TEXT_DOMAIN), get_admin_url()) ?></p></div>\n\t\t\t<?php endif; ?>\n\t\t\t<div id=\"poststuff\" class=\"metabox-holder has-right-sidebar\">\n\t\t\t\t<div id=\"post-body\" class=\"has-sidebar\">\n\t\t\t\t\t<div id=\"post-body-content\" class=\"has-sidebar-content\">\n\t\t\t\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t\t\t\t<?php settings_fields( 'ups_sidebars_options' ); ?>\n\t\t\t\t\t\t\t<?php do_meta_boxes( 'ups_sidebars', 'normal', null ); ?>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"side-info-column\" class=\"inner-sidebar\">\n\t\t\t\t\t<?php do_meta_boxes( 'ups_sidebars', 'side', null ); ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "public function getContent()\n {\n $this->html .= $this->displayCssfile();\n \n if (Tools::getValue('smswelcome') != null && Tools::getValue('smswelcome') != '') {\n $this->getactiveTab = 'smswelcome';\n } elseif (Tools::getValue('configuration') != null && Tools::getValue('configuration') != '') {\n $this->getactiveTab = 'configuration';\n } elseif (Tools::getValue('smsrulesets') != null && Tools::getValue('smsrulesets') != '') {\n $this->getactiveTab = 'smsrulesets';\n } elseif (Tools::getValue('smscampaign') != null && Tools::getValue('smscampaign') != '') {\n $this->getactiveTab = 'smscampaign';\n } elseif (Tools::getValue('smstemplates') != null && Tools::getValue('smstemplates') != '') {\n $this->getactiveTab = 'smstemplates';\n } else {\n $this->getactiveTab = 'smswelcome';\n }\n \n $token = Tools::getAdminTokenLite('AdminModules');\n $WelVar = \"controller=AdminModules&configure=onehopsmsservice\";\n $this->btnurlLink = $_SERVER['PHP_SELF'] . \"?\" . $WelVar . \"&token=\" . $token;\n \n $this->context->smarty->assign('SMSMenuLink', $this->btnurlLink);\n $this->context->smarty->assign('SMSGetTab', $this->getactiveTab);\n $this->context->smarty->assign('SMSIsAPIKey', $this->smsAPI);\n \n if (_PS_VERSION_ > 1.5) {\n $this->html .= $this->display(__FILE__, 'menu_tabs.tpl');\n } else {\n $this->html .= $this->display(dirname(__FILE__), '/views/templates/front/menu_tabs.tpl');\n }\n \n if (Tools::isSubmit('btnSubmit')) {\n $this->postValidation();\n if (!count($this->postErrors)) {\n $this->postProcess();\n } else {\n foreach ($this->postErrors as $err) :\n $this->html .= $this->displayError($err);\n endforeach;\n }\n }\n if ((Tools::getValue('smswelcome') != null && Tools::getValue('smswelcome') != '')\n || (Tools::getValue('smswelcome') == null\n && Tools::getValue('configuration') == null\n && Tools::getValue('smscampaign') == null\n && Tools::getValue('smsrulesets') == null\n && Tools::getValue('smstemplates') == null)) {\n $this->html .= $this->screenMagicDetails();\n }\n \n if (Tools::getValue('smscampaign') != null && Tools::getValue('smscampaign') != '') {\n $this->context->smarty->assign('SMSTemplateslist', array());\n $this->context->smarty->assign('SMSLabellist', array());\n \n $allSMSTemplates = $this->getAllSMSTemplates();\n $allSMSLabel = $this->getSMSLabels();\n if ($allSMSTemplates) :\n $this->context->smarty->assign('SMSTemplateslist', $allSMSTemplates);\n endif;\n if ($allSMSLabel) :\n $this->context->smarty->assign('SMSLabellist', $allSMSLabel['labellist']);\n endif;\n if (Tools::getValue('MessageBody')) {\n $temp_ID = Tools::getValue('tempId');\n if ($temp_ID) {\n $SelTemplateBody = 'SELECT temp_body FROM ' . _DB_PREFIX_ . 'onehop_sms_templates';\n $SelTemplateBody .= ' WHERE md5(temp_id) = \"' . pSQL($temp_ID) . '\"';\n if ($ViewTemplatesBody = Db::getInstance()->ExecuteS($SelTemplateBody)) {\n echo Tools::jsonEncode($ViewTemplatesBody);\n exit;\n }\n }\n }\n if (Tools::isSubmit('sendSingleSMS')) {\n $ErrorMsg = $this->postSendSMSTempValidation();\n $this->context->smarty->assign('smsMobileNo', Tools::getValue('SEND_SINGLE_SMS_MOBILE'));\n $this->context->smarty->assign('smsSenderid', Tools::getValue('SEND_SINGLE_SENDER_ID'));\n $this->context->smarty->assign('smsLabel', Tools::getValue('SEND_SINGLE_SMS_LABEL'));\n $this->context->smarty->assign('smsTemplate', Tools::getValue('SEND_SINGLE_SMS_TEMPLATE'));\n $this->context->smarty->assign('templateBody', Tools::getValue('SEND_SIGNLE_SMS_BODY'));\n \n if (!count($this->postSendSMSTempError)) {\n //use send SMS API to send SMS from here\n $body = Tools::getValue('SEND_SIGNLE_SMS_BODY');\n $body = preg_replace('/<br(\\s+)?\\/?>/i', \"\\n\", $body);\n $postdata = array(\n 'label' => Tools::getValue('SEND_SINGLE_SMS_LABEL'),\n 'sms_text' => $body,\n 'source' => '21000',\n 'sender_id' => Tools::getValue('SEND_SINGLE_SENDER_ID'),\n 'mobile_number' => Tools::getValue('SEND_SINGLE_SMS_MOBILE')\n );\n $isSendSMS = $this->sendSMSByAPI($postdata);\n if ($isSendSMS && isset($isSendSMS->status) && $isSendSMS->status == 'submitted') {\n Onehopsmsservice::onehopSaveLog('SendSMS', $body, Tools::getValue('SEND_SINGLE_SMS_MOBILE'));\n $this->context->smarty->assign('smsMobileNo', '');\n $this->context->smarty->assign('smsSenderid', '');\n $this->context->smarty->assign('smsTemplate', '');\n $this->context->smarty->assign('smsLabel', '');\n $this->context->smarty->assign('templateBody', '');\n $this->context->smarty->assign('SuccessMsg', 'SMS sent successfully.');\n } else {\n $this->context->smarty->assign('ErrorMsg', 'Error while sending the SMS.');\n }\n } else {\n $this->context->smarty->assign('ErrorMsg', $ErrorMsg[0]);\n }\n }\n $this->html .= $this->displaySendSingleSMS();\n }\n \n if (Tools::getValue('smsrulesets') != '' && Tools::getValue('smsrulesets') != null) {\n if (Tools::isSubmit('orderConfirmBtn')\n || Tools::isSubmit('shipmentConfirmBtn')\n || Tools::isSubmit('onDeliveryBtn')\n || Tools::isSubmit('OutStockBtn')\n || Tools::isSubmit('BackStockBtn')) {\n $this->postSMSRulesetsValidation();\n if (!count($this->postsmsRulesetsErrors)) {\n if (Tools::isSubmit('orderConfirmBtn')) {\n $activateFeature = Tools::getValue('ORDER_FEATURE_1');\n if ($activateFeature != '' && $activateFeature != null) :\n $activeRuleset = '1';\n else :\n $activeRuleset = '0';\n endif;\n $sql = 'SELECT * FROM '._DB_PREFIX_.'onehop_sms_rulesets WHERE rule_name=\"order_confirmation\"';\n if (Db::getInstance()->ExecuteS($sql)) {\n $updateQuery = 'UPDATE ' . _DB_PREFIX_ . 'onehop_sms_rulesets SET';\n $updateVars = ' active=\"' . (int)$activeRuleset . '\",';\n $updateVars .= ' template=\"' . pSQL(Tools::getValue('ORDER_SMS_TEMPLATE')) . '\",';\n $updateVars .= ' label=\"' . pSQL(Tools::getValue('ORDER_SMS_LABEL')) . '\",';\n $updateVars .= ' senderid = \"' . pSQL(Tools::getValue('ORDER_SENDER_ID')) . '\"';\n $updateQuery .= $updateVars;\n $updateQuery .= ' WHERE rule_name=\"order_confirmation\"';\n Db::getInstance()->execute($updateQuery);\n } else {\n $insertQuery = 'INSERT INTO ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $insertQuery .= ' (rule_name,template,label,senderid,active)';\n $insertVars = '\"order_confirmation\",';\n $insertVars .= ' \"' . pSQL(Tools::getValue('ORDER_SMS_TEMPLATE')) . '\",';\n $insertVars .= ' \"' . pSQL(Tools::getValue('ORDER_SMS_LABEL')) . '\",';\n $insertVars .= ' \"' . pSQL(Tools::getValue('ORDER_SENDER_ID')) . '\",';\n $insertVars .= ' \"' . (int)$activeRuleset . '\"';\n \n $insertQuery .= ' VALUES (' . $insertVars . ')';\n Db::getInstance()->execute($insertQuery);\n }\n $confMsg = $this->l('Rule set saved successfully for order confirmation.');\n $this->html .= $this->displayConfirmation($confMsg);\n }\n if (Tools::isSubmit('shipmentConfirmBtn')) {\n $activateFeature = Tools::getValue('SHIPMENT_FEATURE_1');\n if ($activateFeature != '' && $activateFeature != null) :\n $activeRuleset = '1';\n else :\n $activeRuleset = '0';\n endif;\n $sql = 'SELECT * FROM ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $sql .= ' WHERE rule_name = \"shipment_confirmation\"';\n if (Db::getInstance()->ExecuteS($sql)) {\n $updateQuery = 'UPDATE ' . _DB_PREFIX_ . 'onehop_sms_rulesets SET';\n $updateVars = ' active=\"' . (int)$activeRuleset . '\",';\n $updateVars .= ' template=\"' . pSQL(Tools::getValue('SHIPMENT_SMS_TEMPLATE')) . '\",';\n $updateVars .= ' label=\"' . pSQL(Tools::getValue('SHIPMENT_SMS_LABEL')) . '\",';\n $updateVars .= ' senderid = \"' . pSQL(Tools::getValue('SHIPMENT_SENDER_ID')) . '\"';\n $updateQuery .= $updateVars;\n $updateQuery .= ' WHERE rule_name=\"shipment_confirmation\"';\n Db::getInstance()->execute($updateQuery);\n } else {\n $insertQuery = 'INSERT INTO ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $insertQuery .= ' (rule_name,template,label,senderid,active)';\n $insertvars = '\"shipment_confirmation\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('SHIPMENT_SMS_TEMPLATE')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('SHIPMENT_SMS_LABEL')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('SHIPMENT_SENDER_ID')) . '\",';\n $insertvars .= ' \"' . (int)$activeRuleset . '\"';\n \n $insertQuery .= ' VALUES (' . $insertvars . ')';\n Db::getInstance()->execute($insertQuery);\n }\n $shipconfmsg = $this->l('Rule set saved successfully for shipment confirmation.');\n $this->html .= $this->displayConfirmation($shipconfmsg);\n }\n if (Tools::isSubmit('onDeliveryBtn')) {\n $activateFeature = Tools::getValue('ON_DELIVERY_FEATURE_1');\n if ($activateFeature != '' && $activateFeature != null) :\n $activeRuleset = '1';\n else :\n $activeRuleset = '0';\n endif;\n $sql = 'SELECT * FROM ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $sql .= ' WHERE rule_name = \"on_delivery_confirmation\"';\n if (Db::getInstance()->ExecuteS($sql)) {\n $updateQuery = 'UPDATE ' . _DB_PREFIX_ . 'onehop_sms_rulesets SET';\n $updatevars = ' active=\"' . (int)$activeRuleset . '\",';\n $updatevars .= ' template=\"' . pSQL(Tools::getValue('ON_DELIVERY_SMS_TEMPLATE')) . '\",';\n $updatevars .= ' label=\"' . pSQL(Tools::getValue('ON_DELIVERY_SMS_LABEL')) . '\",';\n $updatevars .= ' senderid = \"' . pSQL(Tools::getValue('ON_DELIVERY_SENDER_ID')) . '\"';\n $updateQuery .= $updatevars;\n $updateQuery .= ' WHERE rule_name=\"on_delivery_confirmation\"';\n Db::getInstance()->execute($updateQuery);\n } else {\n $insertQuery = 'INSERT INTO ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $insertQuery .= ' (rule_name,template,label,senderid,active)';\n $insertvars = '\"on_delivery_confirmation\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('ON_DELIVERY_SMS_TEMPLATE')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('ON_DELIVERY_SMS_LABEL')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('ON_DELIVERY_SENDER_ID')) . '\",';\n $insertvars .= ' \"' . (int)$activeRuleset . '\"';\n $insertQuery .= ' VALUES (' . $insertvars . ')';\n \n Db::getInstance()->execute($insertQuery);\n }\n $deliveryconfmsg = $this->l('Rule set saved successfully for Delivery Confirmation.');\n $this->html .= $this->displayConfirmation($deliveryconfmsg);\n }\n if (Tools::isSubmit('OutStockBtn')) {\n $activateFeature = Tools::getValue('OUTSTOCK_FEATURE_1');\n if ($activateFeature != '' && $activateFeature != null) :\n $activeRuleset = '1';\n else :\n $activeRuleset = '0';\n endif;\n $sql = 'SELECT * FROM '._DB_PREFIX_.'onehop_sms_rulesets WHERE rule_name=\"out_of_stock_alerts\"';\n if (Db::getInstance()->ExecuteS($sql)) {\n $updateQuery = 'UPDATE ' . _DB_PREFIX_ . 'onehop_sms_rulesets SET';\n $updateQuery .= ' active=\"' . (int)$activeRuleset . '\",';\n $updateQuery .= ' template=\"' . pSQL(Tools::getValue('OUTSTOCK_SMS_TEMPLATE')) . '\",';\n $updateQuery .= ' label=\"' . pSQL(Tools::getValue('OUTSTOCK_SMS_LABEL')) . '\",';\n $updateQuery .= ' senderid = \"' . pSQL(Tools::getValue('OUTSTOCK_SENDER_ID')) . '\"';\n $updateQuery .= ' WHERE rule_name=\"out_of_stock_alerts\"';\n Db::getInstance()->execute($updateQuery);\n } else {\n $insertQuery = 'INSERT INTO ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $insertQuery .= ' (rule_name,template,label,senderid,active)';\n $insertvars = '\"out_of_stock_alerts\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('OUTSTOCK_SMS_TEMPLATE')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('OUTSTOCK_SMS_LABEL')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('OUTSTOCK_SENDER_ID')) . '\",';\n $insertvars .= ' \"' . (int)$activeRuleset . '\"';\n $insertQuery .= ' VALUES (' . $insertvars . ')';\n Db::getInstance()->execute($insertQuery);\n }\n $outStockmsg = $this->l('Rule set saved successfully for Out of Stock Alerts.');\n $this->html .= $this->displayConfirmation($outStockmsg);\n }\n if (Tools::isSubmit('BackStockBtn')) {\n $activateFeature = Tools::getValue('BACKSTOCK_FEATURE_1');\n if ($activateFeature != '' && $activateFeature != null) :\n $activeRuleset = '1';\n else :\n $activeRuleset = '0';\n endif;\n $sql='SELECT * FROM '._DB_PREFIX_.'onehop_sms_rulesets WHERE rule_name=\"back_of_stock_alerts\"';\n if (Db::getInstance()->ExecuteS($sql)) {\n $updateQuery = 'UPDATE ' . _DB_PREFIX_ . 'onehop_sms_rulesets SET';\n $updateQuery .= ' active=\"' . (int)$activeRuleset . '\",';\n $updateQuery .= ' template=\"' . pSQL(Tools::getValue('BACKSTOCK_SMS_TEMPLATE')) . '\",';\n $updateQuery .= ' label=\"' . pSQL(Tools::getValue('BACKSTOCK_SMS_LABEL')) . '\",';\n $updateQuery .= ' senderid = \"' . pSQL(Tools::getValue('BACKSTOCK_SENDER_ID')) . '\"';\n $updateQuery .= ' WHERE rule_name=\"back_of_stock_alerts\"';\n Db::getInstance()->execute($updateQuery);\n } else {\n $insertQuery = 'INSERT INTO ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $insertQuery .= ' (rule_name,template,label,senderid,active)';\n $insertvars = '\"back_of_stock_alerts\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('BACKSTOCK_SMS_TEMPLATE')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('BACKSTOCK_SMS_LABEL')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('BACKSTOCK_SENDER_ID')) . '\",';\n $insertvars .= ' \"' . (int)$activeRuleset . '\"';\n $insertQuery .= ' VALUES (' . $insertvars . ')';\n Db::getInstance()->execute($insertQuery);\n }\n $backStockmsg = $this->l('Rule set saved successfully for Back in Stock Alerts.');\n $this->html .= $this->displayConfirmation($backStockmsg);\n }\n } else {\n foreach ($this->postsmsRulesetsErrors as $err) :\n $this->html .= $this->displayError($err);\n endforeach;\n }\n }\n $getAllRulesetTemplates = $this->getAllSMSTemplates();\n $Template = array();\n if ($getAllRulesetTemplates) {\n $Template[] = array(\n 'id_option' => '',\n 'name' => 'Select template'\n );\n foreach ($getAllRulesetTemplates as $tempVal) {\n $Template[] = array(\n 'id_option' => $tempVal['temp_id'],\n 'name' => $tempVal['temp_name']\n );\n }\n } else {\n $Template[] = array(\n 'id_option' => '',\n 'name' => 'No template available'\n );\n }\n $this->html .= $this->orderConfirmationRuleset($Template);\n $this->html .= $this->shipmentConfirmationRuleset($Template);\n $this->html .= $this->onDeliveryConfirmationRuleset($Template);\n $this->html .= $this->outStockAlertsRuleset($Template);\n $this->html .= $this->backStockAlertsRuleset($Template);\n }\n if (Tools::getValue('smstemplates') != '' && Tools::getValue('smstemplates') != null) {\n if (Tools::getValue('TemplateType') || Tools::getValue('TemplateType')) {\n $templateType = Tools::getValue('Temptype');\n $templatePlaceholder = array();\n switch ($templateType) {\n case 'customer':\n $templatePlaceholder = array(\n 'First name',\n 'Last name',\n 'Email',\n 'Mobile'\n );\n break;\n case 'order':\n $templatePlaceholder = array(\n 'Order ID',\n 'Transaction ID',\n 'Tracking Id',\n 'Invoice',\n 'Price',\n 'Discount',\n 'Shipping_Address'\n );\n break;\n case 'product':\n $templatePlaceholder = array(\n 'Product Id',\n 'Product name'\n );\n break;\n }\n if ($templatePlaceholder) {\n foreach ($templatePlaceholder as $val) {\n $this->options[] = array('name'=>$val,'value'=>Tools::strtoupper(str_replace(' ', '', $val)));\n }\n }\n echo Tools::jsonEncode($this->options);\n exit;\n }\n if (Tools::isSubmit('addTemplateBtn') || Tools::isSubmit('saveTemplate')) {\n $this->context->smarty->assign('isAddTemp', 'addTemplate');\n if (Tools::getValue('TEMPLATE_NAME') == null) {\n $this->context->smarty->assign('templateName', '');\n } else {\n $this->context->smarty->assign('templateName', Tools::getValue('TEMPLATE_NAME'));\n }\n if (Tools::getValue('TEMPLATE_BODY') == null) {\n $this->context->smarty->assign('templateBody', '');\n } else {\n $this->context->smarty->assign('templateBody', Tools::getValue('TEMPLATE_BODY'));\n }\n $this->context->smarty->assign('templateID', 0);\n }\n if (Tools::isSubmit('editTemplateBtn') || Tools::isSubmit('editTemplate')) {\n $this->context->smarty->assign('isAddTemp', 'editTemplate');\n }\n \n if (Tools::isSubmit('saveTemplate')) {\n $ErrorMsg = $this->postSMSTemplateValidation();\n if (!count($this->postsmsTemplateErrors)) {\n $insertQuery = 'INSERT INTO ' . _DB_PREFIX_ . 'onehop_sms_templates';\n $insertQuery .= ' (temp_name,temp_body,submitdate)';\n $insertvars = '\"' . pSQL(Tools::getValue('TEMPLATE_NAME')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('TEMPLATE_BODY')) . '\",';\n $insertvars .= ' Now()';\n $insertQuery .= ' VALUES (' . $insertvars . ')';\n $saveTemplate = Db::getInstance()->execute($insertQuery);\n if ($saveTemplate) :\n $this->context->smarty->assign('isAddTemp', '');\n $this->redirectTemplate();\n endif;\n } else {\n $this->context->smarty->assign('ErrorMsg', $ErrorMsg[0]);\n }\n }\n \n if (Tools::isSubmit('editTemplateBtn')) {\n if (Tools::getValue('editTemplateBtn')) {\n $SelTemplate = 'SELECT temp_id, temp_name, temp_body';\n $SelTemplate .= ' FROM ' . _DB_PREFIX_ . 'onehop_sms_templates';\n $SelTemplate .= ' WHERE md5(temp_id) = \"' . pSQL(Tools::getValue('editTemplateBtn')) . '\"';\n if ($ViewTemplates = Db::getInstance()->ExecuteS($SelTemplate)) {\n $this->context->smarty->assign('templateName', $ViewTemplates[0]['temp_name']);\n $this->context->smarty->assign('templateBody', $ViewTemplates[0]['temp_body']);\n $this->context->smarty->assign('templateID', (int)$ViewTemplates[0]['temp_id']);\n } else {\n $this->context->smarty->assign('isAddTemp', '');\n }\n }\n }\n if (Tools::isSubmit('editTemplate')) {\n $ErrorMsg = $this->postSMSTemplateValidation();\n \n $this->context->smarty->assign('templateName', Tools::getValue('TEMPLATE_NAME'));\n $this->context->smarty->assign('templateBody', Tools::getValue('TEMPLATE_BODY'));\n $this->context->smarty->assign('templateID', Tools::getValue('TEMPLATE_ID'));\n \n if (!count($this->postsmsTemplateErrors)) {\n $updateQuery = 'UPDATE ' . _DB_PREFIX_ . 'onehop_sms_templates SET';\n $updateQuery .= ' temp_name = \"' . pSQL(Tools::getValue('TEMPLATE_NAME')) . '\",';\n $updateQuery .= ' temp_body = \"' . pSQL(Tools::getValue('TEMPLATE_BODY')) . '\",';\n $updateQuery .= ' submitdate = Now()';\n $updateQuery .= ' WHERE md5(temp_id) = \"' . pSQL(Tools::getValue('TEMPLATE_ID')) . '\"';\n $updateTemplate = Db::getInstance()->execute($updateQuery);\n if ($updateTemplate) :\n $this->context->smarty->assign('isAddTemp', '');\n $this->redirectTemplate();\n endif;\n } else {\n $this->context->smarty->assign('ErrorMsg', $ErrorMsg[0]);\n }\n }\n \n if (Tools::getValue('deleteTemplate')) {\n $tempID = Tools::getValue('tempID');\n \n $SelTemplate = 'SELECT ruleid FROM ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $SelTemplate .= ' WHERE md5(template) = \"' . pSQL($tempID) . '\"';\n if (Db::getInstance()->ExecuteS($SelTemplate)) {\n $jsonRes = array(\n 'Error' => 'You can not delete this template because its already set in SMS automation.'\n );\n } else {\n $deleteQuery = 'DELETE FROM ' . _DB_PREFIX_ . 'onehop_sms_templates';\n $deleteQuery .= ' WHERE md5(temp_id) = \"' . pSQL($tempID) . '\"';\n $deleteTemplate = Db::getInstance()->execute($deleteQuery);\n if ($deleteTemplate) :\n $jsonRes = array(\n 'Success' => '1'\n );\n else :\n $jsonRes = array(\n 'Error' => 'Unknown error occurred. Please try again.'\n );\n endif;\n }\n \n echo Tools::jsonEncode($jsonRes);\n exit;\n }\n \n $allTemplatesList = $this->getAllSMSTemplates();\n if ($allTemplatesList) :\n $this->context->smarty->assign('Templateslist', $allTemplatesList);\n endif;\n $this->html .= $this->displaySMSTemplates();\n }\n if (Tools::getValue('configuration') != '' && Tools::getValue('configuration') != null) {\n $this->html .= $this->renderForm();\n }\n \n return $this->html;\n }", "public function index() {\n return $this->view->render('admin/common/sidebar');//$this->view returns a ViewFactory.php Object (Refer to the coreClasses() function in Application.php class)...and $view is a View.php Object (returned from render() function)\n }", "public function index()\n {\n $this->load->model('Inbox', '', TRUE);\n $this->validated();\n $this->Data['Headers']->Page = \"dashboard\";\n $this->Data['inbox_limit'] = 5;\n $this->Data['inbox_list'] = $this->Inbox->get($this->Data['inbox_limit']);\n $this->load->view('layouts/main', $this->Data);\n }", "public function indexAction() {\n $sitepage_info = Zend_Registry::isRegistered('sitepage_info') ? Zend_Registry::get('sitepage_info') : null;\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n\n //GET SUBJECT\n $this->view->sitepage = $sitepage = Engine_Api::_()->core()->getSubject('sitepage_page');\n \n\t\t//SEND DATA TO TPL\n $layout = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepage.layoutcreate', 0);\n $this->view->widgets = $widgets = Engine_Api::_()->sitepage()->getwidget($layout, $sitepage->page_id);\n $this->view->content_id = Engine_Api::_()->sitepage()->GetTabIdinfo('sitepage.info-sitepage', $sitepage->page_id, $layout);\n $this->view->module_tabid = Zend_Controller_Front::getInstance()->getRequest()->getParam('tab', null);\n $this->view->identity_temp = $this->view->identity;\n $this->view->showtoptitle = Engine_Api::_()->sitepage()->showtoptitle($layout, $sitepage->page_id);\n $tableCategories = Engine_Api::_()->getDbTable('categories', 'sitepage');\n $this->view->category_name = $this->view->subcategory_name == $this->view->subsubcategory_name = '';\n if($sitepage->category_id) {\n $categoriesNmae = $tableCategories->getCategory($sitepage->category_id);\n if (!empty($categoriesNmae->category_name)) {\n $this->view->category_name = $categoriesNmae->category_name;\n }\n \n if($sitepage->subcategory_id) {\n $subcategory_name = $tableCategories->getCategory($sitepage->subcategory_id);\n if (!empty($subcategory_name->category_name)) {\n $this->view->subcategory_name = $subcategory_name->category_name;\n }\n \n //GET SUB-SUB-CATEGORY\n if($sitepage->subsubcategory_id) {\n $subsubcategory_name = $tableCategories->getCategory($sitepage->subsubcategory_id);\n if (!empty($subsubcategory_name->category_name)) {\n $this->view->subsubcategory_name = $subsubcategory_name->category_name;\n }\n }\n }\n }\n \n //GET TAGS\n $this->view->sitepageTags = $sitepage->tags()->getTagMaps();\n\n\t\t//CUSTOM FIELD WORK\n $this->view->sitepage_description = Zend_Registry::isRegistered('sitepage_descriptions') ? Zend_Registry::get('sitepage_descriptions') : null;\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Sitepage/View/Helper', 'Sitepage_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($sitepage);\n if (empty($sitepage_info)) {\n return $this->setNoRender();\n }\n }", "public function display_primary_sidebar()\n\t{\n\t\tdynamic_sidebar(static::PRIMARY_SIDEBAR_SLUG);\n\t}", "public function index(){\n\t\t$data['meta_description']='';\n\t\t$data['menu']= $this->menu;\n\t\t// echo \"<pre>\";\n\t\t// print_r($this->user);\n\t\t// echo \"</pre>\";\n\t\t// die();\n\t\t$data['user'] = $this->user;\n\t\t$data['group'] = $this->group->name;\n\t\t$data['superviser']=$this->superviser_name;;\n\n\t\t$data['page']='dashboard'; //page view to load\n\t\t$data['pls'] = array(); //page level scripts\n\t\t$data['plugins'] = array(); //plugins\n\t\t$data['javascript'] = array(); //javascript\n\t\t$views= array('design/html_topbar','sidebar','design/page','design/html_footer');\n\t\t$this->layout->view($views, $data);\n\t}", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "function sMain ()\n\t{\n\t\tglobal $ttH;\n\t\t\n\t\t$ttH->func->load_language_admin($this->modules);\n\t\t$ttH->temp_act = new XTemplate($ttH->path_html.$this->modules.DS.$this->action.\".tpl\");\n\t\t$ttH->temp_act->assign('LANG', $ttH->lang);\n\t\t$ttH->temp_act->assign('DIR_IMAGE', $ttH->dir_images);\n\t\t\n\t\t$fun = (isset($ttH->post['f'])) ? $ttH->post['f'] : '';\n\n\t\tflush();\n\t\tswitch ($fun) {\n\t\t\tcase \"list_widget\":\n\t\t\t\techo $this->do_list_widget();\n\t\t\t\texit;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\techo '';\n\t\t\t\texit;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\texit;\n\t}", "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 main()\n {\n $lang = $this->getLanguageService();\n // Access check...\n // The page will show only if there is a valid page and if this page may be viewed by the user\n $access = is_array($this->pageinfo) ? 1 : 0;\n // Content\n $content = '';\n if ($this->id && $access) {\n // Initialize permission settings:\n $this->CALC_PERMS = $this->getBackendUser()->calcPerms($this->pageinfo);\n $this->EDIT_CONTENT = $this->contentIsNotLockedForEditors();\n\n $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);\n\n // override the default jumpToUrl\n $this->moduleTemplate->addJavaScriptCode('jumpToUrl', '\n function jumpToUrl(URL,formEl) {\n if (document.editform && TBE_EDITOR.isFormChanged) { // Check if the function exists... (works in all browsers?)\n if (!TBE_EDITOR.isFormChanged()) {\n window.location.href = URL;\n } else if (formEl) {\n if (formEl.type==\"checkbox\") formEl.checked = formEl.checked ? 0 : 1;\n }\n } else {\n window.location.href = URL;\n }\n }\n ');\n $this->moduleTemplate->addJavaScriptCode('mainJsFunctions', '\n if (top.fsMod) {\n top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';\n top.fsMod.navFrameHighlightedID[\"web\"] = \"pages' . (int)$this->id . '_\"+top.fsMod.currentBank; ' . (int)$this->id . ';\n }\n ' . ($this->popView ? BackendUtility::viewOnClick($this->id, '', BackendUtility::BEgetRootLine($this->id)) : '') . '\n function deleteRecord(table,id,url) { //\n window.location.href = ' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('tce_db') . '&cmd[')\n . ' + table + \"][\" + id + \"][delete]=1&redirect=\" + encodeURIComponent(url) + \"&prErr=1&uPT=1\";\n return false;\n }\n ');\n\n // Find backend layout / columns\n $backendLayout = GeneralUtility::callUserFunction(BackendLayoutView::class . '->getSelectedBackendLayout', $this->id, $this);\n if (!empty($backendLayout['__colPosList'])) {\n $this->colPosList = implode(',', $backendLayout['__colPosList']);\n }\n // Removing duplicates, if any\n $this->colPosList = array_unique(GeneralUtility::intExplode(',', $this->colPosList));\n // Accessible columns\n if (isset($this->modSharedTSconfig['properties']['colPos_list']) && trim($this->modSharedTSconfig['properties']['colPos_list']) !== '') {\n $this->activeColPosList = array_unique(GeneralUtility::intExplode(',', trim($this->modSharedTSconfig['properties']['colPos_list'])));\n // Match with the list which is present in the colPosList for the current page\n if (!empty($this->colPosList) && !empty($this->activeColPosList)) {\n $this->activeColPosList = array_unique(array_intersect(\n $this->activeColPosList,\n $this->colPosList\n ));\n }\n } else {\n $this->activeColPosList = $this->colPosList;\n }\n $this->activeColPosList = implode(',', $this->activeColPosList);\n $this->colPosList = implode(',', $this->colPosList);\n\n $content .= $this->getHeaderFlashMessagesForCurrentPid();\n\n // Render the primary module content:\n if ($this->MOD_SETTINGS['function'] == 1 || $this->MOD_SETTINGS['function'] == 2) {\n $content .= '<form action=\"' . htmlspecialchars(BackendUtility::getModuleUrl($this->moduleName, ['id' => $this->id, 'imagemode' => $this->imagemode])) . '\" id=\"PageLayoutController\" method=\"post\">';\n // Page title\n $content .= '<h1 class=\"t3js-title-inlineedit\">' . htmlspecialchars($this->getLocalizedPageTitle()) . '</h1>';\n // All other listings\n $content .= $this->renderContent();\n }\n $content .= '</form>';\n $content .= $this->searchContent;\n // Setting up the buttons for the docheader\n $this->makeButtons();\n // @internal: This is an internal hook for compatibility7 only, this hook will be removed without further notice\n if ($this->MOD_SETTINGS['function'] != 1 && $this->MOD_SETTINGS['function'] != 2) {\n $renderActionHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['renderActionHook'];\n if (is_array($renderActionHook)) {\n foreach ($renderActionHook as $hook) {\n $params = [\n 'deleteButton' => $this->deleteButton,\n ''\n ];\n $content .= GeneralUtility::callUserFunction($hook, $params, $this);\n }\n }\n }\n // Create LanguageMenu\n $this->makeLanguageMenu();\n } else {\n $this->moduleTemplate->addJavaScriptCode(\n 'mainJsFunctions',\n 'if (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';'\n );\n $content .= '<h1>' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '</h1>';\n $view = GeneralUtility::makeInstance(StandaloneView::class);\n $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/InfoBox.html'));\n $view->assignMultiple([\n 'title' => $lang->getLL('clickAPage_header'),\n 'message' => $lang->getLL('clickAPage_content'),\n 'state' => InfoboxViewHelper::STATE_INFO\n ]);\n $content .= $view->render();\n }\n // Set content\n $this->moduleTemplate->setContent($content);\n }", "function wpbar_message($message) {\r\n\techo \"<div id=\\\"message\\\" class=\\\"updated fade\\\"><p>$message</p></div>\\n\";\r\n}", "public function index() {\r\n\r\n\t\t$this->event->add(BOARD_LOAD);\r\n\t\t$this->constructMeasurePage();\r\n\t}", "function content() {\n echo \"<div class='container'>{$this->params['body']}\n <p style='background-color: #95a5a6; padding: 10px; text-align: center; margin-top: 10px; border-top-left-radius: 2px; border-top-right-radius: 2px;'><a href='http://{$_SERVER['SERVER_NAME']}/mailmaid/subscriber/unsubscribe/{$this->params['email']}/{$this->params['emailId']}' style='font-family: Arial; color: #333;'>Click here to unsubscribe from our updates</a></p>\n </div>\";\n }", "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n $this->view->subject_id = Engine_Api::_()->core()->getSubject()->getIdentity();\n\n\t\t//GET VIEWER\n\t\t$viewer = Engine_Api::_()->user()->getViewer();\n $this->view->viewer_id = $viewer->getIdentity();\n //GET SUBJECT AND CHECK AUTHENTICATION\n $subject = Engine_Api::_()->core()->getSubject();\n if (!$subject->authorization()->isAllowed($viewer, 'view')) {\n return $this->setNoRender();\n }\n\n\t\t$values = array();\n $this->view->isajax = $is_ajax = $this->_getParam('isajax', '');\n $this->view->textShow = $this->_getParam('textShow', 'Verified');\n $this->view->showMemberText = $this->_getParam('showMemberText', 1);\n $this->view->pageAdminJoined = $pageAdminJoined = $this->_getParam('pageAdminJoined', 2);\n $this->view->category_id = $values['category_id'] = $this->_getParam('category_id',0);\n if( $is_ajax ) {\n $this->getElement()->removeDecorator('Title');\n $this->getElement()->removeDecorator('Container');\n }\n \n\t\tif($pageAdminJoined == 1) {\n\n\t\t\t//GET PAGES\n\t\t\t$adminpages = Engine_Api::_()->getDbtable('manageadmins', 'sitepage')->getManageAdminPages($subject->getIdentity());\n\t\t\t//GET STUFF\n\t\t\t$ids = array();\n\t\t\tforeach ($adminpages as $adminpage) {\n\t\t\t\t$ids[] = $adminpage->page_id;\n\t\t\t}\n\t\t\t$values['adminpages'] = $ids;\n\n\t\t\t$onlymember = Engine_Api::_()->getDbtable('membership', 'sitepage')->getJoinPages($subject->getIdentity(), 'onlymember');\n\t\n\t\t\t$onlymemberids = array();\n\t\t\tforeach ($onlymember as $onlymembers) {\n\t\t\t\t$onlymemberids[] = $onlymembers->page_id;\n\t\t\t} \n\t\t\tif (!empty($onlymemberids)) {\n\t\t\t$values['adminpages'] = array_merge($onlymemberids, $values['adminpages']);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$onlymember = Engine_Api::_()->getDbtable('membership', 'sitepage')->getJoinPages($subject->getIdentity(), 'onlymember');\n\t\n\t\t\t$onlymemberids = array();\n\t\t\tforeach ($onlymember as $onlymembers) {\n\t\t\t\t$onlymemberids[] = $onlymembers->page_id;\n\t\t\t} \n\t\t\t$values['onlymember'] = $onlymemberids;\n\t\t\t\t\t\tif (empty($onlymemberids)) {\n\t\t\treturn $this->setNoRender();\n\t\t\t}\n\t\t}\n\n\t\t$values['type'] = 'browse';\n\t\t$values['orderby'] = 'creation_date';\n\t//\t$values['type_location'] = 'manage';\n\t\tif (Engine_Api::_()->getDbtable( 'modules' , 'core' )->isModuleEnabled('sitepagemember')) {\n\t\t\t$values['type_location'] = 'profilebrowsePage';\n }\n\n $this->view->paginator = $paginator = Engine_Api::_()->sitepage()->getSitepagesPaginator($values);\n $paginator->setItemCountPerPage(10);\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\n //DONT RENDER IF NOTHING TO SHOW\n if ($paginator->getTotalItemCount() <= 0) {\n return $this->setNoRender();\n }\n\n //ADD COUNT IF CONFIGURED\n if ($paginator->getTotalItemCount() > 0) {\n $this->_childCount = $paginator->getTotalItemCount();\n }\n\n //PAGE-RATING IS ENABLE OR NOT\n $this->view->ratngShow = (int) Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitepagereview');\n \n if(!$this->view->isajax) {\n $this->view->params = $this->_getAllParams();\n if ($this->_getParam('loaded_by_ajax', true)) {\n $this->view->loaded_by_ajax = true;\n if ($this->_getParam('is_ajax_load', false)) {\n $this->view->is_ajax_load = true;\n $this->view->loaded_by_ajax = false;\n if (!$this->_getParam('onloadAdd', false))\n $this->getElement()->removeDecorator('Title');\n $this->getElement()->removeDecorator('Container');\n } else { \n return;\n }\n }\n $this->view->showContent = true; \n }\n else {\n $this->view->showContent = true;\n } \n }", "public function kong_inbox_callback() { \n\n\n \n $kong_inbox_list_table = new Kong_Inbox_List_Table();\n\n // Fetch, prepare, sort, and filter our data.\n $kong_inbox_list_table->prepare_items();\n\n if(strpos($_REQUEST['page'],'konginbox' ) !== false){\n $taxonomy = 'ticket_status';\n $terms_slug = substr(strstr($_REQUEST['page'], '-'),1); \n \n }\n if(strpos($_REQUEST['page'],'kongfolder') !== false){\n $taxonomy = 'ticket_system';\n $terms_slug = substr(strstr($_REQUEST['page'], '-'),1);\n }\n\n\n ?>\n <div class=\"wrap\">\n <h2><?php echo ucwords($terms_slug);?></h2>\n <!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->\n <form id=\"inbox-filter\" method=\"get\" class=\"inbox-filter\">\n <!-- For plugins, we also need to ensure that the form posts back to our current page -->\n <input type=\"hidden\" name=\"page\" value=\"<?php echo $_REQUEST['page'] ?>\" />\n <!-- Now we can render the completed list table -->\n <?php $kong_inbox_list_table->display(); ?>\n </form>\n\n </div>\n <?php \n \n }", "public function index() {\n $data = array(\n 'title' => 'Dashboard',\n 'msg' => $this->session->flashdata('msg'),\n 'user' => $this->_fetch_user()\n );\n $this->_view(\n array('templates/nav', 'pages/dashboard/dashboard', 'alerts/msg'),\n array_merge($this->_nav_items, $data)\n );\n }", "function messenger_messages_page($id = NULL)\n{\n\n return '';\n}", "public function actionIndex()\n\t{\n\t\t// do stuff that's not the main content?\n\t}", "public function actionManageDisplayMessage()\n {\n $message = $_GET['message'];\n $this->render('manageDisplayMessage', array('message' => $message));\n }", "function getSidebar($uName='', $uID='', $uPriv='', $str=''){\n\n\t$str .= '<div class=\"row row-offcanvas row-offcanvas-left\">\n\t <div class=\"col-sm-3 col-md-2 sidebar-offcanvas\" id=\"sidebar\" role=\"navigation\">\n\n\t\t\t<ul class=\"nav nav-sidebar\">\n\t\t\t\t<li class=\"' . isActive('dashboard') . '\"><a href=\"dashboard.php\">My Homepage</a></li>\n\t\t\t\t<li class=\"' . isActive('userStart') . '\">\n\t\t\t\t\t<a href=\"' . VIRTUAL_PATH . 'users/userStart.php\">My Startpage</a>\n\t\t\t\t</li>\n\t\t\t\t<li class=\"' . isActive('userChars') . '\">\n\t\t\t\t\t<a href=\"' . VIRTUAL_PATH . 'users/userChars.php\" >My Characters</a>\n\t\t\t\t</li>\n\t\t\t\t<li class=\"' . isActive('userPosts') . '\" target=\"_ext\">&nbsp; &nbsp; &nbsp; My Posts*</li>\n\t\t\t\t<li class=\"' . isActive('userTags') . '\">&nbsp; &nbsp; &nbsp; My Tags*</li>\n\t\t\t\t<li class=\"' . isActive('userUpdatePassword') . '\"><a href=\"' . VIRTUAL_PATH . 'users/userUpdatePassword.php?act=edit&uID=' . $uID . '\">My Password*</a></li>\n\t\t\t\t<li class=\"' . isActive('userPrefs') . '\"><a href=\"' . VIRTUAL_PATH . 'users/userPrefs.php?act=edit&uID=' . $uID . '\">My Preferences*</a></li>\n\t\t\t\t<li class=\"' . isActive('userProfile') . '\"><a href=\"' . VIRTUAL_PATH . 'users/userProfile.php\">My Profile</a></li>\n\t\t\t\t<li class=\"' . isActive('userContact') . '\"><a href=\"' . VIRTUAL_PATH . 'users/userContact.php\">Contact Staff</a></li>\n\t\t\t</ul>';\n\n\n\tif($uPriv >= 4){\n\t\t$str .= '<h4>Moderator Tools<br />\n\t\t<small class=\"text-muted\">for managing threads/characters</small></h4>\n\t\t<ul class=\"nav nav-sidebar\">\n\n\t\t\t<li class=\"' . isActive('modCreateChars') . '\"><a href=\"' . VIRTUAL_PATH . 'users/modCreateChars.php\">Create Characters</a></li>\n\n\t\t\t<li class=\"' . isActive('modReviewChars') . '\"><a href=\"' . VIRTUAL_PATH . 'users/modReviewChars.php\">Review Characters</a></li>\n\n\t\t\t<li class=\"' . isActive('modReviewPosts') . '\">&nbsp; &nbsp; &nbsp; Review Posts*</li>\n\n\t\t</ul>';\n\t}\n\n\tif($uPriv >= 5){\n\t\t$str .= '<h4>Admin Tools<br />\n\t\t<small class=\"text-muted\">for managing user\\'s needs</small></h4>\n\t\t<ul class=\"nav nav-sidebar\">\n\t\t<li class=\"text-muted\"><a href=\"' . VIRTUAL_PATH . 'users/adminReviewUsers.php\">Review Members</a></li>\n\t\t<li class=\"text-danger\"><a href=\"' . VIRTUAL_PATH . 'users/adminAddUser.php\">Add User</a></li>\n\t\t<li class=\"text-danger\"><a href=\"' . VIRTUAL_PATH . 'users/adminEditUser.php\">Edit User</a></li>\n\t\t<li class=\"text-danger\"><a href=\"' . VIRTUAL_PATH . 'users/adminResetPassword.php\">Reset User Password</a></li>\n\t\t<li class=\"text-muted\">&nbsp; &nbsp; &nbsp; Ban User*</li>\n\t</ul>';\n\t}\n\n\tif($uPriv == 7){\n\t\t$str .= \"<h4>Monkee's Tools</h4>\";\n\t\t$str .= '<ul class=\"nav nav-sidebar\">\n\t\t\t<li><a href=\"' . VIRTUAL_PATH . 'users/maxAdminer.php\">Adminer</a></li>\n\t\t\t<li><a href=\"' . VIRTUAL_PATH . 'users/maxSessions.php\">Session Nuke</a></li>\n\t\t\t<li><a href=\"' . VIRTUAL_PATH . 'users/maxInfo.php\">PHP_INFO</a></li>\n\t\t\t<li><a href=\"' . VIRTUAL_PATH . 'users/maxLogs.php\">View Logs</a></li>\n\t\t\t<li><a href=\"' . VIRTUAL_PATH . 'users/maxLogs.php\">Create Poll</a></li>\n\t\t</ul>';\n\t}\n\n\t$str .= '\t<!-- BEGIN row --></div><!--/span-->';\n\n\treturn $str;\n\n}", "public function index() {\n\n // workflow:\n // load and check whether logged.\n // if logged in: load the console page (need special header?)\n // else load the login page (need separate login page)\n\n\t\tif ($this->_isAuthenticated()) {\n\n \t\t// load the console views\n $this->console();\n\n\t\t} else {\n\n // load the login view\n $this->login();\n\n }\n\n\t}", "function wp_email_capture_admin_sidebar( $sidestring ) {\n\t$sidebararray = explode( ',', $sidestring );\n\n\techo '<div class=\"postbox-container\" style=\"width:24%;padding-left:10px;float:left;\"><div class=\"metabox-holder\"><div class=\"meta-box-sortables\">';\n\n\tforeach ( $sidebararray as $widgettitle ) {\n\t\techo \"<div id='wpemailcapture_premium\" . $widgettitle . \"' class='postbox'>\";\n\t\tswitch ( $widgettitle ) {\n\n\t\t\tcase 'support':\n\t\t\t\techo '<h3 class=\"hndle\"><span>' . __( 'Need Help?', 'wp-email-capture' ) . '</span></h3>\n\t\t\t\t\t<div class=\"inside\">\n\t\t\t\t\t<p>' . __( 'If you are having problems with this plugin, please read the', 'wp-email-capture' ) . ' <a href=\"https://www.wpemailcapture.com/frequently-asked-questions/?utm_source=admin-sidebar&utm_medium=plugin&utm_campaign=wpemailcapture\">'. __( 'Frequently Asked Questions', 'wp-email-capture' ) . '</a>, '. __( 'or alternatively', 'wp-email-capture' ) . ' <a href=\"https://www.wpemailcapture.com/support/?utm_source=admin-sidebar&utm_medium=plugin&utm_campaign=wpemailcapture\">' . __( 'submit a support request here', 'wp-email-capture' ) . '</a>.</p>\n\t\t\t\t\t</div>';\n\t\t\t\tbreak;\n\n\t\t\tcase 'affiliates':\n\t\t\t\techo '<h3 class=\"hndle\"><span>'.__( 'Recommended Services', 'wp-email-capture' ).'</span></h3>\n\t\t\t\t\t<div class=\"inside\">\n\t\t\t\t\t<p>'.__( 'We recommend the following services for sending out emails:-', 'wp-email-capture' ).'</p>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><strong><a href=\"https://www.wpemailcapture.com/recommends/aweber\">Aweber</a></strong></li>\n\t\t\t\t\t\t<li><strong><a href=\"https://www.wpemailcapture.com/recommends/constant-contact\">Constant Contact</a></strong></li>\n\t\t\t\t\t\t<li><strong><a href=\"https://www.wpemailcapture.com/recommends/mailchimp\">MailChimp</a></strong></li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t</div>';\n\t\t\t\tbreak;\n\n\t\t\tcase 'globaldescription':\n\t\t\t\techo '<h3 class=\"hndle\"><span>'.__( 'Global List Management', 'wp-email-capture' ).'</span></h3>\n\t\t\t\t\t\t<div class=\"inside\">\n\t\t\t\t\t\t\t<p>'.__( 'This page allows you to create lists, either', 'wp-email-capture' ).' <strong>'.__( 'external lists', 'wp-email-capture' ).'</strong> '.__( '(WP Email Capture is compatible with most major email marketing software packages), or a new', 'wp-email-capture' ).' <strong>'.__( 'WP Email Capture List', 'wp-email-capture' ).'</strong>.' .__( 'You can create as many different lists as you wish', 'wp-email-capture' ).'.</p>\n\t\t\t\t\t\t</div>';\n\t\t\t\tbreak;\n\n\t\t\tcase 'listdescriptionpremium':\n\t\t\t\techo '<h3 class=\"hndle\"><span>' .__( 'Add/Edit WP Email Capture List', 'wp-email-capture' ).'</span></h3>\n\t\t\t\t\t\t<div class=\"inside\">\n\t\t\t\t\t\t\t<p>' .__( 'This is the page for managing WP Email Capture Lists. From this page you can:-', 'wp-email-capture' ).'</p>\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li><strong>' .__( 'Make Changes To Your Lists', 'wp-email-capture' ).'</strong> - ' .__( 'such as the name and the pages redirected to on form completion', 'wp-email-capture' ).'.</li>\n\t\t\t\t\t\t\t\t<li><strong>' .__( 'Email Options', 'wp-email-capture' ).'</strong> - ' .__( 'such as where the email comes from and what emails sent to the subscriber contains', 'wp-email-capture' ).'.</li>\n\t\t\t\t\t\t\t\t<li><strong>' .__( 'Error Options', 'wp-email-capture' ).'</strong> - ' .__( 'the errors that are displayed to subscribers who incorrectly fill in the form', 'wp-email-capture' ).'.</li>\n\t\t\t\t\t\t\t\t<li><strong>' .__( 'Styling Options', 'wp-email-capture' ).'</strong> - ' .__( 'change the button image (or use an image), as well as what to ask the user for besides their name', 'wp-email-capture' ).'.</li>\n\t\t\t\t\t\t\t</ul>' .\n\t\t\t\t\t\t__( 'You can also on this page do the following', 'wp-email-capture' ). ':-' .\n\t\t\t\t\t\t'<ul>\n\t\t\t\t\t\t\t<li>'.__( 'Manage List Subscribers', 'wp-email-capture' ).'</li>\n\t\t\t\t\t\t\t<li>'.__( 'Delete Temporary Emails', 'wp-email-capture' ).'</li>\n\t\t\t\t\t\t\t<li>'.__( 'Empty the entire list', 'wp-email-capture' ).'</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>';\n\t\t\t\tbreak;\n\n\t\t\tcase 'getwpemailcapturepremiumdescription':\n\n\t\t\t\t$link = get_option( 'wp_email_capture_theme_affiliate_link' );\n\n\t\t\t\tif ( !$link ) {\n\n\t\t\t\t\t$link = \"https://www.wpemailcapture.com/premium/?utm_source=admin-sidebar&utm_medium=banner&utm_term=2point5&utm_campaign=internalbanner\";\n\n\t\t\t\t}\n\t\t\t\techo '<h3 class=\"hndle\"><span>'.__( 'Get WP Email Capture Premium', 'wp-email-capture' ).'</span></h3>\n\t\t\t\t\t\t<div class=\"inside\">\n\t\t\t\t\t\t\t<p>'.__( 'Unlock the <strong>true</strong> power of WP Email Capture with the Premium version. With multiple lists, and stat tracking, WP Email Capture Premium is the missing link in your WordPress Email Marketing Puzzle', 'wp-email-capture' ).'.</p>\n\t\t\t\t\t\t\t<p style=\"text-align:center;\"><a href=\"'.$link.'\"><img src=\"'. plugins_url( 'images/WP-EC-262-x-218.png' , dirname(__FILE__) ).'\" alt=\"WP Email Capture\" style=\"width:100%;\"></a></p>\n\t\t\t\t\t\t</div>';\n\t\t\t\tbreak;\n\n\t\t\tcase 'exlistdescriptionpremium':\n\t\t\t\techo '<h3 class=\"hndle\"><span>'.__( 'Add/Edit External List', 'wp-email-capture' ).'</span></h3>\n\t\t\t\t\t\t<div class=\"inside\">\n\t\t\t\t\t\t\t<p>'.__( 'This is the page for managing External lists through WP Email Capture. Simply copy & paste the code from your Email Marketing software into the page below and you can embed your newsletter subscriptions into posts, pages or sidebars easily using WP Email Capture. If you do not have an Email Marketing Service, a few are recommended below', 'wp-email-capture' ).'.</p>\n\t\t\t\t\t\t</div>';\n\t\t\t\tbreak;\n\n\t\t\tcase 'donations':\n\t\t\t\techo '<h3 class=\"hndle\"><span>'.__( 'Donations', 'wp-email-capture' ).'</span></h3><div class=\"inside\">\n\t\t\t\t<p>'.__( 'If you like this plugin, please consider a small donation to help with future versions and plugins.', 'wp-email-capture' ). '</p>\n\t\t\t\t<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">\n\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">\n\t\t\t\t<input type=\"hidden\" name=\"hosted_button_id\" value=\"8590914\">\n\t\t\t\t<input type=\"image\" src=\"https://www.paypal.com/en_US/GB/i/btn/btn_donateCC_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online.\">\n\t\t\t\t<img alt=\"\" border=\"0\" src=\"https://www.paypal.com/en_GB/i/scr/pixel.gif\" width=\"1\" height=\"1\">\n\t\t\t\t</form></div>';\n\t\t\t\tbreak;\n\n\t\t\tcase 'news':\n\t\t\t\t$wpemailcapturefeed = wp_email_capture_fetch_rss_feed();\n\n\t\t\t\techo '<h3 class=\"hndle\"><span>'.__( 'Latest News', 'wp-email-capture' ).'</span></h3><div class=\"inside\">\n\t\t\t\t<p>'.__( 'The latest news and tutorials from WP Email Capture', 'wp-email-capture' ).'.</p>\n\n\t\t\t\t<ul>';\n\t\t\t\t\n\t\t\t\tif ( $wpemailcapturefeed ) {\n\t\t\t\t\tforeach ( $wpemailcapturefeed as $item ) {\n\t\t\t\t\t\t$url = preg_replace( '/#.*/', '', esc_url( $item->get_permalink(), $protocolls = null, 'display' ) );\n\t\t\t\t\t\techo '<li>\n\t\t\t\t\t\t\t<a href=\"'.$url.'?utm_source=admin-sidebar&utm_medium=sidebarwidget&utm_term=newsitem&utm_campaign=wpemailcapture\">'. esc_html( $item->get_title() ) .'</a>\n\t\t\t\t\t\t\t</li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo '</ul></div>';\n\t\t\t\tbreak;\n\n\t\t\tcase 'supportus':\n\t\t\t\techo '<h3 class=\"hndle\"><span>'.__( 'Support Us!', 'wp-email-capture' ).'</span></h3><div class=\"inside\">\n\t\t\t\t<p>'.__( 'We would like you if you would not mind, doing one of the following if you are a fan of WP Email Capture', 'wp-email-capture' ).'.</p>\n\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href=\"http://wordpress.org/extend/plugins/wp-email-capture/\">'.__( 'Rate the plugin 5* on WordPress.org', 'wp-email-capture' ).'</a></li>\n\t\t\t\t\t<li><a href=\"http://twitter.com/WPEmailCapture\">'.__( 'Follow @WPEmailCapture on Twitter', 'wp-email-capture' ).'</a></li>\n\t\t\t\t\t<li><a href=\"http://facebook.com/WPEmailCapture\">'.__( 'Like us on Facebook', 'wp-email-capture' ).'</a></li>\n\t\t\t\t</ul></div>';\n\t\t\t\tbreak;\n\n\t\t\tcase 'becomeanaffiliate':\n\t\t\t\techo '<h3 class=\"hndle\"><span>'.__( 'Become An Affiliate!', 'wp-email-capture' ).'</span></h3><div class=\"inside\">\n\t\t\t\t<p>'.__( 'Earn upto', 'wp-email-capture' ). ' <strong>$30</strong> '.__( 'per sale of WP Email Capture', 'wp-email-capture' ). '! <a href=\"https://www.wpemailcapture.com/affiliate-area/?utm_source=admin-sidebar&utm_medium=plugin&utm_campaign=wpemailcapture\"><strong>'.__( 'Join our affilite programme today', 'wp-email-capture' ).'</strong></a>.</p></div>';\n\t\t\t\tbreak;\n\n\t\t\tcase 'supportpage':\n\t\t\t\techo '<h3 class=\"hndle\"><span>' . __( 'WP Email Capture Options', 'wp-email-capture' ) . '</span></h3><div class=\"inside\">\n\t\t\t\t<p>' . __( 'On this page you can make changes that to the way in which WP Email Capture runs', 'wp-email-capture' ) . '.</p></div>';\n\t\t\t\tbreak;\n\t\t}\n\t\techo '</div>';\n\t}\n\techo '</div></div></div>';\n\n}", "public function action_index()\n\t{\n\t\t// Forward to message index, it's not like we know much more :P\n\t\t$this->action_messageindex();\n\t}", "function index()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //login check\n $this->__commonClient_LoggedInCheck();\n\n //uri - action segment\n $action = $this->uri->segment(3);\n\n //default page titles\n $this->data['vars']['main_title'] = '';\n $this->data['vars']['main_title_icon'] = '';\n\n $this->data['vars']['sub_title'] = $this->data['lang']['lang_users'];\n $this->data['vars']['sub_title_icon'] = '<i class=\"icon-group\"></i>';\n\n //re-route to correct method\n switch ($action) {\n\n case 'view':\n $this->__clientUsers();\n break;\n\n case 'add-user':\n $this->__addUser();\n break;\n\n case 'edit-modal':\n $this->__editUserModal();\n break;\n\n default:\n $this->__clientUsers();\n\n }\n\n //load view\n $this->__flmView('admin/main');\n\n }", "public function dashboard() {\n\t\t$template = \"dashboard.tpl\";\n\t\t$data['name'] = $_SESSION['first'] . \" \" . $_SESSION['last'];\n\t\t$data['html'] = $this->paint_screen();\n\t\t$this->load_smarty($data,$template);\n\t}", "function forum_action()\n{\n $pageTitle = \"forum page\";\n require_once __DIR__ . '/../public/forum/index.php';\n}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\tif (($this->id && $access) || ($BE_USER->user[\"admin\"] && !$this->id))\t{\n\n\t\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance(\"bigDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->doc->form='<form action=\"index.php?id='.$this->id.'\" method=\"POST\">';\n\n\t\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader(\"pages\",$this->pageinfo,$this->pageinfo[\"_thePath\"]).\"<br />\".$LANG->sL(\"LLL:EXT:lang/locallang_core.xml:labels.path\").\": \".t3lib_div::fixed_lgd_pre($this->pageinfo[\"_thePath\"],50);\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\t\n\t\t\texec('hostname',$ret);\n\t\t\t$ret=implode(\"\",$ret);\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\") .\" on: $ret\");\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section(\"\",$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,\"SET[function]\",$this->MOD_SETTINGS[\"function\"],$this->MOD_MENU[\"function\"])));\n\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section(\"\",$this->doc->makeShortcutIcon(\"id\",implode(\",\",array_keys($this->MOD_MENU)),$this->MCONF[\"name\"]));\n\t\t\t}\n\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t}", "function msdlab_hero(){\n if(is_active_sidebar('homepage-top')){\n print '<div id=\"hp-top\">';\n dynamic_sidebar('homepage-top');\n print '</div>';\n } \n}", "public function action_index()\n {\n $this->request->response = $this->render_layout($this->widget_sites());\n }", "function bwrt_site_new_message() {\n $templates = bwrt_get_default_pages();\n\n ?>\n <h3>BWR Club Templates</h3>\n <p>This new club site will include <b><?php echo count($templates) ?></b> template page(s).\n To change the club site templates, toggle <em>BWR Template Page</em> in the page editor.</p>\n <?php\n}", "function show($title,$message) {\n\t\techo '\n<html>\n<head>\n<title>404 Page Not Found</title>\n<style type=\"text/css\">\n\nbody {\nbackground-color:\t#fff;\nmargin:\t\t\t\t40px;\nfont-family:\t\tLucida Grande, Verdana, Sans-serif;\nfont-size:\t\t\t12px;\ncolor:\t\t\t\t#000;\n}\n\n#content {\nborder:\t\t\t\t#999 1px solid;\nbackground-color:\t#fff;\npadding:\t\t\t20px 20px 12px 20px;\n}\n\nh1 {\nfont-weight:\t\tnormal;\nfont-size:\t\t\t14px;\ncolor:\t\t\t\t#990000;\nmargin: \t\t\t0 0 4px 0;\n}\n</style>\n</head>\n<body>\n\t<div id=\"content\">\n\t\t<h1>'.$title.'</h1>\n\t\t<p>'.$message.'</p>\t</div>\n\n</body>\n</html>\n\t\t';\n\t\tdie();\n\t}", "public function index_get() {\n\t\t$uid = 15;\n\t\t$messages = $this->Messages_model->getMessagesByFromUserID($uid);\n\t\t$this->response($messages);\n\t}", "function get_site_screen_help_sidebar_content()\n {\n }" ]
[ "0.6615579", "0.640926", "0.63054806", "0.6273973", "0.6224174", "0.61787885", "0.61291546", "0.6123978", "0.6080846", "0.60671467", "0.60544336", "0.59722954", "0.59695995", "0.59667796", "0.5950821", "0.59236634", "0.59144163", "0.5904101", "0.5872392", "0.5864494", "0.58366406", "0.58308023", "0.5821335", "0.57992256", "0.57968813", "0.5796565", "0.5794784", "0.5776662", "0.5767312", "0.5759979", "0.5751908", "0.57481825", "0.5742276", "0.5726609", "0.57086825", "0.5701306", "0.5695071", "0.5693333", "0.5678536", "0.56777674", "0.56745553", "0.5672376", "0.5671358", "0.5663626", "0.5659133", "0.56555486", "0.5636271", "0.5630473", "0.5629597", "0.5624533", "0.56241333", "0.5621483", "0.56183654", "0.5613877", "0.5612847", "0.5607887", "0.5600023", "0.5597479", "0.5586449", "0.55633503", "0.55623883", "0.5557484", "0.5554835", "0.55505425", "0.5550432", "0.55455935", "0.55425423", "0.5540278", "0.55311316", "0.55306077", "0.5521566", "0.5520246", "0.551927", "0.5518161", "0.55124366", "0.5511309", "0.55095345", "0.550893", "0.55065316", "0.55032223", "0.5499855", "0.54988724", "0.5498469", "0.5496479", "0.5495488", "0.549454", "0.54941374", "0.548064", "0.54805535", "0.54800534", "0.547926", "0.5478713", "0.54775584", "0.5477229", "0.5476854", "0.5473793", "0.5468624", "0.5468071", "0.5467475", "0.54674006" ]
0.6068472
9
/ runs when a new activity is added to the stream. Simply clear out our cached copy
public static function EventAdded(&$eventData) { if(isset($eventData['id_board']) && !empty($eventData['id_board'])) // the event references a board event CacheAPI::putCache(self::$cacheName_Events, null, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function refresh() {\n $this->datastreamInfo = NULL;\n $this->datastreamHistory = NULL;\n }", "public function clearRecentActivitys()\n\t{\n\t\t$this->collRecentActivitys = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function markAsChanged()\n {\n // the stream is not closed because $this->contentStream may still be\n // attached to it. GuzzleHttp will clean it up when destroyed.\n $this->stream = null;\n }", "public function onAfterWrite()\n {\n $owner = $this->owner;\n if (!$owner->hasMethod('doPublish')) {\n $owner->clearFacebookCache();\n }\n }", "public function __destruct()\n {\n if ($this->cache) {\n $this->cache->setItem(self::CACHE_KEY, $this->messagesWritten);\n }\n }", "public function onAfterPublish()\n {\n $this->owner->clearFacebookCache();\n }", "public function publish_to_stream($activity)\n {\n\n }", "public function clearRecordedEvents()\n {\n $this->latestRecordedEvents = [];\n }", "public function clearEvents()\n {\n $this->recorded = [];\n }", "public function clearCached()\n {\n $this->cached = null;\n }", "protected function populateDatastreamHistory() {\n if ($this->datastreamHistory === NULL) {\n $this->datastreamHistory = $this->getDatastreamHistory();\n }\n }", "public function __destruct()\n {\n foreach ($this->changed as $name => $value) {\n $this->storage->save($this->cache->get($name));\n }\n }", "public function clearRecordedEvents()\n {\n $this->events = [];\n }", "public function flushCache() {\n\t\t// is deleted. If it cleared our static cache variables\n\t\t// here, they would in effect be useless.\n\t}", "public function detachContentStream()\n {\n $this->contentStream = null;\n $this->partStreamFilterManager->setStream(null);\n $this->onChange();\n }", "public function saveToCacheForever();", "public function onRun()\n {\n $this->prepareWallStream();\n }", "protected function _clearDataCache() {}", "function reset() {\n\t\t$_this =& AmfStream::getInstance();\n\t\t$_this->__stream = '';\n\t\treturn true;\n\t}", "public function seen(): void\n {\n $this->lastSeen = new DateTime();\n }", "function after() {\n\t\t\n\t\tif (!empty($this->_activity_result)) {\n\t\t\tforeach($this->_activity_result as $result) {\n\t\t\t\t$activity = new Model_Activity();\n\t\t\t\t$activity->create_activity($result);\n\t\t\t}\n\t\t}\n\t}", "public static function clearCache()\n {\n static::$eventMap = [];\n \\Cache::forget(static::EVENT_CACHE_KEY);\n }", "public static function clearCache()\n {\n static::$eventMap = [];\n \\Cache::forget(static::EVENT_CACHE_KEY);\n }", "public function clearCache(){\n if(file_exists($this->file)){\n @unlink($this->file);\n }\n }", "public function refreshManifestCache()\n\t{\n\n\t}", "public static function clear_file_contents_cache() {\n\t\tself::$file_contents = [];\n\t}", "public function initRecentActivitys()\n\t{\n\t\t$this->collRecentActivitys = array();\n\t}", "protected function shift() {\r\n\t\tarray_shift($this->_streams);\r\n\t\t$this->_streamsCount--;\r\n\t}", "public function end() {\n $this->memcache->delete(PREFIX_LOCDATA.$this->getShareID());\n }", "protected function flushCached()\n\t{\n\t\t$this->objectCache = [];\n\t}", "public static function flushCache()\n {\n self::$cache = array();\n }", "function flushCache() {\n\t\t// monograph ID, flush both caches on update.\n\t\t$cache =& $this->_getCache();\n\t\t$cache->flush();\n\t\tunset($cache);\n\n\t\t//TODO: flush cache of publishedMonographDAO once created\n\t}", "private function clearBuffer() {\r\n\t\t$this->buffer = '';\r\n\t}", "public function keep(){\r\n $this->isDestroyed = true;\r\n }", "public function clearCache() {}", "public function clearCache() {}", "function cleanBufferOn()\n\t{\n\t\t$this->bCleanBuffer = true;\n\t}", "public function end()\n\t{\n\t\tTwitchHelper::log(TwitchHelper::LOG_INFO, \"Stream end\");\n\t}", "public function streamClosed();", "public function clearCachefiles () {\r\n\t\r\n\t}", "public function clearCache()\n {\n }", "public function openForAppend(): void\n {\n $this->content->seek(0, SEEK_END);\n $this->lastAccessed = time();\n }", "public function reset()\n {\n $this->values[self::_ACTIVITY_INFO] = array();\n }", "private function clearCache()\n {\n $this->cache->tags('item')->flush();\n }", "public static function purge_cache(){\n $attachments = new \\CFCDN_Attachments();\n $attachments->purge_cache();\n }", "private function clearstatcache() {\n static $cleared = false;\n if ( !$cleared ) {\n clearstatcache();\n $cleared = true;\n }\n }", "public static function clearCache() {\n self::$steamIds = array();\n }", "public function flagCacheWithNewTalkNotification() {\n\t\t$this->cache->set( $this->getTalkNotificationCacheKey(), '1', 86400 );\n\t}", "private function clearTokenCache()\n {\n static $tokenStreams = null;\n if (!$tokenStreams) {\n $tokenStreams = new \\ReflectionProperty(get_parent_class(), 'tokenStreams');\n $tokenStreams->setAccessible(true);\n }\n $tokenStreams->setValue($this, array());\n }", "protected function before_stream() {\n\t\tGyroHeaders::send();\n\t\tsession_write_close();\n\t\tob_end_clean();//required here or large files will not work\n\t}", "public function clearAttachments()\n {\n $this->attachment = array();\n }", "function clearCache () {\n $this->clearThumbCache ();\n $this->clearPreviewCache ();\n }", "abstract protected function clearCache();", "public function onBeforeWrite()\n {\n $this->getTextCache()->invalidate($this->owner);\n }", "public function removeFromCache()\n {\n Cache::tags('file')->forget(strtolower($this->alias));\n }", "public function flushAssets()\n\t{\n\t\t(new Version)->refreshMediaVersion();\n\t}", "public function clearHistory()\r\r\n {\r\r\n $this->history = array();\r\r\n }", "public function clearCacheData(){\n $cacheKey = $this->getCacheKey();\n $this->clearCache($cacheKey);\n }", "private function clearCache() {\n\t\t\n\t\tCore\\Cache::clear();\n\t\t\n\t}", "public function clearInternalCache()\n {\n $this->_cached = null;\n }", "public function cache_gc() {\n // TO DO!!!!!\n }", "public function clearHistorys()\n\t{\n\t\t$this->collHistorys = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function flush()\n {\n unset($this->buffer);\n $this->buffer=array();\n }", "public function onAfterUnpublish()\n {\n\t\t$this->flushChanges();\n\t}", "final public function purgeLog() {\n $this->log = array();\n }", "function _deleteCache() {\n require_once(\"Cache/Output.php\");\n $cache = new Cache_Output($GLOBALS[\"BX_config\"][\"popoon\"][\"cacheContainer\"], $GLOBALS[\"BX_config\"][\"popoon\"][\"cacheParams\"] );\n \n // for the time being, just flush everything...\n @$cache->flush('outputcache');\n $cache->flush('');\n }", "protected function _checkAndReopen()\n\t{\n\t\t$streamMeta = stream_get_meta_data( $this->_stream );\n\t\t$uri = $streamMeta[ 'uri' ];\n\t\tif ( $uri[ 0 ] == '/' )\n\t\t{\n\t\t\tclearstatcache( false, $streamMeta[ 'uri' ] );\n\t\t\tif ( !file_exists( $streamMeta[ 'uri' ] ) )\n\t\t\t{\n\t\t\t\t$this->_open( $uri );\n\t\t\t}\n\t\t}\n\t}", "public static function clearCache()\n\t{\n\t\tparent::clearCache(__CLASS__);\n\t}", "public function clearFinished();", "public function __finalize() {\n\t\t$this->flush_buffer();\n\t}", "public function updateCache() {\n\t\tif ($this->hasLocalMessages()) {\n\t\t\t$this->postCache();\n\t\t}\n\n\t\t$this->uplink->open($this->auth);\n\t\t// Gruppenhashes vergleichen (Schnellste Moeglichkeit)\n\t\tif ($this->uplink->getGroupHash() != $this->getGroupHash()) {\n\t\t\t/* Wenn unser Uplink uns die Nachrichten auch direkt geben kann,\n\t\t\t * muessen wir nicht erst die komplette Gruppe laden */\n\t\t\tif ($this->uplink instanceof MessageStream) {\n\t\t\t\t$this->updateGroup();\n\t\t\t} else {\n\t\t\t\t$this->setGroup($this->uplink->getGroup());\n\t\t\t}\n\t\t}\n\t\t$this->uplink->close();\n\t}", "function wprss_do_not_cache_feeds( &$feed ) {\n $feed->enable_cache( false );\n }", "public function onOutputGenerated()\n {\n if (isset($this->assetData)) {\n $cache = $this->grav['cache'];\n if (0 < count($this->assetData) || !method_exists($cache, \"delete\")) {\n $cache->save($this->assetId, $this->assetData);\n } else {\n $cache->delete($this->assetId);\n }\n }\n }", "function garbageCollect() {\n\t\tif ( !mt_rand( 0, 100 ) ) {\n\t\t\t$nowtime = time();\n\t\t\t/* Avoid repeating the delete within a few seconds */\n\t\t\tif ( $nowtime > ($this->lastexpireall + 1) ) {\n\t\t\t\t$this->lastexpireall = $nowtime;\n\t\t\t\t$this->expireall();\n\t\t\t}\n\t\t}\n\t}", "function __destruct() {\n\t\tcurl_close( $this->ch );\n\t\t@unlink( '/tmp/addframe.cookies.' . $this->uid . '.dat' );\n\t}", "public function flushCache();", "private function flushImageCache()\n {\n $this->imagesCache = null;\n $this->variantImages = null;\n }", "function loadActivity(){\n\t\t\t$this->articleEvents->add( $this->db->getUserActivity($this->getName()) ,true );\t\t\t\n\t\t}", "public function __destruct() {\n\t\tif (file_exists($this->fileName) && (!$this->cache)) {\n\t\t\tunlink($this->fileName);\n\t\t}\n\t}", "public function __destruct()\n {\n $this->_loadedPackets = [];\n }", "protected function populateDatastreamInfo() {\n $this->datastreamHistory = $this->getDatastreamHistory();\n $this->datastreamInfo = $this->datastreamHistory[0];\n }", "function clearPreviewCache () {\n files::deleteFile($this->previewDir . $this->file);\n }", "protected function invalidateCache()\n {\n Cache::tags($this->getTag())->flush();\n }", "public function flushSource()\n {\n if (is_file($this->getStoragePath())) {\n @unlink($this->getStoragePath());\n }\n }", "public function clearBuffer() {\n $this->buffer = '';\n }", "protected function clear() {}", "public function cache() {\r\n\t\t$this->resource->cache();\r\n\t}", "public function clear()\n {\n $this->batch = [];\n }", "function wprss_feed_reset() {\n wp_schedule_single_event( time(), 'wprss_delete_all_feed_items_hook' );\n\t\tset_transient( WPRSS_TRANSIENT_NAME_IS_REIMPORTING, true );\n }", "private function finalize() {\n $this->_log_queries[] = $this->_active_query;\n $this->_active_query = empty($this->_hold_queries) ? NULL : array_pop($this->_hold_queries);\n }", "public function clearCache()\n {\n if ($this->clear_cache && !empty($this->pageinfo)) {\n $dataHandler = GeneralUtility::makeInstance(DataHandler::class);\n $dataHandler->start([], []);\n $dataHandler->clear_cacheCmd($this->id);\n }\n }", "public function onFinish($instance) {\n unset($this->_cnt, $this->_cdata, $this->_objs);\n }", "private function setCacheHeadersForRssFeed() : void {\n $feedSlugRegex = '#^/feed/?$#';\n if (preg_match($feedSlugRegex, $_SERVER['REQUEST_URI']) === 1) {\n $this->disableCache();\n }\n }", "public function onAfterPublish()\n {\n\t\t$context = [\n PublishingEngine::CONTEXT_ACTION => PublishingEngine::CONTEXT_ACTION_PUBLISH\n\t\t];\n\t\t$this->collectChanges($context);\n\t\t$this->flushChanges();\n\t}", "public function UpdateLastActivity()\n\t{\n\t\tif (isset($_SESSION['timestamp']) && $_SESSION['timestamp'] - time() > 60 * 10)\n\t\t{\n\t\t\t// If it's been enough time (say, 10 minutes), generate new session ID\n\t\t\t// to help prevent session hijacking\n\t\t\tsession_regenerate_id();\n\t\t\t$_SESSION['timestamp'] = time();\n\t\t}\n\n\t\t$this->LastActivity = now();\n\t\t$this->Save();\n\t}", "public static function clearCache() {\n $cached=sugar_cached('include/externalAPI.cache.php');\n if ( file_exists($cached) ) {\n unlink($cached);\n }\n $cached=sugar_cached('include/externalAPI.cache.js');\n if ( file_exists($cached) ) {\n unlink($cached);\n }\n }", "public function dispose(): void{\n if(!$this->gotLogs) throw new LogsFileNotLoaded();\n $this->logsFile = null;\n $this->gotLogs = false;\n }", "function cache_gc()\n {\n // because this gc function is called before storage is initialized,\n // we just set a flag to expunge storage cache on shutdown.\n $this->expunge_cache = true;\n }", "public static function clearCache()\n {\n self::$cache = array();\n }", "private function flushImageCache(): void\n {\n $this->imagesCache = null;\n $this->variantImages = null;\n }", "private function _clearCache()\n {\n Cache::forget(\"roaddamage-resource:{$this->id}\");\n foreach ($this->getReports() as $report) {\n Cache::forget(\"report-resource:{$report->id}\");\n }\n }" ]
[ "0.62916154", "0.58936507", "0.56738985", "0.56721354", "0.558436", "0.5509516", "0.54553527", "0.53628814", "0.526395", "0.5208139", "0.51645595", "0.5155649", "0.51503223", "0.5128997", "0.51078886", "0.5095238", "0.5093966", "0.5090509", "0.5060951", "0.5042456", "0.50218964", "0.50206506", "0.50206506", "0.5019522", "0.5013605", "0.50089794", "0.50028497", "0.5000584", "0.50004584", "0.4997741", "0.49492565", "0.49484175", "0.4944658", "0.4944463", "0.49307474", "0.49307474", "0.49271125", "0.49212873", "0.49201143", "0.490776", "0.49058545", "0.49054775", "0.49034417", "0.4900952", "0.4893351", "0.48923504", "0.48897964", "0.48822182", "0.48736823", "0.48696974", "0.48654622", "0.4861568", "0.4859359", "0.4859067", "0.48557302", "0.48519763", "0.48498854", "0.4838377", "0.48322582", "0.48305467", "0.4824434", "0.482271", "0.4821178", "0.48111007", "0.480561", "0.48024252", "0.48001987", "0.4797569", "0.47967973", "0.47748435", "0.47726545", "0.4767416", "0.47662774", "0.47637117", "0.47624514", "0.47570297", "0.47569194", "0.47560054", "0.47547403", "0.47541752", "0.4749919", "0.47463936", "0.47394434", "0.4735841", "0.47289345", "0.47286707", "0.47284645", "0.472635", "0.47250664", "0.47226787", "0.47185585", "0.47159922", "0.47134638", "0.47102553", "0.47033352", "0.4700593", "0.46991378", "0.4694929", "0.46914372", "0.4690882", "0.46869412" ]
0.0
-1
/ runs when a topic is created or updated (i.e. posts were added)
public static function PostAdded(&$msgOptions, &$topicOptions, &$posterOptions) { CacheAPI::putCache(self::$cacheName_Posts, null, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function run()\n {\n $slug = $this->get('slug');\n\n $category = $this->categories->findBySlug($slug);\n\n $creator = User::current();\n $now = Carbon::now();\n\n $conversation = (object) [\n 'poster' => $creator->username,\n 'title' => $this->get('subject'),\n 'posted' => $now,\n 'last_post' => $now,\n 'last_poster' => $creator->username,\n 'category_slug' => $category->slug,\n ];\n\n $post = (new Post([\n 'poster'\t=> $creator->username,\n 'poster_id'\t=> $creator->id,\n 'message'\t=> $this->get('message'),\n 'posted'\t=> $now,\n ]));\n\n $this->categories->addNewTopic($category, $conversation, $post->toArray());\n\n $this->raise(new UserHasPosted($creator, $post));\n }", "public function post_publish()\n\t{\n\t\t$this->get_publish();\n\t}", "public function onTopic( $sTopic )\n\t{\n\t\t$this -> m_sTopic = $sTopic;\n\t}", "function AddTopic()\n{\n global $context, $txt, $mbname, $db_prefix;\n\n // Check permission\n $a_add = allowedTo('smftags_add');\n\n if ($a_add == false)\n fatal_error($txt['cannot_smftags_add'],false);\n\n // get query results to build array of all tags\n $query = db_query(\"\n SELECT t.tag AS tag, t.ID_TAG AS ID_TAG, COUNT(l.ID_TAG) AS quantity, t.approved AS approved\n FROM {$db_prefix}tags AS t\n LEFT JOIN {$db_prefix}tags_log AS l ON t.ID_TAG = l.ID_TAG\n GROUP BY t.ID_TAG\n ORDER BY t.tag ASC\",\n __FILE__, __LINE__);\n\n $context['tags'] = array();\n while ($row = mysql_fetch_assoc($query))\n {\n $context['tags'][] = array(\n 'ID_TAG' => $row['ID_TAG'],\n 'tag' => $row['tag'],\n 'quantity' => $row['quantity'],\n 'approved' => $row['approved'],\n 'tagged' => 0,\n );\n }\n // don't load the subtemplate\n}", "public function created(Post $post)\n {\n $post->recordActivity('created');\n }", "function target_add_topic($topic)\n{\n\t// if ($GLOBALS['VERBOSE']) pf('...'. $topic['id']);\n\n\tif (!isset($topic['orderexpiry'])) {\n\t\t$topic['orderexpiry'] = 0;\n\t}\n\n\t// Set orderexpiry for announcement and sticky topics.\n\tif (($topic['thread_opt'] & 2) || ($topic['thread_opt'] & 4)) {\n\t\t$topic['orderexpiry'] = 1000000000;\n\t}\n\n\t// Skip topics that doesn't belong to a forum.\n\tif (!isset($GLOBALS['forum_map'][ (int)$topic['forum_id'] ])) {\n\t\tpf('WARNING: Skip topic #'. $topic['id'] .'. Probably an announcement or orphaned message!');\n\t\treturn;\n\t}\n\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'thread (\n\t\tid, forum_id, root_msg_id, views, replies, thread_opt, orderexpiry\n\t\t) VALUES(\n\t\t\t'. (int)$topic['id'] .',\n\t\t\t'. $GLOBALS['forum_map'][ (int)$topic['forum_id'] ] .',\n\t\t\t'. (int)$topic['root_msg_id'] .',\n\t\t\t'. (int)$topic['views'] .',\n\t\t\t'. (int)$topic['replies'] .',\n\t\t\t'. (int)$topic['thread_opt'] .',\n\t\t\t'. (int)$topic['orderexpiry'] .')\n\t');\n}", "public function test_store_post()\n {\n $topic = Topic::factory()->create();\n $resp =\n $this->actingAs($this->user)\n ->withHeaders([\n 'Content-Type' => 'application/json',\n 'Accept' => 'application/json',\n ])\n ->postJson(\n '/api/topics/' . $topic->id . '/posts',\n [\n \"body\" => \"testsqx test\",\n ]\n );\n $resp->assertStatus(201);\n }", "public function setTopic($topic, $updateFirstPost = true) {\n\t\tif ($topic == $this->topic) return;\n\t\t\n\t\t$this->topic = $topic;\n\t\t$sql = \"UPDATE \twbb\".WBB_N.\"_thread\n\t\t\tSET\ttopic = '\".escapeString($topic).\"'\n\t\t\tWHERE \tthreadID = \".$this->threadID;\n\t\tWCF::getDB()->registerShutdownUpdate($sql);\n\t\t\n\t\t// update the subject of the first post in this thread\n\t\tif ($updateFirstPost && $this->firstPostID) {\n\t\t\t$sql = \"UPDATE \twbb\".WBB_N.\"_post\n\t\t\t\tSET\tsubject = '\".escapeString($topic).\"'\n\t\t\t\tWHERE \tpostID = \".$this->firstPostID;\n\t\t\tWCF::getDB()->registerShutdownUpdate($sql);\n\t\t}\n\t}", "public function run()\n {\n foreach ($this->topics as $topic){\n Topic::query()->firstOrCreate($topic);\n }\n }", "public function run()\n {\n Topic::create([\n 'name' => 'Чому варто купляти великий будинок?',\n ]);\n Topic::create([\n 'name' => 'Чи потребую я бдуинок?',\n ]);\n Topic::create([\n 'name' => 'Квартира чи Будинок?',\n ]);\n Topic::create([\n 'name' => 'Чому варто бути обережним при купівлі квартири?',\n ]);\n Topic::create([\n 'name' => 'Чи варто мати свій сад?',\n ]);\n\n }", "public function run()\n {\n $topicLists = [\n\n 'Announcement', 'Assignment', 'Live Recording', 'Post', 'Project Title', 'Schedule', 'Survey','Quiz'\n\n ];\n\n foreach ($topicLists as $topicList) \n {\n $topic = new Topic;\n $topic->name = $topicList;\n $topic->user_id = 1;\n $topic->save();\n }\n }", "function _publish_post_hook($post_id)\n {\n }", "public function onAfterPublish()\n {\n\t\t$context = [\n PublishingEngine::CONTEXT_ACTION => PublishingEngine::CONTEXT_ACTION_PUBLISH\n\t\t];\n\t\t$this->collectChanges($context);\n\t\t$this->flushChanges();\n\t}", "public function store(CreateTopic $request)\n { \n $topic = new Topic();\n $topic->section_id = $request->input('section_id');\n $topic->title = $request->title;\n $topic->save();\n\n $post = new Post();\n $post->user_id = Auth::user()->id;\n $post->topic_id = $topic->id;\n $post->body = $request->input('body');\n $post->save();\n\n return redirect(\"/topic/$topic->id\")->with('success', 'Topic was saved with success');\n }", "public function testUpdate(): void\n {\n $this->createInstance();\n $user = $this->createAndLogin();\n\n $res = $this->fConnector->getDiscussionManagement()->postTopic('Hello title', 'My content', [$this->configTest['testTagId']],$user->userId)->wait();\n\n //Test update as admin\n $res2 = $this->fConnector->getDiscussionManagement()->updateTopic($res->id,'Hello title3', 'My content2', [$this->configTest['testTagId']],null)->wait();\n $this->assertInstanceOf(FlarumDiscussion::class,$res2) ;\n $this->assertEquals('Hello title3',$res2->title, 'Test discussion update as admin');\n\n //Test update as user\n $res2 = $this->fConnector->getDiscussionManagement()->updateTopic($res->id,'Hello title4', 'My content3', [$this->configTest['testTagId']],null)->wait();\n $this->assertInstanceOf(FlarumDiscussion::class,$res2) ;\n $this->assertEquals('Hello title4',$res2->title,'Test discussion update as user');\n\n }", "public function save_post() {\n\t\tif ($this->unsaved_post) {\n\t\t\t$this->unsaved_post->is_valid();\n\t\t\t$area = $this->area();\n\n\t\t\tif (!$this->id) {\n\n\t\t\t\t// New topic\n\t\t\t\t$this->save();\n\n\t\t\t\t$this->unsaved_post->forum_topic_id = $this->id;\n\t\t\t\t$this->unsaved_post->save();\n\n\t\t\t\t$this->created = $this->unsaved_post->created;\n\t\t\t\t$this->first_post_id = $this->unsaved_post->id;\n\t\t\t\t$area->topic_count++;\n\n\t\t\t} else {\n\n\t\t\t\t// Old topic\n\t\t\t\t$this->unsaved_post->save();\n\n\t\t\t}\n\n\t\t\t// Topic stats\n\t\t\t$this->last_post_id = $this->unsaved_post->id;\n\t\t\t$this->last_poster = $this->unsaved_post->author_name;\n\t\t\t$this->last_posted = $this->unsaved_post->created;\n\t\t\t$this->post_count++;\n\t\t\t$this->save();\n\n\t\t\t// Area stats\n\t\t\t$area->last_topic_id = $this->id;\n\t\t\t$area->post_count++;\n\t\t\t$area->save();\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function ambassade_single_topic(&$event) {\n global $user;\n // IF IS AMBASSADE\n if($event[\"row\"][\"forum_id\"] == 29 && !$this->topic_ambassade_set_up) {\n $guild = new \\scfr\\main\\ambassade\\Guild($this->db);\n $first_reply = $event[\"topic_data\"][\"topic_first_post_id\"];\n $guild->__topic_init($event[\"row\"][\"topic_id\"]);\n\n //var_dump();\n\n $templates[\"GUILD_JSON\"] = json_encode(false);\n if($guild->is_registerd) {\n $templates[\"TOPIC_IS_REGISTERED_GUILD\"] = true;\n foreach($guild->RSI as $name => $val)\n $templates[\"GUILD_\".strtoupper($name)] = $val;\n\n $templates[\"GUILD_JSON\"] = json_encode($guild->RSI);\n }\n\n\n if($templates['GUILD_BACKGROUND']) $templates['CUSTOM_BACKGROUND'] = $templates['GUILD_BACKGROUND'];\n\n\n $templates[\"TOPIC_IS_GUILD\"] = true;\n $templates[\"GUILD_TOPIC_ID\"] = $event[\"topic_data\"][\"topic_id\"];\n\n $templates[\"S_REQUIRE_ANGULAR\"] = true;\n $this->template->assign_vars($templates);\n $this->topic_set_up = true;\n }\n }", "public function processEdit(ProcessHook $hook)\n {\n $data = $this->view->getRequest()->request->get('dizkus', null);\n $createTopic = isset($data['createTopic']) ? true : false;\n if ($createTopic) {\n $hookconfig = $this->getHookConfig($hook);\n $topic = $this->_em->getRepository('Zikula\\Module\\DizkusModule\\Entity\\TopicEntity')->getHookedTopic($hook);\n // use Meta class to create topic data\n $topicMetaInstance = $this->getClassInstance($hook);\n if (!isset($topic)) {\n // create the new topic\n $newManagedTopic = new TopicManager();\n // format data for topic creation\n $data = array(\n 'forum_id' => $hookconfig[$hook->getAreaId()]['forum'],\n 'title' => $topicMetaInstance->getTitle(),\n 'message' => $topicMetaInstance->getContent(),\n 'subscribe_topic' => false,\n 'attachSignature' => false);\n $newManagedTopic->prepare($data);\n // add hook data to topic\n $newManagedTopic->setHookData($hook);\n // store new topic\n $newManagedTopic->create();\n } else {\n // create new post\n $managedPost = new PostManager();\n $data = array(\n 'topic_id' => $topic->getTopic_id(),\n 'post_text' => $topicMetaInstance->getContent(),\n 'attachSignature' => false);\n // create the post in the existing topic\n $managedPost->create($data);\n // store the post\n $managedPost->persist();\n }\n // cannot notify hooks in non-controller\n // notify topic & forum subscribers\n// ModUtil::apiFunc(self::MODULENAME, 'notify', 'emailSubscribers', array(\n// 'post' => $newManagedTopic->getFirstPost()));\n $this->view->getRequest()->getSession()->getFlashBag()->add('status', $this->__('Dizkus: Hooked discussion topic created.', $this->domain));\n }\n\n return true;\n }", "function addTopic(&$topic) {\n\t\t$this->topics[] = $topic;\n\t}", "function track_new_or_updated_content( $post_id, $post, $update ) {\n\t// Bail on auto-save.\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\treturn;\n\t}\n\n\tif ( $update ) {\n\t\t$action = 'update';\n\t} else {\n\t\t$action = 'create';\n\t}\n\n\ttrack( [\n\t\t'event' => 'Content',\n\t\t'properties' => [\n\t\t\t'content_type' => $post->post_type,\n\t\t\t'content_action' => $action,\n\t\t],\n\t] );\n}", "function target_add_topic_subscription($sub)\n{\n\tif ($sub['user_id'] == 1 && isset($GLOBALS['hack_id'])) {\n\t\t$sub['user_id'] = $GLOBALS['hack_id'];\n\t}\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'thread_notify (user_id, thread_id) VALUES('. (int)$sub['user_id'] .', '. (int)$sub['topic_id'] .')');\n}", "public function handle(PostWasCreated $event)\n {\n $event->post->thread->markAsUnread();\n }", "public function register(Topic $topic);", "function MaintainRemoveOldPosts()\n{\n\t// Actually do what we're told!\n\tloadSource('RemoveTopic');\n\tRemoveOldTopics2();\n}", "public function onPush(Topic $topic, WampRequest $request, $data, $provider)\n {\n }", "public function setTopic($topic);", "public function subscribe()\r\n {\r\n /* Fire our meta box setup function on the post editor screen. */\r\n add_action('load-post.php', array(\r\n $this,\r\n 'setup'\r\n ));\r\n add_action('load-post-new.php', array(\r\n $this,\r\n 'setup'\r\n ));\r\n }", "public function created(Post $post)\n {\n //\n }", "public function declareTopic(string $topic): void;", "protected function run()\n {\n $pid = $this->request->get('id');\n $this->post = Post::with('author', 'topic')->findOrFail($pid);\n\n $this->onErrorRedirectTo(new Request('post_edit', ['id' => $this->post->id]));\n\n $creator = User::current();\n $this->post->fill([\n 'message'\t=> $this->request->get('req_message'),\n 'edited' => Carbon::now(),\n 'edited_by' => $creator->username,\n ]);\n\n $this->validator->validate($this->post);\n\n $this->post->save();\n $this->trigger('post.edited', [$this->post, $creator]);\n\n $this->redirectTo(\n new Request('viewpost', ['id' => $this->post->id]),\n trans('fluxbb::post.edit_redirect')\n );\n }", "public function sendEvent(string $topic, $message): void;", "public function notify_forum_new_topic( $topic_id ) {\n\t\t$this->notify_forum_topic_payload( 'create-topic', $topic_id );\n\t}", "public function publish();", "public function publish();", "public static function listen() {\n $projectId = \"sunday-1601040613995\";\n\n # Instantiates a client\n $pubsub = new PubSubClient([\n 'projectId' => $projectId\n ]);\n\n # The name for the new topic\n $topicName = 'gmail';\n\n # Creates the new topic\n $topic = $pubsub->createTopic($topicName);\n\n echo 'Topic ' . $topic->name() . ' created.';\n }", "public function publish(Post $post){\n $this->posts()->save($post);\n }", "public function updateTopicModifiedDate()\n {\n $this->setAttribute( 'modified', time() );\n $this->store();\n }", "public function created($model)\n {\n $model->forum->update([\n 'latest_post_id' => $model->id,\n ]);\n }", "function create_CPTs ()\n\t{\n\t\t\n\t\t\n\t\t$naming = getTopicNaming();\t\t\n\t\t$singular = $naming[0];\n\t\t$plural = pluralize($singular);\n\t\n\t\t//Topics\n\t\t$labels = array(\n\t\t\t'name' => $plural,\n\t\t\t'singular_name' => $singular,\n\t\t\t'menu_name' => $plural,\n\t\t\t'name_admin_bar' => $plural,\n\t\t\t'add_new' => 'Add New '.$singular,\n\t\t\t'add_new_item' => 'Add New '.$singular,\n\t\t\t'new_item' => 'New '.$singular,\n\t\t\t'edit_item' => 'Edit '.$singular,\n\t\t\t'view_item' => 'View '.$plural,\n\t\t\t'all_items' => 'All '.$plural,\n\t\t\t'search_items' => 'Search '.$plural,\n\t\t\t'parent_item_colon' => '',\n\t\t\t'not_found' => 'No '.$plural.' found.',\n\t\t\t'not_found_in_trash' => 'No '.$plural.' found in Trash.'\n\t\t);\n\t\n\t\t$args = array(\n\t\t\t'menu_icon' => 'dashicons-portfolio',\t\t\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_nav_menus'\t => false,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array( 'slug' => 'topics' ),\n\t\t\t'capability_type' => 'post',\n\t\t\t'has_archive' => true,\n\t\t\t'hierarchical' => true,\n\t\t\t'menu_position' => 21,\n\t\t\t'supports' => array( 'title', 'editor', 'revisions', 'thumbnail' )\n\t\t\t\n\t\t);\n\t\t\n\t\t\n\t\t\n\t\tregister_post_type( 'imperial_topic', $args );\n\t\t//remove_post_type_support('term-session', 'editor');\t\n\t\t\n\t}", "function check_and_publish_future_post($post)\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 testChannelsSetTopic()\n {\n }", "function save_post()\n\t{\n\t\t$time = $this->ipsclass->get_date( time(), 'LONG' );\n\t\t\t\t\n\t\t//-----------------------------------------\n\t\t// Reset some data\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->post['ip_address'] = $this->orig_post['ip_address'];\n\t\t$this->post['topic_id'] = $this->orig_post['topic_id'];\n\t\t$this->post['author_id'] = $this->orig_post['author_id'];\n\t\t$this->post['post_date'] = $this->orig_post['post_date'];\n\t\t$this->post['author_name'] = $this->orig_post['author_name'];\n\t\t$this->post['queued'] = $this->orig_post['queued'];\n\t\t$this->post['edit_time'] = time();\n\t\t$this->post['edit_name'] = $this->ipsclass->member['members_display_name'];\n\t\t\n\t\t//-----------------------------------------\n\t\t// If the post icon has changed, update the topic post icon\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->orig_post['new_topic'] == 1 )\n\t\t{\n\t\t\tif ($this->post['icon_id'] != $this->orig_post['icon_id'])\n\t\t\t{\n\t\t\t\t$this->ipsclass->DB->do_update( 'topics', array( 'icon_id' => $this->post['icon_id'] ), 'tid='.$this->topic['tid'] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Update open and close times\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->orig_post['new_topic'] == 1 )\n\t\t{\n\t\t\t$times = array();\n\t\t\t\n\t\t\tif ( $this->can_set_open_time AND $this->times['open'] )\n\t\t\t{\n\t\t\t\t$times['topic_open_time'] = intval( $this->times['open'] );\n\t\t\t\t\n\t\t\t\tif( $this->topic['topic_open_time'] AND $this->times['open'] )\n\t\t\t\t{\n\t\t\t\t\t$times['state'] = \"closed\";\n\t\t\t\t\t\n\t\t\t\t\tif( time() > $this->topic['topic_open_time'] )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( time() < $this->topic['topic_close_time'] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$times['state'] = \"open\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( ! $this->times['open'] AND $this->topic['topic_open_time'] )\n\t\t\t\t{\n\t\t\t\t\tif ( $this->topic['state'] == 'closed' )\n\t\t\t\t\t{\n\t\t\t\t\t\t$times['state'] = 'open';\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif ( $this->can_set_close_time AND $this->times['close'] )\n\t\t\t{\n\t\t\t\t$times['topic_close_time'] = intval( $this->times['close'] );\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Was a close time, but not now?\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif ( ! $this->times['close'] AND $this->topic['topic_close_time'] )\n\t\t\t\t{\n\t\t\t\t\tif ( $this->topic['state'] == 'closed' )\n\t\t\t\t\t{\n\t\t\t\t\t\t$times['state'] = 'open';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( count( $times ) )\n\t\t\t{\n\t\t\t\t$this->ipsclass->DB->do_update( 'topics', $times, \"tid=\".$this->topic['tid'] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Update poll\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->can_add_poll )\n\t\t{\n\t\t\tif ( is_array( $this->poll_questions ) AND count( $this->poll_questions ) )\n\t\t\t{\n\t\t\t\t$poll_only = 0;\n\t\t\t\t\n\t\t\t\tif ( $this->ipsclass->vars['ipb_poll_only'] AND $this->ipsclass->input['poll_only'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$poll_only = 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $this->topic['poll_state'] )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->DB->do_update( 'polls', array( 'votes' => intval($this->poll_total_votes),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'choices' => addslashes(serialize( $this->poll_questions )),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'poll_question' => $this->ipsclass->input['poll_question'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'poll_only'\t\t=> $poll_only,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ), 'tid='.$this->topic['tid'] );\n\t\t\t\t\t\t\t\n\t\t\t\t\tif( $this->poll_data['choices'] != serialize( $this->poll_questions ) OR $this->poll_data['votes'] != intval($this->poll_total_votes) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ipsclass->DB->do_insert( 'moderator_logs', array (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'forum_id' => $this->forum['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'topic_id' => $this->topic['tid'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'post_id' => $this->orig_post['pid'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'member_id' => $this->ipsclass->member['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'member_name' => $this->ipsclass->member['members_display_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'ip_address' => $this->ip_address,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'http_referer'=> $this->ipsclass->my_getenv('HTTP_REFERER'),\n\t\t\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\t\t\t\t\t 'topic_title' => $this->topic['title'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'action' => \"Edited poll\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'query_string'=> $this->ipsclass->my_getenv('QUERY_STRING'),\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}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->DB->do_insert( 'polls', \n\t\t\t\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'tid' => $this->topic['tid'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'forum_id' => $this->forum['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'start_date' => time(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'choices' => addslashes(serialize( $this->poll_questions )),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'starter_id' => $this->ipsclass->member['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'votes' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'poll_question' => $this->ipsclass->input['poll_question'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'poll_only'\t => $poll_only,\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\t\n\t\t\t\t\t$this->ipsclass->DB->do_insert( 'moderator_logs', array (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'forum_id' => $this->forum['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'topic_id' => $this->topic['tid'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'post_id' => $this->orig_post['pid'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'member_id' => $this->ipsclass->member['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'member_name' => $this->ipsclass->member['members_display_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'ip_address' => $this->ip_address,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'http_referer'=> $this->ipsclass->my_getenv('HTTP_REFERER'),\n\t\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\t\t\t\t 'topic_title' => $this->topic['title'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'action' => \"Added a poll to the topic titled '{$this->ipsclass->input['poll_question']}'\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'query_string'=> $this->ipsclass->my_getenv('QUERY_STRING'),\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\n\t\t\t\t\t$this->ipsclass->DB->do_update( 'topics', array( 'poll_state' => 1, 'last_vote' => 0, 'total_votes' => 0 ), 'tid='.$this->topic['tid'] );\t\t\t\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//-----------------------------------------\n\t\t\t\t// Remove the poll\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'polls' , 'where' => \"tid=\".$this->topic['tid'] ) );\n\t\t\t\t$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'voters', 'where' => \"tid=\".$this->topic['tid'] ) );\n\t\t\t\t$this->ipsclass->DB->do_update( 'topics', array( 'poll_state' => 0, 'last_vote' => 0, 'total_votes' => 0 ), 'tid='.$this->topic['tid'] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Update topic title?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->edit_title == 1 )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Update topic title\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$this->ipsclass->input['TopicTitle'] = $this->pf_clean_topic_title( $this->ipsclass->input['TopicTitle'] );\n\t\t\t$this->ipsclass->input['TopicTitle'] = trim( $this->parser->bad_words( $this->ipsclass->input['TopicTitle'] ) );\n\t\t\t\n\t\t\t$this->ipsclass->input['TopicDesc'] = trim( $this->parser->bad_words( $this->ipsclass->input['TopicDesc'] ) );\n\t\t\t$this->ipsclass->input['TopicDesc'] = $this->ipsclass->txt_mbsubstr( $this->ipsclass->input['TopicDesc'], 0, 70 );\n\t\t\t\n\t\t\tif ( $this->ipsclass->input['TopicTitle'] != \"\" )\n\t\t\t{\n\t\t\t\tif ( ($this->ipsclass->input['TopicTitle'] != $this->topic['title']) or ($this->ipsclass->input['TopicDesc'] != $this->topic['description']) )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->DB->do_update( 'topics', array( 'title' => $this->ipsclass->input['TopicTitle'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'description' => $this->ipsclass->input['TopicDesc']\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ) , \"tid=\".$this->topic['tid'] );\n\t\t\t\t\t\n\t\t\t\t\tif ($this->topic['tid'] == $this->forum['last_id'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ipsclass->DB->do_update( 'forums', array( 'last_title' => $this->ipsclass->input['TopicTitle'] ), 'id='.$this->forum['id'] );\n\t\t\t\t\t\t$this->ipsclass->update_forum_cache();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ( ($this->moderator['edit_topic'] == 1) OR ( $this->ipsclass->member['g_is_supmod'] == 1 ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ipsclass->DB->do_insert( 'moderator_logs', array (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'forum_id' => $this->forum['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'topic_id' => $this->topic['tid'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'post_id' => $this->orig_post['pid'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'member_id' => $this->ipsclass->member['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'member_name' => $this->ipsclass->member['members_display_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'ip_address' => $this->ip_address,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'http_referer'=> $this->ipsclass->my_getenv('HTTP_REFERER'),\n\t\t\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\t\t\t\t\t 'topic_title' => $this->topic['title'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'action' => \"Edited topic title or description '{$this->topic['title']}' to '{$this->ipsclass->input['TopicTitle']}' via post form\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'query_string'=> $this->ipsclass->my_getenv('QUERY_STRING'),\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}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Reason for edit?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->moderator['edit_post'] OR $this->ipsclass->member['g_is_supmod'] )\n\t\t{\n\t\t\t$this->post['post_edit_reason'] = trim( $this->ipsclass->input['post_edit_reason'] );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Update the database (ib_forum_post)\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->post['append_edit'] = 1;\n\t\t\n\t\tif ( $this->ipsclass->member['g_append_edit'] )\n\t\t{\n\t\t\tif ( $this->ipsclass->input['add_edit'] != 1 )\n\t\t\t{\n\t\t\t\t$this->post['append_edit'] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->force_data_type = array( 'post_edit_reason' => 'string' );\n\t\t\n\t\t$this->ipsclass->DB->do_update( 'posts', $this->post, 'pid='.$this->orig_post['pid'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Make attachments \"permanent\"\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->pf_make_attachments_permanent( $this->post_key, $this->orig_post['pid'], 'post', array( 'topic_id' => $this->topic['tid'] ) );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Make sure paperclip symbol is OK\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->pf_recount_topic_attachments($this->topic['tid']);\n\t\t\n\t\t//-----------------------------------------\n\t\t// Not XML? Redirect them back to the topic\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->ipsclass->input['act'] == 'xmlout' )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['post_edited'], \"showtopic={$this->topic['tid']}&st={$this->ipsclass->input['st']}#entry{$this->orig_post['pid']}\");\n\t\t}\n\t}", "function addTopic()\n{\n\tglobal $xoopsDB, $xoopsModule, $xoopsModuleConfig;\n $topicpid = isset($_POST['topic_pid']) ? intval($_POST['topic_pid']) : 0;\n $xt = new NewsTopic();\n if (!$xt->topicExists($topicpid, $_POST['topic_title'])) {\n $xt->setTopicPid($topicpid);\n if (empty($_POST['topic_title']) || xoops_trim($_POST['topic_title'])=='') {\n redirect_header( \"index.php?op=topicsmanager\", 2, _AM_ERRORTOPICNAME );\n }\n $xt->setTopicTitle($_POST['topic_title']);\n //$xt->Settopic_rssurl($_POST['topic_rssfeed']);\n $xt->setTopic_color($_POST['topic_color']);\n if (isset($_POST['topic_imgurl'] ) && $_POST['topic_imgurl'] != \"\") {\n $xt->setTopicImgurl($_POST['topic_imgurl'] );\n }\n\t\t$xt->setMenu(intval($_POST['submenu']));\n\t\t$xt->setTopicFrontpage(intval($_POST['topic_frontpage']));\n\t\tif(isset($_POST['xoops_upload_file'])) {\n\t\t\t$fldname = $_FILES[$_POST['xoops_upload_file'][0]];\n\t\t\t$fldname = (get_magic_quotes_gpc()) ? stripslashes($fldname['name']) : $fldname['name'];\n\t\t\tif(xoops_trim($fldname!='')) {\n\t\t\t\t$sfiles = new sFiles();\n\t\t\t\t$dstpath = XOOPS_ROOT_PATH . \"/modules/\" . $xoopsModule -> dirname() . '/images/topics';\n\t\t\t\t$destname=$sfiles->createUploadName($dstpath ,$fldname, true);\n\t\t\t\t$permittedtypes=array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png');\n\t\t\t\t$uploader = new XoopsMediaUploader($dstpath, $permittedtypes, $xoopsModuleConfig['maxuploadsize']);\n\t\t\t\t$uploader->setTargetFileName($destname);\n\t\t\t\tif ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {\n\t\t\t\t\tif ($uploader->upload()) {\n\t\t\t\t\t\t$xt->setTopicImgurl(basename($destname));\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo _AM_UPLOAD_ERROR . ' ' . $uploader->getErrors();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo $uploader->getErrors();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$xt->setTopicDescription($_POST['topic_description']);\n\t\t$xt->store();\n\t\tupdateCache();\n\n $notification_handler = & xoops_gethandler('notification');\n $tags = array();\n $tags['TOPIC_NAME'] = $_POST['topic_title'];\n $notification_handler->triggerEvent( 'global', 0, 'new_category', $tags);\n redirect_header('index.php?op=topicsmanager', 1, _AM_DBUPDATED);\n } else {\n redirect_header('index.php?op=topicsmanager', 2, _AM_ADD_TOPIC_ERROR);\n }\n exit();\n}", "public function __construct(Topic $topic)\n {\n $this->topic = $topic;\n }", "function TopicCRUD()\n {\n parent::__construct();\n }", "public function createTopic($data){\n DB::beginTransaction();\n try {\n $topic = $this->create($data);\n $topic->category()->increment('topic_count');\n $topic->user()->increment('topic_count');\n if($data['tags']){\n $topic->tags()->sync($data['tags']);\n $topic->tags()->increment('topic_count');\n }\n }catch (\\Exception $e){\n DB::rollback();\n throw $e;\n }\n DB::commit();\n return $topic->id;\n }", "function insertpost(){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif(isset($_POST['sub'])){\r\n\t\t\t\t\t\t\t\t\t\tglobal $con;\r\n\t\t\t\t\t\t\t\t\t\tglobal $user_id;\r\n\t\t\t\t\t\t\t\t\t\t$title=$_POST['title'];\r\n\t\t\t\t\t\t\t\t\t\t$content=$_POST['content'];\r\n\t\t\t\t\t\t\t\t\t\t$topic=$_POST['topic'];\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$insert=\"insert into posts(user_id,topic_id,post_title,post_content,post_date)values('$user_id','$topic','$title','$content',NOW())\";\r\n\t\t\t\t\t\t\t\t\t\t$run=mysqli_query($con,$insert);\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif($run){\r\n\t\t\t\t\t\t\t\t\t\t\t$update=\"update users set posts='yes' where user_id='$user_id'\";\r\n\t\t\t\t\t\t\t\t\t\t\t$run_update=mysqli_query($con,$update);\r\n\t\t\t\t\t\t\t\t\t\t\techo\"<h2>Posted to Timeline,amazing!!</h2>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}", "public function new_topic( $topic_id ) {\n\n\t\t\tglobal $bp;\n\n\t\t\t// Check if user should be excluded\n\t\t\tif ( $this->core->exclude_user( $bp->loggedin_user->id ) ) return;\n\n\t\t\t// Limit\n\t\t\tif ( $this->over_hook_limit( 'new_topic', 'new_group_forum_topic' ) ) return;\n\n\t\t\t// Make sure this is unique event\n\t\t\tif ( $this->core->has_entry( 'new_group_forum_topic', $topic_id, $bp->loggedin_user->id ) ) return;\n\n\t\t\t// Execute\n\t\t\t$this->core->add_creds(\n\t\t\t\t'new_group_forum_topic',\n\t\t\t\t$bp->loggedin_user->id,\n\t\t\t\t$this->prefs['new_topic']['creds'],\n\t\t\t\t$this->prefs['new_topic']['log'],\n\t\t\t\t$topic_id,\n\t\t\t\t'bp_ftopic',\n\t\t\t\t$this->mycred_type\n\t\t\t);\n\n\t\t}", "public function onSpeakersAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "function _update_blog_date_on_post_publish($new_status, $old_status, $post)\n {\n }", "function wp_after_insert_post($post, $update, $post_before)\n {\n }", "public function handleFutureToPublish($post) {\n if (\"publish\" == $post->post_status) {\n $this->indexPost($post->ID);\n }\n }", "public function attachPostToBlogAtTheEnd() {}", "function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password)\n {\n }", "protected function firePostCreateHooks()\n {\n foreach ($this->postCreate as $callback) {\n call_user_func($callback);\n }\n }", "public function create_post() {\n\t\t$data['uid'] = $this->input->get('uid');\n\t\t$data['to'] = $this->input->get('to');\n\t\t$data['text'] = $this->input->get('text');\n\t\t$data['ts'] = now();\n\n\t\t$this->Messages_model->create($data);\n\t}", "public function future_to_published($post) {\n\t\t\n\t\tdefine(\"WPU_JUST_POSTED_{$postID}\", TRUE);\n\t\t$this->handle_new_post($post->ID, $post, true);\n\t}", "public function getTopic() {}", "public function store(PostsRequest $request)\n {\n $post = new Post;\n $post->title = $request->title;\n $post->body = $request->body;\n $post->image = UploadImages('posts', $request->file('image'));\n $post->slug = $request->slug;\n $post->later_publish = $request->later_publish;\n if ($request->later_publish == 'yes') {\n $post->publish_date = $request->publish_date;\n $post->publish_time = $request->publish_time;\n $post->status = 'pending';\n } else {\n if (userCan('Change Posts Status')) {\n $post->status = $request->status;\n } else {\n $post->status = 'pending';\n }\n }\n $post->user_id = auth()->user()->id;\n $post->save();\n \n foreach ($request->tags as $t) {\n if ($tag = Tag::find($t)) {\n $post_tag = new PostTags;\n $post_tag->post_id = $post->id;\n $post_tag->tag_id = $t;\n $post_tag->save();\n\n event(new SendNotificationsForSubscripers($tag, $post->slug));\n }\n }\n\n // if ($post->status == 'approved') {\n // $ids = UserSubscribedTags::whereIn('tag_id', $request->tags)->get()->pluck('user_id')->toArray();\n //\n // foreach (User::findMany($ids) as $user) {\n // Notification::send($user, new NewPostAdded($post));\n // }\n // }\n\n\n session()->flash('success', trans('main.added-message'));\n return redirect()->route('posts.index');\n }", "public function handle(Topic $topic)\n {\n $this->info(\"开始执行加链接任务...\");\n\n $topic->autoLink();\n\n $this->info(\"完成加链接任务\");\n }", "public function createAnswer()\n {\n $this->is_answer = true;\n $this->topic->is_answered = true;\n $post = $this;\n\n Db::transaction(function() use ($post)\n {\n $post->topic->save();\n $post->save();\n });\n }", "function phorum_mod_topic_poll_posting_custom_action($message)\n{\n global $PHORUM;\n\n // Module installation:\n // Load the module installation code if this was not yet done.\n // The installation code will take care of automatically adding\n // the custom profile field that is needed for this module.\n if (! isset($PHORUM[\"mod_topic_poll_installed\"]) ||\n ! $PHORUM[\"mod_topic_poll_installed\"]) {\n include(\"./mods/topic_poll/install.php\");\n }\n\n // Keep track if we want to display the poll editor screen.\n $show_poll_editor = false;\n\n // Polls can only be in thread starting messages.\n if ($message[\"parent_id\"]) return $message;\n\n // ADD A POLL\n if (! isset($message[\"meta\"][\"mod_topic_poll\"]) &&\n isset($_POST[\"topic_poll:add\"]) &&\n check_topic_poll_permission(TOPIC_POLL_ADD, $message)) {\n\n // Initialize a new poll.\n $message[\"meta\"][\"mod_topic_poll\"] = array (\n \"question\" => \"\",\n \"answers\" => array( 0 => \"\", 1 => \"\" ),\n \"votes\" => array(),\n \"total_votes\" => 0,\n \"votingtime\" => 0, // in days, 0 for unlimited\n \"permission\" => \"user\",\n \"active\" => 1,\n \"cache_id\" => 0,\n );\n\n $PHORUM[\"DATA\"][\"OKMSG\"] =\n $PHORUM[\"DATA\"][\"LANG\"][\"mod_topic_poll\"][\"PollAdded\"];\n\n $show_poll_editor = 1;\n }\n\n // ADD ANSWER FIELD\n if (isset($message[\"meta\"][\"mod_topic_poll\"]) &&\n isset($_POST[\"topic_poll:add_answer\"]) &&\n check_topic_poll_permission(TOPIC_POLL_EDIT, $message)) {\n\n $message[\"meta\"][\"mod_topic_poll\"][\"answers\"][] = \"\";\n\n $show_poll_editor = 2;\n }\n\n // DELETE ANSWER FIELD\n // Make sure that at least two answers are kept for voting.\n if (isset($message[\"meta\"][\"mod_topic_poll\"]) &&\n check_topic_poll_permission(TOPIC_POLL_EDIT, $message)) {\n foreach ($message[\"meta\"][\"mod_topic_poll\"][\"answers\"] as $id => $answer) {\n if (isset($_POST[\"topic_poll:delete_answer:$id\"]) &&\n\n count($message[\"meta\"][\"mod_topic_poll\"][\"answers\"]) > 2) {\n unset($message[\"meta\"][\"mod_topic_poll\"][\"answers\"][$id]);\n unset($message[\"meta\"][\"mod_topic_poll\"][\"votes\"][$id]);\n $show_poll_editor = 3;\n }\n }\n }\n\n // DELETE THE POLL\n if (isset($message[\"meta\"][\"mod_topic_poll\"]) &&\n isset($_POST[\"topic_poll:delete\"]) &&\n check_topic_poll_permission(TOPIC_POLL_DELETE, $message)) {\n\n unset($message[\"meta\"][\"mod_topic_poll\"]);\n\n $PHORUM[\"DATA\"][\"OKMSG\"] =\n $PHORUM[\"DATA\"][\"LANG\"][\"mod_topic_poll\"][\"PollDeleted\"];\n }\n\n // CHANGE POLL STATUS\n if (isset($message[\"meta\"][\"mod_topic_poll\"]) &&\n (isset($_POST[\"topic_poll:activate\"]) ||\n isset($_POST[\"topic_poll:deactivate\"])) &&\n check_topic_poll_permission(TOPIC_POLL_SETSTATUS, $message)) {\n\n if (isset($_POST[\"topic_poll:activate\"])) {\n $message[\"meta\"][\"mod_topic_poll\"][\"active\"] = 1;\n } else {\n $message[\"meta\"][\"mod_topic_poll\"][\"active\"] = 0;\n }\n }\n\n // CONFIGURATION CHANGE\n if (isset($message[\"meta\"][\"mod_topic_poll\"]) &&\n check_topic_poll_permission(TOPIC_POLL_EDIT, $message)) {\n\n // Set the question.\n if (isset($_POST[\"topic_poll:question\"])) {\n $message[\"meta\"][\"mod_topic_poll\"][\"question\"] =\n trim($_POST[\"topic_poll:question\"]);\n }\n\n // Set the answers.\n foreach ($message[\"meta\"][\"mod_topic_poll\"][\"answers\"] as $id => $answer) {\n if (isset($_POST[\"topic_poll:answer:$id\"])) {\n $message[\"meta\"][\"mod_topic_poll\"][\"answers\"][$id] =\n trim($_POST[\"topic_poll:answer:$id\"]);\n }\n }\n\n // Set the votingtime.\n if (isset($_POST[\"topic_poll:votingtime\"])) {\n $message[\"meta\"][\"mod_topic_poll\"][\"votingtime\"] =\n abs((int) $_POST[\"topic_poll:votingtime\"]);\n }\n\n // Set the permission.\n if (isset($_POST[\"topic_poll:permission\"])) {\n $p = $_POST[\"topic_poll:permission\"];\n if ($p == 'user' || $p == 'anonymous')\n $message[\"meta\"][\"mod_topic_poll\"][\"permission\"] = $p;\n }\n\n // Set the no vote no read option.\n if (isset($_POST[\"topic_poll:novotenoread\"])) {\n $message[\"meta\"][\"mod_topic_poll\"][\"novotenoread\"] =\n empty($_POST[\"topic_poll:novotenoread\"]) ? 0 : 1;\n }\n\n // Set the poll position.\n if (isset($_POST[\"topic_poll:position\"])) {\n $p = $_POST[\"topic_poll:position\"];\n if ($p == 'before' || $p == 'after')\n $message[\"meta\"][\"mod_topic_poll\"][\"position\"] = $p;\n }\n }\n\n // Request to edit the poll. This is only used to switch to the\n // poll editor screen.\n if (isset($_POST[\"topic_poll:edit\"]) &&\n check_topic_poll_permission(TOPIC_POLL_EDIT, $message)) {\n $show_poll_editor = 4;\n }\n\n // Request to go back to the posting editor. We check the\n // integrity of the posting data here, so we can stay at\n // the poll editor when there are problems with it.\n if (isset($_POST[\"topic_poll:back_to_message\"]) &&\n check_topic_poll_permission(TOPIC_POLL_EDIT, $message)) {\n list ($message, $error) =\n phorum_mod_topic_poll_check_post(array($message, NULL));\n if ($error == NULL) {\n $PHORUM[\"DATA\"][\"OKMSG\"] =\n $PHORUM[\"DATA\"][\"LANG\"][\"mod_topic_poll\"][\"BackToMessageHelp\"];\n } else {\n $PHORUM[\"DATA\"][\"ERROR\"] = $error;\n $show_poll_editor = 5;\n }\n }\n\n if ($show_poll_editor)\n {\n // The changed meta data must be stored in $_POST, so it will\n // be put in the form. Also sign it, to make Phorum accept it.\n $meta = base64_encode(serialize($message[\"meta\"]));\n $_POST[\"meta\"] = $meta;\n $_POST[\"meta:signature\"] = phorum_generate_data_signature($meta);\n\n // Setup data for the templates.\n $poll = $message[\"meta\"][\"mod_topic_poll\"];\n phorum_mod_topic_poll_setup_templatedata($poll, TRUE);\n\n // Create post data for remembering the editor state.\n $post_data = \"\";\n foreach ($_POST as $key => $val) {\n if ($key == \"add_topic_poll\") continue;\n if (substr($key, 0, 11) == \"topic_poll:\") continue;\n $post_data .= '<input type=\"hidden\" ' .\n 'name=\"' . htmlspecialchars($key) . '\" ' .\n 'value=\"' . htmlspecialchars($val) . \"\\\" />\\n\";\n }\n $PHORUM[\"DATA\"][\"POST_VARS\"] = $post_data;\n\n $PHORUM[\"DATA\"][\"POLL\"][\"CAN_DELETE\"] =\n check_topic_poll_permission(TOPIC_POLL_DELETE, $message);\n\n $GLOBALS[\"PHORUM\"][\"posting_template\"] = 'topic_poll::editor';\n }\n\n return $message;\n}", "public function testTopic() {\n\n $this->installEntitySchema('ebms_board');\n $this->installEntitySchema('taxonomy_term');\n $this->installEntitySchema('ebms_topic');\n $this->installEntitySchema('user');\n $this->installSchema('system', ['sequences']);\n $entity_type_manager = $this->container->get('entity_type.manager');\n $topics = $entity_type_manager->getStorage('ebms_topic')->loadMultiple();\n $this->assertEmpty($topics);\n $name = 'Toenail Cancer';\n $board = Board::create(['name' => 'Test Board']);\n $board->save();\n $group_id = 135;\n $group_name = 'Lower Extremities';\n $topic_group = Term::create([\n 'tid' => $group_id,\n 'vid' => 'topic_groups',\n 'name' => $group_name,\n ]);\n $topic_group->save();\n $nci_reviewer = $this->createUser();\n $topic = Topic::create([\n 'name' => $name,\n 'board' => $board->id(),\n 'nci_reviewer' => $nci_reviewer,\n 'topic_group' => $topic_group->id(),\n 'active' => TRUE,\n ]);\n $topic->save();\n $topics = $entity_type_manager->getStorage('ebms_topic')->loadMultiple();\n $this->assertNotEmpty($topics);\n $this->assertCount(1, $topics);\n foreach ($topics as $topic) {\n $this->assertEquals($topic->getName(), $name);\n $this->assertEquals(TRUE, $topic->get('active')->value);\n $this->assertEquals($board->id(), $topic->get('board')->target_id);\n $this->assertEquals($nci_reviewer->id(), $topic->get('nci_reviewer')->target_id);\n $this->assertEquals($group_id, $topic->get('topic_group')->target_id);\n }\n }", "public function rss_topic()\n\t{\n\t\tif (!$this->id)\n\t\t{\n\t\t\tDisplay::message('not_allowed');\n\t\t}\n\n\t\t// Liste des messages\n\t\t$sql = 'SELECT p.p_id, p.p_text, p.p_time, p.u_id, p.p_nickname, p.p_map, t.t_title, t.t_description, t.f_id, t.t_id, u.u_activate_email, u.u_email, u.u_auth\n\t\t\t\tFROM ' . SQL_PREFIX . 'posts p\n\t\t\t\tINNER JOIN ' . SQL_PREFIX . 'topics t\n\t\t\t\t\tON p.t_id = t.t_id\n\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'users u\n\t\t\t\t\tON u.u_id = p.u_id\n\t\t\t\tWHERE t.t_id = ' . $this->id . '\n\t\t\t\t\tAND p.p_approve = 0\n\t\t\t\tORDER BY p.p_time DESC';\n\t\t$result = Fsb::$db->query($sql);\n\t\tif ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\tif (!Fsb::$session->is_authorized($row['f_id'], 'ga_read') || !Fsb::$session->is_authorized($row['f_id'], 'ga_view') || !Fsb::$session->is_authorized($row['f_id'], 'ga_view_topics'))\n\t\t\t{\n\t\t\t\tDisplay::message('not_allowed');\n\t\t\t}\n\n\t\t\t$parser = new Parser();\n\t\t\t$parser->parse_html = (Fsb::$cfg->get('activate_html') && $row['u_auth'] >= MODOSUP) ? true : false;\n\n\t\t\t$this->rss->open(\n\t\t\t\tParser::title($row['t_title']),\n\t\t\t\thtmlspecialchars(($row['t_description']) ? $row['t_description'] : $parser->mapped_message($row['p_text'], $row['p_map'])),\n\t\t\t\tFsb::$session->data['u_language'],\n\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=rss&amp;mode=topic&amp;id=' . $this->id),\n\t\t\t\t$row['p_time']\n\t\t\t);\n\n\t\t\tdo\n\t\t\t{\n\t\t\t\t// Informations passees au parseur de message\n\t\t\t\t$parser_info = array(\n\t\t\t\t\t'u_id' =>\t\t\t$row['u_id'],\n\t\t\t\t\t'p_nickname' =>\t\t$row['p_nickname'],\n\t\t\t\t\t'u_auth' =>\t\t\t$row['u_auth'],\n\t\t\t\t\t'f_id' =>\t\t\t$row['f_id'],\n\t\t\t\t\t't_id' =>\t\t\t$row['t_id'],\n\t\t\t\t);\n\t\t\t\t$parser->parse_html = (Fsb::$cfg->get('activate_html') && $row['u_auth'] >= MODOSUP) ? true : false;\n\n\t\t\t\t$this->rss->add_entry(\n\t\t\t\t\tParser::title($row['t_title']),\n\t\t\t\t\thtmlspecialchars($parser->mapped_message($row['p_text'], $row['p_map'], $parser_info)),\n\t\t\t\t\t(($row['u_activate_email'] & 2) ? 'mailto:' . $row['u_email'] : Fsb::$cfg->get('forum_mail')) . ' ' . htmlspecialchars($row['p_nickname']),\n\t\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=topic&p_id=' . $row['p_id'] . '#p' . $row['p_id']),\n\t\t\t\t\t$row['p_time']\n\t\t\t\t);\n\t\t\t}\n\t\t\twhile ($row = Fsb::$db->row($result));\n\t\t}\n\t\t// Aucun message, on pioche donc directement les informations dans le sujet\n\t\telse \n\t\t{\n\t\t\t$sql = 'SELECT t_id, t_title, t_description, t_time\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'topics\n\t\t\t\t\tWHERE t_id = ' . $this->id;\n\t\t\t$row = Fsb::$db->request($sql);\n\t\t\t$this->rss->open(\n\t\t\t\tParser::title($row['t_title']),\n\t\t\t\thtmlspecialchars($row['t_description']),\n\t\t\t\tFsb::$session->data['u_language'],\n\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=rss&amp;mode=topic&amp;id=' . $this->id),\n\t\t\t\t$row['t_time']\n\t\t\t);\n\t\t}\n\t}", "public function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)\n\t{\n\t\tif ($mode == 'edit')\n\t\t{\n\t\t\t$this->sphinx->UpdateAttributes($this->indexes, array('forum_id', 'poster_id'), array((int) $post_id => array((int) $forum_id, (int) $poster_id)));\n\t\t}\n\t\telse if ($mode != 'post' && $post_id)\n\t\t{\n\t\t\t// Update topic_last_post_time for full topic\n\t\t\t$sql_array = array(\n\t\t\t\t'SELECT'\t=> 'p1.post_id',\n\t\t\t\t'FROM'\t\t=> array(\n\t\t\t\t\tPOSTS_TABLE\t=> 'p1',\n\t\t\t\t),\n\t\t\t\t'LEFT_JOIN'\t=> array(array(\n\t\t\t\t\t'FROM'\t=> array(\n\t\t\t\t\t\tPOSTS_TABLE\t=> 'p2'\n\t\t\t\t\t),\n\t\t\t\t\t'ON'\t=> 'p1.topic_id = p2.topic_id',\n\t\t\t\t)),\n\t\t\t\t'WHERE' => 'p2.post_id = ' . ((int) $post_id),\n\t\t\t);\n\n\t\t\t$sql = $this->db->sql_build_query('SELECT', $sql_array);\n\t\t\t$result = $this->db->sql_query($sql);\n\n\t\t\t$post_updates = array();\n\t\t\t$post_time = time();\n\t\t\twhile ($row = $this->db->sql_fetchrow($result))\n\t\t\t{\n\t\t\t\t$post_updates[(int) $row['post_id']] = array($post_time);\n\t\t\t}\n\t\t\t$this->db->sql_freeresult($result);\n\n\t\t\tif (sizeof($post_updates))\n\t\t\t{\n\t\t\t\t$this->sphinx->UpdateAttributes($this->indexes, array('topic_last_post_time'), $post_updates);\n\t\t\t}\n\t\t}\n\t}", "public function update()\n {\n \n foreach($this->feed->sources as $source){\n \n //Find the right source handler.\n switch($source->type->get()){\n \n case 'TWITTER_TIMELINE':\n $handler = new TwitterTimelineSourceHandler($source);\n break;\n \n case 'TWITTER_SEARCH':\n $handler = new TwitterSearchSourceHandler($source);\n break;\n \n }\n \n //Query for new messages.\n $messages = $handler->query();\n \n //Save those messages.\n mk('Logging')->log('Message board', 'New messages', $messages->size());\n foreach($messages as $message){\n $message\n ->save()\n ->save_webpages()\n ->save_images();\n }\n \n }\n \n }", "function publishLog() {\n\t\t$id = $this->current_log;\t\t\n\t\t$res = $this->query(\"SELECT event_id FROM $this->table_log WHERE id=$id\");\n\t\t$row = $res->fetch_assoc();\n\t\t$cal_id = explode(\",\",$row['event_id']);\n\t\t$calEvent = $this->calendar_instance->getEventDetails($row['event_id']);\n\t\t$topic = $calEvent['caption'];\n\t\t$year = $calEvent['year'];\n\t\t$slug = $calEvent['slug'];\n\t\t$url = $this->generateCoolURL(\"/$year/$slug\");\n\t\t$this->addToActivityLog(\"publiserte logg fra <a href=\\\"$url\\\">$topic</a>.\",false,\"major\");\n\t}", "public function incForumTopicCount()\n {\n $dataMap = $this->forumNode()->dataMap();\n $incTopic = (int) $dataMap['topic_count']->content();\n $incTopic++;\n $dataMap['topic_count']->fromString( $incTopic );\n $dataMap['topic_count']->store();\n }", "public function postEventadd();", "public function executeTopicNew(sfWebRequest $request)\n {\n\t\t$this->flagForumsId = '';\n\t\tif($request->hasParameter('flagForumsId'))\n\t\t\tif($request->getParameter('flagForumsId'))\n\t\t\t\t$this->flagForumsId = $request->getParameter('flagForumsId');\n\t\t\t\t\n $this->form = new ForumTopicsForm();\n }", "public function created(Thread $thread)\n {\n $thread->user->recordActivity('created a new thread:', $thread);\n }", "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'title', 'channel_id', 'link', 'start_time', 'end_time','hits', 'status'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Gou_Service_Notice::addNotice($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "function sendApprovalNotifications(&$topicData)\n{\n\t(new PostNotifications())->sendApprovalNotifications($topicData);\n}", "public function createAction()\n {\n if ($this->getRequest()->isPost())\t\t\t//avoids direct access without having an ID pass\n {\n $this->view->title = ' - Thema';\n\n $this->view->topicID = $_POST[\"topicID\"];\t\t//sends topicID to view\n $this->view->topicName = $_POST[\"topicName\"];\t//sends topicName to view\n }\n else\n {\n $this->_redirect('/');\t\t\t\t//goes to mainpage\n }\n }", "public function publish(Post $post)\n\t{\n\t\t$q = \"UPDATE in_posts \";\n\t\t$q .= \"SET publish_flag=1, read_length=:read_length, publish_time=Now() WHERE id=:post_id\";\n\t\t$vars = array(\n\t\t\t':read_length'=>$post->read_length,\n\t\t\t':post_id'=>$post->id\n\t\t);\n\t\t//$this->logger->logInfo($q);\n\t\t$ps = $this->execute($q, $vars);\n\t}", "public function run()\n {\n $cateTopic = [\n [\n 'title' => 'Conferences',\n 'thumbnail' => 'conferences.png',\n 'category_id' => 1,\n ],\n [\n 'title' => 'Electronics',\n 'thumbnail' => 'electronics.png',\n 'category_id' => 1,\n ],\n [\n 'title' => 'Pharmacy',\n 'thumbnail' => 'pharmacy.webp',\n 'category_id' => 1,\n ],\n [\n 'title' => 'Accounting',\n 'thumbnail' => 'accounting.png',\n 'category_id' => 1,\n ],\n [\n 'title' => 'Airlines',\n 'thumbnail' => 'airlines.png',\n 'category_id' => 1,\n ],\n [\n 'title' => 'Banking',\n 'thumbnail' => 'banking.png',\n 'category_id' => 1,\n ]\n ];\n\n foreach ($cateTopic as $item) {\n DB::table('topics')->insert($item);\n }\n }", "public function executeTopicCreate(sfWebRequest $request)\n {\n $this->forward404Unless($request->isMethod(sfRequest::POST));\n\n $this->form = new ForumTopicsForm();\n\n $flagForumsId = '';\n\t\t$flagForumsId = $request->getPostParameter('flagForumsId');\n\t\t$this->flagForumsId = $flagForumsId;\n $this->processTopicForm($request, $this->form, $flagForumsId);\n\n //$this->processTopicForm($request, $this->form);\n $this->setTemplate('topicNew');\n }", "public function _postInsert()\n\t{\n\t\t$this->notifyObservers(__FUNCTION__);\n\t}", "private function notify_forum_topic_payload( $activity, $topic_id ) {\n\t\tif ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! bbp_is_site_public() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! in_array( $activity, array( 'create-topic', 'remove-topic' ), true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'create-topic' === $activity && ! bbp_is_topic_published( $topic_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$url = bbp_get_topic_permalink( $topic_id );\n\t\t// Remove moderator flags.\n\t\t$url = remove_query_arg( array( 'view' ), $url );\n\n\t\t$args = array(\n\t\t\t'action' => 'wporg_handle_activity',\n\t\t\t'activity' => $activity,\n\t\t\t'source' => 'forum',\n\t\t\t'user' => get_user_by( 'id', bbp_get_topic_author_id( $topic_id ) )->user_login,\n\t\t\t'post_id' => '',\n\t\t\t'topic_id' => $topic_id,\n\t\t\t'forum_id' => bbp_get_topic_forum_id( $topic_id ),\n\t\t\t'title' => strip_tags( bbp_get_topic_title( $topic_id ) ),\n\t\t\t'url' => $url,\n\t\t\t'message' => bbp_get_topic_excerpt( $topic_id, 55 ),\n\t\t\t'site' => get_bloginfo( 'name' ),\n\t\t\t'site_url' => site_url(),\n\t\t);\n\n\t\tProfiles\\api( $args );\n\t}", "public function subscribe()\n {\n $payload = request()->validate([\n 'topics' => 'required|array',\n 'callback' => 'required|url',\n ]);\n\n $topics = array_map(function ($topic) {\n return $this->topics->findOrCreate($topic);\n }, $payload['topics']);\n\n abort_unless(! empty($topics), 404);\n\n $subscriber = $this->subscribers->create($topics, $payload);\n\n }", "public function load_topic_object()\n\t{\n\t\tif (!$this->post->topic->topic_id)\n\t\t{\n\t\t\t$this->post->topic->topic_id = $this->post->topic_id;\n\t\t\t$this->post->topic->load();\n\t\t}\n\t}", "public function run()\n {\n \\App\\Topic::create([\n 'title'=>'sport',\n 'description'=>'sports related questions like football,..',\n ]);\n \\App\\Topic::create([\n 'title'=>'politics',\n 'description'=>'',\n ]);\n \\App\\Topic::create([\n 'title'=>'entertainment',\n 'description'=>'entertainment stuff like music,books,movies',\n ]);\n \\App\\Topic::create([\n 'title'=>'tech',\n 'description'=>'technology issues',\n ]);\n \\App\\Topic::create([\n 'title'=>'business',\n 'description'=>'business and finance consulting',\n ]);\n\t\t\\App\\Topic::create([\n 'title'=>'math',\n 'description'=>'linear algebra,Geomtric,Probability theory',\n ]);\n\t\t\\App\\Topic::create([\n 'title'=>'IT',\n 'description'=>'all about Information Theory',\n ]);\n\t\t\\App\\Topic::create([\n 'title'=>'Health',\n 'description'=>'Health Care',\n ]);\n }", "protected function givenNewDocumentIsCreated()\n {\n }", "function parse_json_topics($topics, $isUpdate) {\n\t$failures = array();//contains nodes that could not be created because of missing parent.\n\t$keys = array_keys($topics);\n\t$newEntries = array();\n\t$updates = array();\n\t//process each node in turn\n\tfor ($k = 0; $k < count($keys); $k++) {\n\t\t$key = $keys[$k];\n\t\techo '<br/>importing ' . $k;\n\t\t$resourceSlug = substr(strrchr(remove_last_slash($key),\"/\"),1);\n\t\techo '<br/>slug ' . $resourceSlug;\n\t\t$title = $topics[$key][\"http://www.w3.org/2004/02/skos/core#prefLabel\"][0][\"value\"];\n\t\tif ($k == 0)\n\t\t\t$title = $topics[$key][\"http://purl.org/dc/elements/1.1/title\"][0][\"value\"];\n\t\techo '<br/>title ' . $title . '<br/>';\n\t\t$parentUri = remove_last_slash($topics[$key][\"http://www.w3.org/2004/02/skos/core#broader\"][0][\"value\"]);\n\t\t$parent = 0;\n\t\t//If the uploaded document specifies a parent for this node...\n\t\tif ($parentUri != null) {\n\t\t\t$parentSlug = substr(strrchr($parentUri,\"/\"),1);\n\t\t\techo '<br/>parentSlug ' . $parentSlug;\n\t\t\t$term = get_term_by( \"slug\", $parentSlug, \"asn_topic_index\");\n\t\t\t//if the parent is found in the taxonomy, set the parent. Otherwise record this as a failed entry\n\t\t\tif ($term !== false) {\n\t\t\t\t$parent = (int)$term->term_id;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$failures[] = $k;\n\t\t\t}\t\n\t\t}\n\t\t//If this node is not a failed entry...\n\t\tif (array_search($k,$failures) === false) {\n\t\t\t//insert the node if it does not already exist. Otherwise, update the existing node with the values in the document\n\t\t\tif (!check_existing_standards($resourceSlug, false)) {\n\t\t\t\t$cid = wp_insert_term(\n\t\t\t\t\t$title,\n\t\t\t\t\t\"asn_topic_index\",\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'description' => $title,\n\t\t\t\t\t\t'slug' => $resourceSlug,\n\t\t\t\t\t\t'parent' => $parent\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tif (is_wp_error( $cid ) )\n\t\t\t\t{\n\t\t\t\t\techo \" error: \" . $cid->get_error_message();\n\t\t\t\t\tif (strlen($title) > 200) {\n\t\t\t\t\t\t$name = substr($title, 0, 200);\n\t\t\t\t\t\twp_insert_term(\n\t\t\t\t\t\t\t$name,\n\t\t\t\t\t\t\t\"asn_topic_index\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'description' => $title,\n\t\t\t\t\t\t\t\t'slug' => $resourceSlug,\n\t\t\t\t\t\t\t\t'parent' => $parent\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t\techo $resourceSlug . \" name had to be shortened!\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($isUpdate) {\n\t\t\t\t\t$newEntries[] = array(\"Name\" => $title, \"Id\" => $resourceSlug, \"Parent\" => $parent);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$term = get_term_by( \"slug\", $resourceSlug, \"asn_topic_index\");\n\t\t\t\t$termUpdate = 0;\n\t\t\t\tif (html_entity_decode(substr($term->name, 0, 200)) != html_entity_decode($substr($title, 0, 200))) {\n\t\t\t\t\t$termUpdate++;\n\t\t\t\t\twp_update_term($term->term_id, 'asn_topic_index', array('name' => $substr($title, 0, 200)));\n\t\t\t\t}\n\t\t\t\tif (html_entity_decode($term->description) != html_entity_decode($description) && $title != html_entity_decode($title)) {\n\t\t\t\t\t$termUpdate++;\n\t\t\t\t\twp_update_term($term->term_id, 'asn_topic_index', array('description' => $title));\n\t\t\t\t}\n\t\t\t\tif (html_entity_decode($term->parent) != html_entity_decode($parent)) {\n\t\t\t\t\t$termUpdate++;\n\t\t\t\t\twp_update_term($term->term_id, 'asn_topic_index', array('parent' => $parent));\n\t\t\t\t}\n\t\t\t\tif ($termUpdate > 0)\n\t\t\t\t\t$updates[] = array(\"id\" => $resourceSlug, \"name\" => $title);\n\t\t\t}\n\t\t}\n\t}\n\t//Notify the uploader of any modifications and any failed nodes\n\tif ($isUpdate && count($newEntries) > 0 || count($updates) > 0)\n\t\tnotify_modifications($newEntries, $updates);\n\tif (count($failures) > 0) {\n\t\techo \"failures:\";\n\t\tprint_r($failures);\t\n\t}\n\t\n}", "function processNewTopicForm($forumID, $data) {\n\t\tglobal $DB, $menuvar, $safs_config;\n\t\t\n\t\t// Dont escape since this method does that, double escape isn't fun\n\t\t// Insert Topic\n\t\t$insertArray = array('forum_id' => $forumID, 'user_id' => $_SESSION['userid'], 'topicicon_id' => $data['icon'], 'title' => $data['title'], 'datetimestamp' => time());\n\t\tif ($_SESSION['user_level'] == SYSTEM_ADMIN || $_SESSION['user_level'] == BOARD_ADMIN) $insertArray['type'] = $data['type'];\n\t\t\n\t\t$topicID = $DB->query_insert(\"topics\", $insertArray);\n\n\t\tif ($topicID) {\n\t\t\t// Insert Post\n\t\t\t$result = $DB->query_insert(\"posts\", array('topic_id' => $topicID, 'user_id' => $_SESSION['userid'], 'text' => $data['message'], 'datetimestamp' => time()));\n\t\n\t\t\t// Update forum post count\n\t\t\t$sql2 = \"UPDATE `\" . DBTABLEPREFIX . \"forums` SET posts = posts + 1 WHERE id = '\" . $forumID . \"'\";\n\t\t\t$result2 = $DB->query($sql2);\n\t\n\t\t\t// Update user post count\n\t\t\t$sql2 = \"UPDATE `\" . DBTABLEPREFIX . \"users` SET posts = posts + 1 WHERE id = '\" . $_SESSION['userid'] . \"'\";\n\t\t\t$result2 = $DB->query($sql2);\n\t\t}\n\t\t\n\t\t$returnVar = \"\n\t\t\t\t\t\t\t\t\t\t\t<h2 class=\\\"processFormTitle\\\">New Topic</h2>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\\\"processFormBlock \" . (($topicID) ? \"processFormSuccess\" : \"processFormFailed\") . \"\\\">\n\t\t\t\t\t\t\t\t\t\t\t\t\" . (($topicID) ? \"Your topic has been posted and you're being redirected to the thread.\" : \"There was an error posting your topic, you're being redirected to the thread.\") . \"\n\t\t\t\t\t\t\t\t\t\t\t\t<meta http-equiv=\\\"refresh\\\" content=\\\"3;url=\" . $menuvar['VIEWTOPIC'] . \"&id=\" . $topicID . \"\\\">\n\t\t\t\t\t\t\t\t\t\t\t</div>\";\n\t\t\n\t\t// Return the HTML\n\t\treturn $returnVar;\n\t}", "function OnPrePublicationCreated($args)\n\t{\n\t\t$tmp = explode(\":\", $this->name);\n\t\t$fname = $tmp[2];\n $this->parseTypeData();\n\t\tforeach ($args['pubInfo']['fields'] as $field) {\n\t\t\tif ($field['id'] === $this->fid){\n\t\t\t\t$mkinfo = pagesetter_mymap_decode($args['pubData'][$field['name']]);\n\t\t\t\tif (isset($mkinfo['lat'])) {\n\t\t\t\t\t$coords = array('lat' => $mkinfo['lat'],'lng' => $mkinfo['lng']);\n\t\t\t\t} else {\n\t\t\t\t\t$marker = pnModAPIFunc('MyMap','user','getMarkers',array('id' => $mkinfo['mkid']));\n\t\t\t\t\t$coords = array(\n\t\t\t\t\t\t\t'lat'\t=> $marker[0]['lat'],\n\t\t\t\t\t\t\t'lng'\t=> $marker[0]['lng']);\n\t\t\t\t}\n\t\t\t\t$info = pagesetter_mymap_reverse($coords, $this->infoType);\n\t\t\t\t$args['pubData'][$fname] = $info;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function publish_help_selling_data_topic(Request $request){\n Session::put('menu_item_parent', 'help');\n Session::put('menu_item_child', 'selling_data');\n Session::put('menu_item_child_child', 'selling_topics');\n\n $helpTopicIdx = $request->helpTopicIdx;\n $topic = HelpTopic::where('helpTopicIdx', $helpTopicIdx)->get()->first();\n $new['active'] = 1 - $topic->active;\n HelpTopic::where('helpTopicIdx', $helpTopicIdx)->update($new);\n Session::flash('flash_success', 'Help Selling Data has been published successfully');\n echo \"success\";\n }", "function post_updated_messages($messages)\n {\n }", "function postNewMessage($user_id, $thread_id, $message)\n\t\t{\n\t\t\t$query=sqlite_exec($this->connection, \"INSERT INTO message(thread_id, user_id, message, date) VALUES($thread_id, $user_id, $message, NOW())\");\n\t\t}", "public function publish($data)\n {\n// $fp = fopen('/tmp/mana.txt', 'w');\n// fwrite($fp, 'yuyuyuy');\n// fclose($fp);\n\n $this->publisher->publish(self::TOPIC_NAME, json_encode($data));\n }", "public function onTicketsAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function onEmailtemplatesAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function run()\n {\n DB::table('topics')->insert\n (\n [\n [\n 'topic_title' => 'topic 1',\n 'status' => 'undone',\n 'meeting_id' => '1',\n 'topic_hour' => '10:00',\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n \n [\n 'topic_title' => 'topic 2',\n 'status' => 'undone',\n 'meeting_id' => '2',\n 'topic_hour' => '11:00',\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n \n [\n 'topic_title' => 'topic 3',\n 'status' => 'undone',\n 'meeting_id' => '3',\n 'topic_hour' => '12:00',\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n \n [\n 'topic_title' => 'topic 4',\n 'status' => 'undone',\n 'meeting_id' => '4',\n 'topic_hour' => '13:00',\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n\n [\n 'topic_title' => 'topice 5',\n 'status' => 'undone',\n 'meeting_id' => '1',\n 'topic_hour' => '14:00',\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n ]);\n }", "function add_topic($array, $redirect_to_topic = false) {\n global $db;\n if ($array == NULL)\n $array = $_POST;\n\n if (is_array($_FILES))\n $array = array_merge($array, $_FILES);\n\n $fields = $this->load_add_topic_form_fields($array);\n validate_cb_form($fields, $array);\n\n $user = userid();\n\n $gp_details = $this->get_group_details($array['group_id']);\n\n\n //Checking for weather user is allowed to post topics or not\n if (!$this->validate_posting_previlige($gp_details))\n return false;\n\n if (!error()) {\n foreach ($fields as $field) {\n $name = formObj::rmBrackets($field['name']);\n $val = $array[$name];\n\n if ($field['use_func_val'])\n $val = $field['validate_function']($val);\n\n\n if (!empty($field['db_field']))\n $query_field[] = $field['db_field'];\n\n if (is_array($val)) {\n $new_val = '';\n foreach ($val as $v) {\n $new_val .= \"#\" . $v . \"# \";\n }\n $val = $new_val;\n }\n\n if (!$field['clean_func'] || (!apply_func($field['clean_func'], $val) && !is_array($field['clean_func'])))\n $val = $val;\n else\n $val = apply_func($field['clean_func'], sql_free($val));\n\n if (empty($val) && !empty($field['default_value']))\n $val = $field['default_value'];\n\n if (!empty($field['db_field']))\n $query_val[] = $val;\n }\n }\n\n\n\n if (!error()) {\n //Adding Topic icon\n $query_field[] = \"topic_icon\";\n $query_val[] = $array['topic_icon'];\n //UID\n $query_field[] = \"userid\";\n $query_val[] = $user;\n //DATE ADDED\n $query_field[] = \"date_added\";\n $query_val[] = now();\n\n $query_field[] = \"last_post_time\";\n $query_val[] = now();\n\n //GID\n $query_field[] = \"group_id\";\n $query_val[] = $array['group_id'];\n\n //Checking If posting requires approval or not\n $query_field[] = \"approved\";\n if ($gp_details['post_type'] == 1)\n $query_val[] = \"no\";\n else\n $query_val[] = \"yes\";\n\n //Inserting IN Database now\n $db->insert(tbl($this->gp_topic_tbl), $query_field, $query_val);\n $insert_id = $db->insert_id();\n\n //Increasing Group Topic Counts\n $count_topics = $this->count_group_topics($array['group_id']);\n $db->update(tbl($this->gp_tbl), array(\"total_topics\"), array($count_topics), \" group_id='\" . $array['group_id'] . \"'\");\n\n //leaving msg\n e(lang(\"grp_tpc_msg\"), \"m\");\n\n //Redirecting to topic\n if ($redirect_to_topic) {\n $grp_details = $this->get_details($insert_id);\n redirect_to(group_link($grp_details));\n }\n\n return $insert_id;\n }\n }", "public function setTopic($topic)\n {\n $this->_topic = $topic;\n }", "public function publishAction()\n {\n // disable rendering\n $this->_helper->viewRenderer->setNoRender();\n\n // disable layout for Ajax requests\n $this->_helper->layout()->disableLayout();\n\n // get the GET/POST paramter\n $hubUrl = $this->getParam('hubUrl');\n $topicUrl = $this->getParam('topicUrl');\n\n // check if the url are not empty\n if (\"\" != $hubUrl && \"\" != $topicUrl) {\n // get the zend pubplisher\n $publisher = new Zend_Feed_Pubsubhubbub_Publisher;\n\n // hand over the paramter\n $publisher->addHubUrl($hubUrl);\n $publisher->addUpdatedTopicUrl($topicUrl);\n\n // start the publishing process\n $publisher->notifyAll();\n\n // check the publisher, if the publishing was correct, else output the errors\n if ($publisher->isSuccess() && 0 == count($publisher->getErrors())) {\n $this->_response->setBody('')->setHttpResponseCode(200);\n } else {\n foreach ($publisher->getErrors() as $error) {\n $this->_response->appendBody($error);\n }\n $this->_response->setHttpResponseCode(404);\n }\n // if the url's are empty\n } else {\n echo 'FAILURE: missing parameter';\n $this->_response->setHttpResponseCode(500);\n return;\n }\n }", "private function getOneTopic() {\n $this->topic->findOne();\n }", "function update_first_post_topic($topic_id)\r\n\t{\r\n\t\tglobal $auth, $db, $phpbb_root_path, $phpEx, $user;\r\n\r\n\t\t$topic_id = (int) $topic_id;\r\n\r\n\t\t$sql = 'SELECT p.post_id, u.user_id, u.username, u.user_colour FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u\r\n\t\t\tWHERE p.topic_id = ' . $topic_id . '\r\n\t\t\t\tAND p.post_deleted = 0\r\n\t\t\t\tAND u.user_id = p.poster_id\r\n\t\t\t\t\tORDER BY p.post_time ASC';\r\n\t\t$result = $db->sql_query_limit($sql, 1);\r\n\t\t$first_post_data = $db->sql_fetchrow($result);\r\n\t\t$db->sql_freeresult($result);\r\n\r\n\t\tif (!$first_post_data || $this->topic_data[$topic_id]['topic_first_post_id'] == $first_post_data['post_id'])\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$sql_data = array(\r\n\t\t\t'topic_poster'\t\t\t\t=> $first_post_data['user_id'],\r\n\t\t\t'topic_first_post_id'\t\t=> $first_post_data['post_id'],\r\n\t\t\t'topic_first_poster_name'\t=> $first_post_data['username'],\r\n\t\t\t'topic_first_poster_colour'\t=> $first_post_data['user_colour'],\r\n\t\t);\r\n\r\n\t\t$this->topic_data[$topic_id] = array_merge($this->topic_data[$topic_id], $sql_data);\r\n\r\n\t\tif (array_key_exists($topic_id, $this->shadow_topic_ids))\r\n\t\t{\r\n\t\t\t$this->topic_data[$this->shadow_topic_ids[$topic_id]] = array_merge($this->topic_data[$this->shadow_topic_ids[$topic_id]], $sql_data);\r\n\t\t\t$sql_where = 'WHERE ' . $db->sql_in_set('topic_id', array($topic_id, $this->shadow_topic_ids[$topic_id]));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$sql_where = 'WHERE topic_id = ' . $topic_id;\r\n\t\t}\r\n\r\n\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\tSET ' . $db->sql_build_array('UPDATE', $sql_data) . ' ' .\r\n\t\t\t\t$sql_where;\r\n\t\t$db->sql_query($sql);\r\n\t}", "function _sf_send_user_publish_note($new_status, $old_status, $post) {\n\t\tif($post->post_type == 'spot') {\n\t\t\t\n\t\t\t$user = get_user_by('id', $post->post_author);\n\t\t\t\n\t\t\t//// IF THIS POST IS BEING PUBLISHED AND THE AUTHOR IS A SUBMITTER\n\t\t\tif($old_status != 'publish' && $new_status == 'publish' && isset($user->caps['submitter'])) {\n\t\t\t\t\n\t\t\t\t//// SENDS AN EMAIL SAYING HIS POST HAS BEEN SUBMITTED\n\t\t\t\t$message = sprintf2(__(\"Dear %user,\n\t\t\t\t\nThis is to inform you that your submission %title at %site_name has been approved and it is now published.\n\nYou can view it here at %link\n\nKind regards,\nthe %site_name team.\", 'btoa'), array(\n\t\t\t\n\t\t\t\t\t'user' => $user->display_name,\n\t\t\t\t\t'title' => $post->post_title,\n\t\t\t\t\t'site_name' => get_bloginfo('name'),\n\t\t\t\t\t'link' => get_permalink($post->ID),\n\t\t\t\t\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$subject = sprintf2(__('Submission approved at %site_name', 'btoa'), array('site_name' => get_bloginfo('name')));\n\t\t\t\t\n\t\t\t\t$headers = \"From: \".get_bloginfo('name').\" <\".get_option('admin_email').\">\";\n\t\t\t\t\n\t\t\t\twp_mail($user->user_email, $subject, $message, $headers);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t///// IF ITS A SPOT\n\t\t\tif($post->post_type == 'spot') {\n\t\t\t\t\n\t\t\t\tif(ddp('future_notification') == 'on' && $old_status != 'publish' && $new_status == 'publish') {\n\t\t\t\t\t\n\t\t\t\t\t//// ALSO CHECKS FOR USER NOTIFICATIONS FOR MATCHING CRITERIA\n\t\t\t\t\tif(function_exists('_sf_check_for_user_notifications_matching_spot')) { _sf_check_for_user_notifications_matching_spot($post->ID); }\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//// IF ITS BEING PUBLISHED AND WE HAVE AN EXPIRY DATE SET\n\t\t\t\tif($old_status != 'publish' && $new_status == 'publish' && ddp('submission_days') != '' && ddp('submission_days') != '0') {\n\t\t\t\t\t\n\t\t\t\t\t//// SETS UP OUR CRON JOB TO PUT IT BACK TO PENDING IN X AMOUNT OF DAYS\n\t\t\t\t\t_sf_set_spot_expiry_date($post);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//// IF ITS BEING PUBLISHED AND WE HAVE AN EXPIRY DATE SET FOR OUR FEATURED SUBMISSION - AND ITS INDEED FEATURED\n\t\t\t\tif($old_status != 'publish' && $new_status == 'publish' && ddp('price_featured_days') != '' && ddp('price_featured_days') != '0' && get_post_meta($post->ID, 'featured', true) == 'on') {\n\t\t\t\t\t\n\t\t\t\t\t//// SETS UP OUR CRON JOB TO PUT IT BACK TO NORMAL SUBMISSION AFTER X DAYS\n\t\t\t\t\t_sf_set_spot_expiry_date_featured($post);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t}" ]
[ "0.66619784", "0.64126736", "0.618764", "0.6041482", "0.60402095", "0.6008568", "0.59965116", "0.59467167", "0.59177953", "0.5908916", "0.5882609", "0.5880958", "0.5880204", "0.5865771", "0.58612174", "0.5852437", "0.5846979", "0.58374363", "0.581198", "0.58100945", "0.58015585", "0.5798692", "0.5796373", "0.57787395", "0.57722735", "0.57610035", "0.5755257", "0.5743027", "0.5715075", "0.57089627", "0.5695425", "0.5664896", "0.5657307", "0.5657307", "0.5654225", "0.5653901", "0.5652235", "0.5651536", "0.5642259", "0.5616548", "0.5568331", "0.5561383", "0.55562866", "0.55473703", "0.553772", "0.5537078", "0.55333024", "0.55321246", "0.551848", "0.551598", "0.55087674", "0.55079955", "0.5501839", "0.5501549", "0.55002964", "0.54877806", "0.5480443", "0.54678565", "0.54559124", "0.54539376", "0.5451482", "0.5435689", "0.54311115", "0.5430267", "0.54288423", "0.54286265", "0.542805", "0.5426287", "0.54244995", "0.54223764", "0.5414438", "0.5412119", "0.5411441", "0.5406634", "0.54062307", "0.5399759", "0.5399098", "0.5396841", "0.539503", "0.5383547", "0.53775966", "0.5377362", "0.53728104", "0.5371227", "0.536491", "0.5362435", "0.53581804", "0.5351777", "0.53489065", "0.5342049", "0.53332186", "0.5327653", "0.532496", "0.53153205", "0.5309621", "0.53041124", "0.5293952", "0.5292409", "0.52900916", "0.52898794" ]
0.5332683
91
set up required objects for testing
public function setUp() { parent::setUp(); $this->_setPlugin(); $this->ObjectObject = $this->ModelObject = $this->ViewObject = $this->ControllerObject = new Object(); $this->ObjectEvent = new Event('TestEvent', $this->ObjectObject, $this->plugin); $this->ModelEvent = new Event('ModelEvent', $this->ModelObject, $this->plugin); $this->ViewtEvent = new Event('ViewtEvent', $this->ViewObject, $this->plugin); $this->ControllerEvent = new Event('ControllerEvent', $this->ControllerObject, $this->plugin); EventCore::loadEventHandler($this->plugin); $this->Event = EventCore::getInstance(); $this->_loadEventClass(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUp()\n {\n $this->_standardLib = new \\App\\OOProgramming\\StandardLibrary;\n $this->_daughter = new \\App\\OOProgramming\\Daughter;\n }", "protected function setUp()\n {\n $this->object1 = new \\Yana\\Security\\Data\\SecurityRules\\Rule('Group1', 'Role1', true);\n $this->object2 = new \\Yana\\Security\\Data\\SecurityRules\\Rule('Group2', 'Role2', false);\n $this->object3 = new \\Yana\\Security\\Data\\SecurityRules\\Rule('', '', false);\n }", "protected function setUp() {\n\t\t$this->objectRegistry = new \\F3\\FLOW3\\Object\\TransientRegistry();\n\t}", "protected function setUp() {\n $this->object = new \\classes\\System();\n }", "protected function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t$this->options = new Registry;\n\t\t$this->object = new JAmazons3($this->options);\n\t}", "protected function setUp() {\n\t\t$this->object = new Showings;\n\t}", "protected function setUp()\n\t{\n\t\t$this->object = new object('obj att', 'obj att2');\n\t}", "protected function setUp()\n\t{\n\t\t$this->object = new object('obj att');\n\n\t\t$this->sibling = new sibling('sibling att');\n\t\t$this->sibling2 = new sibling('sibling att2');\n\n\t\t$this->child = new child('child att');\n\t\t$this->child2 = new child('child att2');\n\n\t\t$this->parent_ = new parent_('parent_ att');\n\t}", "protected function setUp()\n {\n $this->object = Factory::slim();\n }", "protected function setUp()\n {\n $this->object = new HttpParams();\n\n }", "protected function setUp() {\n $this->object = new Qwin_ValidationResult;\n\n\n }", "protected function setUp()\n {\n $this->object = new GamePlayerStatistic();\n $this->object2 = new GamePlayerStatistic();\n }", "protected function setUp() {\n $this->object = new KactoosAPI;\n $this->object->apikey('8f14e45fceea167a5a36dedd4bea2543')\n ->country('br')\n ->module('products')\n ->appname('jaydson')\n ->format('xml');\n }", "protected function setUp()\n {\n require '../src/Capci/Prototype/autoload.php';\n $this->object = new Object;\n }", "protected function setUp()\n {\n $this->object1 = new Comment();\n $this->object2 = new Comment(\"test-prefix\");\n $this->object3 = new Comment(\"test-prefix\", \"test-suffix\");\n }", "protected function setUp()\n\t{\n\t\t$module = new stdClass;\n\t\t$this->object = $module;\n\t}", "protected function setUp()\n\t{\n\t\t$module = new stdClass;\n\t\t$this->object = $module;\n\t}", "public function setup() {}", "protected function setUp() {\n $this->object = new SpamSum;\n }", "protected function setUp() {\n $this->object = new utilsReserva;\n }", "protected function setUp()\n {\n $this->object = new SysInfo;\n }", "protected function setUp()\n {\n $this->session = new \\Yana\\Security\\Sessions\\NullWrapper();\n $this->defaultEvent = array('test');\n $this->object = new \\Yana\\Plugins\\Dependencies\\Container($this->session, $this->defaultEvent);\n }", "protected function setUp() {\n $this->object = new redactorJs;\n }", "protected function setUp()\n {\n // uncomment the following line to set an object to this object\n //$this->object = new \\s3c3\\core\\crypto\\Crypto();\n }", "protected function setUp() {\n $this->object = new ServiceStructure;\n $this->object->setId(1);\n $this->object->setName('service');\n $this->object->setObjectId(2);\n }", "protected function setUp() {\n $this->object = new Utility;\n }", "protected function setUp()\r\n {\r\n $this->helper = new Helper(new DefaultBuilder(), array(\"meta\", \"input\", \"br\"));\r\n $this->object = new HelperObject($this->helper, \"sample\");\r\n }", "protected function setUp() {\n $this->object = new pTime(10, 20, 5, 100);\n }", "protected function setUp() {\n $this->data = [\n 'id' => 1,\n 'firstName' => 'John',\n 'lastName' => 'Smith'\n ];\n $this->object = new Person($this->data);\n }", "abstract protected function setup();", "protected function setUp(): void {\n require_once '../report.php';\n $this->object = new app();\n }", "protected function setUp() {\n $this->object = new jqTemplate;\n }", "protected function setUp() {\n $this->object = new Qrcode;\n }", "protected function setUp()\n\t{\n\t\t$this->object = new RedisTools;\n\t}", "private function setup()\r\n\t{ }", "protected function setUp()\n {\n global $db;\n $this->object = new testSmartObject();\n $this->object->db = $db;\n }", "protected function setUp()\n {\n $this->object = new TestAutoGetSetProps;\n }", "protected function setUp() {\n $this->object = new Patientreports;\n }", "protected function setUp() {\n $this->object = new UtilityIO;\n }", "public function setUp()\n {\n $this->name = new Name([\n 'title' => 'Miss',\n 'first' => 'Rachel',\n 'last' => 'Green',\n ]);\n\n $this->poaName = new Name([\n 'title' => 'Mrs',\n 'first' => 'Someone',\n 'last' => 'Else',\n ]);\n }", "protected function setUp()\n {\n $this->object = new Ticket(new Mapper());\n }", "protected function setUp()\r\n {\r\n $this->object = new \\Yana\\Core\\VarContainer();\r\n }", "protected function setUp()\n {\n $this->object = new Properties();\n }", "protected function setUp()\n {\n $this->object = new Client( $GLOBALS['api_key'] );\n }", "protected function setUp()\n {\n $this->object = new Client( $GLOBALS['api_key'] );\n }", "protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }", "protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }", "protected function setUp() {\n\t\t$this->object = new Calculator;\n\t}", "protected function setUp() {\r\n $this->object = new ValidaDados;\r\n }", "protected function setUp() {\n\t\tob_start ();\n\t\t$this->object = new groupe_forks ( false, 'TESTS groupe_forks' );\n\t\t$this->object->setListeOptions($this->getListeOption());\n\t/********************************************/\n\t\t/* CLASS IMPOSSIBLE EN TESTS UNITAIRES */\n\t/********************************************/\n\t}", "protected function setUp() {\n $this->object = new Qwin_Config;\n }", "protected function setUp() {\n $this->object = new XG_PersonRef;\n }", "public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }", "protected function setUp()\n {\n $this->object = new Modules;\n }", "protected function setUp(): void\n {\n $this->firstNumber = 10;\n $this->secondNumber = 5;\n $this->businessLogic = new BusinessLogic();\n $this->mockTest = new MockTest();\n }", "protected function setUp()\n {\n $this->object = new Set;\n }", "protected function setUp() {\n $this->object = new LyvDAL;\n }", "protected function setUp()\n {\n// $this->object = new DomainUtils;\n }", "protected function setUp() {\n $this->object = new Day1;\n }", "protected function setUp()\n {\n $this->object = new User(1);\n $this->object->exchangeArray(array(\n 'apiKey' => 'thisisanapikey',\n 'secretKey' => 'thisisasecretkey',\n 'lastname' => 'mustermann',\n 'firstname' => 'max',\n 'email' => '[email protected]'\n ));\n }", "public function setUp()\n\t{\n\t\t$this->bb_data = new OLPBlackbox_Data();\n\t\t$this->state_data = new Blackbox_StateData();\n\t}", "protected function setUp() {\n $this->basePath = $basePath = realpath(__DIR__ . '/../../../../../');\n $appPath = $basePath . '/app';\n $this->confPath = $confPath = $appPath . '/boxdata/conf';\n $this->etcPath = $etcPath = $appPath . '/boxdata/etc/local';\n $this->object = new BoxRepository($confPath,null);\n }", "protected function setUp(): void\n {\n $this->object = new PotvrzeniUhrady();\n }", "protected function setUp()\n {\n \n\t$this->object = new Request(array(),array());\n }", "protected function setUp()\n\t{\n\t\t$this->object = new CXLHash;\n\t}", "abstract public function setup();", "abstract public function setup();", "abstract public function setup();", "abstract public function setup();", "protected function setUp() {\n $this->object = new HttpRequestBuilder();\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}" ]
[ "0.78318435", "0.76740474", "0.75465435", "0.7544639", "0.7528188", "0.7511865", "0.74784285", "0.74580824", "0.744653", "0.7444232", "0.7436941", "0.743648", "0.74315196", "0.7430556", "0.74089634", "0.7388972", "0.7388972", "0.73842037", "0.7383659", "0.73520374", "0.7346716", "0.7344651", "0.7337061", "0.7334527", "0.7330631", "0.7322218", "0.7316667", "0.7309857", "0.7309389", "0.73063815", "0.7304834", "0.73035645", "0.72956014", "0.7292483", "0.72903186", "0.72873175", "0.72852486", "0.7283535", "0.7281986", "0.72776395", "0.727451", "0.7269198", "0.72669846", "0.7265752", "0.7265752", "0.72628367", "0.72628367", "0.7260862", "0.725951", "0.7258071", "0.72570264", "0.72549254", "0.72490615", "0.7248762", "0.72439975", "0.72422516", "0.7240296", "0.7238037", "0.7237312", "0.723302", "0.7231563", "0.7228679", "0.7223615", "0.72221714", "0.7221312", "0.72210145", "0.72210145", "0.72210145", "0.72210145", "0.7215799", "0.7210392", "0.7210392", "0.7210392", "0.7210392", "0.7210392", "0.7210392", "0.7210392", "0.7210392", "0.7210392", "0.7210392", "0.7210392", "0.7210392", "0.7210392", "0.7210392", "0.720992", "0.720992", "0.72096354", "0.72096354", "0.72096354", "0.72096354", "0.72096354", "0.72096354", "0.72096354", "0.72096354", "0.72096354", "0.72096354", "0.72096354", "0.72096354", "0.72096354", "0.72096354", "0.72096354" ]
0.0
-1
clear up the enviroment
public function tearDown() { parent::tearDown(); unset($this->Event, $this->EventClass); unset($this->ObjectEvent, $this->ControllerEvent, $this->ModelEvent, $this->ViewtEvent); unset($this->ModelObject, $this->ViewObject, $this->ControllerObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reset()\n {\n $this->env = array();\n $this->object_handlers = array();\n $this->pagetitle = '';\n }", "protected function clear()\n {\n static::destroyApplication();\n }", "public function tearDown(): void\n {\n unset($_SERVER['foo'], $_ENV['foo']);\n }", "public static function resetFrontendEnvironment() {}", "protected function resetFrontendEnvironment() {}", "public function clear($name)\n {\n v::PhpLabel()->check($name);\n\n putenv($name);\n unset($_ENV[$name]);\n unset($_SERVER[$name]);\n }", "protected static function resetFrontendEnvironment() {}", "protected static function resetFrontendEnvironment() {}", "public static function clearEnv(string $name): void\n {\n putenv($name);\n unset($_SERVER[$name], $_ENV[$name]);\n }", "public function cleanAllDockerEnv()\n {\n\n // Delete useless volumes\n //shell_exec('sudo docker system prune --volumes -f');\n //shell_exec('docker system prune --volumes -f');\n echo json_encode(true);\n\n }", "function clearCache()\n {\n $cacheDir = $this->container->getParameter('kernel.cache_dir');\n\n $kernel = $this->container->get('kernel');\n\n $cacheDir = realpath($cacheDir.'/../');\n\n\n foreach (array (/*'frontdev','frontprod',*/'dev','prod') as $env)\n {\n foreach (array ('UrlGenerator','UrlMatcher') as $file)\n {\n $cachedFile = $cacheDir.'/'.$env.'/app'.ucfirst($env).$file.'.php';\n //print '<br>'.$cachedFile;\n if (file_exists($cachedFile)) @unlink ($cachedFile);\n\n\n $cachedFile = $cacheDir.'/'.$env.'/app'.$env.$file.'.php';\n //print '<br>'.$cachedFile;\n if (file_exists($cachedFile)) @unlink ($cachedFile);\n }\n }\n\n\n if (function_exists('apc_clear_cache')) apc_clear_cache('user');\n //exit();\n\n }", "protected function cleanApplication() {\n @unlink('sql.db');\n }", "public static function clear()\n {\n self::$config = array();\n }", "public static function reset()\n {\n self::$config = null;\n self::$configLoaded = false;\n }", "protected function unsetSensitiveData()\n {\n foreach ($_ENV as $key => $value) {\n unset($_SERVER[$key]);\n }\n\n $_ENV = [];\n }", "public function tearDown()\n {\n $this->app = null;\n }", "public function clear()\n {\n sfToolkit::clearDirectory($this->getConfigCacheDir());\n }", "public function tearDown(): void {\n // Remove any temporary directories that were created.\n $filesystem = new Filesystem();\n foreach ($this->tmpDirs as $dir) {\n $filesystem->remove($dir);\n }\n // Clear out variables from the previous pass.\n $this->tmpDirs = [];\n $this->io = NULL;\n // Clear the composer cache dir, if it was set\n putenv('COMPOSER_CACHE_DIR=');\n }", "protected function clear()\n {\n $this->optionManager->clear();\n $this->headerManager->clear();\n $this->cookies = [];\n $this->files = [];\n }", "private function _unsetSetup()\n\t{\n\t\tforeach ( $this->_setup as $setup )\n\t\t{\n\t\t\t$setup->disconnect();\n\t\t}\n\n\t\t$this->_setup = null;\n\t\t$this->_setup = array();\n\t}", "public function tear_down()\n {\n }", "public function tear_down()\n {\n }", "public function tear_down()\n {\n }", "protected function resetFrontendEnvironment() {\n\t\t$GLOBALS['TSFE'] = $this->tsfeBackup;\n\t\tchdir($this->workingDirectoryBackup);\n\t}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function tearDown(): void\n {\n self::$environ->cleanupTestUploadFiles();\n self::$environ->clean();\n }", "public function closeEnvironment() {\n\t\tarray_shift($this->environments);\n\t}", "protected function tearDown(): void\n {\n app(Session::class)->invalidate();\n Routes::reset();\n Kernel::reset();\n }", "function clearConfigSession()\n {\n \t//clear session db info\n\t\t$this->setGeneralSession('db_name', '');\n\t\t$this->setGeneralSession('db_username', '');\n\t\t$this->setGeneralSession('db_password', '');\n\t\t$this->setGeneralSession('status', '');\n }", "private function clear()\n {\n unlink($this->getConfig()->read('tmp_dir') . Evaluator::FILENAME);\n rmdir($this->getConfig()->read('tmp_dir'));\n }", "public function cleanUp()\n\t{\n\t\t$this->logger = new ZFObserver_Forensic();\n\t\t$this->logger->attach(new ZFObserver_Observers_Text());\n\t\t$this->logger->setStatus(ZFObserver_ILogeable :: DEBUG);\n\t\tif( !empty($this->seedMirror) )\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tforeach($this->seedMirror as $id=>$seed)\n\t\t\t\t{\n\t\t\t\t\t$this->logger->notify($this, \"System setting {$seed}\");\n\t\t\t\t\t$this->setSeed($seed);\n\t\t\t\t\t$this->getTearDownOperation();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t$this->logger->notify($this, \"Exception caught while going down. \".$e->getMessage());\n\t\t\t}\n\t\t}\n\t}", "protected function tearDown(): void\n {\n $this->config = null;\n $this->container = null;\n $this->instance = null;\n }", "public static function clear(): void\n {\n self::$dialects = [];\n self::$definitions = [];\n self::$loaded = [];\n }", "protected function tearDown()\n {\n session_destroy(); //req'd because Kml class sets a cookie\n $this->clearRequest();\n $this->clearTmpFiles();\n }", "public function tearDown()\n {\n $this->flushModelEventListeners();\n parent::tearDown();\n unset($this->app);\n\n /*\n * Restore environment\n */\n if (file_exists(base_path($this->envTestingFile())) && file_exists(base_path('.env.backup'))) {\n $this->restoreEnvironment();\n }\n }", "public function reset()\n {\n $this->values[self::system] = null;\n $this->values[self::platform] = null;\n $this->values[self::channel] = null;\n $this->values[self::version] = null;\n }", "public static function resetConfiguration()\n {\n static::$config = null;\n Registry::clear();\n }", "protected function cleanup() {\n $this->clearLocalSessionValues();\n }", "public static function clear(): void\n {\n self::$engine = null;\n self::$validator = null;\n self::$translationFolderPath = \"\";\n self::$lang = self::DEFAULT_LANG;\n }", "public function cleanUp();", "public function cleanUp();", "public function cleanUp();", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "public function clear_util(){\n\t\t$this->util->purge();\n\t}", "public function clearConfig()\n {\n $this->_xcoobee->getStore()->clearStore();\n }", "protected function tearDown(): void {\n unset($this->integration);\n unset($this->ccm);\n unset($this->session);\n }", "protected function tearDown() {\n\t\t$this->Application = null;\n\t\tparent::tearDown ();\n\t}", "protected function setUp()\n {\n $_SERVER['argv'] = self::$argvOriginal;\n @unlink(self::$configFile);\n }", "protected function _clearPaths() {\n\t\tApp::build(array('Vendor' => array('junk')), App::RESET);\n\t\tini_set('include_path', 'junk');\n\t}", "public function tearDown(): void\n {\n putenv(\"BARTLETT_SCAN_DIR=\");\n putenv(\"BARTLETTRC=\");\n }", "public function reset()\r\n {\r\n $this->_session->remove($this->_branchKey);\r\n $this->_session->remove($this->_stepsKey);\r\n $this->_session->remove($this->_timeoutKey);\r\n }", "protected function destroyApplication()\n\t{\n\t\tYii::setApplication(null);\n\t}" ]
[ "0.7356611", "0.7198527", "0.7146402", "0.7137923", "0.7054885", "0.7006026", "0.6988598", "0.6988598", "0.6885785", "0.682023", "0.67717785", "0.67235947", "0.6719329", "0.6711425", "0.6664193", "0.6639131", "0.66261077", "0.6606766", "0.65993124", "0.65524274", "0.6547191", "0.6547191", "0.6547191", "0.65311897", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.64755386", "0.6474918", "0.6474918", "0.6474918", "0.6474918", "0.6474918", "0.6474918", "0.6474918", "0.64741755", "0.64741755", "0.64741755", "0.64741755", "0.64741755", "0.64741755", "0.6470195", "0.6464396", "0.64622813", "0.6455679", "0.6450667", "0.6449827", "0.6428985", "0.6416275", "0.641286", "0.6411542", "0.64066917", "0.64037657", "0.63775736", "0.6366079", "0.63513947", "0.63513947", "0.63513947", "0.63384515", "0.63384515", "0.63384515", "0.63384515", "0.63384515", "0.63205117", "0.62900794", "0.6287553", "0.6271199", "0.62429136", "0.6240724", "0.62394094", "0.6239185", "0.6236128" ]
0.0
-1
setup the current plugin name
protected function _setPlugin() { if (!isset($this->plugin)) { $this->plugin = str_replace('EventsTest', '', get_class($this)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_plugin_name()\n {\n }", "public function getPluginName() {}", "public function setup_plugin_url()\n {\n }", "public function getName()\n\t{\n\t\treturn $this->getSettings()->pluginName;\n\t}", "function getName() {\r\n\t\treturn 'markupplugin';\r\n\t}", "public function admin_init () {\n $data = get_plugin_data(__FILE__);\n $this->plugin_name = $data['Name'];\n $this->plugin_version = $data['Version'];\n $this->plugin_slug = plugin_basename(__FILE__, '.php');\n $this->plugin_name_sanitized = basename(__FILE__, '.php');\n\n // init updater class to plugin updates check\n $this->updater();\n }", "public function plugin_name() {\n\t\treturn 'All In One SEO Pack';\n\t}", "public function get_name() {\r\n return get_string('pluginname', 'assignsubmission_codehandin');\r\n }", "public function get_name() {\n\t\treturn get_string('pluginname', 'assignsubmission_sketchfab');\n\t}", "public function getPluginName(): string\n {\n return \"MumieTask\";\n }", "public function get_name()\n\t{\n\t\treturn 'algolia-wp-plugin';\n\t}", "function getName() {\n\t\treturn 'Plugin';\n\t}", "public function getPluginName() {\n return $this->plugin_name;\n }", "public function getPluginName() {\n return $this->plugin_name;\n }", "public function get_name() {\n return get_string('pluginname', 'local_assessmentsettings');\n }", "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "public function getPluginName() {\n\t\treturn $this->_pluginName;\n\t}", "public function getPluginName() : string\n {\n return \"CryptPad\";\n }", "public function set_plugin_properties() {\n $this->plugin\t= get_plugin_data( SALESFORCE__PLUGIN_FILE );\n $this->basename = plugin_basename( SALESFORCE__PLUGIN_FILE );\n $this->active\t= is_plugin_active( $this->basename );\n }", "public function get_plugin_name()\n {\n return $this->plugin_name;\n }", "function optionsframework_option_name() {\n\t\t$themename = get_option( 'stylesheet' );\n\t\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\t\n\t\t$optionsframework_settings = get_option('optionsframework');\n\t\t$optionsframework_settings['id'] = $themename;\n\t\tupdate_option('optionsframework', $optionsframework_settings);\n\t}", "public function getPluginName()\n\t{\n\t\treturn \"AdobeConnect\";\n\t}", "public function init_plugin()\n {\n }", "public function getPluginPrefix() {\n return str_replace('-','_',$this->plugin_name);\n }", "public function getPluginPrefix() {\n return str_replace('-','_',$this->plugin_name);\n }", "public function init()\n {\n\n parent::init();\n self::$plugin = $this;\n\n if (extension_loaded('newrelic')) {\n\n if (!empty($this->getSettings()->appName)) {\n newrelic_set_appname($this->getSettings()->appName);\n }\n\n\t\t\t$request = Craft::$app->getRequest();\n\n\t\t\tif ($request->getIsConsoleRequest()) {\n\n\t\t\t\t/*\n\t\t\t\t * Console requests have no concept of a URI or segments,\n\t\t\t\t * so we'll name the transaction based on the resolved route.\n\t\t\t\t */\n\n\t\t\t\t$route = ($request->resolve())[0];\n\t\t\t\t$name = \"Console/{$route}\";\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t/*\n\t\t\t\t * We're in a web request, so we can name the transaction based on segments/context.\n\t\t\t\t */\n\n $name = Craft::$app->getRequest()->getSegment(1);\n\n if (Craft::$app->getRequest()->getSegment(2)) {\n if ($this->getSettings()->includeSegment2 === '1') {\n $name .= \"/\" . Craft::$app->getRequest()->getSegment(2);\n } else {\n $name .= \"/*\";\n }\n }\n \n\t\t\t\tif ($request->getIsLivePreview())\n\t\t\t\t{\n\t\t\t\t\t$name = \"LivePreview/{$name}\";\n\t\t\t\t}\n\t\t\t\telseif ($request->getIsCpRequest())\n\t\t\t\t{\n\t\t\t\t\t$name = Craft::$app->getConfig()->getGeneral()->cpTrigger . \"/{$name}\";\n\t\t\t\t}\n\n\t\t\t}\n\n newrelic_name_transaction($name);\n\n }\n\n }", "function optionsframeproject_option_name() {\n\n\t// This gets the theme name from the stylesheet\n\t$themename = wp_get_theme();\n\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\n\t$optionsframeproject_settings = get_option( 'optionsframework' );\n\t$optionsframeproject_settings['id'] = $themename;\n\tupdate_option( 'optionsframework', $optionsframeproject_settings );\n}", "public function get_plugin_name() {\n return $this->plugin_name;\n }", "public function get_name() {\n if(get_config(constants::M_COMPONENT,'customname')){\n return get_config(constants::M_COMPONENT,'customname');\n }else {\n return get_string('pluginname', constants::M_COMPONENT);\n }\n }", "public function init() {\n global $CFG;\n $this->blockname = get_class($this);\n $this->title = get_string('pluginname', $this->blockname);\n }", "function run_plugin_name()\n{\n // If Plugins Requirements are not met.\n if (!plugin_requirements_checker()->requirementsMet()) {\n add_action('admin_notices', [plugin_requirements_checker(), 'showRequirementsErrors']);\n\n // Deactivate plugin immediately if requirements are not met.\n require_once(ABSPATH . 'wp-admin/includes/plugin.php');\n deactivate_plugins(plugin_basename(__FILE__));\n\n return;\n }\n\n /**\n * The core plugin class that is used to define internationalization,\n * admin-specific hooks, and frontend-facing site hooks.\n */\n require_once plugin_dir_path(__FILE__) . 'includes/Plugin_Name.php';\n\n /**\n * Begins execution of the plugin.\n *\n * Since everything within the plugin is registered via hooks,\n * then kicking off the plugin from this point in the file does\n * not affect the page life cycle.\n *\n * @since 1.0.0\n */\n $router_class_name = apply_filters('plugin_name_router_class_name', '\\Plugin_NameVendor\\PWPF\\Routing\\Router');\n $routes = apply_filters('plugin_name_routes_file', plugin_dir_path(__FILE__) . 'app/Config/routes.php');\n $GLOBALS['plugin_name'] = new Plugin_Name($router_class_name, $routes);\n\n register_activation_hook(__FILE__, [new Activator(), 'activate']);\n register_deactivation_hook(__FILE__, [new Deactivator(), 'deactivate']);\n}", "function optionsframework_option_name() {\n\n\t// This gets the theme name from the stylesheet\n\t$themename = get_option( 'stylesheet' );\n\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\n\t$optionsframework_settings = get_option( 'optionsframework' );\n\t$optionsframework_settings['id'] = $themename;\n\tupdate_option( 'optionsframework', $optionsframework_settings );\n}", "function optionsframework_option_name() {\n\n\t// This gets the theme name from the stylesheet (lowercase and without spaces)\n\t$themename = get_option( 'stylesheet' );\n\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\n\t$optionsframework_settings = get_option('optionsframework');\n\t$optionsframework_settings['id'] = $themename;\n\tupdate_option('optionsframework', $optionsframework_settings);\n\n}", "function optionsframework_option_name() {\n\t// This gets the theme name from the stylesheet (lowercase and without spaces)\n\t$themename = get_option( 'stylesheet' );\n\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\t$optionsframework_settings = get_option('optionsframework');\n\t$optionsframework_settings['id'] = $themename;\n\tupdate_option('optionsframework', $optionsframework_settings);\n\t// echo $themename;\n}", "function optionsframework_option_name() {\n\n\t// This gets the theme name from the stylesheet (lowercase and without spaces)\n\t$themename = get_option( 'stylesheet' );\n\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\n\t$optionsframework_settings = get_option('optionsframework');\n\t$optionsframework_settings['id'] = $themename;\n\tupdate_option('optionsframework', $optionsframework_settings);\n\n\t//echo $themename;\n}", "public function get_name() {\n return get_string('pluginname', 'assignfeedback_helixfeedback');\n }", "function __construct( $name, $basename = 'wp-typography/wp-typography.php' ) {\n\t\t$this->plugin_name = $name;\n\t\t$this->local_plugin_path = $basename;\n\t}", "abstract public function register_plugin();", "function optionsframework_option_name() {\r\n\t$themename = get_option( 'stylesheet' );\r\n\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\r\n\r\n\t$optionsframework_settings = get_option( 'optionsframework' );\r\n\t$optionsframework_settings['id'] = $themename;\r\n\tupdate_option( 'optionsframework', $optionsframework_settings );\r\n}", "function optionsframework_option_name() {\n\n\t// This gets the theme name from the stylesheet\n\t$themename = wp_get_theme();\n\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\n\t$optionsframework_settings = get_option( 'optionsframework' );\n\t$optionsframework_settings['id'] = $themename;\n\tupdate_option( 'optionsframework', $optionsframework_settings );\n}", "function optionsframework_option_name() {\n\n\t// This gets the theme name from the stylesheet\n\t$themename = wp_get_theme();\n\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\n\t$optionsframework_settings = get_option( 'optionsframework' );\n\t$optionsframework_settings['id'] = $themename;\n\tupdate_option( 'optionsframework', $optionsframework_settings );\n}", "function __construct($_name=\"\") {\n $this->_name = $_name ; \n \n // $this->hooks();\n \n }", "public function get_name() {\n return get_string('pluginname', 'forumngtype_' . $this->get_id());\n }", "public function init() {\n $this->title = get_string('pluginname', 'block_course_modulenavigation');\n }", "function optionsframework_option_name() {\n\n // 从样式表获取主题名称\n $themename = wp_get_theme();\n $themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\n $optionsframework_settings = get_option( 'optionsframework' );\n $optionsframework_settings['id'] = $themename;\n update_option( 'optionsframework', $optionsframework_settings );\n}", "function optionsframework_option_name() {\n\n\t// This gets the theme name from the stylesheet (lowercase and without spaces)\n\t$themename = get_theme_data(STYLESHEETPATH . '/style.css');\n\t$themename = $themename['Name'];\n\t$themename = preg_replace(\"/\\W/\", \"\", strtolower($themename) );\n\t\n\t$optionsframework_settings = get_option('optionsframework');\n\t$optionsframework_settings['id'] = $themename;\n\tupdate_option('optionsframework', $optionsframework_settings);\n\t\n}", "public function get_name() {\n return get_string('pluginname', 'local_whiacohortsync');\n }", "public function setControllerName()\n {\n $this->name = \"tagui\";\n }", "public function get_plugin_slug()\n {\n }", "function optionsframework_option_name() {\r\n\r\n\t// This gets the theme name from the stylesheet\r\n\t$themename = wp_get_theme();\r\n\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower( $themename ) );\r\n\r\n\t$optionsframework_settings = get_option( 'optionsframework' );\r\n\t$optionsframework_settings['id'] = $themename;\r\n\tupdate_option( 'optionsframework', $optionsframework_settings );\r\n\r\n}", "function getPlugin($name);", "function __construct( $plugin, $args ) {\r\n $this->plugin = $plugin;\r\n $this->name = ! empty( $args['name'] ) ? $args['name'] : get_class( $this );\r\n }", "function setup_title() {\n\t\tglobal $bp;\n\n\t\tif ( bp_is_messages_component() ) {\n\t\t\tif ( bp_is_my_profile() ) {\n\t\t\t\t$bp->bp_options_title = __( 'My Messages', 'buddypress' );\n\t\t\t} else {\n\t\t\t\t$bp->bp_options_avatar = bp_core_fetch_avatar( array(\n\t\t\t\t\t'item_id' => bp_displayed_user_id(),\n\t\t\t\t\t'type' => 'thumb',\n\t\t\t\t\t'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )\n\t\t\t\t) );\n\t\t\t\t$bp->bp_options_title = bp_get_displayed_user_fullname();\n\t\t\t}\n\t\t}\n\n\t\tparent::setup_title();\n\t}", "abstract protected function activate_plugin();", "function optionsframework_option_name() {\n\n\t$optionsframework_settings = get_option('optionsframework');\n\t\n\t// Edit 'options-theme-customizer' and set your own theme name instead\n\t$optionsframework_settings['id'] = 'options_theme_customizer';\n\tupdate_option('optionsframework', $optionsframework_settings);\n}", "public function init_test($testname) {\n $this->plugin = 'test_' . $testname;\n $this->timemodified = time();\n }", "function optionsframework_option_name() {\r\n\r\n\t// This gets the theme name from the stylesheet (lowercase and without spaces)\r\n\t$themename = get_theme_data(STYLESHEETPATH . '/style.css');\r\n\t$themename = $themename['Name'];\r\n\t$themename = preg_replace(\"/\\W/\", \"\", strtolower($themename) );\r\n\r\n\t$optionsframework_settings = get_option('optionsframework');\r\n\t$optionsframework_settings['id'] = $themename;\r\n\tupdate_option('optionsframework', $optionsframework_settings);\r\n\r\n\t// echo $themename;\r\n}", "public function get_plugin_name() {\n\n\t\treturn __( 'WooCommerce Print Invoices/Packing Lists', 'woocommerce-pip' );\n\t}", "public function init() {\n $this->title = get_string('pluginname', 'block_heatmap');\n }", "public function get_name() {\n return get_string('pluginname', 'local_assessmentextensions');\n }", "function optionsframework_option_name() {\n\t\t// This gets the theme name from the stylesheet (lowercase and without spaces)\n\t$themename = get_option( 'stylesheet' );\n\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\n\t$optionsframework_settings = get_option('optionsframework');\n\t$optionsframework_settings['id'] = $themename;\n\tupdate_option('optionsframework', $optionsframework_settings);\n\n\t// echo $themename;\n\t//return 'twentyseventyseven-child-2';\n}", "public function get_plugin_name() {\n\t\treturn __( 'WooCommerce AvaTax', 'woocommerce-avatax' );\n\t}", "function wwm_2015_optionsframework_option_name() {\r\n\r\n\t// This gets the theme name from the stylesheet (lowercase and without spaces)\r\n\t$themename = get_option( 'stylesheet' );\r\n\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\r\n\r\n\t$optionsframework_settings = get_option('optionsframework');\r\n\t$optionsframework_settings['id'] = $themename;\r\n\tupdate_option('optionsframework', $optionsframework_settings);\r\n\r\n}", "public function getParentPluginName() {}", "abstract protected function setMainActionName();", "function getPluginSettingsPrefix() {\n\t\treturn 'doaj';\n\t}", "public function get_plugin_name() {\n\n\t\treturn __( 'WooCommerce Elavon Converge', 'woocommerce-gateway-elavon' );\n\t}", "public function get_name() {\n return get_string('pluginname', 'local_categorycreate');\n }", "function getPluginName() {\n\n return 'sharing';\n\n }", "protected function renderPluginName($plugin) {\r\n\t$return = '';\r\n\t$plugin_name = $this->_psType . '_name';\r\n\t$plugin_desc = $this->_psType . '_desc';\r\n\t$description = '';\r\n// \t\t$params = new JParameter($plugin->$plugin_params);\r\n// \t\t$logo = $params->get($this->_psType . '_logos');\r\n\t$logosFieldName = $this->_psType . '_logos';\r\n\t$logos = $plugin->$logosFieldName;\r\n\tif (!empty($logos)) {\r\n\t $return = $this->displayLogos($logos) . ' ';\r\n\t}\r\n\tif (!empty($plugin->$plugin_desc)) {\r\n\t $description = '<span class=\"' . $this->_type . '_description\">' . $plugin->$plugin_desc . '</span>';\r\n\t}\r\n\t$this->_getHellaspayIntoSession();\r\n\t$extrainfo=$this->getExtraPluginNameInfo($plugin);\r\n\t$pluginName = $return . '<span class=\"' . $this->_type . '_name\">' . $plugin->$plugin_name . '</span>' . $description;\r\n\t$pluginName.= $extrainfo ;\r\n\treturn $pluginName;\r\n }", "function optionsframework_option_name() {\n if (function_exists('wp_get_theme')){\n $theme_data = wp_get_theme('theme-name');\n $themename = $theme_data->Name;\n } else {\n $theme_data = wp_get_theme(STYLESHEETPATH . '/style.css');\n $themename = $theme_data['Name'];\n } \n $themename = preg_replace(\"/\\W/\", \"\", strtolower($themename) );\n \n $optionsframework_settings = get_option('optionsframework');\n $optionsframework_settings['id'] = $themename;\n update_option('optionsframework', $optionsframework_settings);\n}", "function optionsframework_option_name() {\n\n\t$optionsframework_settings = get_option(\"optionsframework\");\n\n\t// Edit 'options-theme-customizer' and set your own theme name instead\n\t$optionsframework_settings[\"id\"] = \"wp-maintenance\";\n\tupdate_option(\"optionsframework\", $optionsframework_settings);\n}", "function install_plugin_information()\n {\n }", "function ui_title() {\n if (!isset($this->plugin['ui_title'])) {\n return check_plain($this->plugin['module'] . ':' . $this->plugin['name']);\n }\n return check_plain($this->plugin['ui_title']);\n }", "protected function initPluginData()\n\t{\n\t\t// code here\n\t\t$this->slug = plugin_basename($this->pluginFile);\n\t\t$this->pluginData = get_plugin_data($this->pluginFile);\n\t}", "public function set_plugin($plugin='') {\n $this->plugin = $plugin;\n }", "function optionsframework_option_name() {\n\n\t// Change this to use your theme slug\n\treturn 'vieu';\n}", "public function initializePlugin();", "public function plugin_info()\n {\n }", "public function initialize()\n {\n $appShortName = $this->config->app->appShortName;\n $this->tag->setTitle($appShortName);\n }", "public function get_modname() {\n return $this->pluginname;\n }", "abstract function getPluginSettingsPrefix();", "function rename_component_init()\n{\n global $rename_component_name;\n\n // Boolean to check for latest version\n $versionok = rename_component_checkversion();\n\n // Component description\n $desc = _(\"This component allows administrators to manage renaming of hosts and services in bulk.\");\n\n if (!$versionok) {\n $desc = \"<b>\" . _(\"Error: This component requires Nagios XI 2012R1.0 or later with Enterprise Features enabled.\") . \"</b>\";\n }\n\n // All components require a few arguments to be initialized correctly. \n $args = array(\n COMPONENT_NAME => $rename_component_name,\n COMPONENT_VERSION => '1.5.1',\n COMPONENT_DATE => '07/12/2016',\n COMPONENT_AUTHOR => \"Nagios Enterprises, LLC\",\n COMPONENT_DESCRIPTION => $desc,\n COMPONENT_TITLE => _(\"Bulk Renaming Tool\")\n );\n\n // Register this component with XI \n register_component($rename_component_name, $args);\n\n // Only add this menu if the user is an admin / register the addmenu function\n if ($versionok) {\n register_callback(CALLBACK_MENUS_INITIALIZED, 'rename_component_addmenu');\n }\n}", "function __construct() {\n $this->plugin_dir = plugin_dir_path(__FILE__);\n $this->icon_dir = $this->plugin_dir . 'images/icons/';\n\n $this->plugin_url = plugins_url('',__FILE__);\n $this->icon_url = $this->plugin_url . 'images/icons/';\n $this->admin_page = admin_url() . 'admin.php?page=' . $this->plugin_dir;\n\n $this->base_name = plugin_basename(__FILE__);\n\n $this->prefix = ADPRESS_PREFIX;\n\n $this->_configure();\n $this->_includes();\n \n // Extra help : attach the packages\n //\n $this->wpcsl->extrahelp = new ADPRESS_Extra_Help(\n array(\n 'parent' => $this->wpcsl\n )\n ); \n }", "function tab_name() {\n return 'Graph Plugin';\n }", "public function __construct( $plugin_name, $options_prefix ) {\n\n $this->plugin_name = $plugin_name;\n $this->options_prefix = $options_prefix;\n\n }", "function setName();", "public function init()\n\t{\n\t\t$this->title( __( 'Aggregated Hook Usage', 'debug-bar' ) );\n\t}", "function thrive_buddydrive_set_name() {\n\treturn __('Files', 'thrive-nouveau');\n}", "function getName() {\n\t\treturn 'TsvResponsiveThemePlugin';\n\t}", "protected function getSetupName()\n {\n return strtolower($this->argument('name'));\n }", "public function get_name() {\n return get_string('pluginname', 'local_assessmentdates');\n }" ]
[ "0.7069391", "0.69162256", "0.65738666", "0.64802617", "0.64053273", "0.63259465", "0.6315909", "0.63099027", "0.6303471", "0.6300665", "0.6299906", "0.62824845", "0.62373054", "0.62373054", "0.62023073", "0.6197434", "0.6197434", "0.6197434", "0.6197434", "0.6197434", "0.6197434", "0.6197434", "0.6197434", "0.6197434", "0.61826235", "0.61800593", "0.6171899", "0.6165252", "0.6160083", "0.61538035", "0.6128082", "0.6124697", "0.6124697", "0.6121501", "0.6097452", "0.6077222", "0.6071053", "0.6068412", "0.60611516", "0.60538566", "0.60522634", "0.6033318", "0.6028855", "0.6022086", "0.6014326", "0.60082686", "0.6001633", "0.59960216", "0.59960216", "0.59869546", "0.598315", "0.5962436", "0.5958191", "0.59577996", "0.5947452", "0.59398454", "0.59351957", "0.592911", "0.5901663", "0.5888753", "0.5881286", "0.5876617", "0.5873492", "0.5862271", "0.58561385", "0.58506864", "0.5849717", "0.58434576", "0.5833408", "0.5824742", "0.5823317", "0.5813673", "0.58051705", "0.579665", "0.57963675", "0.5793943", "0.57914424", "0.5781667", "0.57687473", "0.57640463", "0.5762746", "0.5747838", "0.5730138", "0.5724742", "0.57174", "0.5714259", "0.5679291", "0.5666276", "0.56633735", "0.5661733", "0.566129", "0.5655008", "0.56358576", "0.5635804", "0.56332886", "0.56318724", "0.56317616", "0.56213874", "0.56171036", "0.5614302" ]
0.6171262
27
load and get an instance of the event class being tested
protected function _loadEventClass() { App::uses($this->plugin . 'Events', $this->plugin . '.Lib'); $this->EventClass = $this->plugin . 'Events'; $this->EventClass = new $this->EventClass(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInstance() {\n\t\t$this->assertInstanceOf('EventCore', $this->Event);\n\t}", "public function testFireEventWithClass()\n {\n $eventManager = new EventManager;\n $secret = '1234';\n $eventManager->listen('secret', 'Underlay\\Tests\\Events\\Test@call', function (\n $receivedSecret\n )\n use (\n $secret\n ) {\n $this->assertEquals($secret, $receivedSecret);\n });\n $eventManager->fire('secret', $secret);\n }", "public static function get_instance() \n {\n if ( ! isset(self::$instance)) \n {\n self::$instance = new Event();\n }\n\n return self::$instance;\n }", "public function getEventClass()\n {\n return __NAMESPACE__ . '\\TestAsset\\LongEvent';\n }", "public function testInstanceOf()\n {\n $this->assertInstanceOf('Symfony\\Component\\EventDispatcher\\Event', $this->event);\n }", "protected function setUp()\n {\n parent::setUp();\n $this->object = new Event('test', $this, ['invoker' => $this]);\n }", "public function setUp() {\n\t\tparent::setUp();\n\t\t$this->_setPlugin();\n\n\t\t$this->ObjectObject = $this->ModelObject = $this->ViewObject = $this->ControllerObject = new Object();\n\n\t\t$this->ObjectEvent = new Event('TestEvent', $this->ObjectObject, $this->plugin);\n\t\t$this->ModelEvent = new Event('ModelEvent', $this->ModelObject, $this->plugin);\n\t\t$this->ViewtEvent = new Event('ViewtEvent', $this->ViewObject, $this->plugin);\n\t\t$this->ControllerEvent = new Event('ControllerEvent', $this->ControllerObject, $this->plugin);\n\n\t\tEventCore::loadEventHandler($this->plugin);\n\n\t\t$this->Event = EventCore::getInstance();\n\n\t\t$this->_loadEventClass();\n\t}", "public static function instance() {\n if ( ! isset( self::$instance ) && ! ( self::$instance instanceof FFW_EVENTS ) ) {\n self::$instance = new FFW_EVENTS;\n self::$instance->setup_constants();\n self::$instance->includes();\n // self::$instance->load_textdomain();\n // use @examples from public vars defined above upon implementation\n }\n return self::$instance;\n }", "public function testGetEvent()\n {\n }", "public function testEventReturnsAValidInstanceOfDispatcherEvent()\n\t{\n\t\t$args = array('my' => 'arguments');\n\t\t$event = Dispatcher::event($args, TRUE);\n\n\t\t$this->assertType('Dispatcher_Event', $event);\n\t}", "function event(): EventEmitter\n{\n return EventEmitter::getInstance();\n}", "public function testEvents(string $class): void\n {\n $reflection = new ReflectionClass($class);\n // Avoid checking abstract classes, interfaces, and the like\n if (!$reflection->isInstantiable()) {\n $this->markTestSkipped(\"Class [$class] is not instantiable\");\n }\n\n // All event classes must implement EventListenerInterface\n $requiredInterface = $this->interface;\n $this->assertTrue($reflection->implementsInterface($requiredInterface), \"Class [$class] does not implement [$requiredInterface]\");\n\n // Instantiate the event class and get implemented events list\n $event = new $class();\n $implemented = $event->implementedEvents();\n $this->assertTrue(is_array($implemented), \"implementedEvents() of [$class] returned a non-array\");\n $this->assertFalse(empty($implemented), \"implementedEvents() of [$class] returned an empty array\");\n\n // Test that we each event's handler is actually callable\n // See: https://api.cakephp.org/3.4/class-Cake.Event.EventListenerInterface.html#_implementedEvents\n foreach ($implemented as $name => $handler) {\n if (is_array($handler)) {\n $this->assertFalse(empty($handler['callable']), \"Handler for event [$name] in [$class] is missing 'callable' key\");\n $this->assertTrue(is_string($handler['callable']), \"Handler for event [$name] in [$class] has a non-string 'callable' key\");\n $handler = $handler['callable'];\n }\n\n $this->assertTrue(method_exists($event, $handler), \"Method [$handler] does not exist in [$class] for event [$name]\");\n $this->assertTrue(is_callable([$event, $handler]), \"Method [$handler] is not callable in [$class] for event [$name]\");\n }\n }", "public function testEvent()\n {\n $dispatcher = new Events();\n $this->app->bind(DispatcherInterface::class, function() use ($dispatcher) {\n return $dispatcher;\n });\n $response = (new Command())->testEvent(new Event());\n $event = array_shift($response);\n\n $this->assertSame(Event::class, $event['name'], 'The event that should have been dispatched should match the event passed to event().');\n $this->assertFalse($event['halt'], 'The event should not halt when dispatched from event().');\n }", "protected function setUp() {\r\n\t\t\r\n\t\tparent::setUp ();\r\n\t\t$this->trait = $this->getObjectForTrait('Events');\r\n\t\r\n\t}", "public function testEventLoading() {\n\t\t$sessionData = array('session.test.test' => array('test' => 'testValue'));\n\t\t$storage = null;\n\t\t$session = $this->getSession('test', $sessionData);\n\t\t$session->handleEvent(new Event(Event::TYPE_APPLICATION_BEFORE_CONTROLLER_RUN));\n\t\t$this->assertSame('testValue', $session['test'], 'Loaded value is invalid');\n\t}", "public function getEventClass()\n {\n return $this->eventClass;\n }", "public function testEventCallBackCreate()\n {\n }", "public function testGetEvents()\n {\n }", "public static function getInstance()\n {\n static $instance = false;\n\n if (!$instance) {\n $instance = new \\Xoops\\Core\\Events();\n }\n\n return $instance;\n }", "public function event(): EventDispatcherInterface;", "public function testInstancesOf()\n {\n $this->assertInstanceOf('Symfony\\Component\\EventDispatcher\\Event', $this->gearmanClientCallbackExceptionEvent);\n }", "public function testInstantiation()\n {\n static::assertInstanceOf(HookListener::class, new HookListener($this->mockContaoFramework()));\n }", "public function __construct()\n {\n parent::__construct('BaseEvent');\n }", "public function testGetStaticEventDispatcher()\n {\n $transport = new Transport();\n $refTransport = new \\ReflectionObject($transport);\n $getStaticEventDispatcherMethod = $refTransport->getMethod('getEventDispatcher');\n $getStaticEventDispatcherMethod->setAccessible(true);\n $returnEventDispatcher = $getStaticEventDispatcherMethod->invoke($transport);\n $this->assertInstanceOf(EventDispatcher::class, $returnEventDispatcher);\n }", "public function getEvent(): EventInterface;", "public function init()\n {\n// $eventSystem = $this->_bootstrap->getResource('EventSystem');\n// $eventSystem->raiseEvent($event);\n\n }", "public function testGetEventDispatcher()\n {\n $transport = new Transport();\n $this->assertInstanceOf(EventDispatcher::class, $transport->getEventDispatcher());\n }", "public function testEventCallBackGet()\n {\n }", "protected function getEventsManager() {}", "public static function event() {\n return self::service()->get('events');\n }", "public function testGetEventDispatcher()\n {\n $redis = $this->factory->getRedis();\n $dispatcher = new EventDispatcher();\n $factory = new Factory($redis, $dispatcher);\n\n $this->assertTrue($factory->getEventDispatcher() instanceof EventDispatcherInterface);\n }", "function __construct($event) {\n $this->init($event);\n }", "abstract public function getEventName();", "static function getEventArgsMock(\\PHPUnit_Framework_TestCase $testCase)\n {\n return $testCase->getMockBuilder('Doctrine\\Common\\EventArgs')\n ->disableOriginalConstructor()\n ->getMock();\n }", "public function createEvent()\n {\n return new Event();\n }", "protected function getRandomInstance()\n {\n $eventLine = new EventTag();\n $this->fillThing($eventLine);\n\n return $eventLine;\n }", "function FFW_EVENTS() {\n return FFW_EVENTS::instance();\n}", "public function test_event_notification()\n {\n $this->event_notification_helper('event_method', true);\n }", "protected function getMockEventHandler()\n {\n if (empty($this->events)) {\n $this->events = $this->getMock('Phergie_Event_Handler');\n }\n return $this->events;\n }", "public function testEventCallBackGetItem()\n {\n }", "public static function getInstance(){\n if(static::$instance==null){\n static::$instance=new FEvento_p();\n }\n return static::$instance;\n }", "public function testGetEvents()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function eventsEventGetSource(UnitTester $I)\n {\n $I->wantToTest('Events\\Event - getSource()');\n\n $event = new Event('some-type:beforeSome', $this);\n\n $expected = $this;\n $actual = $event->getSource();\n $I->assertSame($expected, $actual);\n\n $event = new Event('some-type:beforeSome');\n\n $actual = $event->getSource();\n $I->assertNull($actual);\n }", "public function __construct()\n {\n $this->events = new EventDispatcher();\n }", "protected function getEventObject($event, $data)\r\n {\r\n $eventClass = new ReflectionClass($this->getEventClass($event));\r\n\r\n return $eventClass->newInstanceArgs($data);\r\n }", "public static function getEventDispatcher()\n {\n }", "public function __construct($event)\n {\n $this->event = $event;\n }", "public function __construct($event)\n {\n $this->event = $event;\n }", "public function testImplementsEventNameAwareInterface(): void\n {\n $event = new CollectionEvent(\n $this->eventName,\n $this->persistService,\n $this->entityManager,\n $this->logger,\n $this->params\n );\n\n $this->assertInstanceOf(EventNameAwareInterface::class, $event);\n }", "private static function event()\n {\n $files = ['Event', 'EventListener'];\n $folder = static::$root.'Event'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyListenersArgumentsException'];\n $folder = static::$root.'Event/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function getEvent(): Event\n {\n return $this->mainEvent;\n }", "public function testGoogleCalendarImporterCanBeInstantiated()\n {\n $this->assertTrue(method_exists(self::$importer, 'get'));\n }", "public static function getEventDispatcher()\n {\n if (static::$sharedInstance !== null) {\n return static::$sharedInstance;\n }\n\n global $app;\n\n $appEventDispatcher = null;\n if ($app instanceof Application) {\n static::$allowCodeceptionHooks = true;\n $appEventDispatcher = static::getAppEventDispatcher($app);\n } else {\n static::$allowCodeceptionHooks = false;\n $appEventDispatcher = new SymfonyEventDispatcher();\n }\n\n if (! $appEventDispatcher instanceof SymfonyEventDispatcher) {\n throw new TestRuntimeException(sprintf(\n '\\\\Codeception\\\\Codecept::$eventDispatcher property is not an instance of %s; value is instead: %s',\n SymfonyEventDispatcher::class,\n print_r($appEventDispatcher, true)\n ));\n }\n\n static::$sharedInstance = new self($appEventDispatcher);\n\n return static::$sharedInstance;\n }", "public function getEvent()\n {\n return $this->getProperty(\"Event\",\n new Event($this->getContext(), new ResourcePath(\"Event\", $this->getResourcePath())));\n }", "public function __construct()\n {\n Hook::listen(__CLASS__);\n }", "private function event(): Event\n {\n if (!$this->event) {\n $this->event = new Event($this->eventMutex(), '');\n }\n\n return $this->event;\n }", "function get_event(){\n\t\tglobal $EM_Event;\n\t\tif( is_object($EM_Event) && $EM_Event->event_id == $this->event_id ){\n\t\t\treturn $EM_Event;\n\t\t}else{\n\t\t\tif( is_numeric($this->event_id) && $this->event_id > 0 ){\n\t\t\t\treturn em_get_event($this->event_id, 'event_id');\n\t\t\t}elseif( is_array($this->bookings) ){\n\t\t\t\tforeach($this->bookings as $EM_Booking){\n\t\t\t\t\t/* @var $EM_Booking EM_Booking */\n\t\t\t\t\treturn em_get_event($EM_Booking->event_id, 'event_id');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn em_get_event($this->event_id, 'event_id');\n\t}", "protected function getMockCommandEvent()\n {\n return Phake::mock('Phergie\\Irc\\Plugin\\React\\Command\\CommandEvent');\n }", "public function getEvent();", "public function testConstruct() {\n\n // Set a Delivery report callback mock.\n $deliveryReportCallback = new DeliveryReportCallback();\n\n $obj = new DeliveryReportCallbackEvent($deliveryReportCallback);\n\n $this->assertEquals(WBWSMSModeEvents::DELIVERY_REPORT_CALLBACK, $obj->getEventName());\n\n $this->assertSame($deliveryReportCallback, $obj->getDeliveryReportCallback());\n }", "protected function initEvent()\n {\n $locales = $this->container->getParameter('event.locales');\n $event = $this->getRepository('EventEventBundle:Event')->getEvent();\n $now = new \\DateTime();\n\n if (!$event) {\n $event = new Event();\n $event\n ->setTitle('My Event')\n ->setDescription('My another awesome event!')\n ->setStartDate($now)\n ->setEndDate($now->modify('+1 day'))\n ->setVenue('Burj Khalifa Tower')\n ->setEmail('[email protected]')\n ;\n\n $speaker = new Speaker();\n $speaker\n ->setFirstName('Phill')\n ->setLastName('Pilow')\n ->setCompany('Reseach Supplier')\n ;\n\n if ($locales) {\n foreach ($locales as $locale => $title) {\n $eventTranslation = new EventTranslation();\n $eventTranslation->setEvent($event);\n $eventTranslation->setlocale($locale);\n\n $this->getManager()->persist($eventTranslation);\n\n $speakerTranslation = new SpeakerTranslation();\n $speakerTranslation->setSpeaker($speaker);\n $speakerTranslation->setlocale($locale);\n\n $this->getManager()->persist($speakerTranslation);\n }\n }\n\n $this->getManager()->persist($event);\n $this->getManager()->persist($speaker);\n $this->getManager()->flush();\n }\n }", "function __construct() {\n\t\t$request = Request::getInstance();\n\t\t$plugin = Plugin::getInstance();\n\t\t$plugin->triggerEvents('load' . $request->getController());\n\t}", "public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n\t ->getStateMachine()\n ->getTransition()\n ->abortTransition()\n ->isTransitionAborted()\n // EventInterface\n ->getName()\n ->setName()\n ->getTarget()\n ->setTarget()\n ->getParams()\n ->setParams()\n ->getParam()\n ->setParam()\n ->stopPropagation()\n ->isPropagationStopped();\n\n return $mock->new();\n }", "protected function _setPlugin() {\n\t\tif (!isset($this->plugin)) {\n\t\t\t$this->plugin = str_replace('EventsTest', '', get_class($this));\n\t\t}\n\t}", "public function testFactory()\r\n\t{\r\n\t\t$obj = CAntObject::factory($this->dbh, \"calendar_event\");\r\n\t\t$this->assertTrue($obj instanceof CAntObject_CalendarEvent);\r\n\t}", "protected function _getRecurEvent()\n {\n return new Calendar_Model_Event(array(\n 'summary' => 'Breakfast',\n 'dtstart' => '2010-05-20 06:00:00',\n 'dtend' => '2010-05-20 06:15:00',\n 'description' => 'Breakfast',\n 'rrule' => 'FREQ=DAILY;INTERVAL=1', \n 'container_id' => $this->_testCalendar->getId(),\n Tinebase_Model_Grants::GRANT_EDIT => true,\n ));\n }", "protected function _getRecurEvent()\n {\n return new Calendar_Model_Event(array(\n 'summary' => 'Breakfast',\n 'dtstart' => '2010-05-20 06:00:00',\n 'dtend' => '2010-05-20 06:15:00',\n 'description' => 'Breakfast',\n 'rrule' => 'FREQ=DAILY;INTERVAL=1', \n 'container_id' => $this->_testCalendar->getId(),\n Tinebase_Model_Grants::GRANT_EDIT => true,\n ));\n }", "protected function setUp ()\n\t{\n\t\t$this->EventCacheInst = new EventCacheInst(array(\n\t\t\t'app' => 'testapp',\n\t\t\t'trackEvents' => true,\n\t\t\t//'adapter' => 'EventCacheAdapterFile',\n\t\t\t'adapter' => 'EventCacheAdapterApc',\n\t\t\t//'adapter' => 'EventCacheAdapterMemcached',\n\t\t\t//'adapter' => 'EventCacheAdapterRedis',\n\t\t));\n\n\t\t$this->EventCacheInst->flush();\n\t\t$this->EventCacheInst->clear();\n\t}", "public function getEventClass() :string {\n $class = get_class($this);\n $classParts = explode(\"\\\\\", $class);\n\n return $classParts[count($classParts) - 1];\n }", "public function testSettingEventDispatcher()\n {\n $mockEventDispatcher= new MockEventDispatcher();\n $transport = new Transport();\n $returnObject = $transport->setEventDispatcher($mockEventDispatcher);\n $this->assertInstanceOf(Transport::class, $returnObject);\n \n $refTransport = new \\ReflectionObject($transport);\n $eventDispatcher = $refTransport->getProperty('eventDispatcher');\n $eventDispatcher->setAccessible(true);\n $this->assertSame($mockEventDispatcher, $eventDispatcher->getValue($transport));\n }", "public function testFireEventWithInternalFiredEvent()\n {\n $eventManager = new EventManager;\n $event = 'foor.bar';\n $eventManager->listen(EventManager::FIRED, function ($newEvent) use ($event) {\n $this->assertEquals($newEvent, $event);\n });\n $eventManager->fire($event);\n }", "public static function __events () {\n \n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "protected function getEvent()\n {\n if (null === $this->event) {\n $this->event = $event = new EntityEvent;\n\n $event->setTarget($this);\n }\n\n return $this->event;\n }", "static function getInstance($item, $event = '', $options = []) {\n\n $itemtype = $item->getType();\n if ($plug = isPluginItemType($itemtype)) {\n // plugins case\n $name = 'Plugin'.$plug['plugin'].'NotificationTarget'.$plug['class'];\n } else if (strpos($itemtype, \"\\\\\" ) != false) {\n // namespace case\n $ns_parts = explode(\"\\\\\", $itemtype);\n $classname = array_pop($ns_parts);\n $name = implode(\"\\\\\", $ns_parts).\"\\\\NotificationTarget$classname\";\n } else {\n // simple class (without namespace)\n $name = \"NotificationTarget$itemtype\";\n }\n\n $entity = 0;\n if (class_exists($name)) {\n //Entity ID exists in the options array\n if (isset($options['entities_id'])) {\n $entity = $options['entities_id'];\n\n } else if (method_exists($item, 'getEntityID') && $item->getEntityID() >= 0) {\n //Item which raises the event contains an entityID\n $entity = $item->getEntityID();\n\n }\n\n return new $name($entity, $event, $item, $options);\n }\n return false;\n }", "public function testGetWebhookEvents()\n {\n }", "public function run()\n {\n factory(TechnoEvent::class,10)->create();\n }", "public function loadTheInstance();", "public function _loadRealInstance() {}", "public static function events();", "function __construct()\r\n\t{\r\n\t\t$this->events[\"BeforeAdd\"]=true;\r\n\r\n\r\n\t}", "public function event()\n {\n return $this->event;\n }", "public function testClassLoad(): void\n {\n $this->assertInstanceOf(ChangeMailHelper::class, $this->changeMailHelper);\n }", "public function __initEvents($app)\n {\n }", "public function testInstance() { }", "public function construct(CakeEvent $event) {\n\t\t$this->__startTime = time();\n\t}", "public function getEvent() {\n\t}", "public function registerEvents($class)\n {\n $class = new $class;\n\n $class->register();\n }", "protected function makeEvents()\n {\n return $this->container->make(Events::class);\n }", "function getType ()\n\t\t{\n\t\t\treturn \"Event\";\n\t\t}", "protected function getEventClass(): string\n {\n return UserContactsEvent::class;\n }", "public function getEvent() {\n return $this->event;\n }", "public function setUp()\n {\n $request = file_get_contents(GITHUB_FIXTURES_DIR . '/Event/push.json');\n\n $this->webHook = new WebHook($request);\n $this->pushEvent = $this->webHook->getPushEvent();\n }", "public function testOrgApacheFelixEventadminImplEventAdmin()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.felix.eventadmin.impl.EventAdmin';\n\n $crawler = $client->request('POST', $path);\n }", "public function testEventCallBackPatch()\n {\n }", "function get_class_event()\n{\n $colect = collect([\n 'event-warning', \n 'event-info', \n 'event-special', \n 'event-success', \n 'event-inverse', \n 'event-important'\n ]);\n\n return $colect->random();\n}" ]
[ "0.72476095", "0.6862377", "0.6752962", "0.6679267", "0.6549169", "0.6377598", "0.62834555", "0.6265913", "0.6254268", "0.6238321", "0.61207473", "0.60978925", "0.6094033", "0.60903376", "0.6075804", "0.60363036", "0.603006", "0.60247064", "0.60161096", "0.5985935", "0.59524024", "0.59482723", "0.5942705", "0.5927344", "0.5894994", "0.5891964", "0.58395916", "0.5822386", "0.5821328", "0.57843316", "0.57824737", "0.57656664", "0.5756968", "0.57512635", "0.57438165", "0.5719335", "0.571312", "0.56935257", "0.5687374", "0.5661167", "0.5653703", "0.56533027", "0.5630498", "0.5619535", "0.56000674", "0.55930686", "0.5570661", "0.5570661", "0.55667067", "0.55445427", "0.55399567", "0.5539941", "0.5534634", "0.55335927", "0.5525405", "0.55201364", "0.54962546", "0.54924697", "0.5471706", "0.5458998", "0.5456336", "0.5425889", "0.541913", "0.54090804", "0.54072255", "0.53802633", "0.53802633", "0.53763413", "0.5369543", "0.53683263", "0.5358571", "0.535356", "0.53259575", "0.53259575", "0.53259575", "0.53259575", "0.53259575", "0.53187466", "0.5305288", "0.5299132", "0.52937835", "0.529174", "0.5289122", "0.5287253", "0.527015", "0.52436876", "0.5243247", "0.524184", "0.5238618", "0.52385324", "0.5237293", "0.5230771", "0.52301615", "0.52270657", "0.5226339", "0.5225075", "0.5219927", "0.52111846", "0.5210649", "0.52102894" ]
0.739606
0
manuall call an event This will manually call an event to get the return, for auto testing of triggers that do not use complex checks, just standard returns.
protected function _manualCall($event, $object = null) { $method = 'on' . ucfirst($event); $expected = array($event => array(call_user_func_array(array($this->EventClass, $method), array($object)))); $return = current(array_filter($expected[$event])); $expected[$event] = array(); if ($return) { $expected[$event] = array($this->plugin => $return); } return $expected; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testEventCallBackGet()\n {\n }", "function trigger($event, $data=null) {\n return Event::trigger($event, $data);\n }", "public function testEventCallBackGetItem()\n {\n }", "function trigger_elgg_event($event, $object_type, $object = null) {\n\t$return = true;\n\t$return1 = events($event, $object_type, \"\", null, true, $object);\n\tif (!is_null($return1)) {\n\t\t$return = $return1;\n\t}\n\treturn $return;\n}", "public function call($which)\n {\n // Fire pre-hook event\n // Events\\HookTriggered::dispatch(\"$which:before\", true);\n $value = false;\n $arguments = array_slice(func_get_args(), 1);\n // $arguments = count($arguments) == 1 ? $arguments[0] : $arguments;\n if (Event::hasListeners(\"ee:$which\")) {\n $value = Event::dispatch(\"ee:$which\", $arguments)[0];\n }\n\n if (parent::active_hook($which)) {\n $value = parent::call(...func_get_args());\n }\n\n if (Event::hasListeners(\"ee:$which:final\")) {\n // $this->end_script = true;\n $value = Event::dispatch(\"ee:$which:final\", $arguments)[0];\n }\n\n return $value;\n\n // echo \"<pre> <strong>$which</strong>\\n\";\n // var_dump($arguments);\n // echo \"</pre>\";\n\n // Fire post-hook event\n // Events\\HookTriggered::dispatch(\"$which:after\", true);\n\n // return $arguments;\n }", "abstract public function getEventName();", "public function trigger($event, array $args = array()) {\n\t\tif ( ($inst = $this->getInstance()) == null ) return;\n\n\t\t// TODO: IMPORTANT!\n\t\tif ( method_exists($inst, $event) ) {\n\t\t\treturn call_user_func_array(array($inst, $event), $args);\n\t\t}\n\t}", "public function onEvent();", "public function trigger(string $event, ...$arguments): int;", "public function onEvent(Enlight_Event_EventArgs $args)\n {\n if ($this->preventEventLog) {\n return $args->getReturn();\n }\n\n $event = $args->getName();\n $this->events[$event]['returns'][] = $args->getReturn();\n $this->events[$event]['time'][] = microtime(true);\n\n return $args->getReturn();\n }", "public function testPluginRollCall() {\n\t\tif (!$this->_hasTrigger('pluginRollCall')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('pluginRollCall', $this->ObjectEvent);\n\n\t\t$result = $this->Event->trigger($this->ObjectObject, $this->plugin . '.pluginRollCall');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function trigger($event, $args = array()) {\n $func = $this->option($event);\n \n // prepare special error stuff\n if($event == 'error') {\n \n // mark the submission as failed\n $this->error = true;\n \n // collect all error fields\n $this->errors = array_merge($this->missing, $this->invalid);\n \n } \n \n // check if the event is a function at all \n if(!is_a($func, 'Closure') && preg_match('/^default\\:/', $event)) {\n $event = str_replace('default:', '', $event); \n $func = $this->defaults($event);\n }\n \n if(is_a($func, 'Closure')) {\n \n // track all triggered events \n $this->triggered[$event] = array(\n 'name' => $event,\n 'func' => $func,\n 'args' => $args, \n 'time' => microtime()\n );\n\n // invoke the function\n $func($this, $args);\n\n }\n \n return false;\n\n }", "public function testTriggerEventCallsCallbackWithArguments()\n\t{\n\t\t$mock = $this->getMock('Mock_Callback', array('call_me'));\n\n\t\t$mock->expects($this->once())\n\t\t\t\t->method('call_me')\n\t\t\t\t// Have a look in PHPUnit_Framework_Assert for more\n\t\t\t\t->with($this->equalTo('random.pre_forge'), $this->isInstanceOf('Dispatcher_Event'));\n\n\n\n\t\t$mock2 = $this->getMock('Mock_Callback', array('maybe'));\n\n\t\t$mock2->expects($this->once())\n\t\t\t\t->method('maybe')\n\t\t\t\t// Have a look in PHPUnit_Framework_Assert for more\n\t\t\t\t->with($this->equalTo('random.pre_forge'), $this->isInstanceOf('Dispatcher_Event'));\n\n\t\t$dispatcher = new Dispatcher();\n\n\t\t$dispatcher->register_listener('random.pre_forge', array($mock, 'call_me'));\n\t\t$dispatcher->register_listener('random.pre_forge', array($mock2, 'maybe'));\n\n\t\t$dispatcher->trigger_event('random.pre_forge', Dispatcher::event(array('random' => 42)));\n\t}", "public function getEventName() : String;", "public static function event_method()\n {\n return true;\n }", "public function invokeEvent(Event $event);", "public function triggerStaticEvent($eventname)\n {\n $args = array_slice(func_get_args(), 1);\n\n $triggers = $this->context->plugins->getEventTriggers($eventname);\n $ret = true;\n foreach ($triggers as $plugin) {\n $r = call_user_func_array(callback($plugin, $eventname), $args);\n if ($r === false) {\n $ret = false;\n }\n }\n return $ret;\n }", "public function testEventCallBackCreate()\n {\n }", "public function triggerEvent($eventname)\n {\n $args = array_slice(func_get_args(), 1);\n\n $triggers = $this->context->plugins->getEventTriggers($eventname);\n $ret = true;\n foreach ($triggers as $plugin) {\n $r = call_user_func_array(callback($this[$plugin], $eventname), $args);\n if ($r === false) {\n $ret = false;\n }\n }\n return $ret;\n }", "public function raise($event){\r\n\r\n $parameters = [];\r\n\r\n // called like this: raise('event', param, param1, param2, ...)\r\n if(func_num_args() > 1){\r\n $event = func_get_arg(0);\r\n\r\n $tmpParameters = func_get_args();\r\n $parameters = array_splice($tmpParameters, 1);\r\n }\r\n\r\n if(isset($this->events[$event])){\r\n\r\n $listeners = $this->events[$event];\r\n\r\n foreach ($listeners as $listener){\r\n\r\n if($listener['static']){\r\n\r\n Components::callStaticMethod($listener['component'], $listener['method'], $parameters);\r\n\r\n }else{\r\n\r\n self::callNonStaticListener($listener, $parameters);\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n }", "public function getEvent() {\n\t}", "function webrock_hook($event, $value = NULL, $callback = NULL) {\r\n static $events;\r\n\r\n // Adding or removing a callback?\r\n if ($callback !== NULL) {\r\n if ($callback) {\r\n $events[$event][] = $callback;\r\n } else {\r\n unset($events[$event]);\r\n }\r\n } elseif (isset($events[$event])) { // Fire a callback\r\n foreach ($events[$event] as $function) {\r\n $value = call_user_func($function, $value);\r\n }\r\n return $value;\r\n }\r\n}", "public function getEvent();", "public function testEventCallBackPatch()\n {\n }", "public function DoEvent($nEvent) {}", "public function testEventCallBackGetMacros()\n {\n }", "public function exampleCall()\n {\n return \"howdy\";\n }", "public function createEvents()\n {\n //\n\n return 'something';\n }", "public function call();", "public function call();", "public function __call($event, array $args = array())\n {\n $defaults = array(0 => array(), 1 => array());\n $args += $defaults;\n $this->setListener($event);\n return $this->trigger($args[0], $args[1]);\n }", "public function testGetEvent()\n {\n }", "function trigger_plugin_hook($hook, $entity_type, $params = null, $returnvalue = null) {\n\tglobal $CONFIG;\n\n\t//if (!isset($CONFIG->hooks) || !isset($CONFIG->hooks[$hook]) || !isset($CONFIG->hooks[$hook][$entity_type]))\n\t//\treturn $returnvalue;\n\n\tif (!empty($CONFIG->hooks[$hook][$entity_type]) && is_array($CONFIG->hooks[$hook][$entity_type])) {\n\t\tforeach($CONFIG->hooks[$hook][$entity_type] as $hookfunction) {\n\t\t\t$temp_return_value = $hookfunction($hook, $entity_type, $returnvalue, $params);\n\t\t\tif (!is_null($temp_return_value)) {\n\t\t\t\t$returnvalue = $temp_return_value;\n\t\t\t}\n\t\t}\n\t}\n\t//else\n\t//if (!isset($CONFIG->hooks['all'][$entity_type]))\n\t//\treturn $returnvalue;\n\n\tif (!empty($CONFIG->hooks['all'][$entity_type]) && is_array($CONFIG->hooks['all'][$entity_type])) {\n\t\tforeach($CONFIG->hooks['all'][$entity_type] as $hookfunction) {\n\t\t\t$temp_return_value = $hookfunction($hook, $entity_type, $returnvalue, $params);\n\t\t\tif (!is_null($temp_return_value)) $returnvalue = $temp_return_value;\n\t\t}\n\t}\n\t//else\n\t//if (!isset($CONFIG->hooks[$hook]['all']))\n\t//\treturn $returnvalue;\n\n\tif (!empty($CONFIG->hooks[$hook]['all']) && is_array($CONFIG->hooks[$hook]['all'])) {\n\t\tforeach($CONFIG->hooks[$hook]['all'] as $hookfunction) {\n\t\t\t$temp_return_value = $hookfunction($hook, $entity_type, $returnvalue, $params);\n\t\t\tif (!is_null($temp_return_value)) {\n\t\t\t\t$returnvalue = $temp_return_value;\n\t\t\t}\n\t\t}\n\t}\n\t//else\n\t//if (!isset($CONFIG->hooks['all']['all']))\n\t//\treturn $returnvalue;\n\n\tif (!empty($CONFIG->hooks['all']['all']) && is_array($CONFIG->hooks['all']['all'])) {\n\t\tforeach($CONFIG->hooks['all']['all'] as $hookfunction) {\n\t\t\t$temp_return_value = $hookfunction($hook, $entity_type, $returnvalue, $params);\n\t\t\tif (!is_null($temp_return_value)) {\n\t\t\t\t$returnvalue = $temp_return_value;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $returnvalue;\n}", "private static function event()\n {\n $files = ['Event', 'EventListener'];\n $folder = static::$root.'Event'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyListenersArgumentsException'];\n $folder = static::$root.'Event/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "function callEvent($event,$params)\r\n {\r\n //Prevent event executions for this component\r\n if (!$this->inheritsFrom('CustomPage'))\r\n {\r\n if (!acl_isallowed($this->className().'::'.$this->Name, \"Execute\")) return;\r\n }\r\n\r\n $result=null;\r\n $ievent=\"_\".$event;\r\n\r\n if ($this->$ievent!=null)\r\n {\r\n $event=$this->$ievent;\r\n if (!$this->owner->classNameIs('application'))\r\n {\r\n return($this->owner->$event($this,$params));\r\n }\r\n else return($this->$event($this,$params));\r\n }\r\n return($result);\r\n }", "public function triggerEvent($event, array $arguments = null);", "public function raiseEvent($name,$event)\r\n\t{\r\n\t\t$name=strtolower($name);\r\n\t\tif(isset($this->_e[$name]))\r\n\t\t{\r\n\t\t\tforeach($this->_e[$name] as $handler)\r\n\t\t\t{\r\n\t\t\t\tif(is_string($handler))\r\n\t\t\t\t\tcall_user_func($handler,$event);\r\n\t\t\t\telseif(is_callable($handler,true))\r\n\t\t\t\t{\r\n\t\t\t\t\tif(is_array($handler))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// an array: 0 - object, 1 - method name\r\n\t\t\t\t\t\tlist($object,$method)=$handler;\r\n\t\t\t\t\t\tif(is_string($object))\t// static method call\r\n\t\t\t\t\t\t\tcall_user_func($handler,$event);\r\n\t\t\t\t\t\telseif(method_exists($object,$method))\r\n\t\t\t\t\t\t\t$object->$method($event);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse // PHP 5.3: anonymous function\r\n\t\t\t\t\t\tcall_user_func($handler,$event);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// stop further handling if param.handled is set true\r\n\t\t\t\tif(($event instanceof Event) && $event->handled)\r\n\t\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function check()\n {\n $method = $this->camelize('check-for-' . $this->event_type);\n return $this->$method();\n }", "public function testAndExecute(Event $event)\n {\n if ($this->shouldExecuteCallback($event->getRequest()->getMessage())) {\n $event->setMatches($this->getMatches());\n\n return call_user_func($this->callback, $event);\n }\n\n return false;\n }", "public function triggerEvent(Webhook $webhook, $event);", "protected static function callEvent( $event ) {\r\n\t\t\t$event = strtolower( $event );\r\n\t\t\t$arguments = func_get_args();\r\n\t\t\tarray_shift($arguments);\r\n\r\n\t\t\tif (isset(self::$eventMap[$event])) {\r\n\t\t\t\tforeach ( self::$eventMap[$event] as $callback ) {\r\n\t\t\t\t\tcall_user_func_array($callback, $arguments);\r\n\t\t\t\t}\r\n\t\t\t\tif (self::eventCallEvent != $event ) {\r\n\t\t\t\t\tself::callEvent(self::eventCallEvent,$event,$arguments);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "protected function _trigger($eventName, $data = array()) {\n\t\treturn $this->_crud()->trigger($eventName, $data);\n\t}", "public function testTriggerHaltsEventCallbackLoopWhenHaltOnSuccessIsTrue()\n\t{\n\t\t$mock = $this->getMock('Mock_Callback', array('call_me'));\n\n\t\t$mock->expects($this->once())\n\t\t\t\t->method('call_me')\n\t\t\t\t// Have a look in PHPUnit_Framework_Assert for more\n\t\t\t\t->with($this->equalTo('random.pre_forge'), $this->isInstanceOf('Dispatcher_Event'))\n\t\t\t\t->will($this->returnValue(TRUE));\n\n\t\t$mock2 = $this->getMock('Mock_Callback', array('maybe'));\n\n\t\t$mock2->expects($this->never())\n\t\t\t\t->method('maybe');\n\n\t\t$dispatcher = new Dispatcher();\n\n\t\t$dispatcher->register_listener('random.pre_forge', array($mock, 'call_me'));\n\t\t$dispatcher->register_listener('random.pre_forge', array($mock2, 'maybe'));\n\n\t\t$dispatcher->trigger_event('random.pre_forge', Dispatcher::event(array('random' => 42)), TRUE);\n\t}", "function triggerOnce($event, $data=null) {\n return Event::triggerOnce($event, $data);\n }", "public function test_return() \n\t{\n\t\treturn 'Callback returns are also pretty cool';\n\t}", "public function trigger($hook) {\n }", "public function call() {\n\t\treturn false;\n\t}", "public function getEventSucceeded()\n {\n return $this->event_succeeded;\n }", "public function testFireEventWithInternalFiredEvent()\n {\n $eventManager = new EventManager;\n $event = 'foor.bar';\n $eventManager->listen(EventManager::FIRED, function ($newEvent) use ($event) {\n $this->assertEquals($newEvent, $event);\n });\n $eventManager->fire($event);\n }", "static public function trigger () {\n\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:186: characters 5-31\n\t\treturn new FutureTrigger();\n\t}", "function hook(){\n\t\tglobal $listeners;\n\n\t\t$num_args = func_num_args();\n\t\t$args = func_get_args();\n\n\t\tif($num_args < 2)\n\t\t\ttrigger_error(\"Insufficient arguments\", E_USER_ERROR);\n\n\t\t// Hook name should always be first argument\n\t\t$hook_name = array_shift($args);\n\t\t// Default return\n\t\t$hook_result = array_shift($args);\n\t\t\n\t\tif(!isset($listeners[$hook_name])) {\n\t\t\treturn $hook_result; // No plugins have registered this hook\n\t\t}\n\t\t\n\t\t$result = NULL;\n\t\tforeach($listeners[$hook_name] as $func){\n\t\t\t$result = call_user_func_array($func, $args);\n\t\t\tif ($result===NULL) {\n\t\t\t\t$result = $hook_result;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function test_event_notification()\n {\n $this->event_notification_helper('event_method', true);\n }", "function trigger($event, $args = null, $default = null)\n {\n $args = array_merge((array) $args, array($default));\n\n foreach ( bind() as $e => $priorities )\n foreach ( $priorities as $p => &$events )\n foreach ( $events as $i => &$e )\n $default = call_user_func_array($e, $args);\n return $default;\n }", "function event()\n {\n $this->load->library('service');\n $data = file_get_contents('php://input');\n $ret = array(\n 'out' => $this->service->handle('event', $data)\n );\n $this->output($ret);\n }", "public function testEventCallBackGetInboundReferences()\n {\n }", "public static function failed_event_method()\n {\n return false;\n }", "public function triggerEvent(TFW_Event $event){\n if(method_exists($this, $event->getAction()))\n call_user_func_array(array($this, $event->getAction()), $event->getArgs());\n }", "public static function triggerEventBefore($event, &$obj = Null, $args = array()){\n if(file_exists(Vimerito::getApplicationPath().\"configuration\\eventConfiguration.php\")){\n require Vimerito::getApplicationPath().\"configuration\\eventConfiguration.php\";\n if(!empty($__eventAllBefore)){\n foreach ($__eventAllBefore as $e){\n if(count($e) >= 2){\n $__function = \"call_user_func_array(array('$e[0]', '$e[1]')\";\n \n if(count($e) > 2){\n $param = array();\n for($i = 2; $i < count($e); $i++){ \n switch($e[$i]){\n case useClassname:\n $param[]= get_class($obj);\n break;\n case useMethodname:\n $param[]= $event;\n break;\n case useMethodArgs:\n $param[]= $args;\n break;\n default:\n $param[]= $e[$i];\n break; \n }\n\n }\n $__function.= \", \\$param\";\n }\n }\n $__function.= \");\";\n echo $__function;\n eval($__function);\n }\n }\n if(!empty($__eventMethodBefore)){\n if(count($__eventMethodBefore[get_class($obj)][$event]) > 0){\n foreach($__eventMethodBefore[get_class($obj)][$event] as $e){\n // min 2 arguments (classname and methodname) AND NOT an action\n if(count($e) >= 2 && strtolower($e[1]) == str_replace(\"action\", \"\", strtolower($e[1]))){\n $__function = \"call_user_func(array(\\$e[0], \\$e[1])\";\n if(count($e) > 2){\n for($i = 2; $i < count($e); $i++){\n $param = $e[$i];\n if($param == useClassname){\n $param = get_class($obj);\n }\n if($param === useMethodname){\n $param = $event;\n }\n if($param === useMethodArgs){\n $param = $args;\n }\n $__function.= \", \\$param\";\n }\n }\n $__function = \");\";\n eval($__function);\n } \n }\n }\n }\n if(!empty($__eventActionBefore)){\n if(count($__eventActionBefore[get_class($obj)][$event]) > 0){\n \t$__e = $__eventActionBefore[get_class($obj)][$event];\n foreach($__e as $e){\n // min 2 arguments (classname and methodname) AND an action\n if(count($e) >= 2 && strtolower($e[1]) != str_replace(\"action\", \"\", strtolower($e[1]))){\n $__function = \"call_user_func(array(\\$e[0], \\$e[1])\";\n if(count($e) > 2){\n for($i = 2; $i < count($e); $i++){\n $param = $e[$i];\n if($param == useClassname){\n $param = get_class($obj);\n }\n if($param === useMethodname){\n $param = $event;\n }\n if($param === useMethodArgs){\n $param = $args;\n }\n $__function.= \", \\$param\";\n }\n }\n $__function = \");\";\n eval($__function);\n }\n }\n }\n }\n }\n if(!empty(self::$__events[Before][strtolower($event[0])][strtolower($event[1])])){\n for($i = 0; $i < count(self::$__events[Before][strtolower($event[0])][strtolower($event[1])]); $i++){\n $callback = self::$__events[Before][strtolower($event[0])][strtolower($event[1])][$i]; \n $class = $callback[0];\n $method = $callback[1];\n if(str_replace(\":\", \"\", $class) != $class){\n $c = explode(\":\", $class);\n call_user_func(array($c[1], $method), $obj);\n }else{\n if($obj){\n $instance->$method($obj);\n }else{\n $instance->$method();\n } \n }\n } \n }\n }", "abstract function HookEvents();", "public static function eventName(): string\n {\n }", "protected function getMockCommandEvent()\n {\n return Phake::mock('Phergie\\Irc\\Plugin\\React\\Command\\CommandEvent');\n }", "function test_schedule_event_single_args() {\n\t\t$hook = rand_str();\n\t\t$timestamp = strtotime('+1 hour');\n\t\t$args = array(rand_str());\n\n\t\twp_schedule_single_event( $timestamp, $hook, $args );\n\t\t// this returns the timestamp only if we provide matching args\n\t\t$this->assertEquals( $timestamp, wp_next_scheduled($hook, $args) );\n\t\t// these don't match so return nothing\n\t\t$this->assertEquals( false, wp_next_scheduled($hook) );\n\t\t$this->assertEquals( false, wp_next_scheduled($hook, array(rand_str())) );\n\n\t\t// it's a non recurring event\n\t\t$this->assertEquals( '', wp_get_schedule($hook, $args) );\n\t}", "public function trigger($data);", "function set_caller ($e)\n {\n type ($e, 'event');\n\n # Call subsession function.\n $c = new event ('__call_sub', array ('caller' => $e));\n $t = $this;\n $c->set_next ($t);\n return $e;\n }", "public function get_test_scheduled_events()\n {\n }", "private function _callEvent($eventName){\n\t\tif(self::$_disableEvents==false){\n\t\t\tif(method_exists($this, $eventName)){\n\t\t\t\tif($this->{$eventName}()===false){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(isset($this->{$eventName})){\n\t\t\t\t\t$method = $this->{$eventName};\n\t\t\t\t\tif($this->$method()===false){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function call()\n {\n // TODO: Implement call() method.\n }", "public function getTriggeringEvents();", "public function getter_event_callback()\n\t{\n\t\treturn $this->event_callback = \"on\".$this->qualified_name;\n\t}", "static public function trigger () {\n\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Promise.hx:289: characters 12-32\n\t\treturn new FutureTrigger();\n\t}", "function testSecondEventObserver($data) {\n return $data;\n}", "public function getResponseCallFunc(): string;", "public function triggerEvent($eventId);", "public function matchEvent(Mage_Index_Model_Event $event)\n {\n $data = $event->getNewData();\n if (isset($data[self::EVENT_MATCH_RESULT_KEY])) {\n return $data[self::EVENT_MATCH_RESULT_KEY];\n }\n\n $result = parent::matchEvent($event);\n $event->addNewData(self::EVENT_MATCH_RESULT_KEY, $result);\n\n return $result;\n }", "function event($event=null) {\n switch ($event) { \n case 'payreturn': // Order was successful...\n\t $this->handle_Transaction('success');\n\t\t\t\t\t $this->savelog(\"PAYPAL PAYMENT:SUCCESS!!!\");\n\t break;\n case 'paycancel' : //$this->savelog(\"PAYPAL PAYMENT:CANCELED\");\t\n\t \t $this->handle_Transaction('cancel');\n\t\t\t\t\t $this->savelog(\"PAYPAL PAYMENT:CANCELED!!!\");\n\t break;\n case 'payipn' : // Paypal is calling page for IPN validation...\t\n $this->paypal_ipn();\n\t\t if ($status==true)\n \t $this->savelog(\"PAYPAL PAYMENT:IPN IN PROCEESS!!!\");\t\t\n\t\t else\n\t\t $this->savelog(\"PAYPAL PAYMENT:IPN STATUS ERROR!!!\");\t\t\t\n\t break;\n\t\t\t\t\t \n default : \n\t case 'stutpay':\n\t case 'process': $this->savelog(\"PAYPAL PAYMENT:INITIALIZE!!!\");\n\t \n\t $this->p->add_field('address_override', '1');\n $cust_data = GetGlobal('controller')->calldpc_method(\"stutasks.get_customer_details use \".$this->transaction); \t\t\t\t\t \n\t\t\t\t\t $this->p->add_field('address1', $cust_data[4]);\n\t\t\t\t\t $this->p->add_field('address2', $cust_data[5]);\n\t\t\t\t\t $this->p->add_field('city', $cust_data[2]);\n\t\t\t\t\t //$this->p->add_field('country', 'EUR'); //must be country code\n\t\t\t\t\t $this->p->add_field('first_name', $cust_data[0]);\n\t\t\t\t\t $this->p->add_field('last_name', $cust_data[1]);\n\t\t\t\t\t $this->p->add_field('zip', $cust_data[6]);\n\t\t\t\t\t \n\t\t\t\t\t $this->p->add_field('charset', $this->mycharset);//choose based on site lang\n\t\t\t\t\t \n\t $this->p->add_field('currency_code', 'EUR');\n\t\t\t\t\t $this->p->add_field('invoice', $this->transaction );\n\t \t \n $this->p->add_field('business', $this->paypal_mail);//'YOUR PAYPAL (OR SANDBOX) EMAIL ADDRESS HERE!');\n $this->p->add_field('return', $this->this_script.'?t=payreturn&type=invoice&key='.GetReq('key').'&tid='.$this->transaction); //back to invoice view\n $this->p->add_field('cancel_return', $this->this_script.'?t=paycancel&type=invoice&key='.GetReq('key').'&tid='.$this->transaction); //back to invoice view\n $this->p->add_field('notify_url', $this->this_script.'?t=payipn&type=invoice&key='.GetReq('key').'&tid='.$this->transaction);\n \n $name = GetGlobal('controller')->calldpc_method(\"stutasks.get_task_pay_title use \".$this->transaction); \t \n $this->p->add_field('item_name', $name);\n \n $price = GetGlobal('controller')->calldpc_method(\"stutasks.get_task_pay_amount use \".$this->transaction);\n $this->p->add_field('amount', $price); \t\t\t\t\t \n\t\t\t\t\t \n $itemqty = GetGlobal('controller')->calldpc_method(\"stutasks.get_task_pay_qty use \".$this->transaction);\n $this->p->add_field('quantity', $itemqty); \t\t\t\t\t \n\t\t\t\t\t \n\t if ($price>0) {\t\n $this->p->submit_paypal_post(); // submit the fields to paypal\n\t\t\t\t\t die();\n\t }\n\t\t\t\t\t break;\t\t \n\t }\n }", "public function trigger($event, $data = array(), $last = TRUE)\n {\n if (isset($this->$event) && is_array($this->$event))\n {\n foreach ($this->$event as $method)\n {\n if (strpos($method, '('))\n {\n preg_match('/([a-zA-Z0-9\\_\\-]+)(\\(([a-zA-Z0-9\\_\\-\\., ]+)\\))?/', $method, $matches);\n $method = $matches[1];\n $this->callback_parameters = explode(',', $matches[3]);\n }\n $data = call_user_func_array(array($this, $method), array($data, $last));\n }\n }\n return $data;\n }", "function event($event, $halt = false)\n {\n return app('events')->dispatch($event, $halt);\n }", "abstract public function fire();", "public static function triggerEventAfter($event, &$obj = Null){\n if(file_exists(Vimerito::getApplicationPath().\"configuration\\eventConfiguration.php\")){\n require Vimerito::getApplicationPath().\"configuration\\eventConfiguration.php\";\n if(!empty($__eventAllAfter)){\n foreach ($__eventAllAfter as $e){\n if(count($e) >= 2){\n $__function = \"call_user_func(array(\\$e[0], \\$e[1])\";\n if(count($e) > 2){\n for($i = 2; $i < count($e); $i++){\n $param = $e[$i];\n if($param == useClassname){\n $param = get_class($obj);\n }\n if($param === useMethodname){\n $param = $event;\n }\n if($param === useMethodArgs){\n $param = $args;\n }\n $__function.= \", \\$param\";\n }\n }\n $__function = \");\";\n eval($__function);\n }\n $__function = \");\";\n eval($__function);\n }\n }\n if(!empty($__eventMethodAfter)){\n if(count($__eventMethodAfter[get_class($obj)][$event]) > 0){\n \t$__e = $__eventMethodAfter[get_class($obj)][$event];\n foreach($__e as $e){\n // min 2 arguments (classname and methodname) AND NOT an action\n if(count($e) >= 2 && strtolower($e[1]) == str_replace(\"action\", \"\", strtolower($e[1]))){\n $__function = \"call_user_func(array('\".$e[0].\"', '\".$e[1].\"')\";\n if(count($e) > 2){\n for($i = 2; $i < count($e); $i++){\n $param = $e[$i];\n if($param == useClassname){\n $param = get_class($obj);\n }\n if($param === useMethodname){\n $param = $event;\n }\n if($param === useMethodArgs){\n $param = $args;\n }\n $__function.= \", \\$param\";\n }\n }\n $__function.= \");\";\n eval($__function);\n }\n }\n }\n }\n if(!empty($__eventActionAfter)){\n if(count($__eventActionAfter[get_class($obj)][$event]) > 0){\n foreach($__eventActionAfter[get_class($obj)][$event] as $e){\n // min 2 arguments (classname and methodname) AND an action\n if(count($e) >= 2 && strtolower($e[1]) != str_replace(\"action\", \"\", strtolower($e[1]))){\n $__function = \"call_user_func(array(\\$e[0], \\$e[1])\";\n if(count($e) > 2){\n for($i = 2; $i < count($e); $i++){\n $param = $e[$i];\n if($param == useClassname){\n $param = get_class($obj);\n }\n if($param === useMethodname){\n $param = $event;\n }\n if($param === useMethodArgs){\n $param = $args;\n }\n $__function.= \", \\$param\";\n }\n }\n $__function = \");\";\n eval($__function);\n }\n }\n }\n }\n }\n if(!empty(self::$__events[After][strtolower($event[0])][strtolower($event[1])])){\n for($i = 0; $i < count(self::$__events[After][strtolower($event[0])][strtolower($event[1])]); $i++){\n $callback = self::$__events[After][strtolower($event[0])][strtolower($event[1])][$i];\n $class = $callback[0];\n $method = $callback[1];\n if(str_replace(\":\", \"\", $class) != $class){\n $c = explode(\":\", $class);\n call_user_func(array($c[1], $method), $obj);\n }else{\n if($obj){\n $instance->$method($obj);\n }else{\n $instance->$method();\n }\n }\n }\n }\n }", "public function testReportsEventlogGet()\n {\n }", "public function getEventDispatch();", "public function foo()\n {\n $this->wasCalled = true;\n return 'bar';\n }", "public function run() {\n\t\ttry {\n\t\t\t$result = call_user_func( $this->callback );\n\t\t} catch ( Exception $e ) {\n\t\t\treturn $e;\n\t\t}\n\n\t\tif ( $result ) {\n\t\t\t$this->success = true;\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getEvent(): EventInterface;", "public function testGetWebhookEvents()\n {\n }", "public function testAntBackendGetEvent()\r\n\t{\r\n\t\t// Set testing timezone\r\n\t\t//$cur_tz = date_default_timezone_get();\r\n\t\t//date_default_timezone_set('America/Los_Angeles'); // -8\r\n\r\n\t\t$calid = GetDefaultCalendar($this->dbh, $this->user->id);\r\n\r\n\t\t// Create a new calendar event for testing\r\n\t\t$event = new CAntObject_CalendarEvent($this->dbh, null, $this->user);\r\n\t\t$event->setValue(\"name\", \"UnitTest Event\");\r\n\t\t$event->setValue(\"ts_start\", \"10/8/2011 2:30 PM\");\r\n\t\t$event->setValue(\"ts_end\", \"10/8/2011 3:30 PM\");\r\n\t\t$event->setValue(\"calendar\", $calid);\r\n\t\t$rp = $event->getRecurrencePattern();\r\n\t\t$rp->type = RECUR_MONTHLY;\r\n\t\t$rp->dayOfMonth = 1;\r\n\t\t$rp->interval = 1;\r\n\t\t$rp->dateStart = \"1/1/2011\";\r\n\t\t$rp->dateEnd = \"11/1/2011\";\r\n\t\t$eid = $event->save();\r\n\r\n\t\t// Get the event and make sure the recurrence is set right\r\n\t\t$syncEvent = $this->backend->getAppointment($eid);\r\n\t\t$this->assertEquals($syncEvent->subject, $event->getValue(\"name\"));\r\n\t\t$this->assertEquals($syncEvent->recurrence->type, 2); // 2 = monthly\r\n\t\t$this->assertEquals($syncEvent->recurrence->dayofmonth , 1);\r\n\r\n\t\t// Cleanup\r\n\t\t$event->removeHard();\r\n\t}", "abstract public function OnCall(Command $command);", "public function invoke();", "function eis_device_simulate($callparam) {\n\tglobal $eis_conf,$eis_dev_conf,$eis_dev_status,$eis_mysqli;\n\t$timestamp=$eis_dev_status[\"timestamp\"];\n\t$timestep=$eis_dev_status[\"sim_step\"]*60;\n\t// do nothing\n\treturn true;\n}", "function test_schedule_event_single() {\n\t\t$hook = rand_str();\n\t\t$timestamp = strtotime('+1 hour');\n\n\t\twp_schedule_single_event( $timestamp, $hook );\n\t\t$this->assertEquals( $timestamp, wp_next_scheduled($hook) );\n\n\t\t// it's a non recurring event\n\t\t$this->assertEquals( '', wp_get_schedule($hook) );\n\n\t}", "public function handle($event)\n {\n $eventName = $this->getEventName($event);\n\n if ($this->listenerIsRegistered($eventName)) {\n\n return app()->call(get_class($this) . '@when' . $eventName, compact('event'));\n }\n\n return null;\n }", "function get_return_string() {\n\t\tif(function_exists($this->settings['callback'])) {\n\t\t\treturn call_user_func($this->settings['callback']);\n\t\t}\n\t\treturn $this->settings['return'];\n\t}", "function tick_handler()\n{\n echo \"called\\n\";\n}", "public function triggered()\n {\n Log::debug('user_action always returns true.');\n\n return true;\n }", "public function perform()\n {\n $hook = $this->args['hook'];\n $subscriber = $this->args['subscriber'];\n $event_data = $this->args['event_data'];\n $url = (array_key_exists('url', $subscriber['variables'])) ? $subscriber['variables']['url'] : '';\n\n $classname = 'AllPlayers\\\\Webhooks\\\\' . $hook['name'];\n $webhook = new $classname($subscriber['variables']);\n $webhook_data = array(\n 'event_name' => $hook['name'],\n 'event_data' => $event_data\n );\n if (!empty($this->test_url)) {\n $webhook_data['original_url'] = $url;\n $url = $this->test_url;\n }\n $webhook->post($url);\n $result = $webhook->send($webhook_data);\n }", "public function matchEvent(Mage_Index_Model_Event $event)\n {\n $data = $event->getNewData();\n if (isset($data[self::EVENT_MATCH_RESULT_KEY])) {\n return $data[self::EVENT_MATCH_RESULT_KEY];\n }\n\n $entity = $event->getEntity();\n if ($entity == Mage_Catalog_Model_Resource_Eav_Attribute::ENTITY) {\n /* @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */\n $attribute = $event->getDataObject();\n if (!$attribute) {\n $result = FALSE;\n } elseif ($event->getType() == Mage_Index_Model_Event::TYPE_SAVE) {\n $result = $attribute->dataHasChangedFor('is_searchable');\n } elseif ($event->getType() == Mage_Index_Model_Event::TYPE_DELETE) {\n $result = $attribute->getIsSearchable();\n } else {\n $result = FALSE;\n }\n } else if ($entity == Mage_Core_Model_Store::ENTITY) {\n if ($event->getType() == Mage_Index_Model_Event::TYPE_DELETE) {\n $result = TRUE;\n } else {\n /* @var $store Mage_Core_Model_Store */\n $store = $event->getDataObject();\n if ($store && $store->isObjectNew()) {\n $result = TRUE;\n } else {\n $result = FALSE;\n }\n }\n } else if ($entity == Mage_Core_Model_Store_Group::ENTITY) {\n /* @var $storeGroup Mage_Core_Model_Store_Group */\n $storeGroup = $event->getDataObject();\n if ($storeGroup && $storeGroup->dataHasChangedFor('website_id')) {\n $result = TRUE;\n } else {\n $result = FALSE;\n }\n } else if ($entity == Mage_Core_Model_Config_Data::ENTITY) {\n $data = $event->getDataObject();\n if ($data\n && ( in_array($data->getPath(), $this->_relatedConfigSettingsReindex)\n || in_array($data->getPath(), $this->_relatedConfigSettingsUpdate))\n ) {\n $result = $data->isValueChanged();\n } else {\n $result = FALSE;\n }\n } else {\n $result = parent::matchEvent($event);\n }\n\n $event->addNewData(self::EVENT_MATCH_RESULT_KEY, $result);\n\n return $result;\n }", "public function trigger($type, $data){}", "function test_schedule_event_args() {\n\t\t$hook = rand_str();\n\t\t$timestamp = strtotime('+1 hour');\n\t\t$recur = 'hourly';\n\t\t$args = array(rand_str());\n\n\t\twp_schedule_event( $timestamp, 'hourly', $hook, $args );\n\t\t// this returns the timestamp only if we provide matching args\n\t\t$this->assertEquals( $timestamp, wp_next_scheduled($hook, $args) );\n\t\t// these don't match so return nothing\n\t\t$this->assertEquals( false, wp_next_scheduled($hook) );\n\t\t$this->assertEquals( false, wp_next_scheduled($hook, array(rand_str())) );\n\n\t\t$this->assertEquals( $recur, wp_get_schedule($hook, $args) );\n\n\t}", "public function callback();", "public function testGetChallengeEvent()\n {\n }" ]
[ "0.6219531", "0.6097979", "0.60375047", "0.5966939", "0.59272546", "0.5858346", "0.58450073", "0.58344895", "0.58170485", "0.5752812", "0.57164985", "0.569454", "0.5669498", "0.56427544", "0.56095314", "0.5608605", "0.55996126", "0.55648786", "0.5536428", "0.55354404", "0.55330527", "0.5523283", "0.5523254", "0.5512973", "0.55059755", "0.550005", "0.5496513", "0.5495423", "0.5461987", "0.5461987", "0.5438012", "0.5435734", "0.54207855", "0.54092634", "0.53874254", "0.53668207", "0.5366345", "0.5355111", "0.53470826", "0.5342805", "0.5339536", "0.53286487", "0.53236693", "0.5317242", "0.5295279", "0.52786964", "0.5270902", "0.5246772", "0.5246438", "0.52346456", "0.5227473", "0.5205898", "0.5202234", "0.5184341", "0.51735306", "0.5172781", "0.5169671", "0.51688606", "0.51625586", "0.51346374", "0.51249355", "0.51203626", "0.510963", "0.51078415", "0.5085053", "0.5076878", "0.5066115", "0.50616616", "0.50460225", "0.5042783", "0.50377524", "0.50364554", "0.50353485", "0.5030038", "0.5028682", "0.5026202", "0.5023746", "0.5023565", "0.5022533", "0.50212413", "0.5016028", "0.5008799", "0.49977633", "0.4988917", "0.49885643", "0.4985215", "0.4981783", "0.49804947", "0.4978913", "0.49694118", "0.4947106", "0.4945911", "0.49426365", "0.493995", "0.49371374", "0.4930726", "0.49191514", "0.4917191", "0.49104595", "0.49104148" ]
0.57590026
9
test if the event class has the required event
protected function _hasTrigger($event) { $eventClass = new ReflectionClass(get_class($this->EventClass)); $parentMethods = $eventClass->getParentClass()->getMethods(ReflectionMethod::IS_PUBLIC); foreach ($parentMethods as $parentMethod) { $declaringClass = $eventClass->getMethod($parentMethod->getName())->getDeclaringClass()->getName(); if ($declaringClass === $eventClass->getName() && $parentMethod->getName() == 'on' . ucfirst($event)) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasEventListeners($event);", "private function checkEventExists(){\n $event = Event::find($this->id);\n\n return(!is_null($event));\n }", "function getHasEvent() {\n\t\treturn $this->_HasEvent;\n\t}", "public function isEvent()\n {\n return isset($this->status_changed) && ! is_null($this->status_changed);\n }", "public static function event_method()\n {\n return true;\n }", "public function hasEventQueue(/*# string */ $eventName)/*# : bool */;", "protected function isListenerFired($event)\n {\n // Do not apply to the same or newer versions\n if (version_compare(static::VERSION, $event->old, '<=')) {\n return true;\n }\n\n return false;\n }", "Public function isEvent( $cat ) {\r\n\t\treturn isset( $this->events[ $cat ] );\r\n\t}", "public function hasEvent($name)\n\t{\n\t\tif((strncasecmp($name,'on',2)===0&&method_exists($this,$name))||strncasecmp($name,'fx',2)===0||strncasecmp($name,'dy',2)===0)\n\t\t\treturn true;\n\n\t\telse if($this->_m!==null&&$this->_behaviorsenabled)\n\t\t{\n\t\t\tforeach($this->_m->toArray() as $behavior)\n\t\t\t{\n\t\t\t\tif((!($behavior instanceof IBehavior)||$behavior->getEnabled())&&$behavior->hasEvent($name))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function hasEventHandler($name)\r\n\t{\r\n\t\t$name=strtolower($name);\r\n\t\treturn isset($this->_e[$name]) && $this->_e[$name]->getCount()>0;\r\n\t}", "function isCustomEvent($event_id){\n\t$data = M('customevent');\n\tif((int)$event_id>=1){\n\t\t$condition = Array('event_id' => $event_id);\n\t\tif($event = $data->where($condition)->find()){\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}\n}", "public function hasEvents()\n {\n return count($this->events) > 0 ? true : false;\n }", "protected static function isEventExists($event)\n {\n static $events;\n\n if (!$events) {\n $ref = new \\ReflectionClass('Symfony\\Component\\Form\\FormEvents');\n $events = $ref->getConstants();\n }\n\n return in_array($event, $events);\n }", "function hasCallbacks($event) {\n return Event::hasCallbacks($event);\n }", "function isRegistered($event) {\n return Event::isRegistered($event);\n }", "public function isValidFor(Event $event)\n {\n return $this->getEventName() === $event->getName();\n }", "public function hasListeners($event): bool;", "public function matchEvent(Mage_Index_Model_Event $event)\n {\n return false;\n }", "function isEventStarting( $event )\n {\n // Settings\n $ini = eZINI::instance( \"bceventnotifications.ini\" );\n $eventClassIdentifier = $ini->variable( \"EventNotificationsSettings\", \"EventClassIdentifier\" );\n $eventStartDateTimeIdentifier = $ini->variable( \"EventNotificationsSettings\", \"EventClassAttributeIdentifierStartDateTime\" );\n\n if ( $eventClassIdentifier == $event->ClassIdentifier )\n {\n // Event Start Attribute\n $dm=$event->dataMap();\n $eventStartDateAttribute=$dm[$eventStartDateTimeIdentifier];\n $eventStartDate=$eventStartDateAttribute->content();\n\n // Event Start DateTime Object\n $eventDateTime = new eZDateTime();\n $eventDateTime->setTimeStamp( $eventStartDate->timeStamp() );\n $eventDateTimeString = $eventDateTime->timeStamp();\n\n // Start time, Start of Hour\n $startOfCurrentHour = new eZDateTime();\n $startOfCurrentHour->adjustDateTime( 1, 0, 0, 0, 0, 0 );\n $startOfCurrentHour->setMinute( 0 );\n $startOfCurrentHour->setSecond( 0 );\n $startOfCurrentHourString = $startOfCurrentHour->timeStamp();\n\n // End time, End of Hour\n $endOfCurrentHour = new eZDateTime();\n $endOfCurrentHour->setMinute( 0 );\n $endOfCurrentHour->setSecond( 0 );\n $endOfCurrentHour->adjustDateTime( 1, 59, 59, 0, 0, 0 );\n $endOfCurrentHourString = $endOfCurrentHour->timeStamp();\n\n if( $eventDateTime->isGreaterThan( $startOfCurrentHour, true ) && $eventDateTimeString <= $endOfCurrentHourString )\n {\n $ret = true;\n }\n // if ($ret == true)\n // die('true');\n \n }\n return $ret;\n }", "public function matchesEvent($event);", "function is_event($p = null) {\n\tglobal $post;\n\t$p = ($p == null) ? $post : $p;\n\t$cat = get_the_category($p->ID);\n\t$option_category = get_it_option('event_category');\n\t\n\treturn $cat[0]->cat_ID == $option_category ||\n\t\t\tget_top_parent_cat_ID($cat[0]) == $option_category;\n}", "public function hasListeners($eventName): bool;", "function isEvent($var){\n\tif ($this->calEvents){\n\t\t$checkTime=$this->mkActiveTime(0,0,1,$this->actmonth,$var,$this->actyear);\n\t\t$selectedTime=$this->mkActiveTime(0,0,1,$this->selectedmonth,$this->selectedday,$this->selectedyear);\n\t\t$todayTime=$this->mkActiveTime(0,0,1,$this->monthtoday,$this->daytoday,$this->yeartoday);\n\t\tforeach($this->calEvents as $eventTime => $eventID){\n\t\t\tif ($eventTime==$checkTime){\n\t\t\t\tif ($eventTime==$selectedTime) $this->eventID=$this->cssPrefixSelecEvent.$eventID;\n\t\t\t\telseif ($eventTime==$todayTime) $this->eventID=$this->cssPrefixTodayEvent.$eventID;\n\t\t\t\telse $this->eventID=$eventID;\n\t\t\t\tif ($this->calEventsUrl[$eventTime]) $this->eventUrl=$this->calEventsUrl[$eventTime];\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\treturn false;\n\t}\n}", "public function eventExists()\n {\n return $this->getTalk()->getSpeaker()->exists();\n }", "public function hasTimeEvents(){\n return $this->_has(8);\n }", "public function hasListeners($eventName);", "public function isUnknownEvent()\n {\n return $this->baseEvent->isUnknownEvent();\n }", "public function isUserEvent()\n {\n return $this->baseEvent->isUserEvent();\n }", "static protected function eventExists($uid) {\n return array_key_exists($uid, self::$events);\n }", "private function _isEventForMe(TestEvent $event)\n\t{\n\t\treturn $event->getTestCase()->getSessionStrategy() instanceof self;\n\t}", "public function eventExists(Event $event){\r\n //echo $event->getType();\r\n $stmt = $this->db->prepare(\"SELECT COUNT(*) as count FROM event WHERE type = ? AND name = ? AND date = ? AND observations = ? AND guests = ?\");\r\n $stmt->execute(array($event->getType(), $event->getName(), $event->getDate(), $event->getObservations(), $event->getGuests()));\r\n $data = $stmt->fetch(PDO::FETCH_ASSOC);\r\n\r\n if($data['count'] == 0){\r\n $exists = false;\r\n }else{\r\n $exists = true;\r\n }\r\n return $exists;\r\n }", "public function testEvents(string $class): void\n {\n $reflection = new ReflectionClass($class);\n // Avoid checking abstract classes, interfaces, and the like\n if (!$reflection->isInstantiable()) {\n $this->markTestSkipped(\"Class [$class] is not instantiable\");\n }\n\n // All event classes must implement EventListenerInterface\n $requiredInterface = $this->interface;\n $this->assertTrue($reflection->implementsInterface($requiredInterface), \"Class [$class] does not implement [$requiredInterface]\");\n\n // Instantiate the event class and get implemented events list\n $event = new $class();\n $implemented = $event->implementedEvents();\n $this->assertTrue(is_array($implemented), \"implementedEvents() of [$class] returned a non-array\");\n $this->assertFalse(empty($implemented), \"implementedEvents() of [$class] returned an empty array\");\n\n // Test that we each event's handler is actually callable\n // See: https://api.cakephp.org/3.4/class-Cake.Event.EventListenerInterface.html#_implementedEvents\n foreach ($implemented as $name => $handler) {\n if (is_array($handler)) {\n $this->assertFalse(empty($handler['callable']), \"Handler for event [$name] in [$class] is missing 'callable' key\");\n $this->assertTrue(is_string($handler['callable']), \"Handler for event [$name] in [$class] has a non-string 'callable' key\");\n $handler = $handler['callable'];\n }\n\n $this->assertTrue(method_exists($event, $handler), \"Method [$handler] does not exist in [$class] for event [$name]\");\n $this->assertTrue(is_callable([$event, $handler]), \"Method [$handler] is not callable in [$class] for event [$name]\");\n }\n }", "public function hasEventHandler($name)\n\t{\n\t\t$name=strtolower($name);\n\t\tif(strncasecmp($name,'fx',2)===0)\n\t\t\treturn isset(self::$_ue[$name])&&self::$_ue[$name]->getCount()>0;\n\t\telse\n\t\t{\n\t\t\tif(isset($this->_e[$name])&&$this->_e[$name]->getCount()>0)\n\t\t\t\treturn true;\n\t\t\telse if($this->_m!==null&&$this->_behaviorsenabled) {\n\t\t\t\tforeach($this->_m->toArray() as $behavior)\n\t\t\t\t{\n\t\t\t\t\tif((!($behavior instanceof IBehavior)||$behavior->getEnabled())&&$behavior->hasEventHandler($name))\n\t\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 hasNetworkEvent(){\n return $this->_has(3);\n }", "public function has($name)\r\n {\r\n return isset($this->_events[$name]);\r\n }", "public static function hasHandlers($class, $name)\n {\n if (empty(self::$_eventWildcards) && empty(self::$_events[$name])) {\n return false;\n }\n\n if (is_object($class)) {\n $class = get_class($class);\n } else {\n $class = ltrim($class, '\\\\');\n }\n\n $classes = array_merge(\n [$class],\n class_parents($class, true),\n class_implements($class, true)\n );\n\n // regular events\n foreach ($classes as $className) {\n if (!empty(self::$_events[$name][$className])) {\n return true;\n }\n }\n\n // wildcard events\n foreach (self::$_eventWildcards as $nameWildcard => $classHandlers) {\n if (!StringHelper::matchWildcard($nameWildcard, $name, ['escape' => false])) {\n continue;\n }\n foreach ($classHandlers as $classWildcard => $handlers) {\n if (empty($handlers)) {\n continue;\n }\n foreach ($classes as $className) {\n if (StringHelper::matchWildcard($classWildcard, $className, ['escape' => false])) {\n return true;\n }\n }\n }\n }\n\n return false;\n }", "public static function isCodeceptionEvent($eventName)\n {\n return in_array($eventName, static::codeceptionEvents(), true);\n }", "public function hasDataCollectionEvents() {\n return $this->_has(8);\n }", "private function _callEvent($eventName){\n\t\tif(self::$_disableEvents==false){\n\t\t\tif(method_exists($this, $eventName)){\n\t\t\t\tif($this->{$eventName}()===false){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(isset($this->{$eventName})){\n\t\t\t\t\t$method = $this->{$eventName};\n\t\t\t\t\tif($this->$method()===false){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function isEventRecurs() {\n\t\treturn ($this->eventRecurs);\n\t}", "protected function observed($event)\n {\n return $this->hasListeners($this->buildEventName($event));\n }", "private function _valid_event_type($event_type=NULL){\n\t\tif(!empty($event_type)){\n\t\t\tif ($event_type == Minematic_Connector_Model_Config::EVENT_TYPE_ALL ||\n\t\t\t\t$event_type == Minematic_Connector_Model_Config::EVENT_TYPE_PAID || \n\t\t\t\t$event_type == Minematic_Connector_Model_Config::EVENT_TYPE_OTHERS){\n\t\t\t\treturn TRUE;\n\t\t\t} else {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "protected function listenerIsRegistered($eventName)\n {\n $method = \"when{$eventName}\";\n\n if (substr($method, -5) == 'Event') {\n\n $method = substr($method, 0, -5);\n }\n\n return method_exists($this, $method);\n }", "public function __isset($name) {\n\t\tif ($name === 'event_name')\n\t\t\t$ret = isset ( $this->event );\n\t\telse\n\t\t\t$ret = isset ( $this->$name );\n\t\treturn $ret;\n\t}", "private function hasEventLinks()\n {\n return !empty($this->eventlinks);\n }", "public function testInstance() {\n\t\t$this->assertInstanceOf('EventCore', $this->Event);\n\t}", "public function valid()\n {\n return (false !== \\next($this->events)) ? current($this->events) : false;\n }", "public static function hasEvent( $element, $eventName )\r\n\t{\r\n\t\t$success = false;\r\n\t if (!$element || !is_object($element)) {\r\n\t\t\treturn $success;\r\n\t\t}\r\n\t\t\r\n\t\tif (!$eventName || !is_string($eventName)) {\r\n\t\t\treturn $success;\r\n\t\t}\r\n\t\t\r\n\t\t// Check if they have a particular event\r\n\t\t$import \t= JPluginHelper::importPlugin( strtolower('Tienda'), $element->element );\r\n\t\t$dispatcher\t= JDispatcher::getInstance();\r\n\t\t$result \t= $dispatcher->trigger( $eventName, array( $element ) );\r\n\t\tif (in_array(true, $result, true)) \r\n\t\t{\r\n\t\t\t$success = true;\r\n\t\t}\t\t\r\n\t\treturn $success;\t\r\n\t}", "public function hasListener($event, $listener);", "public function getBase(): false|EventBase {}", "public static function has_event_json()\n {\n global $wpdb;\n\n $event_id = isset($_POST['event_id']) ? (int) $_POST['event_id'] : 0;\n if (isset($_GET['event_id'])) {\n $event_id = (int) $_GET['event_id'];\n }\n $response = new stdClass();\n $response->success = false;\n if ($post_id = $wpdb->get_var(\"select post_id from \" . EM_EVENTS_TABLE . \" where event_id='\" . $event_id . \"' limit 1\")) {\n if ($event_key = $wpdb->get_var(\"SELECT event_key FROM \" . EM_SEATSIO_EVENT . \" WHERE post_id='\" . $post_id . \"' LIMIT 1\")) {\n $response->success = true;\n $response->event_key = $event_key;\n $response->post_id = $post_id;\n $response->event_id = $event_id;\n }\n }\n wp_send_json($response);\n }", "public function isRoomEvent()\n {\n return $this->baseEvent->isRoomEvent();\n }", "public static function listeners($event) {\n return isset(static::$events[$event]);\n }", "public static function item_has_events($item_id, $module_id, $course_id, $item_type) {\r\n return count_item_events($item_id, $module_id, $course_id, $item_type) > 0;\r\n }", "private function event_exists($slug) {\n return (isset($this->events[$slug]));\n }", "public function shouldCatchEventDefinition(EventDefinitionInterface $eventDefinition);", "public function hasWildcardListeners($eventName): bool;", "protected function eventIsFiredByTheFramework($eventName): bool\n {\n return Str::is(\n ['Illuminate\\*', 'eloquent*', 'bootstrapped*', 'bootstrapping*', 'creating*', 'composing*'],\n $eventName\n );\n }", "public function testInstanceOf()\n {\n $this->assertInstanceOf('Symfony\\Component\\EventDispatcher\\Event', $this->event);\n }", "public function hasDataCollectionEventId() {\n return $this->_has(3);\n }", "public function hasObject($class) {\n\t\treturn (isset($this->_attached[$class]) || isset($this->_classes[$class]));\n\t}", "private function eventExists($id) {\n $exists = new RecordExists( [ 'table' => $this->_events, 'field' => 'id', 'adapter' => $this->db, ]);\n return $exists->isValid( $id ); \n }", "function isEventEnding( $event )\n {\n // Settings\n $ini = eZINI::instance( \"bceventnotifications.ini\" );\n $eventClassIdentifier = $ini->variable( \"EventNotificationsSettings\", \"EventClassIdentifier\" );\n $eventEndDateTimeIdentifier = $ini->variable( \"EventNotificationsSettings\", \"EventClassAttributeIdentifierEndDateTime\" );\n\n if( $eventClassIdentifier == $event->ClassIdentifier )\n {\n // Event Start Attribute\n $dm=$event->dataMap();\n $eventStartDateAttribute=$dm[$eventEndDateTimeIdentifier];\n $eventStartDate=$eventStartDateAttribute->content();\n\n // Event Start DateTime Object\n $ct = new eZDateTime();\n $ts = $ct->timeStamp();\n\n // Event Start DateTime Object\n $eventDateTime = new eZDateTime();\n $eventDateTime->setTimeStamp( $eventStartDate->timeStamp() );\n $eventDateTimeString = $eventDateTime->timeStamp();\n\n // Start time, Start of Hour\n $startOfCurrentHour = new eZDateTime();\n $startOfCurrentHour->adjustDateTime( -1, 0, 0, 0, 0, 0 );\n // $startOfCurrentHour->setMinute( 0 );\n // $startOfCurrentHour->setSecond( 0 );\n $startOfCurrentHourString = $startOfCurrentHour->timeStamp();\n\n // End time, End of Hour\n $endOfCurrentHour = new eZDateTime();\n $endOfCurrentHour->setMinute( 0 );\n $endOfCurrentHour->setSecond( 0 );\n $endOfCurrentHour->adjustDateTime( -1, 59, 59, 0, 0, 0 );\n $endOfCurrentHourString = $endOfCurrentHour->timeStamp();\n\n // Debug\n $eventName = $event->attribute('name');\n print_r( 'Name: '. $eventName );\n print_r(\"\\n\" );\n\n if( $eventDateTime->isGreaterThan( $startOfCurrentHour, true ) && $eventDateTimeString <= $ts )\n {\n $ret = true;\n print_r(\"Notify users: TRUE\\n\");\n\n // Debug\n /*\n\n // Fetch current datetime object\n $cDateTime = new eZDateTime();\n $cDateTimeString = $cDateTime->timeStamp();\n\n\n print_r(\"\\neventDateTime : $eventDateTimeString\\n\\n\");\n print_r(\"Now : $cDateTimeString\\n\");\n print_r(\"(lte) startOfCurrentHour: $startOfCurrentHourString \\n\");\n print_r(\"(lte) endOfCurrentHour: $endOfCurrentHourString \\n\\n\");\n\n\n print_r(\"\\n\" );\n print_r( 'Now: '. $cDateTimeString .' == '. $cDateTime->toString() );\n print_r(\"\\n\");\n\n\n print_r( 'cStart: '. $startOfCurrentHourString .' == '. $startOfCurrentHour->toString() );\n print_r(\"\\n\");\n\n print_r( 'cEnd: '. $endOfCurrentHourString .' == '. $endOfCurrentHour->toString() );\n print_r(\"\\n\\n\");\n\n print_r( 'Event Time: '. $eventDateTimeString .' == '. $eventDateTime->toString() );\n print_r(\"\\n\");\n\n print_r( 'eStart: '. $startEventDateRangeString .' == '. $startEventDateRange->toString() );\n print_r(\"\\n\");\n\n print_r( 'eEnd: '. $endEventDateRangeString .' == '. $endEventDateRange->toString() );\n print_r(\"\\n\\n\");\n */\n }\n }\n return $ret;\n }", "public function testEmittedEventName()\n {\n $expected = array(\n 'request.before_send' => 'onBeforeSend'\n );\n $this->assertEquals($expected, DaWandaPlugin::getSubscribedEvents());\n }", "public function isPropagationStopped($event = null) : bool;", "static public function hasListeners($eventName) {\n return !empty(self::$listeners[$eventName]);\n }", "public function shouldDiscoverEvents(): bool\n {\n return false;\n }", "public static function hasAttachedEvents($handler)\n {\n return (\n isset(static::$events[$handler]) &&\n is_array(static::$events[$handler])\n );\n }", "public static function failed_event_method()\n {\n return false;\n }", "public function event_has_run($name)\r\n\t{\r\n\t\treturn isset($this->observer_has_run[$name]);\r\n\t}", "public function hasListeners($event)\n {\n return isset($this->listeners[$event]);\n }", "abstract public function getEventName();", "static public function dispatchEvent(slEvent &$event) {\n if (!self::hasListeners($event->getName())) return false;\n\n $event->setState(slEventState::FIRED);\n foreach(self::$listeners[$event->getName()] as $listener) {\n if (is_array($listener)) {\n call_user_func($listener, $event);\n } else {\n $method = 'on'.slInflector::camelCase($event->getName());\n if (method_exists($listener,$method)) {\n $listener->$method($event);\n }\n }\n if ($event->isStopped()) return false;\n\n }\n $event->setState(slEventState::FINISHED);\n return true;\n }", "protected function mustTakeAction(string $eventName): bool\n {\n }", "public function testEvent()\n {\n $dispatcher = new Events();\n $this->app->bind(DispatcherInterface::class, function() use ($dispatcher) {\n return $dispatcher;\n });\n $response = (new Command())->testEvent(new Event());\n $event = array_shift($response);\n\n $this->assertSame(Event::class, $event['name'], 'The event that should have been dispatched should match the event passed to event().');\n $this->assertFalse($event['halt'], 'The event should not halt when dispatched from event().');\n }", "private function checkEventNotBookedByCreator(){\n $event = Event::find($this->id);\n\n return($event->host != Auth::id());\n }", "protected static function check_parent_class( $class ) {\n\t\tif ( is_subclass_of( $class, 'ht_dms\\api\\internal\\actions\\action' ) ) {\n\t\t\treturn true;\n\n\t\t}\n\n\t}", "public function shouldDiscoverEvents()\n {\n return true;\n }", "public static function Has($sName){\n $oThis = self::CreateInstanceIfNotExists();\n $sName = strtolower(str_replace(array(\"/\", \"\\\\\", \"--\"), \"-\", $sName));//Bugfix \n return array_key_exists($sName, $oThis->aEvents);\n }", "public function hasClass($class);", "public static function adminHeadCheck()\n {\n global $post;\n if (\n !$post\n ||\n !property_exists($post, 'post_type')\n ||\n $post->post_type != 'event'\n ) {\n return true;\n }\n // Force a setup_postdata.\n setup_postdata($post);\n return true;\n }", "private function checkEventDateNotDue(){\n $event = Event::find($this->id);\n $now = Carbon::now();\n \n $startTime = Carbon::createFromFormat('Y-m-d H:i:s', $event->start_time);\n return $startTime->gt($now);\n }", "protected function isValidEvent(Event $event): bool\n {\n $valid = true;\n\n // some special fields must be set\n if (\n empty($event->getEventType()) ||\n !$event->getEventBegin() instanceof \\DateTime\n ) {\n $valid = false;\n }\n\n return $valid;\n }", "protected function assertCancelingEvent($event_type) {\n return !empty($this->configuration['event_settings'][$event_type]);\n }", "final public function allowsEvents() {\n\t\treturn false;\n\t}", "function canUpdateBGEvents() {\n if ($this->fields[\"background\"]\n && !Session::haveRight(self::$rightname, self::MANAGE_BG_EVENTS)) {\n return false;\n }\n\n return true;\n }", "public function isSetEventCode()\n {\n return !is_null($this->_fields['EventCode']['FieldValue']);\n }", "function isCustomEventCreator($event_id, $judge_id){\n\t$data = M('customevent');\n\tif((int)$event_id>=1 && (int)$judge_id>=1){\n\t\t$condition = Array('event_id' => $event_id, 'judge_id' => $judge_id);\n\t\tif($data->where($condition)->find()){\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}\n}", "protected static function check_interface( $class ) {\n\n\t\tif ( ! class_exists( $class ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$interfaces = class_implements( $class, false );\n\n\t\tif ( in_array( 'ht_dms\\api\\internal\\actions\\action_interface', $interfaces ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t}", "public function isAppEventEnabled()\n {\n return true;\n }", "public function getEventClass()\n {\n return $this->eventClass;\n }", "public function isSetEventDate()\n {\n return !is_null($this->_fields['EventDate']['FieldValue']);\n }", "function checkin()\r\n\t{\r\n\t\tif ($this->_id)\r\n\t\t{\r\n\t\t\t$event = & JTable::getInstance('eventlist_events', '');\r\n\t\t\treturn $event->checkin($this->_id);\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private static function hasProperty($class, $name)\n\t{\n\t\t$prop = & self::$props[$class][$name];\n\t\tif ($prop === NULL) {\n\t\t\t$prop = FALSE;\n\t\t\ttry {\n\t\t\t\t$rp = new \\ReflectionProperty($class, $name);\n\t\t\t\tif ($name === $rp->getName() && $rp->isPublic() && !$rp->isStatic()) {\n\t\t\t\t\t$prop = preg_match('#^on[A-Z]#', $name) ? 'event' : TRUE;\n\t\t\t\t}\n\t\t\t} catch (\\ReflectionException $e) {}\n\t\t}\n\t\treturn $prop;\n\t}", "private function _isRejected($event)\n {\n return in_array(\n $event,\n array('catalogsearch_advanced_result', 'catalogsearch_advanced_index')\n );\n }", "function isPastEvent($newEventID){\r\n\t\tif(!$this->DBLogin()){\r\n $this->HandleError(\"Database login failed!\");\r\n return false;\r\n }\r\n\t\t\r\n\t\t//check that the event is not a past event.\r\n\t\t//the user should not be able to edit the event when it is past.\r\n\t\t\r\n\t\t\r\n\t\t\r\n if(!$this->EnsureRegTable()){\r\n return false;\r\n }\r\n\t\t\r\n\t\tif(!$this->EnsureMyEventsTable($formvars['UuserName'])){\r\n return false;\r\n }\r\n\t\t\r\n if(!$this->IsFieldUnique($formvars, 'email')){\r\n $this->HandleError(\"This email is already registered\");\r\n return false;\r\n }\r\n \r\n if(!$this->IsFieldUnique($formvars, 'username')){\r\n $this->HandleError(\"This UserName is already used. Please try another username\");\r\n return false;\r\n }\r\n \r\n if(!$this->InsertIntoEventAdvisorDB($formvars)){\r\n $this->HandleError(\"Inserting to Database failed!\");\r\n return false;\r\n }\r\n return true;\r\n\t}", "public function test_is_event_ignored(event_base $event) {\n if (!PHPUNIT_TEST) {\n throw new \\coding_exception('Public test method can only be invoked by PHPUnit');\n }\n return $this->is_event_ignored($event);\n }", "public static function containerLogicCheck(\\Elgg\\Event $elgg_event) {\n\t\tif ($elgg_event->getParam('subtype') !== 'event') {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$container = $elgg_event->getParam('container');\n\t\tif ($container instanceof \\ElggGroup) {\n\t\t\t$who_create_group_events = elgg_get_plugin_setting('who_create_group_events', 'event_manager'); // group_admin, members\n\t\t\tif (empty($who_create_group_events)) {\n\t\t\t\t// no one can create\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$user = $elgg_event->getUserParam();\n\t\t\t$user_guid = $user instanceof \\ElggUser ? $user->guid : 0;\n\t\t\tif ($who_create_group_events === 'group_admin' && !$container->canEdit($user_guid)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// in other group case let regular checks take place\n\t\t} else {\n\t\t\t$who_create_site_events = elgg_get_plugin_setting('who_create_site_events', 'event_manager');\n\t\t\tif ($who_create_site_events === 'admin_only' && !elgg_is_admin_logged_in()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function shouldntRaiseAnEvent()\n {\n }", "public function isGroupEvent()\n {\n return $this->baseEvent->isGroupEvent();\n }" ]
[ "0.72293913", "0.70172143", "0.69290346", "0.68166214", "0.6752141", "0.6751428", "0.6666463", "0.6615511", "0.6573287", "0.6511448", "0.6510004", "0.6503724", "0.6461029", "0.6453831", "0.6449916", "0.6435096", "0.64016354", "0.63838166", "0.6372109", "0.6321015", "0.6280456", "0.62703055", "0.6231536", "0.620034", "0.61688864", "0.6168642", "0.61384493", "0.61257875", "0.611459", "0.60939896", "0.6080267", "0.60449964", "0.6032136", "0.6029254", "0.6019291", "0.60031986", "0.5979043", "0.59703636", "0.59431076", "0.5930148", "0.5907149", "0.5893118", "0.58901584", "0.5878234", "0.5868624", "0.58651185", "0.5850059", "0.58076954", "0.5794031", "0.57848775", "0.5775095", "0.5770125", "0.57631814", "0.5761308", "0.57543707", "0.57523763", "0.5728715", "0.57207394", "0.5710332", "0.57000303", "0.5696082", "0.5676218", "0.56630415", "0.5636103", "0.5623236", "0.5619757", "0.56183714", "0.56088024", "0.55963224", "0.5592708", "0.5590232", "0.5583234", "0.557644", "0.5570283", "0.555517", "0.55469793", "0.55441827", "0.55424535", "0.55391854", "0.5535641", "0.5530944", "0.5526229", "0.55218935", "0.5509885", "0.55070996", "0.55007905", "0.5497678", "0.54808706", "0.54803324", "0.54543865", "0.5449868", "0.5439977", "0.54368097", "0.5433896", "0.5431469", "0.5430766", "0.5421049", "0.5415139", "0.54005575", "0.53970194" ]
0.6903131
3
test the instance is loaded correctly
public function testInstance() { $this->assertInstanceOf('EventCore', $this->Event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _loadRealInstance() {}", "public function loadTheInstance();", "function testLoad()\n {\n $this->assertTrue(true);\n }", "public function testAutoload()\n {\n $class = new Piw();\n $this->assertTrue($class->autoloaded());\n }", "public function testArbitraryLoad()\n {\n // initialize a module with a controller.\n P4Cms_Module::setCoreModulesPath(TEST_ASSETS_PATH . '/core-modules');\n P4Cms_Module::fetch('Core')->init();\n\n // if registered, de-register it.\n if ($this->_isRegistered()) {\n $this->_disableAutoloader();\n }\n\n $this->assertFalse(\n class_exists('Core_Some_Class'),\n \"Core_Some_Class class should not be registered\"\n );\n\n $this->_enableAutoloader();\n $this->assertTrue(\n class_exists('Core_Some_Class'),\n \"Core_Some_Class class should be registered\"\n );\n }", "protected function assertLoaded()\n\t{\n\t\tif (!$this->hasLoaded) {\n\t\t\t$this->settings = $this->loadSettings();\n\n\t\t\t$this->hasLoaded = true;\n\t\t}\n\t}", "public function testIsLoaded()\n {\n $this->fixtures('users', 'articles');\n $user = User::find($this->users('derek')->id);\n\n $this->assertFalse($user->reflectOnAssociation('Articles')->isLoaded());\n $user->articles;\n $this->assertTrue($user->reflectOnAssociation('Articles')->isLoaded());\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function isLoaded();", "public function checkIfCanLoad()\r\n\t{\r\n\t\treturn true;\r\n\t}", "public static function isLoaded();", "public function __load()\r\n {\r\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\r\n }", "public function __load()\r\n {\r\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\r\n }", "public function __load()\r\n {\r\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\r\n }", "public function __load()\r\n {\r\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\r\n }", "public function __load()\r\n {\r\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\r\n }", "public function __load();", "public function testLoadInfo() {\n $this->assertInstanceOf('Titon\\Common\\Augment\\InfoAugment', $this->object->getInfoAugment());\n }", "public function testLoadParentClassNotDefined()\r\n\t\t{\r\n\t\t\tORM::init('mysql:host=localhost;dbname=rocket_orm', 'orm_username', 'orm_password');\r\n\t\t\t\r\n\t\t\tORM::load(1);\r\n\t\t}", "public function testInstance() { }", "public function testLoad()\n {\n $fixture = new Mad_Test_Fixture_Base($this->_conn, 'unit_tests');\n $this->assertEquals('0', $this->_countRecords());\n\n $fixture->load();\n $this->assertEquals('6', $this->_countRecords());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());\n }", "protected function setUp()\n {\n $this->object = new Loader;\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }" ]
[ "0.7495609", "0.739474", "0.72154385", "0.69702554", "0.6862832", "0.68415576", "0.6810612", "0.6717684", "0.6717684", "0.6717684", "0.67165565", "0.65726596", "0.6558449", "0.6558448", "0.6558448", "0.6558448", "0.6554209", "0.6554209", "0.6545775", "0.65420663", "0.65325916", "0.6504805", "0.6504384", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6493336", "0.6488264", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015", "0.6485015" ]
0.0
-1
test getting the plugins details
public function testPluginRollCall() { if (!$this->_hasTrigger('pluginRollCall')) { return false; } $expected = $this->_manualCall('pluginRollCall', $this->ObjectEvent); $result = $this->Event->trigger($this->ObjectObject, $this->plugin . '.pluginRollCall'); $this->assertEquals($expected, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPlugins();", "abstract public function pluginDetails();", "public function getRequiredPlugins() {}", "private function pageGetPlugins() {\n\t\techo \"<reply action=\\\"ok\\\">\\n\";\r\n\t\t\r\n\t\t//To get the status of all plugins, they must all be started first.\n\t\t//As a safety measure, check that it's not running at boot.\n\t\t$this->framework->startAllPlugins ( false );\r\n\t\t\r\n\t\t//Print each plugin\n\t\tforeach ( $this->data as $plugin ) {\r\n\t\t\t$plugin_object = $this->framework->getPlugin ( ( string ) $plugin ['name'] );\r\n\t\t\t$status = \"\";\r\n\t\t\tif (isset ( $plugin_object )) {\r\n\t\t\t\t$status = $plugin_object->getStatus ();\r\n\t\t\t} else if (( string ) $plugin ['enabled'] == \"true\") {\r\n\t\t\t\tthrow new Exception('The module '.$plugin['name'].' could not be retrieved');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo \"<plugin status=\\\"{$status}\\\" \";\r\n\t\t\t//also print all other attributes the plugin has.\n\t\t\tforeach ( $plugin->attributes () as $name => $value ) {\r\n\t\t\t\techo \" $name = \\\"$value\\\"\";\r\n\t\t\t}\r\n\t\t\techo \"/>\\n\"; //Closing tag of plugin\n\t\t}\r\n\t\techo \"</reply>\";\r\n\t}", "private function plugins(){\n $all_plugins = explode(',', json_decode(file_get_contents($this->pluginsJson))->all->names);\n debug($all_plugins);\n die;\n }", "public function plugin_info()\n {\n }", "protected function get_installed_plugins()\n {\n }", "public function listPlugin()\n\t{\n\t\t\n\t}", "public function test_plugin_isLoaded()\n {\n global $plugin_controller;\n $this->assertTrue(\n in_array(\n syntax_plugin_related::PLUGIN_NAME,\n $plugin_controller->getList()),\n syntax_plugin_related::PLUGIN_NAME . \" plugin is loaded\"\n );\n }", "function getEnabledPlugins();", "public function test_plugininfo() {\n $file = __DIR__.'/../plugin.info.txt';\n $this->assertFileExists($file);\n\n $info = confToHash($file);\n\n $this->assertArrayHasKey('base', $info);\n $this->assertArrayHasKey('author', $info);\n $this->assertArrayHasKey('email', $info);\n $this->assertArrayHasKey('date', $info);\n $this->assertArrayHasKey('name', $info);\n $this->assertArrayHasKey('desc', $info);\n $this->assertArrayHasKey('url', $info);\n\n $this->assertEquals('door43obs', $info['base']);\n $this->assertRegExp('/^https?:\\/\\//', $info['url']);\n $this->assertTrue(mail_isvalid($info['email']));\n $this->assertRegExp('/^\\d\\d\\d\\d-\\d\\d-\\d\\d$/', $info['date']);\n $this->assertTrue(false !== strtotime($info['date']));\n }", "function get_mu_plugins()\n {\n }", "function wp_get_mu_plugins()\n {\n }", "function wp_get_active_and_valid_plugins()\n {\n }", "public function get_meta_plugins() {\n\t\tSingleton::get_instance( 'Plugin', $this )->get_remote_plugin_meta();\n\t}", "public function loadPlugins() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('loadPlugins', func_get_args()));\n }", "public function testGetPlugin()\n {\n Plugin::load('TestPlugin');\n $table = TableRegistry::get('TestPlugin.TestPluginComments', ['connection' => 'test']);\n\n $class = 'TestPlugin\\Model\\Table\\TestPluginCommentsTable';\n $this->assertInstanceOf($class, $table);\n $this->assertTrue(\n TableRegistry::exists('TestPluginComments'),\n 'Short form should exist'\n );\n $this->assertTrue(\n TableRegistry::exists('TestPlugin.TestPluginComments'),\n 'Long form should exist'\n );\n\n $second = TableRegistry::get('TestPlugin.TestPluginComments');\n $this->assertSame($table, $second, 'Can fetch long form');\n\n $second = TableRegistry::get('TestPluginComments');\n $this->assertSame($table, $second);\n }", "function install_plugin_information()\n {\n }", "public function getPlugin();", "public function getPlugin();", "function testPluginId()\n {\n\t $this->assertEquals(XiptLibApps::getPluginId('joomla', 'authentication'),XIPT_TEST_AUTHENTICATION_PLUGIN);\n\t $this->assertEquals(XiptLibApps::getPluginId('content', 'search'),XIPT_TEST_SEARCH_PLUGIN);\t \n\t \t\n\t // invalid search\n\t $this->assertEquals(XiptLibApps::getPluginId('joomla', 'stupid'),false);\n\t \n\t // cached search\n\t $this->assertEquals(XiptLibApps::getPluginId('content', 'search'),XIPT_TEST_SEARCH_PLUGIN);\n\t $this->assertEquals(XiptLibApps::getPluginId('joomla', 'stupid'),false);\n\t \n\n }", "abstract protected function get_plugin_components();", "abstract protected function get_prerequisite_plugins();", "public function testGetPlugin()\n {\n $this->markTestIncomplete('Do this after collection class is done');\n Plugin::load('TestPlugin');\n $table = CollectionRegistry::get('TestPlugin.Comments');\n $this->assertInstanceOf('TestPlugin\\Model\\Collection\\CommentsCollection', $table);\n $this->assertFalse(\n CollectionRegistry::exists('Comments'),\n 'Short form should NOT exist'\n );\n $this->assertTrue(\n CollectionRegistry::exists('TestPlugin.Comments'),\n 'Long form should exist'\n );\n\n $second = CollectionRegistry::get('TestPlugin.Comments');\n $this->assertSame($table, $second, 'Can fetch long form');\n }", "public function obtenerPlugins(){\n if ($this->getSelectedLicense() > empresa::LICENSE_FREE) {\n return plugin::getAll();\n }\n\n return false;\n //return $this->obtenerObjetosRelacionados( TABLE_EMPRESA .\"_plugin\", \"plugin\");\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 get_test_plugin_version()\n {\n }", "protected function get_detected_plugins () {\n //** Check if get_plugins() function exists */\n if ( ! function_exists( 'get_plugins' ) ) {\n require_once ABSPATH . 'wp-admin/includes/plugin.php';\n }\n $response = array();\n $products = get_plugins();\n if ( is_array( $products ) && ( 0 < count( $products ) ) ) {\n $reference_list = $this->get_product_reference_list();\n //echo \"<pre>\"; print_r( $reference_list ); echo \"</pre>\"; die();\n $activated_products = $this->get_activated_products();\n if ( is_array( $reference_list ) && ( 0 < count( $reference_list ) ) ) {\n foreach ( $products as $k => $v ) {\n if ( in_array( $k, array_keys( $reference_list ) ) ) {\n $status = 'inactive';\n if ( in_array( $k, array_keys( $activated_products ) ) ) { \n $status = 'active'; \n }\n $response[$k] = array( \n 'product_name' => $v['Name'], \n 'product_version' => $v['Version'], \n 'instance_key' => $reference_list[$k]['instance_key'], \n 'product_id' => $reference_list[$k]['product_id'],\n 'product_status' => $status, \n 'product_file_path' => $k,\n 'errors_callback' => isset( $reference_list[$k]['errors_callback'] ) ? $reference_list[$k]['errors_callback'] : false,\n );\n }\n }\n }\n }\n return $response;\n }", "public function getPlugins()\n {\n $this->getPlugin('base');\n }", "public function test_pluginFilterDependency()\n {\n $controller = new elizabethae\\controller\\pluginFilterController(\"indexAction\");\n\n $res = $controller->get_data();\n $this->assertEquals($res[\"res\"], array(\n \"parse_mail\",\n \"load_config\",\n \"get_user\",\n \"render_mail\",\n \"send_mail\",\n \"write_mail_log\"\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}", "public function get_plugins() {\n\t\treturn get_plugins();\n\t}", "abstract function is_plugin();", "function getPlugins() {\n return $this->plugins;\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(): array\n {\n return [\n 'name' => 'RoutesBrowser',\n 'description' => 'Plugin for browse routes',\n 'author' => 'GromIT',\n 'icon' => 'icon-question'\n ];\n }", "public function retrievesAllPluginsOrderedByName()\n {\n\n $plugin = new MockedPlugin();\n $anotherPlugin = new MockedPlugin();\n $anotherPlugin->author = 'Another author';\n $anotherPlugin->label = 'Another label';\n $anotherPlugin->name = 'Another name';\n $anotherPlugin->active = TRUE;\n\n $query = $this->getMock('Doctrine\\ORM\\Query', array('execute'));\n $query->expects($this->once())\n ->method('execute')\n ->will($this->returnValue(\n array($plugin, $anotherPlugin)));\n\n $builder = $this->getMock('Doctrine\\ORM\\QueryBuilder', array('addOrderBy', 'getQuery'));\n $builder->expects($this->once())\n ->method('addOrderBy')\n ->with(\n 'plugin.name'\n );\n\n $builder->expects($this->once())\n ->method('getQuery')\n ->will($this->returnValue($query));\n\n $repository = $this->getMock('Shopware\\Components\\Model\\ModelRepository', array('createQueryBuilder'));\n $repository->expects($this->once())\n ->method('createQueryBuilder')\n ->with('plugin')\n ->will(\n $this->returnValue($builder)\n );\n\n $shop = $this->getMock('Avantgarde\\ShopwareCLI\\Shop', array('getRepository'));\n $shop->expects($this->once())\n ->method('getRepository')\n ->with('Shopware\\Models\\Plugin\\Plugin')\n ->will(\n $this->returnValue($repository)\n );\n\n $pluginList = new PluginListCommand();\n $pluginList->setShop($shop);\n\n $application = new Application();\n $application->add($pluginList);\n\n $command = $application->find('plugin:list');\n $commandTester = new CommandTester($command);\n $commandTester->execute(array('command' => $command->getName()));\n\n $this->assertRegExp('/A name/', $commandTester->getDisplay());\n $this->assertRegExp('/A label/', $commandTester->getDisplay());\n $this->assertRegExp('/An author/', $commandTester->getDisplay());\n $this->assertRegExp('/No/', $commandTester->getDisplay());\n\n $this->assertRegExp('/Another name/', $commandTester->getDisplay());\n $this->assertRegExp('/Another label/', $commandTester->getDisplay());\n $this->assertRegExp('/Another author/', $commandTester->getDisplay());\n $this->assertRegExp('/Yes/', $commandTester->getDisplay());\n\n }", "private static function plugins()\n {\n $files = ['Plugins'];\n $folder = static::$root.'Plugins'.'/';\n\n self::call($files, $folder);\n\n $files = ['AutoloadFileNotFoundException', 'InfoStructureException'];\n $folder = static::$root.'Plugins/Exceptions'.'/';\n\n self::call($files, $folder);\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}", "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 wpcom_vip_get_loaded_plugins() {\n\tglobal $vip_loaded_plugins;\n\n\tif ( ! isset( $vip_loaded_plugins ) )\n\t\t$vip_loaded_plugins = array();\n\n\treturn $vip_loaded_plugins;\n}", "public function getPluginManager();", "public function getActivePluginsList()\n\t{\n\t\techo \"Active plugins:\\n\";\n\t\tforeach (get_plugins() as $plugin_name => $plugin_details)\n\t\t{\n\t\t\tif (is_plugin_active($plugin_name) === true)\n\t\t\t{\n\t\t\t\tforeach ($plugin_details as $details_key => $details_value)\n\t\t\t\t{\n\t\t\t\t\tif (in_array($details_key, array('Name', 'Version', 'PluginURI')))\n\t\t\t\t\t{\n\t\t\t\t\t\techo $details_key . \" : \" . $details_value . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo \"Path : \" . $plugin_name . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "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' => 'Klyp Page Builder',\n 'description' => 'Easily order component on pages.',\n 'author' => 'Klyp',\n 'icon' => 'icon-leaf'\n ];\n }", "function getPlugins() {\n\n return $this->plugins;\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' => 'Iklan',\n 'description' => 'Pengaturan Iklan',\n 'author' => 'PanatauSolusindo',\n 'icon' => 'icon-diamond'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'EaxOctober',\n 'description' => 'Стандартное расширение Quadrowin',\n 'author' => 'quadrowin',\n 'icon' => 'icon-leaf'\n ];\n }", "private static function load_plugins()\n\t{\n\t\tstatic $loaded;\n\t\t\n\t\tif ($loaded === NULL)\n\t\t{\n\t\t\tglobal $doc;\n\t\t\t\n\t\t\t$key = $doc['page_id'];\n\t\t\t\n\t\t\t$plugins = TC::config('tc.plugins');\n\t\t\t\n\t\t\t$plugin_files = $plugins['global'];\n\t\t\t\n\t\t\tif (isset($plugins[$key]) && is_array($plugins[$key]))\n\t\t\t{\n\t\t\t\t$plugin_files = array_merge($plugin_files, $plugins[$key]);\n\t\t\t}\n\t\t\t\n\t\t\t//echo '<div style=\"padding:20px; background:#efefef;font-size:16px;color:#333;text-align:left;\"><pre>';\n\t\t\t\n\t\t\tforeach ($plugin_files as $plugin)\n\t\t\t{\n\t\t\t\t$plugin = TC_PLUGINS_PATH.'/plugins.'.$plugin.'.php';\n\t\t\t\t$plugin_basename = basename($plugin);\n\t\t\t\t\n\t\t\t\tif (file_exists($plugin))\n\t\t\t\t{\n\t\t\t\t\tinclude($plugin);\n\t\t\t\t\t\n\t\t\t\t\t$cleanup = array('plugins.', '.php', '.');\n\t\t\t\t\t$cleaned = array('', '', '_');\n\t\t\t\t\t\n\t\t\t\t\t$plugin_name = ucwords(strtolower(str_replace($cleanup, $cleaned, $plugin_basename)));\n\t\t\t\t\t$plugin_class_name = 'TC_'.$plugin_name;\n\t\t\t\t\t\n\t\t\t\t\tglobal ${$plugin_name};\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//$plugin_class = new ReflectionClass($plugin_class_name);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// autoload? // ${$plugin_name} = $plugin_class->newInstance();\n\t\t\t\t\t\tTC::$plugins[$plugin_name] = 1;\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception $e)\n\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//echo '<div style=\"padding:20px; background:#efefef;font-size:16px;color:#333;text-align:left;\"><pre>';\n\t\t\t\t\t//var_dump($plugin_name);\n\t\t\t\t\t//var_dump($plugin_class);\n\t\t\t\t\t//var_dump($contact_form);\n\t\t\t\t\t//echo '</pre></div>';\n\t\t\t\t\t\n\t\t\t\t\t//echo \"\\n\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//echo \"\\nskipped:\\n\";\n\t\t\t\t\t//var_dump(basename($plugin));\n\t\t\t\t\t//echo \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//echo '</pre></div>';\n\t\t\t\n\t\t\t$loaded = true;\n\t\t}\n\t}", "public function getPlugins()\n {\n return $this->getProperty()->plugins;\n }", "function loadPlugins() {\n\n\t\t// load and parse the plugins file ...\n\t\tif ($plugins = $this->xml_parser->parseXml('plugins.xml')) {\n\n\t\t\t// take each plugin tag ...\n\t\t\tforeach ($plugins['ASECO_PLUGINS']['PLUGIN'] as $plugin) {\n\n\t\t\t\t// showup message\n\t\t\t\t$this->console_text('[Aseco] Load plugin [' . $plugin . ']');\n\n\t\t\t\t// and include the value between ...\n\t\t\t\trequire_once('plugins/' . $plugin);\n\t\t\t}\n\t\t}\n\t}", "public function testPluginInstance()\n {\n $this->assertInstanceOf(\n OrderOnWhatsapp::class,\n OrderOnWhatsapp::$plugin\n );\n }", "function loadPlugins() {\n\n\t\t// load and parse the plugins file\n\t\tif ($plugins = $this->xml_parser->parseXml('plugins.xml')) {\n\t\t\tif (!empty($plugins['XASECO2_PLUGINS']['PLUGIN'])) {\n\t\t\t\t// take each plugin tag\n\t\t\t\tforeach ($plugins['XASECO2_PLUGINS']['PLUGIN'] as $plugin) {\n\t\t\t\t\t// log plugin message\n\t\t\t\t\t$this->console_text('[XAseco2] Load plugin [' . $plugin . ']');\n\t\t\t\t\t// include the plugin\n\t\t\t\t\trequire_once('plugins/' . $plugin);\n\t\t\t\t\t$this->plugins[] = $plugin;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\ttrigger_error('Could not read/parse plugins list plugins.xml !', E_USER_ERROR);\n\t\t}\n\t}", "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}", "function loadPlugins() {\r\n\t\tforeach ($this->modx->ms2Plugins->plugins as $plugin) {\r\n\t\t\tif (!empty($plugin['manager']['msProductData'])) {\r\n\t\t\t\t$this->addJavascript($plugin['manager']['msProductData']);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "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 subsite_manager_get_plugins() {\n\n // grab plugins\n $options = array(\n 'type' => 'object',\n 'subtype' => 'plugin',\n 'limit' => false\n );\n\n $old_ia = elgg_set_ignore_access(true);\n $plugins = elgg_get_entities($options);\n elgg_set_ignore_access($old_ia);\n\n return $plugins;\n }", "function get_plugins($plugin_folder = '')\n {\n }", "function _manually_load_plugin() {\n \n require TEST_PLUGIN_FILE;\n \n // Make sure plugin is installed here ...\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 }", "protected function getInstalledPlugins()\n\t{\n\t\tif(!class_exists('Zend_Registry'))\n\t\t{\n\t\t\tthrow new Exception(\"Not possible to list installed plugins (case LogStats module)\");\n\t\t}\n\t\tif(!is_null(Zend_Registry::get('config')->PluginsInstalled->PluginsInstalled))\n\t\t{\n\t\t\treturn Zend_Registry::get('config')->PluginsInstalled->PluginsInstalled->toArray();\n\t\t}\n\t\telseif(is_array(Zend_Registry::get('config')->PluginsInstalled))\n\t\t{\n\t\t\treturn Zend_Registry::get('config')->PluginsInstalled;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Zend_Registry::get('config')->PluginsInstalled->toArray();\n\t\t}\n\t}", "abstract function is_plugin_new_install();", "public function checkPlugins() {\n $types = Hash::extract($this->records, '{n}.' . $this->Version->Version->alias . '.type');\n $types = $plugins = array_unique($types);\n\n // Remove app from it\n $index = array_search('app', $plugins);\n if ($index !== false) {\n unset($plugins[$index]);\n }\n\n // Try to load them\n CakePlugin::load($plugins);\n }", "public function servePluginInfo()\n {\n\n $pluginInfo = [\n 'name' => 'TODO Plugin',\n 'description' => [\n \"Zuri.chat Plugin\",\n \"A plugin to manage individual/team project's task\"\n ],\n 'scaffold_structure' => 'Monolith',\n 'team' => 'HNG-8.0/Team-Kant',\n 'ping_url' => 'https://todo.zuri.chat/api/ping',\n 'html_url' => 'https://todo.zuri.chat/#/main',\n 'sidebar_url' => 'https://todo.zuri.chat/#/main',\n ];\n return response()->json([\n 'status' => 'success',\n 'type' => 'plugin information',\n 'plugin_info' => $pluginInfo\n ], 200);\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 }", "private function loadPlugins()\n\t{\n\t\t$plugins = plugin_installed_list();\n\t\t$plugins = collect($plugins)->map(function ($item, $key) {\n\t\t\tif (is_object($item)) {\n\t\t\t\t$item = Arr::fromObject($item);\n\t\t\t}\n\t\t\tif (isset($item['item_id']) && !empty($item['item_id'])) {\n\t\t\t\t$item['installed'] = plugin_check_purchase_code($item);\n\t\t\t}\n\t\t\t\n\t\t\treturn $item;\n\t\t})->toArray();\n\t\t\n\t\tConfig::set('plugins', $plugins);\n\t\tConfig::set('plugins.installed', collect($plugins)->whereStrict('installed', true)->toArray());\n\t}", "function wp_dashboard_plugins()\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 static function get_plugin_info() {\n\t\t$cache = get_transient( self::TRANSIENT );\n\t\tif ( $cache ) {\n\t\t\treturn $cache;\n\t\t}\n\n\t\t$request = wp_remote_get( self::API_URL, [ 'timeout' => 20 ] );\n\t\tif ( ! is_wp_error( $request ) && is_array( $request ) ) {\n\t\t\t$response = json_decode( $request['body'], true );\n\t\t\tset_transient( self::TRANSIENT, $response, ( 12 * HOUR_IN_SECONDS ) );\n\t\t\treturn $response;\n\t\t}\n\n\t\treturn false;\n\t}", "public function pluginDetails()\n {\n return [\n 'name' => 'tattler',\n 'description' => 'No description provided yet...',\n 'author' => 'Grohman',\n 'icon' => 'icon-leaf'\n ];\n }", "function check_capabilities() {\n\n\t\tif ( ! current_user_can( 'install_plugins' ) ) {\n\t\t\treturn;\n\t\t\t// TODO: Error message\n\t\t}\n\n\t}", "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 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 }", "static final function getPlugins()\n {\n self::initPlugins();\n return self::$plugins;\n }", "function lambert_register_required_plugins() {\n /*\n * Array of plugin arrays. Required keys are name and slug.\n * If the source is NOT from the .org repo, then source is also required.\n */\n $plugins = array(\n\n array('name' => esc_html__('WPBakery Page Builder','lambert'),\n // The plugin name.\n 'slug' => 'js_composer',\n // The plugin slug (typically the folder name).\n 'source' => 'http://assets.cththemes.com/plugins/js_composer.zip',\n // The plugin source.\n 'required' => true,\n 'external_url' => esc_url(lambert_relative_protocol_url().'://codecanyon.net/item/visual-composer-page-builder-for-wordpress/242431' ),\n // If set, overrides default API URL and points to an external URL.\n\n 'function_to_check' => '',\n 'class_to_check' => 'Vc_Manager'\n ), \n\n array(\n 'name' => esc_html__('WooCommerce','lambert'),\n // The plugin name.\n 'slug' => 'woocommerce',\n // The plugin slug (typically the folder name).\n 'required' => true,\n // If false, the plugin is only 'recommended' instead of required.\n 'external_url' => esc_url(lambert_relative_protocol_url().'://wordpress.org/plugins/woocommerce/' ), \n // If set, overrides default API URL and points to an external URL.\n\n 'function_to_check' => '',\n 'class_to_check' => 'WooCommerce'\n ), \n\n array('name' => esc_html__('Redux Framework','lambert'),\n // The plugin name.\n 'slug' => 'redux-framework',\n // The plugin source.\n 'required' => true,\n // If false, the plugin is only 'recommended' instead of required.\n 'external_url' => esc_url(lambert_relative_protocol_url().'://wordpress.org/plugins/redux-framework/' ),\n // If set, overrides default API URL and points to an external URL.\n 'function_to_check' => '',\n 'class_to_check' => 'ReduxFramework'\n ), \n\n array(\n 'name' => esc_html__('Contact Form 7','lambert'),\n // The plugin name.\n 'slug' => 'contact-form-7',\n // The plugin slug (typically the folder name).\n 'required' => true,\n // If false, the plugin is only 'recommended' instead of required.\n 'external_url' => esc_url(lambert_relative_protocol_url().'://wordpress.org/plugins/contact-form-7/' ),\n // If set, overrides default API URL and points to an external URL.\n\n 'function_to_check' => 'wpcf7',\n 'class_to_check' => 'WPCF7'\n ), \n\n\n array(\n 'name' => esc_html__('CMB2','lambert'),\n // The plugin name.\n 'slug' => 'cmb2',\n // The plugin slug (typically the folder name).\n 'required' => true,\n // If false, the plugin is only 'recommended' instead of required.\n 'external_url' => esc_url(lambert_relative_protocol_url().'://wordpress.org/support/plugin/cmb2'),\n // If set, overrides default API URL and points to an external URL.\n\n 'function_to_check' => 'cmb2_bootstrap',\n 'class_to_check' => 'CMB2_Base'\n ),\n \n\n array(\n 'name' => esc_html__('Lambert Add-ons','lambert' ),\n // The plugin name.\n 'slug' => 'lambert-add-ons',\n // The plugin slug (typically the folder name).\n 'source' => 'lambert-add-ons.zip',\n // The plugin source.\n 'required' => true,\n // If false, the plugin is only 'recommended' instead of required.\n\n 'force_deactivation' => true,\n\n 'function_to_check' => '',\n 'class_to_check' => 'Lambert_Addons'\n ), \n\n array(\n 'name' => esc_html__('Loco Translate','lambert'),\n // The plugin name.\n 'slug' => 'loco-translate',\n // The plugin slug (typically the folder name).\n 'required' => false,\n // If false, the plugin is only 'recommended' instead of required.\n 'external_url' => esc_url(lambert_relative_protocol_url().'://wordpress.org/plugins/loco-translate/'),\n // If set, overrides default API URL and points to an external URL.\n\n 'function_to_check' => 'loco_autoload',\n 'class_to_check' => 'Loco_Locale'\n ),\n\n \n array(\n 'name' => esc_html__('Envato Market','lambert' ),\n // The plugin name.\n 'slug' => 'envato-market',\n // The plugin slug (typically the folder name).\n 'source' => esc_url(lambert_relative_protocol_url().'://envato.github.io/wp-envato-market/dist/envato-market.zip' ),\n // The plugin source.\n 'required' => true,\n // If false, the plugin is only 'recommended' instead of required.\n 'external_url' => esc_url('//envato.github.io/wp-envato-market/' ),\n // If set, overrides default API URL and points to an external URL.\n\n 'function_to_check' => 'envato_market',\n 'class_to_check' => 'Envato_Market'\n ),\n\n array('name' => esc_html__('One Click Demo Import','lambert'),\n // The plugin name.\n 'slug' => 'one-click-demo-import',\n // The plugin slug (typically the folder name).\n 'required' => false,\n // If false, the plugin is only 'recommended' instead of required.\n 'external_url' => esc_url(lambert_relative_protocol_url().'://wordpress.org/plugins/one-click-demo-import/'),\n // If set, overrides default API URL and points to an external URL.\n\n 'function_to_check' => '',\n 'class_to_check' => 'OCDI_Plugin'\n ),\n\n array('name' => esc_html__('Regenerate Thumbnails','lambert'),\n // The plugin name.\n 'slug' => 'regenerate-thumbnails',\n // The plugin slug (typically the folder name).\n 'required' => false,\n // If false, the plugin is only 'recommended' instead of required.\n 'external_url' => esc_url(lambert_relative_protocol_url().'://wordpress.org/plugins/regenerate-thumbnails/' ),\n // If set, overrides default API URL and points to an external URL.\n\n 'function_to_check' => 'RegenerateThumbnails',\n 'class_to_check' => 'RegenerateThumbnails'\n ),\n\n \n\n\n );\n\n /*\n * Array of configuration settings. Amend each line as needed.\n *\n * TGMPA will start providing localized text strings soon. If you already have translations of our standard\n * strings available, please help us make TGMPA even better by giving us access to these translations or by\n * sending in a pull-request with .po file(s) with the translations.\n *\n * Only uncomment the strings in the config array if you want to customize the strings.\n */\n $config = array(\n 'id' => 'lambert', // Unique ID for hashing notices for multiple instances of TGMPA.\n 'default_path' => get_template_directory() . '/lib/plugins/', // Default absolute path to bundled plugins.\n 'menu' => 'tgmpa-install-plugins', // Menu slug.\n 'has_notices' => true, // Show admin notices or not.\n 'dismissable' => true, // If false, a user cannot dismiss the nag message.\n 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.\n 'is_automatic' => false, // Automatically activate plugins after installation or not.\n 'message' => '', // Message to output right before the plugins table.\n\n \n );\n\n tgmpa( $plugins, $config );\n}", "private function get_useful_plugins() {\n\t\t$available = get_transient( $this->plugins_cache_key );\n\t\t$hash = get_transient( $this->plugins_cache_hash_key );\n\t\t$current_hash = substr( md5( wp_json_encode( $this->useful_plugins ) ), 0, 5 );\n\n\n\t\tif ( $available !== false && $hash === $current_hash ) {\n\t\t\t$available = json_decode( $available, true );\n\n\t\t\tforeach ( $available as $slug => $args ) {\n\t\t\t\t$available[ $slug ]['cta'] = $this->plugin_helper->get_plugin_state( $slug );\n\t\t\t\t$available[ $slug ]['path'] = $this->plugin_helper->get_plugin_path( $slug );\n\t\t\t\t$available[ $slug ]['activate'] = $this->plugin_helper->get_plugin_action_link( $slug );\n\t\t\t\t$available[ $slug ]['deactivate'] = $this->plugin_helper->get_plugin_action_link( $slug, 'deactivate' );\n\t\t\t}\n\n\t\t\treturn $available;\n\t\t}\n\n\t\t$data = [];\n\t\tforeach ( $this->useful_plugins as $slug ) {\n\t\t\t$current_plugin = $this->plugin_helper->get_plugin_details( $slug );\n\t\t\tif ( $current_plugin instanceof \\WP_Error ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$data[ $slug ] = [\n\t\t\t\t'banner' => $current_plugin->banners['low'],\n\t\t\t\t'name' => html_entity_decode( $current_plugin->name ),\n\t\t\t\t'description' => html_entity_decode( $current_plugin->short_description ),\n\t\t\t\t'version' => $current_plugin->version,\n\t\t\t\t'author' => html_entity_decode( wp_strip_all_tags( $current_plugin->author ) ),\n\t\t\t\t'cta' => $this->plugin_helper->get_plugin_state( $slug ),\n\t\t\t\t'path' => $this->plugin_helper->get_plugin_path( $slug ),\n\t\t\t\t'activate' => $this->plugin_helper->get_plugin_action_link( $slug ),\n\t\t\t\t'deactivate' => $this->plugin_helper->get_plugin_action_link( $slug, 'deactivate' ),\n\t\t\t];\n\t\t}\n\n\t\tset_transient( $this->plugins_cache_hash_key, $current_hash );\n\t\tset_transient( $this->plugins_cache_key, wp_json_encode( $data ) );\n\n\t\treturn $data;\n\t}", "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 }", "public function get_plugins_data() {\n return $this->plugins_data;\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 }", "function _loadPluginData()\r\t{\r\t\t//$this->_db->setQuery( $query );\r\t\t$ext = $this->_ext;\r\t\tif(!isset($this->_installed->$ext)) {\r\t\t\t$this->loadInstalledPlugins();\r\t\t}\r\t\tif(isset($this->_installed->$ext)) $this->_data = $this->_installed->$ext;\r\r\t\treturn (boolean)$this->_data;\r\t}", "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 }", "public function get_plugins(){\n\t\t\t\n\t\t\t$this->load->dbutil(); \n\n\t\t\tif($this->dbutil->database_exists('wpadmin_localhost')){\n\n\t\t\t\t# Get the credentials from the database to populate the database below.\n\t\t \t$this->load->model('download_model');\t\n\n\t\t\t\t$query = $this\n\t\t\t\t\t\t\t->download_model\n\t\t\t\t\t\t\t->get_site_credentials();\n\n\t\t\t\t$host = $query[0]->admin_host;\n\t\t\t\t$user = $query[0]->admin_user;\n\t\t\t\t$pass = $query[0]->admin_password;\t\t\t\t\n\n\t\t\t\t$config['hostname'] = \"localhost\";\n\t\t\t $config['username'] = $user;\n\t\t\t $config['password'] = $pass;\n\t\t\t $config['database'] = \"wordpress_default_plugins\";\n\t\t\t $config['dbdriver'] = \"mysql\";\n\t\t\t $config['dbprefix'] = \"\";\n\t\t\t $config['pconnect'] = FALSE;\n\t\t\t $config['db_debug'] = TRUE;\n\t\t\t $config['cache_on'] = FALSE;\n\t\t\t $config['cachedir'] = \"\";\n\t\t\t $config['char_set'] = \"utf8\";\n\t\t\t $config['dbcollat'] = \"utf8_general_ci\";\n\n\t\t\t \t$db2 = $this->load->database($config,TRUE);\n\n\t\t\t\t$query = $db2->get('default_plugins');\n\n\t\t\t\t$query = $query->result();\t\n\n\t\t\t\treturn $query; \t\t\t\n\n\t\t\t}\telse {\n\t\t\t\tredirect('admin');\n\t\t\t}\n\n\n\t\t}", "function pi_test_plugin_pas_installe($plugin) {\n include_spip('inc/plugin');\n $arr = preg_grep('#^.*'.preg_quote($plugin).'/?.*$#i',liste_plugin_actifs());\n return !count($arr);\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 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 }", "static function plugins_loaded() {\n\n if ( !function_exists( 'is_plugin_active' ) ) {\n require_once ABSPATH . '/wp-admin/includes/plugin.php';\n }\n\n // check if MetaBox plugin is loaded\n if ( class_exists('RWMB_Loader')) {\n define( 'WPBUCKET_META_BOX', true );\n } else {\n define( 'WPBUCKET_META_BOX', false );\n }\n }", "public static function loadPlugins(){\n\n\t\t// check to make sure the plugins directory exists\n\t\tif( !self::_pluginsDirectoryExists() )\n\t\t\treturn;\n\n\t\t// scan the directory, searching for plugins that fit the stereotype\n\t\tself::_scanForPlugins();\n\t}", "public function getPlugins()\n {\n return $this->plugins;\n }", "public function getPlugins()\n {\n return $this->plugins;\n }", "public function testConfigPlugin()\n {\n Plugin::load('TestPlugin');\n\n $data = [\n 'connection' => 'testing',\n 'entityClass' => 'TestPlugin\\Model\\Entity\\Comment',\n ];\n\n $result = TableRegistry::config('TestPlugin.TestPluginComments', $data);\n $this->assertEquals($data, $result, 'Returns config data.');\n\n $result = TableRegistry::config();\n $expected = ['TestPluginComments' => $data];\n $this->assertEquals($expected, $result);\n }", "function loadPlugins() {\n\t\t$pathname = $GLOBALS['mosConfig_absolute_path'].'/administrator/components/com_joomap/plugins/';\n\t\t$plugins = JoomapPlugins::listPlugins();\n\t\tforeach( $plugins as $plugin ) {\n\t\t\tinclude_once( $pathname.$plugin );\n\t\t}\n\t}", "public function getPlugins()\n\t{\n\t\treturn $this->plugins;\n\t}", "public function testExistsPlugin()\n {\n $this->assertFalse(CollectionRegistry::exists('Comments'));\n $this->assertFalse(CollectionRegistry::exists('TestPlugin.Comments'));\n\n CollectionRegistry::get('TestPlugin.Comments', ['type' => 'comments']);\n $this->assertFalse(CollectionRegistry::exists('Comments'), 'The Comments key should not be populated');\n $this->assertTrue(CollectionRegistry::exists('TestPlugin.Comments'), 'The plugin.alias key should now be populated');\n }", "public function getGrPluginDetails()\n\t{\n\t\tglobal $wpdb;\n\t\t$sql = \"\n\t\t\t\tSELECT *\n\t\t\t\tFROM $wpdb->options options\n\t\t\t\tWHERE options.`option_name` LIKE 'GrIntegrationOptions%'\n\t\t\t\tORDER BY options.`option_name` DESC;\n\t\t\t\t\";\n\n\t\treturn $wpdb->get_results($sql);\n\t}", "public static function getPlugins() {\r\n\t\treturn self::getModulesForUser(Config::$sis_plugin_folder);\r\n\t}", "function _init_plugin() {\n\t\tglobal $db, $apcms;\n\t\t\n\t\treturn true;\n\t}", "public function pluginDetails()\n {\n return [\n 'name' => 'portfolio',\n 'description' => 'Simple portfolio plugin',\n 'author' => 'AngryGantz',\n 'icon' => 'icon-briefcase'\n ];\n }", "function aione_register_required_plugins() {\n\t/**\n\t * Array of plugin arrays. Required keys are name and slug.\n\t * If the source is NOT from the .org repo, then source is also required.\n\t */\n\t$plugins = array(\n\t\tarray(\n\t\t\t'name' => 'Oxo Core',\n\t\t\t'slug' => 'oxo-core',\n\t\t\t'source' => get_template_directory() . '/framework/plugins/oxo-core.zip',\n\t\t\t'required' => true,\n\t\t\t'version' => '1.8.3',\n\t\t\t'force_activation' => false,\n\t\t\t'force_deactivation' => false,\n\t\t\t'external_url' => '',\n\t\t\t'image_url' => Aione()->get_framework_dir() . '/assets/images/oxo_core.png',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'LayerSlider WP',\n\t\t\t'slug' => 'LayerSlider',\n\t\t\t'source' => get_template_directory() . '/framework/plugins/LayerSlider.zip',\n\t\t\t'required' => false,\n\t\t\t'version' => '5.6.2',\n\t\t\t'force_activation' => false,\n\t\t\t'force_deactivation' => false,\n\t\t\t'external_url' => '',\n\t\t\t'image_url' => Aione()->get_framework_dir() . '/assets/images/layer_slider.png',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'Revolution Slider',\n\t\t\t'slug' => 'revslider',\n\t\t\t'source' => get_template_directory() . '/framework/plugins/revslider.zip',\n\t\t\t'required' => false,\n\t\t\t'version' => '5.1.6',\n\t\t\t'force_activation' => false,\n\t\t\t'force_deactivation' => false,\n\t\t\t'external_url' => '',\n\t\t\t'image_url' => Aione()->get_framework_dir() . '/assets/images/rev_slider.png',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'WooCommerce',\n\t\t\t'slug' => 'woocommerce',\n\t\t\t'required' => false,\n\t\t\t'image_url' => Aione()->get_framework_dir() . '/assets/images/woocommerce.png',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'bbPress',\n\t\t\t'slug' => 'bbpress',\n\t\t\t'required' => false,\n\t\t\t'image_url' => Aione()->get_framework_dir() . '/assets/images/bbpress.png',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'The Events Calendar',\n\t\t\t'slug' => 'the-events-calendar',\n\t\t\t'required' => false,\n\t\t\t'image_url' => Aione()->get_framework_dir() . '/assets/images/the_events_calendar.png',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'Contact Form 7',\n\t\t\t'slug' => 'contact-form-7',\n\t\t\t'required' => false,\n\t\t\t'image_url' => Aione()->get_framework_dir() . '/assets/images/contact_form_7.jpg',\n\t\t),\n\t);\n\n\t// Change this to your theme text domain, used for internationalising strings\n\t$theme_text_domain = 'Aione';\n\n\t/**\n\t * Array of configuration settings. Amend each line as needed.\n\t * If you want the default strings to be available under your own theme domain,\n\t * leave the strings uncommented.\n\t * Some of the strings are added into a sprintf, so see the comments at the\n\t * end of each line for what each argument will be.\n\t */\n\t$config = array(\n\n\t\t'domain' \t=> $theme_text_domain,\n\t\t'default_path' \t=> '',\n\t\t'parent_slug' \t\t=> 'themes.php',\n\t\t'menu' \t=> 'install-required-plugins',\n\t\t'has_notices' \t=> true,\n\t\t'is_automatic' \t=> true,\n\t\t'message' \t=> '',\n\t\t'strings' \t=> array(\n\t\t\t'page_title' => __( 'Install Required Plugins', 'Aione' ),\n\t\t\t'menu_title' => __( 'Install Plugins', 'Aione' ),\n\t\t\t'installing' => __( 'Installing Plugin: %s', 'Aione' ), // %1$s = plugin name\n\t\t\t'oops' => __( 'Something went wrong with the plugin API.', 'Aione' ),\n\t\t\t'notice_can_install_required' => _n_noop( 'This theme requires the following plugin installed or updated: %1$s.', 'This theme requires the following plugins installed or updated: %1$s.', 'Aione' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_install_recommended' => _n_noop( str_replace( '{{system-status}}', admin_url( 'admin.php?page=aione-system-status' ), 'This theme recommends the following plugin installed or updated: %1$s.<br />IMPORTANT: If your hosting plan has low resources, activating additional plugins can lead to fatal \"out of memory\" errors. We recommend at least 128MB of memory. Check your resources on the <a href=\"{{system-status}}\" target=\"_self\">System Status</a> tab.' ), str_replace( '{{system-status}}', admin_url( 'admin.php?page=aione-system-status' ), 'This theme recommends the following plugins installed or updated: %1$s.<br />IMPORTANT: If your hosting plan has low resources, activating additional plugins can lead to fatal \"out of memory\" errors. We recommend at least 128MB of memory. Check your resources on the <a href=\"{{system-status}}\" target=\"_self\">System Status</a> tab.' ), 'Aione' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'Aione' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'Aione' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_activate_recommended' => _n_noop( str_replace( '{{system-status}}', admin_url( 'admin.php?page=aione-system-status' ), 'The following recommended plugin is currently inactive: %1$s.<br />IMPORTANT: If your hosting plan has low resources, activating additional plugins can lead to fatal \"out of memory\" errors. We recommend at least 128MB of memory. Check your resources on the <a href=\"{{system-status}}\" target=\"_self\">System Status</a> tab.' ), str_replace( '{{system-status}}', admin_url( 'admin.php?page=aione-system-status' ), 'The following recommended plugins are currently inactive: %1$s.<br />IMPORTANT: If your hosting plan has low resources, activating additional plugins can lead to fatal \"out of memory\" errors. We recommend at least 128MB of memory. Check your resources on the <a href=\"{{system-status}}\" target=\"_self\">System Status</a> tab.' ), 'Aione' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'Aione' ), // %1$s = plugin name(s)\n\t\t\t'notice_ask_to_update' => _n_noop( '<span class=\"oxo-update-heading\" style=\"margin-top:-0.4em\">%1$s Update Required</span>The plugin needs to be updated to its latest version to ensure maximum compatibility with Aione.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 'Aione' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'Aione' ), // %1$s = plugin name(s)\n\t\t\t'install_link' => _n_noop( 'Go Install Plugin', 'Go Install Plugins', 'Aione' ),\n\t\t\t'activate_link' => _n_noop( 'Go Activate Plugin', 'Go Activate Plugins', 'Aione' ),\n\t\t\t'return' => __( 'Return to Required Plugins Installer', 'Aione' ),\n\t\t\t'plugin_activated' => __( 'Plugin activated successfully.', 'Aione' ),\n\t\t\t'complete' => __( 'All plugins installed and activated successfully. %s', 'Aione' ), // %1$s = dashboard link\n\t\t\t'nag_type' => 'error' // Determines admin notice type - can only be 'updated' or 'error'\n\t\t)\n\t);\n\n\ttgmpa( $plugins, $config );\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 }", "function loadPlugins() {\n // @todo make this more efficient\n $plugin_dirs = $this->listDir(MWG_BASE . '/plugins/');\n foreach($plugin_dirs as $ptypes) {\n $this->loadPluginGroup($ptypes);\n } \n }" ]
[ "0.7220731", "0.7153848", "0.6968654", "0.69604474", "0.69245017", "0.6913483", "0.68636006", "0.68525773", "0.6839768", "0.6828042", "0.68269646", "0.6803819", "0.6776115", "0.6745333", "0.6625841", "0.6581977", "0.6560028", "0.6493146", "0.6478852", "0.6478852", "0.6418387", "0.6398125", "0.6380716", "0.6370669", "0.6355549", "0.6355157", "0.63519", "0.63437444", "0.631782", "0.6312352", "0.6278092", "0.62485534", "0.6243187", "0.6224119", "0.61858356", "0.6181018", "0.6171949", "0.61673415", "0.6163741", "0.6156087", "0.61535877", "0.6143478", "0.6141947", "0.6131894", "0.61268586", "0.609724", "0.6093487", "0.60850966", "0.60831636", "0.6082093", "0.60734016", "0.6072421", "0.60696054", "0.6064102", "0.60591084", "0.60519433", "0.60518944", "0.6015391", "0.6009306", "0.60013586", "0.59920514", "0.5975647", "0.5970451", "0.5970134", "0.5967883", "0.59674597", "0.59637374", "0.59513557", "0.59491897", "0.5943139", "0.5940778", "0.5937997", "0.59375125", "0.5933924", "0.5930414", "0.5923145", "0.59155804", "0.5915401", "0.5915192", "0.59117156", "0.5911479", "0.59096193", "0.5906967", "0.5887747", "0.5885061", "0.5882933", "0.5882574", "0.58804244", "0.5878548", "0.5878548", "0.58775115", "0.58703357", "0.587012", "0.58648777", "0.58638126", "0.5856383", "0.5855259", "0.5853357", "0.5848033", "0.58460456", "0.5845841" ]
0.0
-1
test getting additional db configs
public function testRequireDatabaseConfigs() { if (!$this->_hasTrigger('requireDatabaseConfigs')) { return false; } $expected = $this->_manualCall('requireDatabaseConfigs', $this->ObjectEvent); $result = $this->Event->trigger($this->ModelObject, $this->plugin . '.requireDatabaseConfigs'); $this->assertEquals($expected, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDb()\n {\n // print_r($cfg);\n\n // $params = array('adapter', 'host', 'username', 'password', 'dbname');\n // foreach ($params as $param) {\n // $this->assertArrayHasKey(\n // $param, $cfg['database'], 'db缺少' . $param . '配置'\n // );\n // }\n // $dbCfg = $cfg['database'];\n // $dsn = '' . strtolower($dbCfg['adapter']) . ':host=' . $dbCfg['host'] . ';dbname=' . $dbCfg['dbname'] . '';\n\n // new PDO($dsn, $dbCfg['username'], $dbCfg['password']);\n }", "public function testGetExistingWithConfigData()\n {\n $users = TableRegistry::get('Users');\n TableRegistry::get('Users', ['table' => 'my_users']);\n }", "public function testDatabaseConfig() {\n $class = $this->carClass;\n \n $this->assertEquals( \n $this->databaseConfig, \n $class::DatabaseConfigName()\n );\n }", "protected function _readDbConfig()\n {\n $this->_host = Config::DB_HOST;\n $this->_user = Config::DB_USER;\n $this->_password = Config::DB_PASS;\n $this->_dbName = Config::DB_NAME;\n }", "public function databaseConfig() {\n\t\t$dbs = new DATABASE_CONFIG();\n\t\t$list = array();\n\t\t$counter = 1;\n\n\t\t$this->out('Possible database configurations:');\n\n\t\tforeach ($dbs as $db => $config) {\n\t\t\t$this->out('[' . $counter . '] ' . $db);\n\t\t\t$list[$counter] = $db;\n\t\t\t$counter++;\n\t\t}\n\n\t\t$this->out();\n\n\t\t$answer = strtoupper($this->in('Which database should the tables be created in?', array_keys($list)));\n\n\t\tif (isset($list[$answer])) {\n\t\t\t$this->install['database'] = $list[$answer];\n\t\t\t$this->db = ConnectionManager::getDataSource($this->install['database']);\n\n\t\t} else {\n\t\t\treturn $this->databaseConfig();\n\t\t}\n\n\t\treturn true;\n\t}", "public function testCustomDBPath() {\n $dbdata = HermesHelper::getMagentoDBConfig($this->_dbFile);\n $this->assertNotNull((string)$dbdata->host);\n $this->assertNotNull((string)$dbdata->username);\n $this->assertNotNull((string)$dbdata->password);\n $this->assertNotNull((string)$dbdata->dbname);\n\n //From phpunit path, the config file shouldn't be found.\n set_exit_overload(function($message) { Etailers_HermesHelper_Test::setMessage($message); return FALSE; });\n $dbdata = HermesHelper::getMagentoDBConfig();\n unset_exit_overload();\n $this->assertEquals('Unable to load magento db config file.', self::$message);\n }", "function configure_db() {\n //Old data is deleted before adding the new db structure\n $db = DB::getInstance();\n //$file = new File(CORE_INSTALLER_FILES_PATH.'/db/init.sql', 'r');\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/init.sql'))->error()) {\n return true;\n }\n return false;\n}", "public function getDatabaseConfig() : array{\n \treturn $this->getConfig()->getAll()[\"mysql\"];\n }", "protected function setUpTestDatabase() {}", "function getDatabaseConfig()\n{\n $dsnDetail = [];\n $databaseConfig = require dirname(__FILE__) . \"/../config/database.php\";\n preg_match(\"/mysql:host=(.+);dbname=([^;.]+)/\", $databaseConfig[\"dsn\"], $dsnDetail);\n $dsnDetail[3] = $databaseConfig[\"username\"];\n $dsnDetail[4] = $databaseConfig[\"password\"];\n return $dsnDetail;\n}", "public function testGetDBCon()\n {\n // TODO use a different check, if mariadb or mysql is used\n $this->assertTrue(false !== $this->fixture->getDBCon());\n }", "protected function testConnections()\n {\n $cacheId = 'store_1_example_config_cache';\n try {\n $cacheData = Mage::app()->loadCache($cacheId);\n } catch (Exception $e) {\n }\n\n try {\n $dbData = $this->getConn()->fetchOne('SELECT NOW()');\n } catch (Exception $e) {\n $db = Mage::getSingleton('core/resource')->getConnection('core_read');\n $db->closeConnection();\n $db->getConnection();\n $this->getConn()->query(\"SET NAMES 'utf8' COLLATE 'utf8_unicode_ci'\");\n }\n\n $cacheData = Mage::app()->loadCache($cacheId);\n $dbData = $this->getConn()->fetchOne('SELECT NOW()');\n }", "function getDBsettings () {\r\n return array (\r\n 'DBserver' => \"localhost\",\r\n 'DBname' => \"wideworldimporters\",\r\n 'DBport' => 3306,\r\n\r\n 'DBuser' => \"wwi\",\r\n 'DBpass' => ''\r\n );\r\n}", "function &db_config()\n {\n static $database;\n if ( file_exists(APPPATH.'config/database.php') ) \n {\n require_once APPPATH.'config/database.php';\n\n if ( isset($database) ) \n {\n foreach( $database as $key => $val ) \n {\n $database[$key] = $val;\n }\n return $database;\n }\n }\n }", "public function getDb();", "private function setUpAndReturnDatabaseStub() {}", "public function testGetWithConfig()\n {\n TableRegistry::config('Articles', [\n 'table' => 'my_articles',\n ]);\n $result = TableRegistry::get('Articles');\n $this->assertEquals('my_articles', $result->table(), 'Should use config() data.');\n }", "public function testDefaultsApplying()\n {\n $cfg = new ConfigLoader(realpath(__DIR__ . '/../config/database-config.ini'), $this->config);\n $ro = new \\ReflectionObject($cfg);\n $prop = $ro->getProperty('configs');\n $prop->setAccessible(true);\n $value = $prop->getValue($cfg);\n\n $this->assertTrue(is_scalar($value['main']['dbClassImpl']));\n }", "public function admin_get_dbs() {}", "public function testConfigAndBuild()\n {\n TableRegistry::clear();\n $map = TableRegistry::config();\n $this->assertEquals([], $map);\n\n $connection = ConnectionManager::get('test', false);\n $options = ['connection' => $connection];\n TableRegistry::config('users', $options);\n $map = TableRegistry::config();\n $this->assertEquals(['users' => $options], $map);\n $this->assertEquals($options, TableRegistry::config('users'));\n\n $schema = ['id' => ['type' => 'rubbish']];\n $options += ['schema' => $schema];\n TableRegistry::config('users', $options);\n\n $table = TableRegistry::get('users', ['table' => 'users']);\n $this->assertInstanceOf('Cake\\ORM\\Table', $table);\n $this->assertEquals('users', $table->table());\n $this->assertEquals('users', $table->alias());\n $this->assertSame($connection, $table->connection());\n $this->assertEquals(array_keys($schema), $table->schema()->columns());\n $this->assertEquals($schema['id']['type'], $table->schema()->column('id')['type']);\n\n TableRegistry::clear();\n $this->assertEmpty(TableRegistry::config());\n\n TableRegistry::config('users', $options);\n $table = TableRegistry::get('users', ['className' => __NAMESPACE__ . '\\MyUsersTable']);\n $this->assertInstanceOf(__NAMESPACE__ . '\\MyUsersTable', $table);\n $this->assertEquals('users', $table->table());\n $this->assertEquals('users', $table->alias());\n $this->assertSame($connection, $table->connection());\n $this->assertEquals(array_keys($schema), $table->schema()->columns());\n }", "protected function getDatabase() {}", "public function testMakeAuthWithMysqlBackendConfig()\n {\n $config = $this->config;\n $factory = new Factory($config);\n $basicAuth = $factory->makeAuth();\n $this->assertInstanceOf(BasicAuth::class, $basicAuth);\n\n // test with missing db config\n $config = $this->config;\n unset($config['db']);\n $factory = new Factory($config);\n $this->expectException(BasicAuthException::class);\n $factory->makeAuth();\n }", "private function initDatabase()\n {\n $defaults = [\n 'user' => 'root',\n 'password' => '',\n 'prefix' => '',\n 'options' => [\n \\PDO::ATTR_PERSISTENT => true,\n \\PDO::ATTR_ERRMODE => 2,\n \\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',\n \\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => 1,\n \\PDO::ATTR_EMULATE_PREPARES => false\n ]\n ];\n\n if (empty($this->settings['db'])) {\n error_log('No DB data set in Settings.php');\n Throw new FrameworkException('Error on DB access');\n }\n\n if (empty($this->settings['db']['default'])) {\n error_log('No DB \"default\" data set in Settings.php');\n Throw new FrameworkException('Error on DB access');\n }\n\n foreach ($this->settings['db'] as $name => &$settings) {\n\n $prefix = 'db.' . $name;\n\n // Check for databasename\n if (empty($settings['dsn'])) {\n Throw new \\PDOException(sprintf('No DSN specified for \"%s\" db connection. Please add correct DSN for this connection in Settings.php', $name));\n }\n\n // Check for DB defaults and map values\n foreach ($defaults as $key => $default) {\n\n // Append default options to settings\n if ($key == 'options') {\n\n if (empty($settings['options'])) {\n $settings['options'] = [];\n }\n\n foreach ($defaults['options'] as $option => $value) {\n\n if (array_key_exists($option, $settings['options'])) {\n continue;\n }\n\n $settings[$key][$option] = $value;\n }\n }\n\n if (empty($settings[$key])) {\n $settings[$key] = $default;\n }\n }\n\n foreach ($settings as $key => $value) {\n $this->di->mapValue($prefix . '.conn.' . $key, $value);\n }\n\n $this->di->mapService($prefix . '.conn', '\\Core\\Data\\Connectors\\Db\\Connection', [\n $prefix . '.conn.dsn',\n $prefix . '.conn.user',\n $prefix . '.conn.password',\n $prefix . '.conn.options'\n ]);\n $this->di->mapFactory($prefix, '\\Core\\Data\\Connectors\\Db\\Db', [\n $prefix . '.conn',\n $settings['prefix']\n ]);\n }\n }", "private function getCrendentials()\n {\n $db = parse_ini_file('db.ini');\n $this->username = $db['user'];\n $this->password = $db['password'];\n $this->host = $db['host'];\n $this->dbname = $db['dbname'];\n }", "private function canUseDatabase()\n {\n return $this->deploymentConfig->get('db');\n }", "private function loadConfig(){\n $DB = DB::pass();\n $conf = $DB->loadConfig();\n if ( count($conf) > 0 ){\n foreach($conf as $c){\n $this->config->set($c['cluster'] . \".\" . $c['name'],$c['value']);\n }\n } else {\n throw new SystemException(\"No database configuration\");\n }\n }", "public function testConfigOnDefinedInstance()\n {\n $users = TableRegistry::get('Users');\n TableRegistry::config('Users', ['table' => 'my_users']);\n }", "protected function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t$oContext = &Context::getInstance();\n\n\t\t$db_info = include dirname(__FILE__) . '/../config/db.config.php';\n\n\t\t$db = new stdClass();\n\t\t$db->master_db = $db_info;\n\t\t$db->slave_db = array($db_info);\n\t\t$oContext->setDbInfo($db);\n\n\t\tDB::getParser(TRUE);\n\t}", "public function getDbConfig()\n\t{\n\t\t$db_config = ee('Database')->getConfig();\n\n\t\ttry\n\t\t{\n\t\t\treturn $db_config->getGroupConfig();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// Suppress errors, if we can't find it, move along\n\t\t\tif (@include_once(SYSPATH.'/user/config/database.php'))\n\t\t\t{\n\t\t\t\t$group_config = $db[$db_config->getActiveGroup()];\n\n\t\t\t\tif ( ! empty($group_config))\n\t\t\t\t{\n\t\t\t\t\treturn $group_config;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthrow new \\Exception(lang('database_no_data'));\n\t\t}\n\t}", "public function testConfig()\n {\n $connection = new MockConnection($this->mockConnector, $this->mockCompiler);\n $this->assertEquals('mock', $connection->config('driver'));\n }", "public function testGetByKey( )\n\t{\n\t\t$instance = $this->dbConfiguration->newInstance([\n\t\t\t'default' => 'default',\n\t\t\t'connections' => [\n\t\t\t\t'default' => [\n\t\t\t\t\t'hostname' => 'localhost',\n\t\t\t\t\t'driver' => 'mysql',\n\t\t\t\t\t'database' => 'database'\n\t\t\t\t]\n\t\t\t]\n\t\t]);\n\n\t\t$this->assertEquals(null, $instance->get('connections.mysql'));\n\n\t\t$this->assertEquals([\n\t\t\t'hostname' => 'localhost',\n\t\t\t'driver' => 'mysql',\n\t\t\t'database' => 'database'\n\t\t], $instance->get('connections.default'));\n\t}", "protected static function main_database()\n\t{\n\t\t// these tests should use a seperate table\n\t\treturn 'phpunit';\n\t}", "protected function loadExtLocalconfDatabaseAndExtTables() {}", "public function testThatWeCanConnectToDatabase(){\n $this->assertNotEmpty($this->db->connect());\n }", "public function testRequireSilverstripeDB()\n {\n LivePubHelper::$init_code = array();\n\n // check that nothing happens when not publishing\n LivePubHelper::require_silverstripe_db();\n $this->assertEquals(count(LivePubHelper::$init_code), 0);\n\n // check that it does happen when publishing\n LivePubHelper::init_pub();\n LivePubHelper::require_silverstripe_db();\n $this->assertEquals(count(LivePubHelper::$init_code), 1);\n $this->assertEquals(preg_match('/\\$databaseConfig = array \\(.+\\);/ms', LivePubHelper::$init_code[0]), 1);\n\n // check that it's not included twice\n LivePubHelper::require_silverstripe_db();\n $this->assertEquals(count(LivePubHelper::$init_code), 1);\n\n LivePubHelper::stop_pub();\n }", "protected function setUpDatabaseConnectionMock() {}", "protected function _initDb()\n {\n $this->bootstrap('configs');\n \n // combine application.ini & config.ini database settings\n $options = $this->getOptions();\n $dbSettings = $options['resources']['db'];\n $dbParams = Zend_Registry::get('config.config')->db->toArray();\n $dbSettings['params'] = array_merge($dbSettings['params'], $dbParams);\n \n $db = Zend_Db::factory($dbSettings['adapter'], $dbSettings['params']);\n if(!empty($dbSettings['isDefaultTableAdapter'])\n && (bool)$dbSettings['isDefaultTableAdapter']\n ) {\n Zend_Db_Table::setDefaultAdapter($db);\n }\n }", "function get_config_data()\n{\n global $dbh;\n $config = null;\n\n $result = $dbh->query(\"SELECT * FROM configuration\");\n if ($result)\n $config = $result->fetch(PDO::FETCH_OBJ);\n\n return $config;\n}", "public function db()\n {\n return $this->databaseConfig;\n }", "public function testListDatabases()\r\n {\r\n $this->_sm->listDatabases();\r\n }", "public function testWith_DsnIsDriverAndPathOptExt()\n {\n $config = Config::with(\"dir:{$this->dir}\", array('ext'=>'mock'));\n $this->checkWithResult($config);\n }", "function prepConfig() {\n\n global $db;\n global $lang;\n\n if($report = $db->query(\"CREATE DATABASE IF NOT EXISTS \".$lang[\"config_db_name\"].\"\")) {\n\n // Generate safety table\n if($report = $db->query(\"CREATE TABLE IF NOT EXISTS `\".$lang[\"config_db_name\"].\"`.`\".$lang[\"config_table_name\"].\"` ( `id` INT(6) NOT NULL AUTO_INCREMENT, `key` VARCHAR(100) NOT NULL, UNIQUE (`key`), `val` VARCHAR(100) NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;\")) {\n\n return \"Ready\";\n\n } else {\n\n return \"Failed to create table. Error: \".$db->error;\n\n }\n\n } else {\n\n return \"Failed to create database. Error: \".$db->error;\n\n }\n\n }", "public function testGetExistingWithConfigData()\n {\n $users = CollectionRegistry::get('Users');\n CollectionRegistry::get('Users', ['name' => 'my_users']);\n }", "private static function getConf(){\n if(!self::$conf){\n self::$conf = require('db.conf.php');\n }\n\n return self::$conf;\n }", "public static function load_db_conf(){\n $db_config = include(CONFIGPATH.'db.conf.php');\n return $db_config;\n }", "public function testLoadAdditional()\n {\n $addl = array('test' => 'foo');\n $config = new \\Stormpath\\Config($addl);\n\n $this->assertEquals($config->get('test'), 'foo');\n }", "function testDBLogging() {\n if (strlen(DBPASS) > 0) {\n Debug::$enable_show = false;\n Debug::$enable_log = true;\n $this->assertTrue(Debug::out('Testing, testing, 123'));\n }\n }", "function probe_db_access($file_base)\n\t{\n\t\t$dbname='';\n\t\t$dbuser='';\n\t\t$dbpasswd='';\n\t\t$table_prefix='';\n\t\tif (!file_exists($file_base.'/config.php'))\n\t\t\twarn_exit(do_lang_tempcode('BAD_IMPORT_PATH',escape_html('config.php')));\n\t\trequire($file_base.'/config.php');\n\t\t$INFO=array();\n\t\t$INFO['sql_database']=$dbname;\n\t\t$INFO['sql_user']=$dbuser;\n\t\t$INFO['sql_pass']=$dbpasswd;\n\t\t$INFO['sql_tbl_prefix']=$table_prefix;\n\n\t\treturn array($INFO['sql_database'],$INFO['sql_user'],$INFO['sql_pass'],$INFO['sql_tbl_prefix']);\n\t}", "public static function databaseReuseDataProvider(): array\n {\n return [\n 'reuseTransaction false, scenarios false, isBrowserTest false' => [\n 'config' => self::newConfigDTO('sqlite')\n ->seeders([])\n ->reuseTransaction(false)\n ->scenarios(false)\n ->isBrowserTest(false),\n 'updateReuseTableQuery' => \"UPDATE `\" . Settings::REUSE_TABLE . \"` SET `inside_transaction` = 0\",\n 'expectedDBName' => self::$wsDatabaseDir . '/database.sqlite',\n 'expectedUserCount' => 0,\n 'expectedException' => null,\n ],\n 'reuseTransaction true, scenarios false, isBrowserTest false' => [\n 'config' => self::newConfigDTO('sqlite')\n ->seeders([])\n ->reuseTransaction(true)\n ->scenarios(false)\n ->isBrowserTest(false),\n 'updateReuseTableQuery' => \"UPDATE `\" . Settings::REUSE_TABLE . \"` SET `inside_transaction` = 0\",\n 'expectedDBName' => self::$wsDatabaseDir . '/database.sqlite',\n 'expectedUserCount' => 1,\n 'expectedException' => null,\n ],\n 'reuseTransaction false, scenarios true, isBrowserTest false' => [\n 'config' => self::newConfigDTO('sqlite')\n ->seeders([])\n ->reuseTransaction(false)\n ->scenarios(true)\n ->isBrowserTest(false),\n 'updateReuseTableQuery' => \"UPDATE `\" . Settings::REUSE_TABLE . \"` SET `inside_transaction` = 0\",\n 'expectedDBName' => self::$wsAdaptStorageDir . '/test-database.80cb3b-4d0a942a4f44.sqlite',\n 'expectedUserCount' => 0,\n 'expectedException' => null,\n ],\n 'reuseTransaction true, scenarios true, isBrowserTest false' => [\n 'config' => self::newConfigDTO('sqlite')\n ->seeders([])\n ->reuseTransaction(true)\n ->scenarios(true)\n ->isBrowserTest(false),\n 'updateReuseTableQuery' => \"UPDATE `\" . Settings::REUSE_TABLE . \"` SET `inside_transaction` = 0\",\n 'expectedDBName' => self::$wsAdaptStorageDir . '/test-database.80cb3b-3c25506a6206.sqlite',\n 'expectedUserCount' => 1,\n 'expectedException' => null,\n ],\n 'reuseTransaction false, scenarios false, isBrowserTest true' => [\n 'config' => self::newConfigDTO('sqlite')\n ->seeders([])\n ->reuseTransaction(false)\n ->scenarios(false)\n ->isBrowserTest(true),\n 'updateReuseTableQuery' => \"UPDATE `\" . Settings::REUSE_TABLE . \"` SET `inside_transaction` = 0\",\n 'expectedDBName' => self::$wsDatabaseDir . '/database.sqlite',\n 'expectedUserCount' => 0,\n 'expectedException' => null,\n ],\n 'reuseTransaction true, scenarios false, isBrowserTest true' => [\n 'config' => self::newConfigDTO('sqlite')\n ->seeders([])\n ->reuseTransaction(true)\n ->scenarios(false)\n ->isBrowserTest(true),\n 'updateReuseTableQuery' => \"UPDATE `\" . Settings::REUSE_TABLE . \"` SET `inside_transaction` = 0\",\n 'expectedDBName' => self::$wsDatabaseDir . '/database.sqlite',\n 'expectedUserCount' => 0,\n 'expectedException' => null,\n ],\n 'reuseTransaction false, scenarios true, isBrowserTest true' => [\n 'config' => self::newConfigDTO('sqlite')\n ->seeders([])\n ->reuseTransaction(false)\n ->scenarios(true)\n ->isBrowserTest(true),\n 'updateReuseTableQuery' => \"UPDATE `\" . Settings::REUSE_TABLE . \"` SET `inside_transaction` = 0\",\n 'expectedDBName' => self::$wsAdaptStorageDir . '/test-database.80cb3b-64d73e5bd418.sqlite',\n 'expectedUserCount' => 0,\n 'expectedException' => null,\n ],\n 'reuseTransaction true, scenarios true, isBrowserTest true' => [\n 'config' => self::newConfigDTO('sqlite')\n ->seeders([])\n ->reuseTransaction(true)\n ->scenarios(true)\n ->isBrowserTest(true),\n 'updateReuseTableQuery' => \"UPDATE `\" . Settings::REUSE_TABLE . \"` SET `inside_transaction` = 0\",\n 'expectedDBName' => self::$wsAdaptStorageDir . '/test-database.80cb3b-11d5e7e68fce.sqlite',\n 'expectedUserCount' => 0,\n 'expectedException' => null,\n ],\n\n 'reuseTransaction true, different reuse_table_version' => [\n 'config' => self::newConfigDTO('sqlite')\n ->seeders([])\n ->reuseTransaction(true)\n ->scenarios(false)\n ->isBrowserTest(false),\n 'updateReuseTableQuery' =>\n \"UPDATE `\" . Settings::REUSE_TABLE . \"` \"\n . \"SET `inside_transaction` = 0, `reuse_table_version` = 'blahblah'\",\n 'expectedDBName' => self::$wsDatabaseDir . '/database.sqlite',\n 'expectedUserCount' => 0,\n 'expectedException' => null,\n ],\n 'reuseTransaction true, different project_name' => [\n 'config' => self::newConfigDTO('sqlite')\n ->seeders([])\n ->reuseTransaction(true)\n ->scenarios(false)\n ->isBrowserTest(false),\n 'updateReuseTableQuery' =>\n \"UPDATE `\" . Settings::REUSE_TABLE . \"` \"\n . \"SET `inside_transaction` = 0, `project_name` = 'blahblah'\",\n 'expectedDBName' => self::$wsDatabaseDir . '/database.sqlite',\n 'expectedUserCount' => 0,\n 'expectedException' => AdaptBuildException::class,\n ],\n 'reuseTransaction true, still in transaction' => [\n 'config' => self::newConfigDTO('sqlite')\n ->seeders([])\n ->reuseTransaction(true)\n ->scenarios(false)\n ->isBrowserTest(false),\n 'updateReuseTableQuery' => \"UPDATE `\" . Settings::REUSE_TABLE . \"` SET `inside_transaction` = 1\",\n 'expectedDBName' => self::$wsDatabaseDir . '/database.sqlite',\n 'expectedUserCount' => 0,\n 'expectedException' => AdaptBuildException::class,\n ],\n 'reuseTransaction true, empty ____adapt____ table' => [\n 'config' => self::newConfigDTO('sqlite')\n ->seeders([])\n ->reuseTransaction(true)\n ->scenarios(false)\n ->isBrowserTest(false),\n 'updateReuseTableQuery' => \"DELETE FROM `\" . Settings::REUSE_TABLE . \"`\",\n 'expectedDBName' => self::$wsDatabaseDir . '/database.sqlite',\n 'expectedUserCount' => 0,\n 'expectedException' => null,\n ],\n 'reuseTransaction true, no ____adapt____ table' => [\n 'config' => self::newConfigDTO('sqlite')\n ->seeders([])\n ->reuseTransaction(true)\n ->scenarios(false)\n ->isBrowserTest(false),\n 'updateReuseTableQuery' => \"DROP TABLE `\" . Settings::REUSE_TABLE . \"`\",\n 'expectedDBName' => self::$wsDatabaseDir . '/database.sqlite',\n 'expectedUserCount' => 0,\n 'expectedException' => null,\n ],\n ];\n }", "public function getDatabaseInfo();", "public function testInvalidConnectionCredentialsDB()\r\n\t\t{\r\n\t\t\tORM::init('mysql:host=localhost;dbname=doesnotexistdb', 'orm_username', 'orm_password');\r\n\t\t}", "function pdoe_mysql_test_db_credentials() {\n\treturn array( \n\t\t'user' => 'pdoe', \n\t\t'password' => 'moomoo', \n\t\t'host' => 'localhost', \n\t\t'database' => 'pdoe_test'\n\t);\n}", "public function getDatabaseConfig()\n {\n \n $jdbc_dir = 'C:\\xampp\\htdocs\\JasperReport\\vendor\\cossou\\jasperphp\\src\\JasperStarter\\jdbc';\n return [\n 'driver' => 'generic',\n 'host' => env('DB_HOST'),\n 'port' => env('DB_PORT'),\n 'username' => env('DB_USERNAME'),\n 'password' => env('DB_PASSWORD'),\n 'database' => env('DB_DATABASE'),\n 'jdbc_driver' => 'com.microsoft.sqlserver.jdbc.SQLServerDriver',\n 'jdbc_url' => 'jdbc:sqlserver://192.168.1.250:1433;databaseName='.env('DB_DATABASE').'',\n 'jdbc_dir' => $jdbc_dir\n ];\n }", "function MetaDatabases() {}", "private static function initDatabase() {\n\t\t\tif (self::Config('use_db')) {\n\t\t\t\t$host = self::Config('mysql_host');\n\t\t\t\t$user = self::Config('mysql_user');\n\t\t\t\t$pass = self::Config('mysql_password');\n\t\t\t\t$name = self::Config('mysql_dbname');\n\t\t\t\tDBManager::init($host, $user, $pass, $name);\n\t\t\t}\n\t\t}", "protected function setUpDatabase($app)\n {\n\n }", "public function getDbDatabase(): string\n {\n return Environment::is([Environment::ENV_TEST, Environment::ENV_HTTP_TEST])\n ? Testing::DB_NAME\n : (string) Config::get('DB_DATABASE');\n }", "function setup_db_config($configuration){\n // or the user is admin user\n if(_is_db_configured($configuration)){\n _is_admin_or_return($configuration);\n }\n\n // get and validate user input\n $data = json_decode(file_get_contents('php://input'));\n \n $host = parse_url($data->db_server, PHP_URL_HOST);\n if(!isset($host)){\n return Status::errorStatus('no proper hostname specified');\n }\n $port = parse_url($data->db_server, PHP_URL_PORT);\n if(!isset($port)){\n return Status::errorStatus('no port specified');\n }\n if(!preg_match('/^[a-zA-Z0-9-_\\.\\:\\]\\[]+:[0-9]+$/', $data->db_server)){\n return Status::errorStatus('only [ip|hostname]:[port] format supported for database host');\n }\n if(!isset($data->db_name) || !preg_match('/^[a-zA-Z0-9-_]+$/', $data->db_name)){\n return Status::errorStatus('invalid database name');\n }\n if(!isset($data->db_user) || !preg_match('/^[a-zA-Z0-9-_]+$/', $data->db_user)){\n return Status::errorStatus('invalid database user');\n }\n if(!isset($data->db_password) || preg_match('/\\s+/', $data->db_password)){\n return Status::errorStatus('invalid database password (containing spaces)');\n }\n\n // verify that connection works\n $new_config = new Configuration();\n $new_config->db_server = $data->db_server;\n $new_config->db_name = $data->db_name;\n $new_config->db_user = $data->db_user;\n $new_config->db_password = $data->db_password;\n $db = new DBAccess($new_config);\n if(!$db->connect()){\n return Status::errorStatus('DB access not working with the provided settings. Please check for typos, make sure that the database is reachable and that your username and password are correct.');\n }\n\n // check whether tables already exist\n $query = 'SHOW TABLES LIKE \"configuration\"';\n $res = $db->fetch_data_hash($query, 0);\n if(!$res){\n // if the table does not exist, we setup the database\n // setup a new database\n if(!file_exists(\"../config/db/schema.sql\") || !$db->apply_sql_file(\"../config/db/schema.sql\")){\n return Status::errorStatus(\"DB scheme could not be applied to database, please check server error logs\");\n }\n }\n\n // write configuration file (only after schema is applied)// build the configuration for the configuration file\n $configuration->config_file_variables['db_server'] = $data->db_server;\n $configuration->config_file_variables['db_name'] = $data->db_name;\n $configuration->config_file_variables['db_user'] = $data->db_user;\n $configuration->config_file_variables['db_password'] = $data->db_password;\n if(_write_config_file($configuration->config_file_variables)){\n return Status::successStatus(\"configuration applied and database setup\");\n }\n return Status::errorStatus(\"db could not be configured\");\n }", "public function testDatabase()\n\t{\n\t\t// Or use putenv('TEST_DATABASE=true') in your tests to throw an error\n\t\tif (env('TEST_DATABASE', false) == true) {\n\t\t\tthrow new Exception('TEST_DATABASE_REGISTER', 422);\n\t\t}\n\t}", "function getDbCredentials()\n{ \n return getSettings()['database'];\n}", "public function testSchemaChecking() {\n // Create some configuration that should be skipped.\n $this->config('config_schema_test.noschema')->set('foo', 'bar')->save();\n $this->runUpdates();\n $this->assertSame('bar', $this->config('config_schema_test.noschema')->get('foo'));\n\n }", "protected function dbConfig()\n {\n return $this->config('database.connections.mysql');\n }", "protected function _initDb() {\n\trequire_once 'Zend/Config/Ini.php';\n\trequire_once 'Agel/Db/Table.php';\n\n\t//TODO: Remove the dependency on db.config.php, and encryption.config.php\n\trequire realpath((APPLICATION_PATH . '/../../include/db.config.php'));\n\trequire realpath((APPLICATION_PATH . '/../../include/encryption.config.php'));\n if(isset($dsn['username'])) {\n define('PROMETHEUS_DB_CONFIGURED', 'yes');\n }\n\tdefine('PROMETHEUS_DB_USERNAME', $dsn ['username']);\n\tdefine('PROMETHEUS_DB_PASSWORD', $dsn ['password']);\n\tdefine('PROMETHEUS_DB_HOSTSPEC', $dsn ['hostspec']);\n\tdefine('PROMETHEUS_DB_SCHEMA', $dsn ['database']);\n\tdefine('PROMETHEUS_DB_CRYPT_KEY', $dsn ['crypt_passkey']);\n\tdefine('PROMETHEUS_SET_COMPANY_PRE', $db_values ['company_pre']);\n\tdefine('ORBSIX_CRYPT_KEY', $key);\n\n\tif (isset($dsn_slave)) {\n\t define('PROMETHEUS_SLAVE_DB_CONFIGURED', 'yes');\n\t define('PROMETHEUS_SLAVE_DB_USERNAME', $dsn_slave ['username']);\n\t define('PROMETHEUS_SLAVE_DB_PASSWORD', $dsn_slave ['password']);\n\t define('PROMETHEUS_SLAVE_DB_HOSTSPEC', $dsn_slave ['hostspec']);\n\t define('PROMETHEUS_SLAVE_DB_SCHEMA', $dsn_slave ['database']);\n\t define('PROMETHEUS_SLAVE_DB_CRYPT_KEY', $dsn_slave ['crypt_passkey']);\n\t define('PROMETHEUS_SLAVE_SET_COMPANY_PRE', $db_values_slave ['company_pre']);\n\t}\n\n\tAgel_Db_Table::setDbAdapter(new Zend_Config_Ini(APPLICATION_CONFIG_PATH . '/database.ini'));\n\n\treturn Agel_Db_Table::getDefaultAdapter();\n }", "protected function _initDbResource()\n {\n $registry = $this->getPluginResource('db');\n if (!$registry) {\n return;\n }\n\n //\n // options in configs/application\n $options = $registry->getOptions();\n\n if (array_key_exists('dsn', $options) && '' !== $options['dsn']) {\n $options['params'] = array_replace(\n $options['params'],\n $this->_parseDsn($options['dsn'])\n );\n }\n\n $registry->setOptions($options);\n }", "public function testValidateConfiguration()\n\t{\n\t\t$method = $this->setAccessibleMethod('validateConfig');\n\n\t\t$results = $method->invoke($this->dbConfiguration->newInstance([\n\t\t\t'default' => 'default',\n\t\t\t'connections' => [\n\t\t\t\t'default' => [\n\t\t\t\t\t'hostname' => 'localhost',\n\t\t\t\t\t'driver' => 'mysql',\n\t\t\t\t\t'database' => 'database'\n\t\t\t\t]\n\t\t\t]\n\t\t]));\n\n\t\t$this->assertSame(null, $results);\n\t}", "public function testGetUndefinedDbConnectionFails()\n {\n $db = \\Yii::$app->get('dbFactory')->getConnection('dbX', true, false);\n }", "public function testGetAllDbs()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n \n list($host, $port, $dbname) = $this->_getUrlParts();\n $dbname = trim($dbname, '/');\n \n // First, create a DB\n Sopha_Db::createDb($dbname, $host, $port);\n \n // Make sure DB exists by looking for it in the list of all DBs\n $dbs = Sopha_Db::getAllDbs($host, $port);\n $this->assertType('array', $dbs);\n $this->assertTrue(in_array($dbname, $dbs));\n \n // Delete the DB and make sure it is no longer in the list\n Sopha_Db::deleteDb($dbname, $host, $port);\n $dbs = Sopha_Db::getAllDbs($host, $port);\n $this->assertType('array', $dbs);\n $this->assertFalse(in_array($dbname, $dbs));\n }", "function readConfigDB($dbHandle) {\n // virtual\n $this->debugLog(\"this configReader does not implement readConfigDB()\");\n }", "abstract protected function getDatabaseConnectionParameters();", "protected function setUpConfigurationData() {}", "public function configdatabase(){\n\t\t$alreadyInstalled = $this->isInstalled();\n\t\t\n\t\t\n\t\t$showform = false;\n\t\t$errorMessage = '';\n\t\tif ($alreadyInstalled == false){\n\t\t\t\n\t\t\t// get request variables\n\t\t\t$sql_host = $this->request->getParameter(\"sql_host\");\n\t\t\t$login = $this->request->getParameter(\"login\");\n\t\t\t$password = $this->request->getParameter(\"password\");\n\t\t\t$db_name = $this->request->getParameter(\"db_name\");\n\t\t\t\n\t\t\t// test the connection\n\t\t\t$installModel = new CoreInstall();\n\t\t\t$testVal = $installModel->testConnection($sql_host, $login, $password, $db_name);\n\t\t\t//echo 'test connection return val = ' . $testVal . '-----'; \n\t\t\tif ($testVal == 'success'){\n\t\t\t\t// edit the config file\n\t\t\t\t$returnVal = $installModel->writedbConfig($sql_host, $login, $password, $db_name);\n\t\t\t\tif ($returnVal){\n\t\t\t\t\t$showform = false;\n\t\t\t\t\t$errorMessage = '';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$showform = true;\n\t\t\t\t\t$errorMessage = 'Cannot write the congif file. Please make sure that the application have the right for writing in Config/prod.ini' ;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$showform = true;\n\t\t\t\t$errorMessage = $testVal;\n\t\t\t\t//echo '$errorMessage = ' . $errorMessage . '-----';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->generateView ( array (\n\t\t\t\t'alreadyInstalled' => $alreadyInstalled, 'showform' => $showform, 'errorMessage' => $errorMessage\n\t\t) );\n\t\t\n\t}", "function GetDb(){\n global $Config;\n return include $Config['DefaultDatabaseInitPhpFileName'];//初始化数据库连接\n}", "function get_db($db_config) {\n return mysqli_connect($db_config['host'], $db_config['user'], $db_config['pass'], $db_config['name']);\n}", "public function setUp()\n {\n parent::setUp();\n\n $this->database = \\oxDb::getDb();\n }", "function get_db_config($configuration){\n $db_config = array();\n $db_config['is_configured'] = false;\n $db_config['db_server'] = null;\n $db_config['db_name'] = null;\n $db_config['db_user'] = null;\n $db_config['db_password'] = null; // we do not reveal the password via API\n\n if(!_is_db_configured($configuration)){\n return Status::successDataResponse(\"not configured\", $db_config);\n }else{\n // to reveal already configured info\n // the user needs to be admin\n _is_admin_or_return($configuration);\n\n // return db configuration\n $db_config['is_configured'] = TRUE;\n $db_config['db_server'] = $config['db_server'];\n $db_config['db_name'] = $config['db_name'];\n $db_config['db_user'] = $config['db_user'];\n $db_config['db_password'] = null; // we do not reveal the password via API\n\n return Status::successDataResponse(\"success\", $db_config);\n }\n }", "public function test_database()\n\t{\n\t\ttry {\n\t\t\treturn (bool) DB::query(Database::SELECT, 'SHOW DATABASES')\n\t\t\t\t->execute()\n\t\t\t\t->count();\n\t\t} catch (Database_Exception $e) {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function setDatabaseConfig()\n {\n $this->_databaseConfig = Core_Model_Config_Json::getModulesDatabaseConfig();\n\n $this->_type = $this->_databaseConfig['type'];\n $this->_host = $this->_databaseConfig['host'];\n $this->_name = $this->_databaseConfig['name'];\n $this->_user = $this->_databaseConfig['user'];\n $this->_pass = $this->_databaseConfig['pass'];\n }", "private function refresh_db_config()\n {\n $this->systemConfiguration->where(true, true);\n foreach ($this->scheduleMapping as $scheduleType) {\n foreach ($scheduleType as $where) {\n $this->systemConfiguration->orWhere('type', $where);\n }\n }\n $this->config = $this->systemConfiguration->select('type', 'value')->get()->toArray();\n }", "function setup_ExternalDB() {\n global $CFG, $DB, $remotedb;\n\n // Use a custom $remotedb (and not current system's $DB) if set - code sourced from configurable\n // Reports plugin.\n $remotedbhost = get_config('report_myfeedback', 'dbhost');\n $remotedbname = get_config('report_myfeedback', 'dbname');\n $remotedbuser = get_config('report_myfeedback', 'dbuser');\n $remotedbpass = get_config('report_myfeedback', 'dbpass');\n if (empty($remotedbhost) OR empty($remotedbname) OR empty($remotedbuser)) {\n $remotedb = $DB;\n\n setup_DB();\n } else {\n //\n if (!isset($CFG->dblibrary)) {\n $CFG->dblibrary = 'native';\n // use new drivers instead of the old adodb driver names\n switch ($CFG->dbtype) {\n case 'postgres7' :\n $CFG->dbtype = 'pgsql';\n break;\n\n case 'mssql_n':\n $CFG->dbtype = 'mssql';\n break;\n\n case 'oci8po':\n $CFG->dbtype = 'oci';\n break;\n\n case 'mysql' :\n $CFG->dbtype = 'mysqli';\n break;\n }\n }\n\n if (!isset($CFG->dboptions)) {\n $CFG->dboptions = array();\n }\n\n if (isset($CFG->dbpersist)) {\n $CFG->dboptions['dbpersist'] = $CFG->dbpersist;\n }\n\n if (!$remotedb = moodle_database::get_driver_instance($CFG->dbtype, $CFG->dblibrary)) {\n throw new dml_exception('dbdriverproblem', \"Unknown driver $CFG->dblibrary/$CFG->dbtype\");\n }\n\n try {\n $remotedb->connect($remotedbhost, $remotedbuser, $remotedbpass, $remotedbname, $CFG->prefix, $CFG->dboptions);\n } catch (moodle_exception $e) {\n if (empty($CFG->noemailever) and ! empty($CFG->emailconnectionerrorsto)) {\n $body = \"Connection error: \" . $CFG->wwwroot .\n \"\\n\\nInfo:\" .\n \"\\n\\tError code: \" . $e->errorcode .\n \"\\n\\tDebug info: \" . $e->debuginfo .\n \"\\n\\tServer: \" . $_SERVER['SERVER_NAME'] . \" (\" . $_SERVER['SERVER_ADDR'] . \")\";\n if (file_exists($CFG->dataroot . '/emailcount')) {\n $fp = @fopen($CFG->dataroot . '/emailcount', 'r');\n $content = @fread($fp, 24);\n @fclose($fp);\n if ((time() - (int) $content) > 600) {\n //email directly rather than using messaging\n @mail($CFG->emailconnectionerrorsto, 'WARNING: Database connection error: ' . $CFG->wwwroot, $body);\n $fp = @fopen($CFG->dataroot . '/emailcount', 'w');\n @fwrite($fp, time());\n }\n } else {\n //email directly rather than using messaging\n @mail($CFG->emailconnectionerrorsto, 'WARNING: Database connection error: ' . $CFG->wwwroot, $body);\n $fp = @fopen($CFG->dataroot . '/emailcount', 'w');\n @fwrite($fp, time());\n }\n }\n // rethrow the exception\n throw $e;\n }\n\n $CFG->dbfamily = $remotedb->get_dbfamily(); // TODO: BC only for now\n\n return true;\n }\n return false;\n }", "public function checkDatabaseStructure( );", "function configEnabled() { global $db;\n global $lang;\n\n $dbtst = $db->query(\"SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '\".$lang[\"config_db_name\"].\"'\");\n if($dbtst->num_rows == 0) {\n $prepReturn = prepConfig();\n if ($prepReturn == \"Ready\"){\n return true;\n } else {\n return $prepReturn;\n }\n } else {\n return true;\n }\n }", "abstract protected function getConfig();", "public function setUp()\n {\n TestConfiguration::setupDatabase();\n }", "public function testConfigReturnsDefault()\n {\n $unique = uniqid();\n $connection = new MockConnection($this->mockConnector, $this->mockCompiler);\n $this->assertEquals($unique, $connection->config('foobar', $unique));\n }", "public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }", "protected function getExtbaseConfiguration() {}", "public function testDatabase()\n {\n $this->assertDatabaseHas('users', [\n 'email' => '[email protected]'\n ]);\n }", "function getConnection($db,$custom);", "protected function getAvailableDbalDrivers() {}", "function fetchConfigParameters(){\n try {\n global $db_table_prefix;\n\n $results = array();\n\n $db = pdoConnect();\n\n $query = \"SELECT id, name, value\n FROM \".$db_table_prefix.\"configuration\";\n\n $stmt = $db->prepare($query);\n\n if (!$stmt->execute()){\n // Error\n return false;\n }\n\n while ($r = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $name = $r['name'];\n $value = $r['value'];\n $results[$name] = $value;\n }\n $stmt = null;\n\n return $results;\n\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n }\n}", "public function testGettingNonExistantDataSource() \n {\n DataSourcesRegistry::getDataSource('test');\n }", "public function initDBConnections(): void\n {\n $this->addConnectionsToConfig();\n $this->testConnections();\n }", "public function test_set_db_invokes()\n {\n $this->expectNotToPerformAssertions(MultiDB::setDB('db-ninja-01'));\n }", "public function testConfigFunctions()\r\n\t{\r\n\t\t// Create new schema\r\n\t\t$index = new Index();\r\n\r\n\t\t// Check return types\r\n\t\t$this->assertTrue(is_array($index->attributeLabels()));\r\n\t\t$this->assertTrue(is_array($index->rules()));\r\n\t\t$this->assertTrue(is_array($index->relations()));\r\n\t\t$this->assertTrue(is_array(Index::getIndexTypes()));\r\n\t}", "public function getFromDb()\n {\n $config = [];\n try {\n $query = (new Query)->from('{{%podium_config}}')->all();\n foreach ($query as $setting) {\n $config[$setting['name']] = $setting['value'];\n }\n }\n catch (Exception $e) {\n Log::error($e->getMessage(), null, __METHOD__);\n }\n \n return $config;\n }", "public function testExceptExceptionWithWrongDatabaseInfo()\n {\n $this->expectException(\"Exception\");\n $randomData = (object) array(\n \"user\" => $this->generateRandomString(5),\n \"password\" => $this->generateRandomString(10),\n \"host\" => $this->generateRandomString(120),\n \"database\" => $this->generateRandomString(15),\n \"port\" => random_int(1000, 16200)\n );\n\n /**\n * Creating annomous class,\n * I think I found a caseuse for interfaces now.\n */\n $settings = new class ($randomData) {\n private $data;\n public function __construct($data)\n {\n $this->data = $data;\n }\n public function getDatabaseConfig()\n {\n return $this->data;\n }\n };\n\n $database = new \\Database($settings);\n }", "public static function load_db_config() {\n\t\tif (Config::instance()->db_config)\n\t\t\treturn Config::instance()->db_config;\n\n\t\t$db_config = parse_ini_file(HALFMOON_ROOT . \"/config/db.ini\", true);\n\n\t\t/* set some reasonable defaults */\n\t\t$ar_config = array();\n\t\tforeach ($db_config as $henv => $db) {\n\t\t\tif ($db[\"adapter\"] == \"sqlite\")\n\t\t\t\t$ar_config[$henv] = $db;\n\t\t\telse\n\t\t\t\t$ar_config[$henv] = array_merge(array(\n\t\t\t\t\t\"adapter\" => \"mysql\",\n\t\t\t\t\t\"username\" => \"username\",\n\t\t\t\t\t\"password\" => \"password\",\n\t\t\t\t\t\"hostname\" => \"localhost\",\n\t\t\t\t\t\"database\" => \"database\",\n\t\t\t\t\t\"socket\" => \"\",\n\t\t\t\t\t\"port\" => 3306,\n\t\t\t\t), $db);\n\t\t}\n\n\t\treturn Config::instance()->db_config = $ar_config;\n\t}", "abstract public function getConfig();", "protected function _setupDb()\n {\n // First, delete the DB if it exists\n $this->_teardownDb();\n \n // Then, set up a clean new DB and return it\n list ($host, $port, $db) = $this->_getUrlParts();\n $db = trim($db, '/');\n \n return Sopha_Db::createDb($db, $host, $port);\n }", "protected function setupDBData()\n {\n /**\n * IMPORTANT NOTE : these functions must be executed sequentially in order for the command to work.\n */\n $this->setupProducts();\n $this->setupServerTypes();\n $this->setupServers();\n $this->setupUsers();\n }" ]
[ "0.71715856", "0.663886", "0.6628883", "0.6622264", "0.66183096", "0.6594249", "0.65662265", "0.65515935", "0.65139437", "0.64475244", "0.64389575", "0.6437165", "0.6430073", "0.6364556", "0.63351434", "0.63303196", "0.6323718", "0.6299742", "0.6277534", "0.6273761", "0.6209162", "0.6199916", "0.61469036", "0.6143093", "0.612893", "0.61271256", "0.6112223", "0.6103429", "0.60871136", "0.6084185", "0.6035945", "0.60246545", "0.6017509", "0.6016137", "0.6013343", "0.601328", "0.60095286", "0.6003572", "0.59934855", "0.5971168", "0.59671926", "0.59668016", "0.59522843", "0.5950112", "0.59498143", "0.5934767", "0.59270436", "0.5925587", "0.5922606", "0.59116805", "0.59039634", "0.58955747", "0.58946764", "0.5866771", "0.5858545", "0.5833713", "0.5821944", "0.58186525", "0.5815747", "0.58100563", "0.58075833", "0.58036137", "0.5801328", "0.5800541", "0.5794456", "0.57912713", "0.5775064", "0.57666695", "0.57661694", "0.5765012", "0.57622033", "0.5752702", "0.5751912", "0.57487303", "0.57237184", "0.57194436", "0.57109404", "0.5703514", "0.57026803", "0.57021844", "0.5698837", "0.56939465", "0.5691866", "0.5686123", "0.5677015", "0.56762844", "0.5663428", "0.56602603", "0.5659578", "0.56559956", "0.5654588", "0.56447756", "0.5644578", "0.5637719", "0.5628094", "0.56270754", "0.5624022", "0.5622394", "0.5621938", "0.56209767" ]
0.6173404
22
test getting the cache config
public function testCacheConfig() { if (!$this->_hasTrigger('setupCache')) { return false; } $expected = $this->_manualCall('setupCache', $this->ObjectEvent); $result = $this->Event->trigger($this->ModelObject, $this->plugin . '.setupCache'); $this->assertEquals($expected, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function configurationIsCached();", "public function testCreateCachedObject() {\n\t\t// Load the config file\n\t\tCore\\Config::load('MyProject');\n\t\tCore\\Config::set('cache', 'enable', true, true);\n\n\t\t// Put the cache\n\t\tCore\\Cache::put('foo', 'bar');\n\n\t\t// The file exists?\n\t\t$this->assertTrue(Core\\Cache::has('foo'));\n\n\t\t// And the file has the correct contents?\n\t\t$this->assertEquals(Core\\Cache::get('foo'), 'bar');\n\t}", "public static function getCache() {}", "public function setUpCache();", "public function get_test_page_cache()\n {\n }", "function cacheConfig() {\n\t\tif(!isset($this->_options['configCachePath'])) {\n\t\t\tthrow new PPI_Exception('Missing path to the config cache path');\n\t\t}\n\n\t\t$path = sprintf('%s%s.%s.cache',\n\t\t\t$this->_options['configCachePath'],\n\t\t\t$this->_options['configFile'],\n\t\t\t$this->_options['configBlock']);\n\n\t\tif(file_exists($path)) {\n\t\t\treturn unserialize(file_get_contents($path));\n\t\t}\n\t\t$config = $this->parseConfig();\n\t\tfile_put_contents($path, serialize($config));\n\t\treturn $config;\n\t}", "public function getCache();", "private function _shouldBeCached()\n {\n $item = $this->repo->get(SettingKeys::CACHE_SETTINGS);\n //The setting failed to fetch, don't cache value to be on the safe side.\n if (!$item) {\n Log::channel('runtime')->warning(\n '[SettingsManager:39] Failed to fetch setting.',\n ['key' => SettingKeys::CACHE_SETTINGS]\n );\n return false;\n }\n return $item->value;\n }", "public function testCacheGet() \n\t{\n\t\t$key = uniqid('key_');\n\t\t$value = uniqid('value_');\n\t\t$this->assertFalse(\\Cache\\Cache::get($key));\n\n\t\t\\Cache\\Cache::set($key, $value);\n\t\t$this->assertEquals(\\Cache\\Cache::get($key), $value);\n\t}", "public function testSetupCache()\n {\n $this->assertNull($this->setupCache());\n }", "protected function getCurrentPageCacheConfiguration() {}", "public function testAuthorizeConfigCacheEmpty()\n\t{\n\t\t$service = $this->createBuilder();\n\t\t$builderCache = $service->getCacheAdapter();\n\t\t$testingConf = [\n\t\t\t'someConf' => true\n\t\t];\n\n\t\t$builderCache->setItem(AnnotationBuilder::CACHE, serialize($testingConf));\n\n\t\t$service->getAuthorizeConfig();\n\n\t\t$this->assertEquals($testingConf, unserialize($builderCache->getItem(AnnotationBuilder::CACHE)));\n\n\t\t// clear settings\n\t\t$builderCache->setItem(AnnotationBuilder::CACHE, null);\n\t}", "function _cache_get ($cache_name = \"\") {\n\t\tif (empty($cache_name)) {\n\t\t\treturn false;\n\t\t}\n\t\t$cache_file_path = $this->_prepare_cache_path($cache_name);\n\t\treturn $this->_get_cache_file($cache_file_path);\n\t}", "public function getCacheConfig()\n {\n $config = null;\n if (file_exists($this->options['cache_path'])) {\n $content = @file_get_contents($this->options['cache_path']);\n $config = new Config($this->app, $content);\n }\n return $config;\n }", "protected function getCacheManager() {}", "protected function getCacheManager() {}", "public static function getCacheControl() {}", "protected static function getCacheManager() {}", "public function get($cache_name);", "private function cached()\n {\n if (isset(self::$_cached)) {\n $this->_config = self::$_cached;\n return true;\n } else {\n return false;\n }\n }", "public function getCacheOptions();", "function set_cache($cache_file = '')\n {\n $data = array();\n switch ($cache_file) {\n case 'configurations':\n $data = modules::run('configurations/get_configuration', array('array' => TRUE)); \n break;\n case 'configurations_vi':\n $data = modules::run('configurations/get_configuration', array('array' => TRUE, 'lang' => 'vi')); \n break;\n case 'configurations_en':\n $data = modules::run('configurations/get_configuration', array('array' => TRUE, 'lang' => 'en')); \n break;\n case 'pages':\n $data = modules::run('pages/get_page_data', array('array' => TRUE)); \n break;\n case 'menus':\n $data = modules::run('menus/get_menu_data', array('array' => TRUE)); \n break;\n default:\n break;\n }\n return $data;\n }", "protected function configureCaching() {\n $_CONFIG = array();\n\n require_once ASCMS_CORE_MODULE_PATH . '/Cache/Controller/CacheLib.class.php';\n\n $isInstalled = function($cacheEngine) {\n switch ($cacheEngine) {\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC:\n return extension_loaded('apc');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE:\n return extension_loaded('opcache') || extension_loaded('Zend OPcache');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE:\n return extension_loaded('memcache') || extension_loaded('memcached');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE:\n return extension_loaded('xcache');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_FILESYSTEM:\n return true;\n }\n };\n\n $isConfigured = function($cacheEngine, $user = false) {\n switch ($cacheEngine) {\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC:\n if ($user) {\n return ini_get('apc.serializer') == 'php';\n }\n return true;\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE:\n return ini_get('opcache.save_comments') && ini_get('opcache.load_comments');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE:\n return false;\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE:\n if ($user) {\n return (\n ini_get('xcache.var_size') > 0 &&\n ini_get('xcache.admin.user') &&\n ini_get('xcache.admin.pass')\n );\n }\n return ini_get('xcache.size') > 0;\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_FILESYSTEM:\n return is_writable(ASCMS_DOCUMENT_ROOT . '/tmp/cache');\n }\n };\n\n // configure opcaches\n $configureOPCache = function() use($isInstalled, $isConfigured, &$_CONFIG) {\n // APC\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC) && $isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC)) {\n $_CONFIG['cacheOPCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC;\n return;\n }\n\n // Disable zend opcache if it is enabled\n // If save_comments is set to TRUE, doctrine2 will not work properly.\n // It is not possible to set a new value for this directive with php.\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE)) {\n ini_set('opcache.save_comments', 1);\n ini_set('opcache.load_comments', 1);\n ini_set('opcache.enable', 1);\n\n if ($isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE)) {\n $_CONFIG['cacheOPCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE;\n return;\n }\n }\n\n // XCache\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE) &&\n $isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE)\n ) {\n $_CONFIG['cacheOPCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE;\n return;\n }\n return false;\n };\n\n // configure user caches\n $configureUserCache = function() use($isInstalled, $isConfigured, &$_CONFIG) {\n // APC\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC)) {\n // have to use serializer \"php\", not \"default\" due to doctrine2 gedmo tree repository\n ini_set('apc.serializer', 'php');\n if ($isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC, true)) {\n $_CONFIG['cacheUserCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC;\n return;\n }\n }\n\n // Memcache\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE) && $isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE)) {\n $_CONFIG['cacheUserCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE;\n return;\n }\n\n // XCache\n if (\n $isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE) &&\n $isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE, true)\n ) {\n $_CONFIG['cacheUserCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE;\n return;\n }\n\n // Filesystem\n if ($isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_FILESYSTEM)) {\n $_CONFIG['cacheUserCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_FILESYSTEM;\n return;\n }\n return false;\n };\n\n if ($configureOPCache() === false) {\n $_CONFIG['cacheOpStatus'] = 'off';\n } else {\n $_CONFIG['cacheOpStatus'] = 'on';\n }\n\n if ($configureUserCache() === false) {\n $_CONFIG['cacheDbStatus'] = 'off';\n } else {\n $_CONFIG['cacheDbStatus'] = 'on';\n }\n\n $objDb = $this->_getDbObject($statusMsg);\n foreach ($_CONFIG as $key => $value) {\n $objDb->Execute(\"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"settings` SET `setvalue` = '\".$value.\"' WHERE `setname` = '\".$key.\"'\");\n }\n }", "private function mockCache()\n {\n $this->objectManager->configure([\n 'preferences' => [\n Cache::class => DummyCache::class\n ]\n ]);\n }", "function _biurnal_conf_get_conf_cache($name) {\n ctools_include('object-cache');\n $cache = ctools_object_cache_get('biurnal_conf', $name);\n if (!$cache) {\n $cache = biurnal_conf_load($name);\n if ($cache) {\n $cache->locked = ctools_object_cache_test('biurnal_conf', $name);\n }\n }\n\n return $cache;\n}", "static public function getCache(){\n return static::$cache;\n }", "public static function configurationIsCached(){\n return \\Illuminate\\Foundation\\Application::configurationIsCached();\n }", "public function getConfigCacheEnabled()\n {\n return $this->configCacheEnabled;\n }", "private function loadConfig() {\n if (file_exists($this->_data['cache_config_file'])) {\n $data = unserialize(file_get_contents($this->_data['cache_config_file']));\n \n self::$_configInstance = (object)$data; //instance of stdClass with all the properties public\n //$this->_data = (array)$data; \n return true;\n } \n return false;\n }", "public function testCacheService()\n {\n $client = $this->createClient();\n $cache = $client->getContainer()->get('anu_style_proxy.cache');\n $this->assertInstanceOf('Doctrine\\Common\\Cache\\Cache', $cache);\n }", "public function testGets()\n {\n $this->assertEquals(self::$cache->get('Butternut'), '', 'Does not return false on missing file.');\n\n //Test with expired date\n self::$cache->set('Toaster', 'Test', -5);\n\n $this->assertEquals(self::$cache->get('Toaster'), '', 'File not counted as expired.');\n\n //Test with okay file\n self::$cache->set('Toaster', 'Test', 5);\n\n $this->assertEquals(self::$cache->get('Toaster'), 'Test', 'File has not been Get correctly.');\n }", "function _config_cache(){\n Mapper::config(array('use_cache'=>false));\n \n}", "public function test_page_cache()\n {\n }", "function cacheing_environment()\n\t{\n\t\t$info=array();\n\t\t$info['cache_on']=array('block_youtube_channel__cache_on');\n\t\t$info['ttl']=intval(get_option('channel_update_time'));\n\t\treturn $info;\n\t}", "public function testConfigGetter(): void {\n $expected = new Config(\"$this->root/source\", \"$this->root/target\");\n $actual = $this->configUpdateManager->getConfig();\n self::assertEquals($expected, $actual);\n }", "function get_config() {\n //$memcached = new \\Memcached();\n //$memcached->addServer(MEMCACHED_HOST, MEMCACHED_PORT);\n \n if (false) {//$memcached->get('lc_config') && MEMCACHED_ENABLED) {\n //return $memcached->get('lc_config');\n }\n else { \n // Load our master config\n $master_config = parse_ini_file(LC_HOME . LC_MASTER_CONFIG, True);\n \n // Let's get the local config based on the resource type (an action parameter)\n if (!empty($this->http_request->action_params['resource_type'])){\n $resource_type = $this->http_request->action_params['resource_type'];\n if (!empty($resource_type) && !in_array($resource_type, array_keys($master_config['resource_types']))) {\n throw new \\Exception('Incorrect resource type specified' .\n ' --> ' . $resource_type . ' <-- See ' .\n $master_config['doc']['lc_doc_loc'] . ' for documention on resource types.');\n }\n }\n \n $resource_config = parse_ini_file(LC_HOME . $master_config['resource_types'][$resource_type]);\n\n // Since we turn all sections in our master config into arrays (this \n // way we can validate keys easily), we need to flatten it back down\n $flattened_master_config = array();\n foreach ($master_config as $top_level_element) {\n foreach ($top_level_element as $key => $value) {\n $flattened_master_config[$key] = $value;\n }\n }\n\n $merged = array_merge($flattened_master_config, $resource_config);\n //$memcached->set('lc_config', $merged);\n return $merged;\n }\n }", "private function get_cache() {\n exit(file_get_contents($this->cache_file));\n }", "public function cacheGet() {\n }", "public function getFromCache() {}", "public static function initCache()\n {\n// $cache->delete('config');\n }", "static public function getConfiguration($id) {\n\t\t$mCache=new Maerdo_Model_Componentcache();\n\t\t$cacheConfig=$mCache->find($id)->toArray();\n\t\t\n\t\tif($cacheConfig['backend_type']==\"file\") {\t\n\t\t\t$mComponentcachebackendoption=new Maerdo_Model_Componentcachebackendfileoption();\n\t\t\t$backendOptions=$mComponentcachebackendoption->findByField('cc_id',$id,$mComponentcachebackendoption);\n\t\t\t\n\t\t\tforeach($backendOptions as $key=>$value) {\t\t\t\t\n\t\t\t\t$value=$value->toArray();\t\t\t\t\t\t\t\t\t\n\t\t\t\t$cacheConfig['backend']=$value;\n\t\t\t}\n\t\t\t\n\t\t\t// Set other support option to null\t\t\t\n\t\t\t$cacheConfig['backend']['automatic_vacuum_factor']=\"\";\n\t\t\t$cacheConfig['backend']['cache_db_complete_path']=\"\";\n\t\t\t\n\t\t} elseif($cacheConfig['backend_type']==\"sqlite\") {\n\t\t\t$mComponentcachebackendoption=new Maerdo_Model_Componentcachebackendsqliteoption();\n\t\t\t$backendOptions=$mComponentcachebackendoption->findByField('cc_id',$id,$mComponentcachebackendoption);\n\t\t\t\n\t\t\tforeach($backendOptions as $key=>$value) {\t\t\t\t\n\t\t\t\t$value=$value->toArray();\t\t\t\t\t\t\t\t\t\n\t\t\t\t$cacheConfig['backend']=$value;\n\t\t\t} \t \t\n\t\t\t// Set other support option to null \t \t \t \t\n\t\t\t$cacheConfig['backend']['cache_dir']=\"\";\n\t\t\t$cacheConfig['backend']['file_locking']=\"\";\n\t\t\t$cacheConfig['backend']['read_control']=\"\";\n\t\t\t$cacheConfig['backend']['read_control_type']=\"\";\n\t\t\t$cacheConfig['backend']['hashed_directory_level']=\"\";\n\t\t\t$cacheConfig['backend']['hashed_directory_umask']=\"\";\n\t\t\t$cacheConfig['backend']['metatadatas_array_max_size']=\"\";\t\n\t\t\t\t\t\t\t\n\t\t} else {\t\n\t\t\t$cacheConfig['backend']=array();\t\n\t\t}\n\t\t\n\t\t$mCacheFrontend=new Maerdo_Model_Componentcachefrontendoption();\n\t\t$frontendOptions=$mCacheFrontend->findByField('cc_id',$id,$mCacheFrontend);\n\t\tforeach($frontendOptions as $key=>$value) {\t\n\t\t\t$value=$value->toArray();\t\t\t\t\t\n\t\t\t$cacheConfig['frontend'][$value['option']]=$value['value'];\n\t\t}\t\t\n\n\t\t//var_dump($cacheConfig);die;\n\t\treturn($cacheConfig);\n\t}", "public function testGetDefaultDriver0()\n{\n\n $actual = $this->cacheManager->getDefaultDriver();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testCacheSetRetrievement(){\n\n $this->initCache();\n\n $this->assertNotEmpty($this->cache);\n\n // Trying to set, save and get value:\n $this->cache->set('test_var', 'testvalue');\n $this->cache->save();\n $this->assertEquals('testvalue', $this->cache->get('test_var'));\n }", "public function getCache() {\n\t\tif (file_exists($this->cache_file)) {\n\t\t\t$cache_contents = file_get_contents($this->cache_file);\n\t\t\treturn $cache_contents;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function testCacheableInstallWithConfig() {\n $this->installProcedure->shouldBeCalledOnce();\n $this->updateProcedure->shouldNotBeCalled();\n\n $this->cachedInstall->install($this->installer, $this->updater);\n $this->cachedInstall->install($this->installer, $this->updater);\n\n $this->assertSiteInstalled();\n $this->assertSiteCached($this->cachedInstall->getInstallCacheId());\n $this->assertSiteCached($this->cachedInstall->getUpdateCacheId());\n }", "function getConfig() {\n\t\tif($this->_oConfig === null) {\n\t\t\tif(isset($this->_options['cacheConfig']) && $this->_options['cacheConfig']) {\n\t\t\t\t$this->_oConfig = $this->cacheConfig();\n\t\t\t} else {\n\t\t\t\t$this->_oConfig = $this->parseConfig();\n\t\t\t}\n\t\t}\n\t\treturn $this->_oConfig;\n\t}", "public function testCache()\n {\n $client = static::createClient();\n $client->request('GET', '/include.php?part=site');\n /** @var $response \\Symfony\\Component\\HttpFoundation\\Response */\n $response = $client->getResponse();\n $this->assertNotEmpty($response->headers->getCacheControlDirective('public'));\n $client = static::createClient(array('environment' => 'test2'));\n $client->request('GET', '/include.php?part=site');\n $response = $client->getResponse();\n $this->assertFalse($response->headers->hasCacheControlDirective('public'));\n }", "public function checkCache()\n {\n $this->assertWritableDir($this->config->getPath('cache'));\n }", "public function getCacheTime($configKey);", "private static function getCache()\n\t{\n\t\t// Initialiase variables.\n\t\t$file = JPATH_CACHE . '/twitter';\n\n\t\tif (JFile::exists($file))\n\t\t{\n\t\t\treturn unserialize(JFile::read($file));\n\t\t}\n\n\t\treturn false;\n\t}", "public function testConfigGetConfig()\n {\n\n $config = Config::getConfig();\n $this->assertInstanceOf('streltcov\\geocoder\\Config', $config);\n\n }", "protected function load_config() {\n $this->config = Kohana::$config->load('imagecache');\n $this->config_patterns = Kohana::$config->load('imagecache_patterns');\n }", "public function it_gets_config_values()\n {\n $expectedConfig = [\n 'cluster' => false,\n 'default' => [\n 'host' => $this->masters[0]['host'],\n 'port' => $this->masters[0]['port']\n ]\n ];\n\n Config::shouldReceive('get')->once()->with('database.redis.nodeSetName')->andReturn('node-set');\n Config::shouldReceive('get')->once()->with('database.redis.masters')->andReturn($this->masters);\n Config::shouldReceive('get')->with('database.redis.backoff-strategy')->andReturn($this->backOffStrategy);\n Config::shouldReceive('get')->with('database.redis.cluster')->andReturn(false);\n\n $this->HAClient->shouldReceive('getIpAddress')->once()->andReturn($this->masters[0]['host']);\n $this->HAClient->shouldReceive('getPort')->once()->andReturn($this->masters[0]['port']);\n\n $this->driverUnderTest = new Driver();\n\n $configUnderTest = $this->driverUnderTest->getConfig();\n\n $this->assertEquals($expectedConfig, $configUnderTest);\n }", "public function configurationCacheFilePath();", "abstract protected function getConfig();", "public function is_use_cache()\r\n {\r\n return $this->cache;\r\n }", "public function getCache()\r\n {\r\n \treturn $this->_cache;\r\n }", "protected function getCacheModule() {}", "public function testPersistanceGet() {\n\t\t// the values are still retrievable.\n\t\t$this->assertEquals( 'remember', $this->cache->get( 'keep' ) );\n\t}", "public function getCache($url, $data = []){\n \t$this->_setData($data);\n \t$this->cacheredis \t= $this->redis->hGet(\"api/$url\",$this->dataredis );\n \t#$this->common->debug(\"api/$url\",FALSE);\n \t#$this->common->debug($this->dataredis);\n \tif( $this->cacheredis){\n \t\treturn $this->cacheredis;\n \t}else{\n \t\treturn FALSE;\n \t}\n }", "public function getContentCacheConfig() {\n return $this->contentCacheConfig;\n }", "public function testConfigGet()\n {\n\n $this->assertNull(Config::get('lang'));\n $this->assertNull(Config::get('skip'));\n $this->assertNull(Config::get('kind'));\n\n Config::setLocale('RU');\n $this->assertEquals('ru_RU', Config::get('lang'));\n\n Config::setLocale('US');\n $this->assertEquals('en_US', Config::get('lang'));\n\n Config::setLocale('EN');\n $this->assertEquals('en_RU', Config::get('lang'));\n\n Config::setLocale('UA');\n $this->assertEquals('uk_UA', Config::get('lang'));\n\n Config::setLocale('TR');\n $this->assertEquals('tr_TR', Config::get('lang'));\n\n Config::setLocale('BY');\n $this->assertEquals('be_BY', Config::get('lang'));\n\n Config::setKind('house');\n $this->assertEquals('house', Config::get('kind'));\n\n Config::setKind('street');\n $this->assertEquals('street', Config::get('kind'));\n\n Config::setKind('metro');\n $this->assertEquals('metro', Config::get('kind'));\n\n Config::setKind('country');\n $this->assertEquals('country', Config::get('kind'));\n\n Config::setKind('locality');\n $this->assertEquals('locality', Config::get('kind'));\n\n Config::setKind('province');\n $this->assertEquals('province', Config::get('kind'));\n\n Config::setKind('hydro');\n $this->assertEquals('hydro', Config::get('kind'));\n\n Config::setSkip(1);\n $this->assertEquals(1, Config::get('skip'));\n\n Config::setSkip(2);\n $this->assertEquals(2, Config::get('skip'));\n\n Config::setSkip(3);\n $this->assertEquals(3, Config::get('skip'));\n\n }", "public function caching_environment()\n {\n $info = array();\n $info['cache_on'] = array('block_youtube_channel__cache_on');\n $info['ttl'] = intval(get_option('youtube_channel_block_update_time'));\n return $info;\n }", "protected function initializeCache() {}", "protected function _initCache()\n {\n $this->bootstrap('Config');\n $appConfig = Zend_Registry::get('config');\n $cache = NULL;\n\n // only attempt to init the cache if turned on\n if ($appConfig->app->caching) {\n\n // get the cache settings\n $config = $appConfig->app->cache;\n\n if (NULL !== $this->_tmpFolder) {\n if ('File' == $config->backend->adapter && !isset($config->backend->options->cache_dir)) {\n $config->backend->options->cache_dir = $this->_tmpFolder . '/cache';\n if (!is_dir($config->backend->options->cache_dir)) {\n mkdir($config->backend->options->cache_dir);\n }\n }\n }\n\n try {\n $cache = Zend_Cache::factory(\n $config->frontend->adapter,\n $config->backend->adapter,\n $config->frontend->options->toArray(),\n $config->backend->options->toArray()\n );\n } catch (Zend_Cache_Exception $e) {\n // send email to alert caching failed\n Zend_Registry::get('log')->alert(\n 'Caching failed: adapter=' . $config->backend->adapter . ', message=' . $e->getMessage(\n ));\n }\n }\n Zend_Registry::set('cache', $cache);\n return $cache;\n }", "protected function initializeCache() {}", "private function _get_cache($key){\n if(is_file(_ENVATO_TMP_DIR.'cache-'.basename($key))){\n return @unserialize(file_get_contents(_ENVATO_TMP_DIR.'cache-'.basename($key)));\n }\n return false;\n }", "public function setCaching($cache);", "public function testOpcacheGetInfoFetcher(): void\n {\n $functionName = 'opcache_' . 'get_' . 'status';\n if (!function_exists($functionName)) {\n eval(\"function $functionName(): array { return []; }\");\n }\n $info = (new OpcacheGetStatusFetcher())->fetch();\n self::assertIsBool($info->isEnabled());\n }", "function testContentLocallyCached() {\n\t\t$this->cache\n\t\t\t->expects( $this->once() ) // <-- the assert\n\t\t\t->method( 'get' )\n\t\t\t->will( $this->returnValue( $this->statusSchema ) );\n\t\t$this->schema->get();\n\t\t$this->schema->get();\n\t\t$this->schema->get();\n\t}", "public function testComDayCqReportingImplCacheCacheImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.reporting.impl.cache.CacheImpl';\n\n $crawler = $client->request('POST', $path);\n }", "private function get_caches () {\n $caches_slug = 'cache';\n return $this->get_option($caches_slug, array());\n }", "public function testCacheStorageIO(){\n\n $this->initCache();\n $this->assertTrue($this->cache->check());\n\n // Check if file is really exists and accessible:\n $this->assertFileExists($this->cache_file);\n\n //@TODO: Uncomment if Travis CI already supports PHPUnit 5.6+\n //$this->assertFileIsReadable($this->cache_file);\n //$this->assertFileIsWritable($this->cache_file);\n }", "public function getCache()\n {\n return $this->get('cache', false);\n }", "public static function cache()\n {\n $cache = Cache::instance('system');\n if (!$cache->get('config-autoload')) {\n $cache->set('config-autoload', self::$data);\n }\n }", "public function getCache()\r\n {\r\n if ($this->exists('cache')) {\r\n return ROOT . $this->get('cache');\r\n }\r\n else\r\n return ROOT . '/cache';\r\n }", "function should_cache() {\n return array_key_exists('cache', $this->options) && $this->options['cache'] === TRUE;\n }", "protected function getRuntimeCache() {}", "public static function is_set_cache(): bool\n {\n return self::getConfigDB(self::cache);\n }", "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}", "public function testCacheReturn()\n {\n $jwks_url = 'https://localhost/.well-known/jwks.json';\n $kid = '__test_kid_2__';\n $cache_value = '__cached_value__';\n $set_spy = $this->once();\n $get_spy = $this->any();\n\n // Mock the CacheHandler interface.\n $cache_handler = $this->getMockBuilder(CacheHandler::class)\n ->getMock();\n\n // The set method should only be called once.\n $cache_handler->expects($set_spy)\n ->method('set')\n ->willReturn( null );\n\n // The get method should be called once and return no cache first, then a cache value after.\n $cache_handler->expects($get_spy)\n ->method('get')\n ->will( $this->onConsecutiveCalls( null, $cache_value ) );\n\n $jwksFetcher = $this->getStub($cache_handler);\n\n $pem_not_cached = $jwksFetcher->requestJwkX5c( $jwks_url, $kid );\n $this->assertNotEmpty( $pem_not_cached );\n\n $pem_cached = $jwksFetcher->requestJwkX5c( $jwks_url, $kid );\n $this->assertEquals( $cache_value, $pem_cached );\n\n // Test that the set method was called with the correct parameters.\n $set_invocations = $set_spy->getInvocations();\n $this->assertEquals( $jwks_url.'|'.$kid, $set_invocations[0]->parameters[0] );\n $this->assertEquals( $pem_not_cached, $set_invocations[0]->parameters[1] );\n\n // Test that the get method was only called twice.\n $this->assertEquals( 2, $get_spy->getInvocationCount() );\n }", "function getCache() {\n return $this->cache;\n }", "public function testComDayCqDamStockIntegrationImplCacheStockCacheConfigurationSer()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.dam.stock.integration.impl.cache.StockCacheConfigurationServiceImpl';\n\n $crawler = $client->request('POST', $path);\n }", "public function getCache() {\n\t\treturn $this->get('Cundd\\\\Rest\\\\Cache\\\\Cache');\n\t}", "protected function checkCache()\n {\n if (file_exists(app()->getCachedConfigPath())) {\n Artisan::call('config:clear');\n Artisan::call('config:cache');\n return true;\n }\n return false;\n }", "public function getCacheDirectory() {}", "public function getCache()\r\n\t{\r\n\t\treturn \\Bitrix\\Main\\Data\\Cache::createInstance();\r\n\t}", "public function getCache(): string\n {\n return $this->cache;\n }", "public function testCekGetCollectionCacheVersionTemplate() {\n\t\t$asset = $this->modelAsset;\n\t\t$this->assertFalse($asset->getCollectionCacheVersion(array()));\n\t}", "public function readAndCache() {\n\n $config = $this->read(false);\n $tempPath = App::tempPath();\n \\jFile::createDir($tempPath, $config->chmodDir);\n $filename = $tempPath.str_replace('/', '~', $this->configFileName);\n\n if (BYTECODE_CACHE_EXISTS) {\n $filename .= '.conf.php';\n if ($f = @fopen($filename, 'wb')) {\n fwrite($f, '<?php $config = '.var_export(get_object_vars($config),true).\";\\n?>\");\n fclose($f);\n chmod($filename, $config->chmodFile);\n }\n else {\n throw new Exception('Error while writing configuration cache file -- '.$filename);\n }\n }\n else {\n IniFileMgr::write(get_object_vars($config), $filename.'.resultini.php', \";<?php die('');?>\\n\", $config->chmodFile);\n }\n return $config;\n }", "abstract public function getConfig();", "public function getConfiguration(string|ExtendedCacheItemPoolInterface $driver = \"\", ConfigurationOptionInterface $config = null){\n\n # Set result\n $result = [];\n\n # Check not test\n if(\n (Env::has(\"phpunit_test\") && Env::get(\"phpunit_test\")) ||\n (Env::has(\"cache_driver\") && Env::get(\"cache_driver\") == \"Files\")\n )\n\n # Set driver\n $driver = \"Files\";\n\n # Get driver if empty\n if(!$driver){\n\n # Get mongodb config\n $mongodbConfig = Config::getValue(\"Database.collection.mongodb\");\n\n # Check mongodb config\n if($mongodbConfig && !empty($mongodbConfig))\n\n # Set driver\n $driver = \"Mongodb\";\n\n # Else default driver\n else\n\n $driver = \"Files\";\n\n }\n\n # Check driver\n if(!$driver || !in_array($driver, self::DRIVERS_ALLOWED)){\n\n echo $driver;\n\n # New Exception\n throw new CrazyException(\n \"Driver \\\"$driver\\\" for your cache instance isn't valid...\",\n 500,\n [\n \"custom_code\" => \"cache-001\",\n ]\n );\n\n }\n\n # Push driver in result\n $result[\"driver\"] = $driver;\n\n # Check config\n if(!empty($config)){\n\n # Push config\n $result[\"options\"] = $config;\n\n }else\n # Check if files driver\n if($driver == \"Files\"){\n\n # Set Files config\n $result[\"options\"] = [\n 'path' => self::_getPath(),\n 'itemDetailedDate' => true,\n ];\n\n }else\n # Check if mongodb driver\n if($driver == \"Mongodb\"){\n\n # Get cache config\n\n # Set Mongodb config\n $result[\"options\"] = [\n 'itemDetailedDate' => true,\n \"host\" => $mongodbConfig[\"host\"],\n \"port\" => $mongodbConfig[\"port\"],\n \"username\" => $mongodbConfig[\"users\"][0][\"login\"],\n \"password\" => $mongodbConfig[\"users\"][0][\"password\"],\n \"collectionName\" => \"cache\", \n \"databaseName\" => \"crazy_db\",\n ];\n\n }\n\n # Return result\n return $result;\n\n }", "protected function _initCache() {\n\trequire_once 'Zend/Cache.php';\n\trequire_once 'Zend/Config/Ini.php';\n\n\t$this->bootstrap('ServerRegistry');\n\t$config = new Zend_Config_Ini(APPLICATION_CONFIG_PATH . '/cache.ini');\n\t$cache = Zend_Cache::factory($config->get('frontend'), $config->get('backend'), $config->get('frontendOption')->toArray(), $config->get('backendOption')->toArray(), TRUE, TRUE);\n\t$cache->cleanByRegistry();\n\tif (isset($_GET ['clear_cache']) && ('all' == $_GET ['clear_cache'])) {\n\t $cache->clean();\n\t}\n\n\treturn $cache;\n }", "function getCache() {\n return $this->cache;\n }", "public function getConfig() {}", "function getCacheDuration($config='') {\n \n if ($config == 'low') {\n\t\t $minutes = config('app.cache_minutes_low');\n\t\t} else {\n\t\t $minutes = config('app.cache_minutes');\n\t\t}\n\n return $minutes;\n\n}", "public static function getCache() {\n\n if (Config::get('app.cache') != 0 && !Auth::check()) { //\n $page = (Paginator::getCurrentPage() > 1 ? Paginator::getCurrentPage() : '');\n $key = 'route-' . Str::slug(Request::fullurl()) . $page;\n\n if (Cache::has($key)) {\n die(Cache::get($key));\n }\n }\n }", "public function readCache() {\n\t\tif(file_exists($this -> sCacheDir . $this -> sCacheFile)) {\n\t\t\treturn file_get_contents($this -> sCacheDir . $this -> sCacheFile);\n\t\t}\n\t\treturn false;\n\t}", "public function isCached() {}", "protected function getCache()\n {\n return Mage::app()->getCache();\n }" ]
[ "0.7166657", "0.7094102", "0.6941396", "0.687526", "0.6807122", "0.6712748", "0.66992867", "0.6686551", "0.6674238", "0.6662307", "0.66509277", "0.6638423", "0.66327775", "0.6583384", "0.65706474", "0.6569947", "0.6559856", "0.65525186", "0.65412664", "0.653488", "0.64902633", "0.6469926", "0.64605284", "0.6440451", "0.6428987", "0.6421242", "0.63710123", "0.6358357", "0.635746", "0.6349852", "0.6341716", "0.6340675", "0.6326349", "0.6324186", "0.6313178", "0.62885433", "0.62884057", "0.62874454", "0.62743986", "0.6271037", "0.62545145", "0.6228278", "0.62157154", "0.6215323", "0.62064415", "0.6190709", "0.6184276", "0.61772853", "0.6171985", "0.6171299", "0.61700034", "0.61644167", "0.614851", "0.61419547", "0.6121251", "0.6109482", "0.6098952", "0.6091947", "0.60864335", "0.60848105", "0.6063136", "0.6062112", "0.6061157", "0.60597086", "0.60533106", "0.6053065", "0.60515606", "0.6043147", "0.6041442", "0.6031671", "0.6029911", "0.6028389", "0.60203314", "0.6013666", "0.600339", "0.59999007", "0.59979117", "0.5989585", "0.59872454", "0.5985901", "0.59858406", "0.5974343", "0.59738016", "0.59730124", "0.5965167", "0.5962318", "0.5957844", "0.59567803", "0.59535694", "0.5951894", "0.5943309", "0.59364104", "0.5933471", "0.59300685", "0.5928205", "0.5925361", "0.59228754", "0.59215844", "0.59147906", "0.5914382" ]
0.72214276
0
test getting the required fixtures
public function testRequiredExtentions() { if (!$this->_hasTrigger('setupExtensions')) { return false; } $expected = $this->_manualCall('setupExtensions', $this->ObjectEvent); $result = $this->Event->trigger($this->ModelObject, $this->plugin . '.setupExtensions'); $this->assertEquals($expected, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getFixtures();", "public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }", "protected function getFixtures()\n {\n return array(\n __DIR__ . '/card.yml',\n );\n }", "protected function getFixtures()\n {\n return array(\n // __DIR__ . '/../../Resources/fixtures/majora_entitys.yml',\n );\n }", "public static function loadFixture()\n {\n //include __DIR__ .'/../_files/customer.php';\n include __DIR__ .'/../_files/order_fee_variation.php';\n\n }", "public function testLoadAllFixtures(): void\n {\n $this->loadFixtures();\n $article = $this->getTableLocator()->get('Articles')->get(1);\n $this->assertSame(1, $article->id);\n $category = $this->getTableLocator()->get('Categories')->get(1);\n $this->assertSame(1, $category->id);\n }", "public function setUp()\n {\n $this->fixtures('articles');\n }", "public function setUp()\n {\n $this->loadFixtures([]);\n }", "public function setUp()\n\t{\n\t\tparent::setUp();\n if(is_array($this->fixtures)){\n foreach($this->fixtures as $fixtureName=>$modelClass)\n {\n $tableName=WF_Table::model($modelClass)->tableName();\n $this->resetTable($tableName);\n $rows=$this->loadFixtures($modelClass, $tableName);\n if(is_array($rows) && is_string($fixtureName))\n {\n $this->_rows[$fixtureName]=$rows;\n if(isset($modelClass))\n {\n foreach(array_keys($rows) as $alias)\n $this->_records[$fixtureName][$alias]=$modelClass;\n }\n }\n }\n }\n }", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => BookFixture::class,\n 'dataFile' => codecept_data_dir() . 'book.php'\n ],\n ];\n }", "protected function getFixtures()\n {\n return array(\n __DIR__ . '/../../Resources/fixtures/BlogArticle.yml',\n );\n }", "public function testRequiredFixtures() {\n\t\tif (!$this->_hasTrigger('getRequiredFixtures')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('getRequiredFixtures', $this->ObjectEvent);\n\n\t\t$result = $this->Event->trigger($this->ModelObject, $this->plugin . '.getRequiredFixtures');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function testFixturesSetup() {\n $this->assertCount(3, $this->databaseDumpFiles);\n }", "public function testGetFixture()\n {\n $this->assertNull(SeederTask::getFixtureFile());\n }", "public function setupFixtures()\n {\n if ($this->_fixtures === null) {\n $loadedFixtures = [];\n foreach ($this->fixtures() as $fixtureClass) {\n $loadedFixtures[$fixtureClass] = Yii::createObject($fixtureClass);\n }\n\n $this->_fixtures = $loadedFixtures;\n }\n }", "private function determineFixturesPath() {}", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => AdminUserFixture::class,\n 'dataFile' => codecept_data_dir() . 'admin_user.php',\n ],\n 'auth' => [\n 'class' => AuthItemFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_data.php',\n ],\n 'auth_child' => [\n 'class' => AuthItemChildFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_child_data.php',\n ],\n 'authAssignment' => [\n 'class' => AuthAssignmentFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_assigment_data.php',\n ],\n 'category' => [\n 'class' => CategoryFixture::class,\n 'dataFile' => codecept_data_dir() . 'category_data.php',\n ],\n 'category_company_type' => [\n 'class' => CategoryCompanyTypeFixture::class,\n 'dataFile' => codecept_data_dir() . 'category_company_type_data.php',\n ],\n 'company_type' => [\n 'class' => CompanyTypeFixture::class,\n 'dataFile' => codecept_data_dir() . 'company_type_data.php',\n ],\n\n ];\n }", "public function testLoadDulicateFixtures(): void\n {\n $this->expectException(UnexpectedValueException::class);\n $this->expectExceptionMessage('Found duplicate fixture `core.Articles`');\n (new FixtureHelper())->loadFixtures(['core.Articles','core.Articles']);\n }", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => UserFixture::className(),\n 'dataFile' => codecept_data_dir() . 'login_data.php',\n ],\n ];\n }", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => TicketsFixture::className(),\n 'dataFile' => codecept_data_dir() . 'tickets.php'\n ]\n ];\n }", "public function _fixtures()\n\t{\n\t\treturn [\n\t\t\t'user' => [\n\t\t\t\t'class' => UserFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'login_data.php'\n\t\t\t],\n\t\t\t'models' => [\n\t\t\t\t'class' => ModelsFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'models.php'\n\t\t\t],\n\t\t\t'files' => [\n\t\t\t\t'class' => FilesFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'files.php'\n\t\t\t]\n\n\t\t];\n\t}", "public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_connection,\n\t\t\t\t'fixtures' => $this->_fixtures\n\t\t\t]\n\t\t];\n\n\t\tFixtures::config($options);\n\t\tFixtures::save('db');\n\t}", "public function setUp()\n {\n $this->fixtures('unit_tests');\n }", "protected static function getDataFixtures()\n {\n return array(\n new LoadTestUser(),\n new LoadSuperUser(),\n );\n }", "protected function fixture(){\n $this->clearAll();\n \n $venue_id = $this->createVenue('Pool');\n \n $this->createUser('foo');\n\n\n $seller = $this->createUser('seller');\n \n $evt = $this->createEvent('Barcelona vs Real Madrid', $seller->id, $this->createLocation()->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'aaa');\n $this->setEventGroupId($evt, '0010');\n $this->setEventVenue($evt, $venue_id);\n $this->setEventOtherTaxes($evt, 'VAT', 17.5, 'barb4d0s');\n $this->catA = $this->createCategory('Category A', $evt->id, 25.00, 100);\n $catB = $this->createCategory('Category B', $evt->id, 10.00);\n $catC = $this->createCategory('Category C', $evt->id, 5.00);\n \n /*\n $loc = $this->createLocation();\n $evt = $this->createEvent('Water March', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'bbb');\n $this->createCategory('Zamora Branch', $evt->id, 14.00);\n \n $evt = $this->createEvent('Third Event', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'ccc');\n $this->createCategory('Heaven', $evt->id, 22.50);\n $this->createCategory('Limbo', $evt->id, 22.50);\n \n \n $this->seller = $this->createUser('seller2');\n $loc = $this->createLocation();\n $evt = $this->createEvent('Transformers Con', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'ttt');\n $this->createCategory('Autobots', $evt->id, 55.00);*/\n }", "protected function createFixtures()\n {\n // Due to a dubious bug(?) in doctrine - product types need to be loaded first.\n $typeFixtures = new LoadProductTypes();\n $typeFixtures->load($this->entityManager);\n $this->productType = $this->getProductTypeRepository()->find(self::PRODUCT_TYPE_ID);\n $this->addonProductType = $this->getProductTypeRepository()->find(self::PRODUCT_TYPE_ADDON_ID);\n\n $countries = new LoadCountries();\n $countries->load($this->entityManager);\n\n $this->contactTestData = new ContactTestData($this->container);\n\n $loadCurrencies = new LoadCurrencies();\n $loadCurrencies->load($this->entityManager);\n\n $this->currency = $this->getCurrencyRepository()->findByCode($this->defaultCurrencyCode);\n\n $unitFixtures = new LoadUnits();\n $unitFixtures->load($this->entityManager);\n $this->orderUnit = $this->getProductUnitRepository()->find(self::ORDER_UNIT_ID);\n\n $this->contentUnit = $this->getProductUnitRepository()->find(self::CONTENT_UNIT_ID);\n\n $taxClasses = new LoadTaxClasses();\n $taxClasses->load($this->entityManager);\n $this->taxClass = $this->getTaxClassRepository()->find(self::TAX_CLASS_ID);\n\n $countryTaxes = new LoadCountryTaxes();\n $countryTaxes->load($this->entityManager);\n\n $collectionTypes = new LoadCollectionTypes();\n $collectionTypes->load($this->entityManager);\n\n $mediaTypes = new LoadMediaTypes();\n $mediaTypes->load($this->entityManager);\n\n $attributeTypes = new LoadAttributeTypes();\n $attributeTypes->load($this->entityManager);\n $this->attributeType = $this->getAttributeTypeRepository()->find(self::ATTRIBUTE_TYPE_ID);\n\n $statusFixtures = new LoadProductStatuses();\n $statusFixtures->load($this->entityManager);\n $this->productStatus = $this->getProductStatusRepository()->find(Status::ACTIVE);\n $this->productStatusChanged = $this->getProductStatusRepository()->find(Status::CHANGED);\n $this->productStatusImported = $this->getProductStatusRepository()->find(Status::IMPORTED);\n $this->productStatusSubmitted = $this->getProductStatusRepository()->find(Status::SUBMITTED);\n\n $deliveryStatusFixtures = new LoadDeliveryStatuses();\n $deliveryStatusFixtures->load($this->entityManager);\n }", "public function fixtures() \n {\n return [\n 'categories' => CategoryFixture::className(),\n ];\n }", "public function _fixtures()\n {\n return [\n\n 'base_date' => [\n 'class' => BaseDataFixture::class,\n 'dataFile' => codecept_data_dir() . 'base_data_data.php',\n ],\n\n ];\n }", "protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }", "public function testFindTemplates()\n {\n\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function setUp() {\n $this->fixture= new FreeTdsLookup($this->getClass()->getPackage()->getResourceAsStream('freetds.conf'));\n }", "private function myLoadFixtures()\n {\n $em = $this->getDatabaseManager();\n\n // load fixtures\n $client = static::createClient();\n $classes = array(\n // classes implementing Doctrine\\Common\\DataFixtures\\FixtureInterface\n 'Demofony2\\AppBundle\\DataFixtures\\ORM\\FixturesLoader',\n );\n\n $this->loadFixtures($classes);\n }", "public function testDynamicFixture()\n {\n $fixture = new Mad_Test_Fixture_Base($this->_conn, 'unit_tests');\n $fixture->load();\n $record = $fixture->getRecord('unit_test_2');\n \n $this->assertEquals(date(\"Y-m-d\"), $record['date_value']);\n }", "public static function loadWebsiteFixtures()\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }", "public static function loadWebsiteFixtures()\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }", "public function setUp() {\n $this->fixture= new RestJsonSerializer();\n }", "protected function postFixtureSetup()\n {\n }", "public function testPopulate()\n {\n $this->todo('stub');\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}" ]
[ "0.7951442", "0.7440711", "0.7225635", "0.7212955", "0.7175378", "0.7103578", "0.7052515", "0.70011467", "0.69911766", "0.6983086", "0.6976447", "0.6976425", "0.6920657", "0.6904257", "0.6875756", "0.68727165", "0.6867595", "0.6812385", "0.6809905", "0.678578", "0.67506206", "0.6739128", "0.669537", "0.6683208", "0.6668422", "0.6638555", "0.6595494", "0.65707505", "0.6567457", "0.6548508", "0.65160334", "0.65160334", "0.65160334", "0.6495072", "0.64925194", "0.64777213", "0.64493316", "0.64493316", "0.6433766", "0.6430411", "0.6427749", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873" ]
0.0
-1
test getting the required fixtures
public function testRequiredFixtures() { if (!$this->_hasTrigger('getRequiredFixtures')) { return false; } $expected = $this->_manualCall('getRequiredFixtures', $this->ObjectEvent); $result = $this->Event->trigger($this->ModelObject, $this->plugin . '.getRequiredFixtures'); $this->assertEquals($expected, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getFixtures();", "public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }", "protected function getFixtures()\n {\n return array(\n __DIR__ . '/card.yml',\n );\n }", "protected function getFixtures()\n {\n return array(\n // __DIR__ . '/../../Resources/fixtures/majora_entitys.yml',\n );\n }", "public static function loadFixture()\n {\n //include __DIR__ .'/../_files/customer.php';\n include __DIR__ .'/../_files/order_fee_variation.php';\n\n }", "public function testLoadAllFixtures(): void\n {\n $this->loadFixtures();\n $article = $this->getTableLocator()->get('Articles')->get(1);\n $this->assertSame(1, $article->id);\n $category = $this->getTableLocator()->get('Categories')->get(1);\n $this->assertSame(1, $category->id);\n }", "public function setUp()\n {\n $this->fixtures('articles');\n }", "public function setUp()\n {\n $this->loadFixtures([]);\n }", "public function setUp()\n\t{\n\t\tparent::setUp();\n if(is_array($this->fixtures)){\n foreach($this->fixtures as $fixtureName=>$modelClass)\n {\n $tableName=WF_Table::model($modelClass)->tableName();\n $this->resetTable($tableName);\n $rows=$this->loadFixtures($modelClass, $tableName);\n if(is_array($rows) && is_string($fixtureName))\n {\n $this->_rows[$fixtureName]=$rows;\n if(isset($modelClass))\n {\n foreach(array_keys($rows) as $alias)\n $this->_records[$fixtureName][$alias]=$modelClass;\n }\n }\n }\n }\n }", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => BookFixture::class,\n 'dataFile' => codecept_data_dir() . 'book.php'\n ],\n ];\n }", "protected function getFixtures()\n {\n return array(\n __DIR__ . '/../../Resources/fixtures/BlogArticle.yml',\n );\n }", "public function testFixturesSetup() {\n $this->assertCount(3, $this->databaseDumpFiles);\n }", "public function testGetFixture()\n {\n $this->assertNull(SeederTask::getFixtureFile());\n }", "public function setupFixtures()\n {\n if ($this->_fixtures === null) {\n $loadedFixtures = [];\n foreach ($this->fixtures() as $fixtureClass) {\n $loadedFixtures[$fixtureClass] = Yii::createObject($fixtureClass);\n }\n\n $this->_fixtures = $loadedFixtures;\n }\n }", "private function determineFixturesPath() {}", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => AdminUserFixture::class,\n 'dataFile' => codecept_data_dir() . 'admin_user.php',\n ],\n 'auth' => [\n 'class' => AuthItemFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_data.php',\n ],\n 'auth_child' => [\n 'class' => AuthItemChildFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_child_data.php',\n ],\n 'authAssignment' => [\n 'class' => AuthAssignmentFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_assigment_data.php',\n ],\n 'category' => [\n 'class' => CategoryFixture::class,\n 'dataFile' => codecept_data_dir() . 'category_data.php',\n ],\n 'category_company_type' => [\n 'class' => CategoryCompanyTypeFixture::class,\n 'dataFile' => codecept_data_dir() . 'category_company_type_data.php',\n ],\n 'company_type' => [\n 'class' => CompanyTypeFixture::class,\n 'dataFile' => codecept_data_dir() . 'company_type_data.php',\n ],\n\n ];\n }", "public function testLoadDulicateFixtures(): void\n {\n $this->expectException(UnexpectedValueException::class);\n $this->expectExceptionMessage('Found duplicate fixture `core.Articles`');\n (new FixtureHelper())->loadFixtures(['core.Articles','core.Articles']);\n }", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => UserFixture::className(),\n 'dataFile' => codecept_data_dir() . 'login_data.php',\n ],\n ];\n }", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => TicketsFixture::className(),\n 'dataFile' => codecept_data_dir() . 'tickets.php'\n ]\n ];\n }", "public function _fixtures()\n\t{\n\t\treturn [\n\t\t\t'user' => [\n\t\t\t\t'class' => UserFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'login_data.php'\n\t\t\t],\n\t\t\t'models' => [\n\t\t\t\t'class' => ModelsFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'models.php'\n\t\t\t],\n\t\t\t'files' => [\n\t\t\t\t'class' => FilesFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'files.php'\n\t\t\t]\n\n\t\t];\n\t}", "public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_connection,\n\t\t\t\t'fixtures' => $this->_fixtures\n\t\t\t]\n\t\t];\n\n\t\tFixtures::config($options);\n\t\tFixtures::save('db');\n\t}", "public function setUp()\n {\n $this->fixtures('unit_tests');\n }", "protected static function getDataFixtures()\n {\n return array(\n new LoadTestUser(),\n new LoadSuperUser(),\n );\n }", "protected function fixture(){\n $this->clearAll();\n \n $venue_id = $this->createVenue('Pool');\n \n $this->createUser('foo');\n\n\n $seller = $this->createUser('seller');\n \n $evt = $this->createEvent('Barcelona vs Real Madrid', $seller->id, $this->createLocation()->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'aaa');\n $this->setEventGroupId($evt, '0010');\n $this->setEventVenue($evt, $venue_id);\n $this->setEventOtherTaxes($evt, 'VAT', 17.5, 'barb4d0s');\n $this->catA = $this->createCategory('Category A', $evt->id, 25.00, 100);\n $catB = $this->createCategory('Category B', $evt->id, 10.00);\n $catC = $this->createCategory('Category C', $evt->id, 5.00);\n \n /*\n $loc = $this->createLocation();\n $evt = $this->createEvent('Water March', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'bbb');\n $this->createCategory('Zamora Branch', $evt->id, 14.00);\n \n $evt = $this->createEvent('Third Event', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'ccc');\n $this->createCategory('Heaven', $evt->id, 22.50);\n $this->createCategory('Limbo', $evt->id, 22.50);\n \n \n $this->seller = $this->createUser('seller2');\n $loc = $this->createLocation();\n $evt = $this->createEvent('Transformers Con', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'ttt');\n $this->createCategory('Autobots', $evt->id, 55.00);*/\n }", "protected function createFixtures()\n {\n // Due to a dubious bug(?) in doctrine - product types need to be loaded first.\n $typeFixtures = new LoadProductTypes();\n $typeFixtures->load($this->entityManager);\n $this->productType = $this->getProductTypeRepository()->find(self::PRODUCT_TYPE_ID);\n $this->addonProductType = $this->getProductTypeRepository()->find(self::PRODUCT_TYPE_ADDON_ID);\n\n $countries = new LoadCountries();\n $countries->load($this->entityManager);\n\n $this->contactTestData = new ContactTestData($this->container);\n\n $loadCurrencies = new LoadCurrencies();\n $loadCurrencies->load($this->entityManager);\n\n $this->currency = $this->getCurrencyRepository()->findByCode($this->defaultCurrencyCode);\n\n $unitFixtures = new LoadUnits();\n $unitFixtures->load($this->entityManager);\n $this->orderUnit = $this->getProductUnitRepository()->find(self::ORDER_UNIT_ID);\n\n $this->contentUnit = $this->getProductUnitRepository()->find(self::CONTENT_UNIT_ID);\n\n $taxClasses = new LoadTaxClasses();\n $taxClasses->load($this->entityManager);\n $this->taxClass = $this->getTaxClassRepository()->find(self::TAX_CLASS_ID);\n\n $countryTaxes = new LoadCountryTaxes();\n $countryTaxes->load($this->entityManager);\n\n $collectionTypes = new LoadCollectionTypes();\n $collectionTypes->load($this->entityManager);\n\n $mediaTypes = new LoadMediaTypes();\n $mediaTypes->load($this->entityManager);\n\n $attributeTypes = new LoadAttributeTypes();\n $attributeTypes->load($this->entityManager);\n $this->attributeType = $this->getAttributeTypeRepository()->find(self::ATTRIBUTE_TYPE_ID);\n\n $statusFixtures = new LoadProductStatuses();\n $statusFixtures->load($this->entityManager);\n $this->productStatus = $this->getProductStatusRepository()->find(Status::ACTIVE);\n $this->productStatusChanged = $this->getProductStatusRepository()->find(Status::CHANGED);\n $this->productStatusImported = $this->getProductStatusRepository()->find(Status::IMPORTED);\n $this->productStatusSubmitted = $this->getProductStatusRepository()->find(Status::SUBMITTED);\n\n $deliveryStatusFixtures = new LoadDeliveryStatuses();\n $deliveryStatusFixtures->load($this->entityManager);\n }", "public function fixtures() \n {\n return [\n 'categories' => CategoryFixture::className(),\n ];\n }", "public function _fixtures()\n {\n return [\n\n 'base_date' => [\n 'class' => BaseDataFixture::class,\n 'dataFile' => codecept_data_dir() . 'base_data_data.php',\n ],\n\n ];\n }", "protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }", "public function testFindTemplates()\n {\n\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function setUp() {\n $this->fixture= new FreeTdsLookup($this->getClass()->getPackage()->getResourceAsStream('freetds.conf'));\n }", "private function myLoadFixtures()\n {\n $em = $this->getDatabaseManager();\n\n // load fixtures\n $client = static::createClient();\n $classes = array(\n // classes implementing Doctrine\\Common\\DataFixtures\\FixtureInterface\n 'Demofony2\\AppBundle\\DataFixtures\\ORM\\FixturesLoader',\n );\n\n $this->loadFixtures($classes);\n }", "public function testDynamicFixture()\n {\n $fixture = new Mad_Test_Fixture_Base($this->_conn, 'unit_tests');\n $fixture->load();\n $record = $fixture->getRecord('unit_test_2');\n \n $this->assertEquals(date(\"Y-m-d\"), $record['date_value']);\n }", "public static function loadWebsiteFixtures()\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }", "public static function loadWebsiteFixtures()\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }", "public function setUp() {\n $this->fixture= new RestJsonSerializer();\n }", "protected function postFixtureSetup()\n {\n }", "public function testPopulate()\n {\n $this->todo('stub');\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}" ]
[ "0.7951442", "0.7440711", "0.7225635", "0.7212955", "0.7175378", "0.7103578", "0.7052515", "0.70011467", "0.69911766", "0.6983086", "0.6976447", "0.6920657", "0.6904257", "0.6875756", "0.68727165", "0.6867595", "0.6812385", "0.6809905", "0.678578", "0.67506206", "0.6739128", "0.669537", "0.6683208", "0.6668422", "0.6638555", "0.6595494", "0.65707505", "0.6567457", "0.6548508", "0.65160334", "0.65160334", "0.65160334", "0.6495072", "0.64925194", "0.64777213", "0.64493316", "0.64493316", "0.6433766", "0.6430411", "0.6427749", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63974094", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63958806", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873", "0.63955873" ]
0.6976425
11
test getting the admin menu
public function testAdminMenu() { if (!$this->_hasTrigger('adminMenu')) { return false; } $expected = $this->_manualCall('adminMenu', $this->ObjectEvent); $result = $this->Event->trigger($this->ViewObject, $this->plugin . '.adminMenu'); $this->assertEquals($expected, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testmenuAction()\n {\n parent::login();\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->isElementPresent(\"id=sortable1\");\n $this->isElementPresent(\"id=sortable2\");\n parent::logout();\n }", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "public static function add_admin_menus()\n\t{\n\t}", "public function testShowingAdmin(){\n }", "public function admin_menu(&$menu)\n {\n\n\t}", "protected function getModuleMenu() {}", "protected function getModuleMenu() {}", "protected function getModuleMenu() {}", "function network_admin_menu()\n {\n }", "public function adminmenu()\n {\n\n $vue = new ViewAdmin(\"Administration\");\n $vue->generer(array());\n }", "function getMenuItems()\n {\n $this->menuitem(\"xp\", \"\", \"main\", array(\"xp.story\", \"admin\"));\n $this->menuitem(\"stories\", dispatch_url(\"xp.story\", \"admin\"), \"xp\", array(\"xp.story\", \"admin\"));\n }", "public function getMenus() {}", "public function page_test() {\n\n\t\tprint_r($this->permissions->check(\"can_view_admin\"));\n\t}", "public function testGetAdminLinks() {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "function adminMenu() {\r\n\t\t// TODO: This does not only create the menu, it also (only?) *does* sth. with the entries.\r\n\t\t// But those actions must be done before the menu is created (due to the redirects).\r\n\t\t// !Split the function!\r\n\t\t//$page = add_submenu_page('admin.php', __('UWR Ergebnisse'), __('UWR Ergebnisse'), 'edit_posts', 'uwr1results', array('Uwr1resultsController', 'adminAction'));\r\n\t\t$page = add_submenu_page('uwr1menu', __('UWR Ergebnisse'), __('UWR Ergebnisse'), UWR1RESULTS_CAPABILITIES, 'uwr1results', array('Uwr1resultsController', 'adminAction'));\r\n\t\tadd_action( 'admin_print_scripts-' . $page, array('Uwr1resultsView', 'adminScripts') );\r\n\t}", "protected function menus()\n {\n\n }", "public function testMenuRouteTest()\n {\n $user = $this->_getAdminUser();\n $response = $this->actingAs($user, 'admin')->get(route('admin.menu.index'));\n $response->assertStatus(200);\n $response->assertSee('Menu');\n\n //\n $data['name'] = 'test menu';\n $data['identifier'] = 'test-menu';\n $data['menu_json'] = '[[{\n \"name\": \"Kitchen\",\n \"params\": \"kitchen\",\n \"route\": \"category.view\",\n \"children\": [\n []\n ]\n }]]';\n $response = $this->post(route('admin.menu.store'), $data);\n\n $response->assertRedirect(route('admin.menu.index'));\n }", "private function loadMenu()\n\t{\n\t\tglobal $txt, $context, $modSettings, $settings;\n\n\t\t// Need these to do much\n\t\trequire_once(SUBSDIR . '/Menu.subs.php');\n\n\t\t// Define the menu structure - see subs/Menu.subs.php for details!\n\t\t$admin_areas = array(\n\t\t\t'forum' => array(\n\t\t\t\t'title' => $txt['admin_main'],\n\t\t\t\t'permission' => array('admin_forum', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_boards', 'manage_smileys', 'manage_attachments'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'index' => array(\n\t\t\t\t\t\t'label' => $txt['admin_center'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Admin',\n\t\t\t\t\t\t'function' => 'action_home',\n\t\t\t\t\t\t'class' => 'i-home i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'credits' => array(\n\t\t\t\t\t\t'label' => $txt['support_credits_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Admin',\n\t\t\t\t\t\t'function' => 'action_credits',\n\t\t\t\t\t\t'class' => 'i-support i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'maillist' => array(\n\t\t\t\t\t\t'label' => $txt['mail_center'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageMaillist',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-envelope-blank i-admin',\n\t\t\t\t\t\t'permission' => array('approve_emails', 'admin_forum'),\n\t\t\t\t\t\t'enabled' => featureEnabled('pe'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'emaillist' => array($txt['mm_emailerror'], 'approve_emails'),\n\t\t\t\t\t\t\t'emailfilters' => array($txt['mm_emailfilters'], 'admin_forum'),\n\t\t\t\t\t\t\t'emailparser' => array($txt['mm_emailparsers'], 'admin_forum'),\n\t\t\t\t\t\t\t'emailtemplates' => array($txt['mm_emailtemplates'], 'approve_emails'),\n\t\t\t\t\t\t\t'emailsettings' => array($txt['mm_emailsettings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'news' => array(\n\t\t\t\t\t\t'label' => $txt['news_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageNews',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-post-text i-admin',\n\t\t\t\t\t\t'permission' => array('edit_news', 'send_mail', 'admin_forum'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'editnews' => array($txt['admin_edit_news'], 'edit_news'),\n\t\t\t\t\t\t\t'mailingmembers' => array($txt['admin_newsletters'], 'send_mail'),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'packages' => array(\n\t\t\t\t\t\t'label' => $txt['package'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\Packages\\\\Packages',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'class' => 'i-package i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'browse' => array($txt['browse_packages']),\n\t\t\t\t\t\t\t'installed' => array($txt['installed_packages']),\n\t\t\t\t\t\t\t'options' => array($txt['package_settings']),\n\t\t\t\t\t\t\t'servers' => array($txt['download_packages']),\n\t\t\t\t\t\t\t'upload' => array($txt['upload_packages']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'packageservers' => array(\n\t\t\t\t\t\t'label' => $txt['package_servers'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\Packages\\\\PackageServers',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'class' => 'i-package i-admin',\n\t\t\t\t\t\t'hidden' => true,\n\t\t\t\t\t),\n\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Admin',\n\t\t\t\t\t\t'function' => 'action_search',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'class' => 'i-search i-admin',\n\t\t\t\t\t\t'select' => 'index'\n\t\t\t\t\t),\n\t\t\t\t\t'adminlogoff' => array(\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Admin',\n\t\t\t\t\t\t'function' => 'action_endsession',\n\t\t\t\t\t\t'label' => $txt['admin_logoff'],\n\t\t\t\t\t\t'enabled' => empty($modSettings['securityDisable']),\n\t\t\t\t\t\t'class' => 'i-sign-out i-admin',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'config' => array(\n\t\t\t\t'title' => $txt['admin_config'],\n\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'corefeatures' => array(\n\t\t\t\t\t\t'label' => $txt['core_settings_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\CoreFeatures',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-cog i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'featuresettings' => array(\n\t\t\t\t\t\t'label' => $txt['modSettings_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageFeatures',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-switch-on i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'basic' => array($txt['mods_cat_features']),\n\t\t\t\t\t\t\t'layout' => array($txt['mods_cat_layout']),\n\t\t\t\t\t\t\t'pmsettings' => array($txt['personal_messages']),\n\t\t\t\t\t\t\t'karma' => array($txt['karma'], 'enabled' => featureEnabled('k')),\n\t\t\t\t\t\t\t'likes' => array($txt['likes'], 'enabled' => featureEnabled('l')),\n\t\t\t\t\t\t\t'mention' => array($txt['mention']),\n\t\t\t\t\t\t\t'sig' => array($txt['signature_settings_short']),\n\t\t\t\t\t\t\t'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => featureEnabled('cp')),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'serversettings' => array(\n\t\t\t\t\t\t'label' => $txt['admin_server_settings'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageServer',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-menu i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'general' => array($txt['general_settings']),\n\t\t\t\t\t\t\t'database' => array($txt['database_paths_settings']),\n\t\t\t\t\t\t\t'cookie' => array($txt['cookies_sessions_settings']),\n\t\t\t\t\t\t\t'cache' => array($txt['caching_settings']),\n\t\t\t\t\t\t\t'loads' => array($txt['loadavg_settings']),\n\t\t\t\t\t\t\t'phpinfo' => array($txt['phpinfo_settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'securitysettings' => array(\n\t\t\t\t\t\t'label' => $txt['admin_security_moderation'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageSecurity',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-lock i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'general' => array($txt['mods_cat_security_general']),\n\t\t\t\t\t\t\t'spam' => array($txt['antispam_title']),\n\t\t\t\t\t\t\t'moderation' => array($txt['moderation_settings_short'], 'enabled' => !empty($modSettings['warning_enable'])),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'theme' => array(\n\t\t\t\t\t\t'label' => $txt['theme_admin'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageThemes',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'custom_url' => getUrl('admin', ['action' => 'admin', 'area' => 'theme']),\n\t\t\t\t\t\t'class' => 'i-modify i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'admin' => array($txt['themeadmin_admin_title']),\n\t\t\t\t\t\t\t'list' => array($txt['themeadmin_list_title']),\n\t\t\t\t\t\t\t'reset' => array($txt['themeadmin_reset_title']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'current_theme' => array(\n\t\t\t\t\t\t'label' => $txt['theme_current_settings'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageThemes',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'custom_url' => getUrl('admin', ['action' => 'admin', 'area' => 'theme', 'sa' => 'list', 'th' => $settings['theme_id']]),\n\t\t\t\t\t\t'class' => 'i-paint i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'languages' => array(\n\t\t\t\t\t\t'label' => $txt['language_configuration'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageLanguages',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-language i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'edit' => array($txt['language_edit']),\n\t\t\t\t\t\t\t// 'add' => array($txt['language_add']),\n\t\t\t\t\t\t\t'settings' => array($txt['language_settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'addonsettings' => array(\n\t\t\t\t\t\t'label' => $txt['admin_modifications'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\AddonSettings',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-puzzle i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'general' => array($txt['mods_cat_modifications_misc']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'layout' => array(\n\t\t\t\t'title' => $txt['layout_controls'],\n\t\t\t\t'permission' => array('manage_boards', 'admin_forum', 'manage_smileys', 'manage_attachments', 'moderate_forum'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'manageboards' => array(\n\t\t\t\t\t\t'label' => $txt['admin_boards'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageBoards',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-directory i-admin',\n\t\t\t\t\t\t'permission' => array('manage_boards'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'main' => array($txt['boardsEdit']),\n\t\t\t\t\t\t\t'newcat' => array($txt['mboards_new_cat']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'postsettings' => array(\n\t\t\t\t\t\t'label' => $txt['manageposts'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManagePosts',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'class' => 'i-post-text i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'posts' => array($txt['manageposts_settings']),\n\t\t\t\t\t\t\t'censor' => array($txt['admin_censored_words']),\n\t\t\t\t\t\t\t'topics' => array($txt['manageposts_topic_settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'editor' => array(\n\t\t\t\t\t\t'label' => $txt['editor_manage'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageEditor',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-modify i-admin',\n\t\t\t\t\t\t'permission' => array('manage_bbc'),\n\t\t\t\t\t),\n\t\t\t\t\t'smileys' => array(\n\t\t\t\t\t\t'label' => $txt['smileys_manage'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageSmileys',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-smiley i-admin',\n\t\t\t\t\t\t'permission' => array('manage_smileys'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'editsets' => array($txt['smiley_sets']),\n\t\t\t\t\t\t\t'addsmiley' => array($txt['smileys_add'], 'enabled' => !empty($modSettings['smiley_enable'])),\n\t\t\t\t\t\t\t'editsmileys' => array($txt['smileys_edit'], 'enabled' => !empty($modSettings['smiley_enable'])),\n\t\t\t\t\t\t\t'setorder' => array($txt['smileys_set_order'], 'enabled' => !empty($modSettings['smiley_enable'])),\n\t\t\t\t\t\t\t'editicons' => array($txt['icons_edit_message_icons'], 'enabled' => !empty($modSettings['messageIcons_enable'])),\n\t\t\t\t\t\t\t'settings' => array($txt['settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'manageattachments' => array(\n\t\t\t\t\t\t'label' => $txt['attachments_avatars'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageAttachments',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-paperclip i-admin',\n\t\t\t\t\t\t'permission' => array('manage_attachments'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'browse' => array($txt['attachment_manager_browse']),\n\t\t\t\t\t\t\t'attachments' => array($txt['attachment_manager_settings']),\n\t\t\t\t\t\t\t'avatars' => array($txt['attachment_manager_avatar_settings']),\n\t\t\t\t\t\t\t'attachpaths' => array($txt['attach_directories']),\n\t\t\t\t\t\t\t'maintenance' => array($txt['attachment_manager_maintenance']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'managesearch' => array(\n\t\t\t\t\t\t'label' => $txt['manage_search'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageSearch',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-search i-admin',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'weights' => array($txt['search_weights']),\n\t\t\t\t\t\t\t'method' => array($txt['search_method']),\n\t\t\t\t\t\t\t'managesphinx' => array($txt['search_sphinx']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'members' => array(\n\t\t\t\t'title' => $txt['admin_manage_members'],\n\t\t\t\t'permission' => array('moderate_forum', 'manage_membergroups', 'manage_bans', 'manage_permissions', 'admin_forum'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'viewmembers' => array(\n\t\t\t\t\t\t'label' => $txt['admin_users'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageMembers',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-user i-admin',\n\t\t\t\t\t\t'permission' => array('moderate_forum'),\n\t\t\t\t\t),\n\t\t\t\t\t'membergroups' => array(\n\t\t\t\t\t\t'label' => $txt['admin_groups'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageMembergroups',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-users',\n\t\t\t\t\t\t'permission' => array('manage_membergroups'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'index' => array($txt['membergroups_edit_groups'], 'manage_membergroups'),\n\t\t\t\t\t\t\t'add' => array($txt['membergroups_new_group'], 'manage_membergroups'),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'permissions' => array(\n\t\t\t\t\t\t'label' => $txt['edit_permissions'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManagePermissions',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-lock i-admin',\n\t\t\t\t\t\t'permission' => array('manage_permissions'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'index' => array($txt['permissions_groups'], 'manage_permissions'),\n\t\t\t\t\t\t\t'board' => array($txt['permissions_boards'], 'manage_permissions'),\n\t\t\t\t\t\t\t'profiles' => array($txt['permissions_profiles'], 'manage_permissions'),\n\t\t\t\t\t\t\t'postmod' => array($txt['permissions_post_moderation'], 'manage_permissions', 'enabled' => $modSettings['postmod_active']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'ban' => array(\n\t\t\t\t\t\t'label' => $txt['ban_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageBans',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-thumbdown i-admin',\n\t\t\t\t\t\t'permission' => 'manage_bans',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'list' => array($txt['ban_edit_list']),\n\t\t\t\t\t\t\t'add' => array($txt['ban_add_new']),\n\t\t\t\t\t\t\t'browse' => array($txt['ban_trigger_browse']),\n\t\t\t\t\t\t\t'log' => array($txt['ban_log']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'regcenter' => array(\n\t\t\t\t\t\t'label' => $txt['registration_center'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageRegistration',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-user-plus i-admin',\n\t\t\t\t\t\t'permission' => array('admin_forum', 'moderate_forum'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'register' => array($txt['admin_browse_register_new'], 'moderate_forum'),\n\t\t\t\t\t\t\t'agreement' => array($txt['registration_agreement'], 'admin_forum'),\n\t\t\t\t\t\t\t'privacypol' => array($txt['privacy_policy'], 'admin_forum'),\n\t\t\t\t\t\t\t'reservednames' => array($txt['admin_reserved_set'], 'admin_forum'),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'sengines' => array(\n\t\t\t\t\t\t'label' => $txt['search_engines'],\n\t\t\t\t\t\t'enabled' => featureEnabled('sp'),\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageSearchEngines',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-website i-admin',\n\t\t\t\t\t\t'permission' => 'admin_forum',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'stats' => array($txt['spider_stats']),\n\t\t\t\t\t\t\t'logs' => array($txt['spider_logs']),\n\t\t\t\t\t\t\t'spiders' => array($txt['spiders']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'paidsubscribe' => array(\n\t\t\t\t\t\t'label' => $txt['paid_subscriptions'],\n\t\t\t\t\t\t'enabled' => featureEnabled('ps'),\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManagePaid',\n\t\t\t\t\t\t'class' => 'i-credit i-admin',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'permission' => 'admin_forum',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'view' => array($txt['paid_subs_view']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'maintenance' => array(\n\t\t\t\t'title' => $txt['admin_maintenance'],\n\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'maintain' => array(\n\t\t\t\t\t\t'label' => $txt['maintain_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Maintenance',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-cog i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'routine' => array($txt['maintain_sub_routine'], 'admin_forum'),\n\t\t\t\t\t\t\t'database' => array($txt['maintain_sub_database'], 'admin_forum'),\n\t\t\t\t\t\t\t'members' => array($txt['maintain_sub_members'], 'admin_forum'),\n\t\t\t\t\t\t\t'topics' => array($txt['maintain_sub_topics'], 'admin_forum'),\n\t\t\t\t\t\t\t'hooks' => array($txt['maintain_sub_hooks_list'], 'admin_forum'),\n\t\t\t\t\t\t\t'attachments' => array($txt['maintain_sub_attachments'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'logs' => array(\n\t\t\t\t\t\t'label' => $txt['logs'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\AdminLog',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-comments i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'errorlog' => array($txt['errlog'], 'admin_forum', 'enabled' => !empty($modSettings['enableErrorLogging']), 'url' => getUrl('admin', ['action' => 'admin', 'area' => 'logs', 'sa' => 'errorlog', 'desc'])),\n\t\t\t\t\t\t\t'adminlog' => array($txt['admin_log'], 'admin_forum', 'enabled' => featureEnabled('ml')),\n\t\t\t\t\t\t\t'modlog' => array($txt['moderation_log'], 'admin_forum', 'enabled' => featureEnabled('ml')),\n\t\t\t\t\t\t\t'banlog' => array($txt['ban_log'], 'manage_bans'),\n\t\t\t\t\t\t\t'spiderlog' => array($txt['spider_logs'], 'admin_forum', 'enabled' => featureEnabled('sp')),\n\t\t\t\t\t\t\t'tasklog' => array($txt['scheduled_log'], 'admin_forum'),\n\t\t\t\t\t\t\t'pruning' => array($txt['pruning_title'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'scheduledtasks' => array(\n\t\t\t\t\t\t'label' => $txt['maintain_tasks'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageScheduledTasks',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-calendar i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'tasks' => array($txt['maintain_tasks'], 'admin_forum'),\n\t\t\t\t\t\t\t'tasklog' => array($txt['scheduled_log'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'mailqueue' => array(\n\t\t\t\t\t\t'label' => $txt['mailqueue_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageMail',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-envelope-blank i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'browse' => array($txt['mailqueue_browse'], 'admin_forum'),\n\t\t\t\t\t\t\t'settings' => array($txt['mailqueue_settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'reports' => array(\n\t\t\t\t\t\t'enabled' => featureEnabled('rg'),\n\t\t\t\t\t\t'label' => $txt['generate_reports'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Reports',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-pie-chart i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'repairboards' => array(\n\t\t\t\t\t\t'label' => $txt['admin_repair'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\RepairBoards',\n\t\t\t\t\t\t'function' => 'action_repairboards',\n\t\t\t\t\t\t'select' => 'maintain',\n\t\t\t\t\t\t'hidden' => true,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\t$this->_events->trigger('addMenu', array('admin_areas' => &$admin_areas));\n\n\t\t// Any files to include for administration?\n\t\tcall_integration_include_hook('integrate_admin_include');\n\n\t\t$menuOptions = array(\n\t\t\t'hook' => 'admin',\n\t\t);\n\n\t\t// Actually create the menu!\n\t\t$menu = new Menu();\n\t\t$menu->addMenuData($admin_areas);\n\t\t$menu->addOptions($menuOptions);\n\t\t$admin_include_data = $menu->prepareMenu();\n\t\t$menu->setContext();\n\t\tunset($admin_areas);\n\n\t\t// Make a note of the Unique ID for this menu.\n\t\t$context['admin_menu_id'] = $context['max_menu_id'];\n\t\t$context['admin_menu_name'] = 'menu_data_' . $context['admin_menu_id'];\n\n\t\t// Where in the admin are we?\n\t\t$context['admin_area'] = $admin_include_data['current_area'];\n\n\t\treturn $admin_include_data;\n\t}", "function admin_menu() {\n\t\t// Set Admin Access Level\n\t\tif(!$this->options['access_level']): \n\t\t\t$access = 'edit_dashboard';\n\t\telse: \n\t\t\t$access = $this->options['access_level'];\n\t\tendif;\n\t\t\n\t\t// Create Menu Items \n\t\tadd_options_page('Escalate Network', 'Escalate Network', $access, 'escalate-network-options', array($this, 'settings_page'));\n\t}", "public static function admin_menu() {\n\t\t$title = 'Micropub';\n\t\t// If the IndieWeb Plugin is installed use its menu.\n\t\tif ( class_exists( 'IndieWeb_Plugin' ) ) {\n\t\t\t$options_page = add_submenu_page(\n\t\t\t\t'indieweb',\n\t\t\t\t$title,\n\t\t\t\t$title,\n\t\t\t\t'manage_options',\n\t\t\t\t'micropub',\n\t\t\t\tarray( static::class, 'settings_page' )\n\t\t\t);\n\t\t} else {\n\t\t\t$options_page = add_options_page(\n\t\t\t\t$title,\n\t\t\t\t$title,\n\t\t\t\t'manage_options',\n\t\t\t\t'micropub',\n\t\t\t\tarray( static::class, 'settings_page' )\n\t\t\t);\n\t\t}\n\n\t}", "static function adminMenuPage()\n {\n // Include the view for this menu page.\n include PROJECTEN_PLUGIN_ADMIN_VIEWS_DIR . '/admin_main.php';\n }", "protected function adminMenu()\n {\n \\add_submenu_page(\n 'options-general.php',\n \\esc_html__('WP REST API Cache', 'wp-rest-api-cache'),\n \\esc_html__('REST API Cache', 'wp-rest-api-cache'),\n self::CAPABILITY,\n self::MENU_SLUG,\n function () {\n $this->renderPage();\n }\n );\n }", "public function testAddMenuAction()\n {\n parent::login();\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Páginas\");\n $this->waitForPageToLoad(\"30000\");\n $this->click(\"link=Criar uma nova página\");\n $this->waitForPageToLoad(\"30000\");\n $this->type(\"id=xvolutions_adminbundle_page_title\", \"Test Menu Selenium 1\");\n $this->type(\"id=xvolutions_adminbundle_page_idalias\", \"test-menu-selenium-1\");\n $this->runScript(\"tinyMCE.activeEditor.setContent('Test Menu Selenium 1')\");\n $this->select(\"id=xvolutions_adminbundle_page_id_language\", \"label=Português\");\n $this->select(\"id=xvolutions_adminbundle_page_id_section\", \"label=Pública\");\n $this->select(\"id=xvolutions_adminbundle_page_id_status\", \"label=Publicado\");\n $this->click(\"id=xvolutions_adminbundle_page_Criar\");\n $this->waitForPageToLoad(\"30000\");\n $this->click(\"link=Criar uma nova página\");\n $this->waitForPageToLoad(\"30000\");\n $this->type(\"id=xvolutions_adminbundle_page_title\", \"Test Menu Selenium 2\");\n $this->type(\"id=xvolutions_adminbundle_page_idalias\", \"test-menu-selenium-2\");\n $this->runScript(\"tinyMCE.activeEditor.setContent('Test Menu Selenium 2')\");\n $this->select(\"id=xvolutions_adminbundle_page_id_language\", \"label=Português\");\n $this->select(\"id=xvolutions_adminbundle_page_id_section\", \"label=Pública\");\n $this->select(\"id=xvolutions_adminbundle_page_id_status\", \"label=Publicado\");\n $this->click(\"id=xvolutions_adminbundle_page_Criar\");\n $this->waitForPageToLoad(\"30000\");\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->isElementPresent(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\");\n $this->assertElementContainsText(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\", \"Test Menu Selenium 1\");\n $this->isElementPresent(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-2.ui-state-default.ui-sortable-handle\");\n $this->assertElementContainsText(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-2.ui-state-default.ui-sortable-handle\", \"Test Menu Selenium 2\");\n parent::logout();\n }", "public function network_admin_menu()\n\t{\n\t\treturn $this->admin_menu();\n\t}", "public function admin_menu() {\n\t\t// Load abstract page class.\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-page.php';\n\t\t// Load page classes.\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-general.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-accounts.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-messages.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-categories.php';\n\n\t\t// Init menu classes.\n\t\tnew SocialFlow_Admin_Settings_General();\n\t\tnew SocialFlow_Admin_Settings_Accounts();\n\t\t// new SocialFlow_Admin_Settings_Categories.\n\t\t// new SocialFlow_Admin_Settings_Messages.\n\t}", "function admin_menu() {\n\t\tif ( class_exists( 'Jetpack' ) )\n\t\t\tadd_action( 'jetpack_admin_menu', array( $this, 'load_menu' ) );\n\t\telse\n\t\t\t$this->load_menu();\n\t}", "public function getMenu();", "public function onWpAdminMenu() {\n\t}", "function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Menu.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Menu::showMenu($error);\n return;\n }\n // see if we need to do anything to the db\n if(isset($_REQUEST['newadmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->department_id = $_REQUEST['department_id'];\n $admin->username = $_REQUEST['username'];\n $admin->save();\n }else if (isset($_REQUEST['deladmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->id = $_REQUEST['id'];\n $admin->delete();\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }", "function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Menu.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Menu::showMenu($error);\n return;\n }\n // see if we need to do anything to the db\n if(isset($_REQUEST['newadmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->department_id = $_REQUEST['department_id'];\n $admin->username = $_REQUEST['username'];\n $admin->save();\n }else if (isset($_REQUEST['deladmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->id = $_REQUEST['id'];\n $admin->delete();\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }", "function addAdminMenu()\n\t{\n\t\tglobal $tpl, $tree, $rbacsystem, $lng;\n\n\t\tinclude_once(\"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php\");\n\t\t$gl = new ilGroupedListGUI();\n\n\t\t$objects = $tree->getChilds(SYSTEM_FOLDER_ID);\n\t\tforeach($objects as $object)\n\t\t{\n\t\t\t$new_objects[$object[\"title\"].\":\".$object[\"child\"]]\n\t\t\t\t= $object;\n\t\t\t//have to set it manually as translation type of main node cannot be \"sys\" as this type is a orgu itself.\n\t\t\tif($object[\"type\"] == \"orgu\")\n\t\t\t\t$new_objects[$object[\"title\"].\":\".$object[\"child\"]][\"title\"] = $lng->txt(\"obj_orgu\");\n\t\t}\n\n\t\t// add entry for switching to repository admin\n\t\t// note: please see showChilds methods which prevents infinite look\n\t\t$new_objects[$lng->txt(\"repository_admin\").\":\".ROOT_FOLDER_ID] =\n\t\t\tarray(\n\t\t\t\t\"tree\" => 1,\n\t\t\t\t\"child\" => ROOT_FOLDER_ID,\n\t\t\t\t\"ref_id\" => ROOT_FOLDER_ID,\n\t\t\t\t\"depth\" => 3,\n\t\t\t\t\"type\" => \"root\",\n\t\t\t\t\"title\" => $lng->txt(\"repository_admin\"),\n\t\t\t\t\"description\" => $lng->txt(\"repository_admin_desc\"),\n\t\t\t\t\"desc\" => $lng->txt(\"repository_admin_desc\"),\n\t\t\t);\n\n//$nd = $tree->getNodeData(SYSTEM_FOLDER_ID);\n//var_dump($nd);\n\t\t$new_objects[$lng->txt(\"general_settings\").\":\".SYSTEM_FOLDER_ID] =\n\t\t\tarray(\n\t\t\t\t\"tree\" => 1,\n\t\t\t\t\"child\" => SYSTEM_FOLDER_ID,\n\t\t\t\t\"ref_id\" => SYSTEM_FOLDER_ID,\n\t\t\t\t\"depth\" => 2,\n\t\t\t\t\"type\" => \"adm\",\n\t\t\t\t\"title\" => $lng->txt(\"general_settings\"),\n\t\t\t);\n\t\tksort($new_objects);\n\n\t\t// determine items to show\n\t\t$items = array();\n\t\tforeach ($new_objects as $c)\n\t\t{\n\t\t\t// check visibility\n\t\t\tif ($tree->getParentId($c[\"ref_id\"]) == ROOT_FOLDER_ID && $c[\"type\"] != \"adm\" &&\n\t\t\t\t$_GET[\"admin_mode\"] != \"repository\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// these objects may exist due to test cases that didnt clear\n\t\t\t// data properly\n\t\t\tif ($c[\"type\"] == \"\" || $c[\"type\"] == \"objf\" ||\n\t\t\t\t$c[\"type\"] == \"xxx\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$accessible = $rbacsystem->checkAccess('visible,read', $c[\"ref_id\"]);\n\t\t\tif (!$accessible)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($c[\"ref_id\"] == ROOT_FOLDER_ID &&\n\t\t\t\t!$rbacsystem->checkAccess('write', $c[\"ref_id\"]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($c[\"type\"] == \"rolf\" && $c[\"ref_id\"] != ROLE_FOLDER_ID)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$items[] = $c;\n\t\t}\n\n\t\t$titems = array();\n\t\tforeach ($items as $i)\n\t\t{\n\t\t\t$titems[$i[\"type\"]] = $i;\n\t\t}\n\t\t// admin menu layout\n\t\t$layout = array(\n\t\t\t1 => array(\n\t\t\t\t\"adn\" =>\n\t\t\t\t\tarray(\"xaad\", \"xaec\",\"xaed\", \"xaes\", \"xaep\", \"xacp\", \"xata\", \"xamd\", \"xast\"),\n\t\t\t\t\"basic\" =>\n\t\t\t\t\tarray(\"adm\", \"stys\", \"adve\", \"lngf\", \"hlps\", \"accs\", \"cmps\", \"extt\"),\n\t\t\t\t\"user_administration\" =>\n\t\t\t\t\tarray(\"usrf\", 'tos', \"rolf\", \"auth\", \"ps\", \"orgu\"),\n\t\t\t\t\"learning_outcomes\" =>\n\t\t\t\t\tarray(\"skmg\", \"cert\", \"trac\")\n\t\t\t),\n\t\t\t2 => array(\n\t\t\t\t\"user_services\" =>\n\t\t\t\t\tarray(\"pdts\", \"prfa\", \"nwss\", \"awra\", \"cadm\", \"cals\", \"mail\"),\n\t\t\t\t\"content_services\" =>\n\t\t\t\t\tarray(\"seas\", \"mds\", \"tags\", \"taxs\", 'ecss', \"pays\", \"otpl\"),\n\t\t\t\t\"maintenance\" =>\n\t\t\t\t\tarray('sysc', \"recf\", 'logs', \"root\")\n\t\t\t),\n\t\t\t3 => array(\n\t\t\t\t\"container\" =>\n\t\t\t\t\tarray(\"reps\", \"crss\", \"grps\", \"prgs\"),\n\t\t\t\t\"content_objects\" =>\n\t\t\t\t\tarray(\"bibs\", \"blga\", \"chta\", \"excs\", \"facs\", \"frma\",\n\t\t\t\t\t\t\"lrss\", \"mcts\", \"mobs\", \"svyf\", \"assf\", \"wbrs\", \"wiks\")\n\t\t\t)\n\t\t);\n\n\t\t// now get all items and groups that are accessible\n\t\t$groups = array();\n\t\tfor ($i = 1; $i <= 3; $i++)\n\t\t{\n\t\t\t$groups[$i] = array();\n\t\t\tforeach ($layout[$i] as $group => $entries)\n\t\t\t{\n\t\t\t\t$groups[$i][$group] = array();\n\t\t\t\t$entries_since_last_sep = false;\n\t\t\t\tforeach ($entries as $e)\n\t\t\t\t{\n\t\t\t\t\tif ($e == \"---\" || $titems[$e][\"type\"] != \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($e == \"---\" && $entries_since_last_sep)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups[$i][$group][] = $e;\n\t\t\t\t\t\t\t$entries_since_last_sep = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ($e != \"---\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups[$i][$group][] = $e;\n\t\t\t\t\t\t\t$entries_since_last_sep = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tinclude_once(\"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php\");\n\t\t$gl = new ilGroupedListGUI();\n\n\t\tfor ($i = 1; $i <= 3; $i++)\n\t\t{\n\t\t\tif ($i > 1)\n\t\t\t{\n//\t\t\t\t$gl->nextColumn();\n\t\t\t}\n\t\t\tforeach ($groups[$i] as $group => $entries)\n\t\t\t{\n\t\t\t\tif (count($entries) > 0)\n\t\t\t\t{\n\t\t\t\t\t$gl->addGroupHeader($lng->txt(\"adm_\".$group));\n\n\t\t\t\t\tforeach ($entries as $e)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($e == \"---\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$gl->addSeparator();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$path = ilObject::_getIcon(\"\", \"tiny\", $titems[$e][\"type\"]);\n\t\t\t\t\t\t\t$icon = ($path != \"\")\n\t\t\t\t\t\t\t\t? ilUtil::img($path).\" \"\n\t\t\t\t\t\t\t\t: \"\";\n\n\t\t\t\t\t\t\tif ($_GET[\"admin_mode\"] == \"settings\" && $titems[$e][\"ref_id\"] == ROOT_FOLDER_ID)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$gl->addEntry($icon.$titems[$e][\"title\"],\n\t\t\t\t\t\t\t\t\t\"ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=\".\n\t\t\t\t\t\t\t\t\t$titems[$e][\"ref_id\"].\"&amp;admin_mode=repository\",\n\t\t\t\t\t\t\t\t\t\"_top\", \"\", \"\", \"mm_adm_rep\",\n\t\t\t\t\t\t\t\t\tilHelp::getMainMenuTooltip(\"mm_adm_rep\"),\n\t\t\t\t\t\t\t\t\t\"bottom center\", \"top center\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$gl->addEntry($icon.$titems[$e][\"title\"],\n\t\t\t\t\t\t\t\t\t\"ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=\".\n\t\t\t\t\t\t\t\t\t$titems[$e][\"ref_id\"].\"&amp;cmd=jump\",\n\t\t\t\t\t\t\t\t\t\"_top\", \"\", \"\", \"mm_adm_\".$titems[$e][\"type\"],\n\t\t\t\t\t\t\t\t\tilHelp::getMainMenuTooltip(\"mm_adm_\".$titems[$e][\"type\"]),\n\t\t\t\t\t\t\t\t\t\"bottom center\", \"top center\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//$gl->addSeparator();\n\n\t\t$tpl->setLeftNavContent(\"<div id='adn_adm_side_menu'>\".$gl->getHTML().\"</div>\");\n\t}", "function get_admin_menu()\n\t\t{\n\t\t\t$items = array(\n\t\t\t\t'show_global_settings'\t=> 'Global Settings',\n\t\t\t\t'show_rating_groups' \t=> 'Rating Groups',\n\t\t\t\t'show_post_settings'\t=> 'Post Rating Settings',\n\t\t\t\t'show_feedback_stats'\t=> 'Feedback Stats'\n\t\t\t\t);\n\t\t\t$html = \"<ul class='wpdrs-admin-menu'>\";\n\t\t\tforeach($items as $k=>$v)\n\t\t\t{\n\t\t\t\t$href = admin_url().'?page=wpdrs&wpdrs_action='.$k;\n\t\t\t\t$html .= \"<li><a href='{$href}'>{$v}</a></li>\";\n\t\t\t\t}\n\t\t\t$html .= \"</ul>\";\n\t\t\treturn $html;\n\t\t\t}", "public function admin() {\n\t\tif (!isset($this->sets['admin'])) {\n\t\t\t$this->sets['admin'] = new CMS_Navigation3_LinkSet();\n\t\t}\n\t\tCMS_Admin::build_embedded_admin_menu($this->sets['admin']);\n\t\treturn $this->sets['admin'];\n\t}", "public function adminMenu() {\n\t\t$cap = is_multisite() ? 'manage_network_options' : 'manage_options';\n\t\t$action = \"actionIndex\";\n\t\tadd_submenu_page( 'wp-defender', esc_html__( \"IP Lockouts\", \"defender-security\" ), esc_html__( \"IP Lockouts\", \"defender-security\" ), $cap, $this->slug, array(\n\t\t\t&$this,\n\t\t\t$action\n\t\t) );\n\t}", "public function add_admin_menus()\n {\n\n add_menu_page(\n 'Online Exam',\n 'Online Exam',\n 'manage_department',\n 'online_exam',\n function () {\n new \\OE\\includes\\html\\Manage_Department;\n },\n 'dashicons-text-page',\n );\n\n /**\n * adding theme setting menu to admin page\n */\n\n add_menu_page(\n 'OE Theme Setting',\n 'Theme Setting',\n 'manage_options',\n 'oe_theme_setting',\n function () {\n new \\OE\\includes\\html\\Theme_Setting;\n },\n 'dashicons-admin-generic',\n 98\n );\n\n /**\n * adding all the submens to admin page\n * this is teacher's submenu page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Manage Teacher's\",\n // menu title\n \"Manage Teacher's\",\n // capability\n 'manage_teachers',\n // menu slug\n 'manage_teachers',\n // callback function\n function () {\n new \\OE\\includes\\html\\Manage_Teaher;\n },\n );\n\n /**\n * adding all the submens to admin page\n * this is all questions managing page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Manage Questions\",\n // menu title\n \"Manage Questions\",\n // capability\n 'manage_questions',\n // menu slug\n 'manage_questions',\n // callback function\n function () {\n new \\OE\\includes\\html\\Manage_Question;\n },\n );\n\n /**\n * adding all the submens to admin page\n * this is all questions managing page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Exam Routine\",\n // menu title\n \"Exam Routine\",\n // capability\n 'manage_routine',\n // menu slug\n 'manage_routine',\n // callback function\n function () {\n new \\OE\\includes\\html\\Exam_Routine;\n },\n );\n\n /**\n * adding all the submens to admin page\n * this is all questions managing page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Manage Students\",\n // menu title\n \"Manage Students\",\n // capability\n 'manage_students',\n // menu slug\n 'manage_students',\n // callback function\n function () {\n new \\OE\\includes\\html\\Manage_Student;\n },\n );\n\n /**\n * adding create all question page according to question folder\n * this is question creation page\n */\n if (isset($_GET['exam_folder_id'])) {\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Create Qustion\",\n // menu title\n \"Create Qustion\",\n // capability\n 'create_question',\n // menu slug\n 'create_question',\n // callback function\n function () {\n new \\OE\\includes\\html\\Create_Qustion;\n },\n );\n }\n\n /**\n * adding student performence page according to question folder\n * this is question creation page\n */\n if (isset($_GET['current_folder_id'])) {\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Student's Performence\",\n // menu title\n \"Student's Performence\",\n // capability\n 'student_performence',\n // menu slug\n 'student_performence',\n // callback function\n function () {\n new \\OE\\includes\\html\\Student_Performence;\n },\n );\n }\n\n /**\n * adding individual performence page according to question folder\n * this is question creation page\n */\n if (isset($_GET['performence_folder_id'])) {\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"\" . $_GET['student_name'] . \"'s Performence\",\n // menu title\n \"\" . $_GET['student_name'] . \"'s Performence\",\n // capability\n 'individual_performence',\n // menu slug\n 'individual_performence',\n // callback function\n function () {\n new \\OE\\includes\\html\\Individual_Performence;\n },\n );\n }\n\n /**\n * renaming online exam menu\n */\n\n $this->admin_menu_rename();\n }", "public function admin_menu(): void {\n\t\tif ( is_plugin_active_for_network( plugin_basename( WP_SENTRY_PLUGIN_FILE ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_management_page(\n\t\t\t'WP Sentry test',\n\t\t\t'WP Sentry test',\n\t\t\t'activate_plugins',\n\t\t\tself::ADMIN_PAGE_SLUG,\n\t\t\t[ $this, 'render_admin_page' ]\n\t\t);\n\t}", "function initAdminMenu() {\r\n\r\n\t\t$accounts_hook = $this->addMenu('accounts', ShoppWholesale::SHOPP_MENU_ROOT);\r\n\t\t$this->addMenu('account-review', $accounts_hook);\r\n\t\t$this->addMenu('account-settings', $accounts_hook);\r\n\t\t$this->addMenu('account-shortcode-help', $accounts_hook);\r\n\r\n\t\t//reorder menus\r\n\t\t$this->sendToBottom('Settings');\r\n\r\n\t}", "function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Error.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Error::error($error);\n return;\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }", "private function set_admin_menu() {\n $TSB_settings_admin_menu = new Admin_Menu( Initial_Value::TSB_main_settings_page() );\n $this->loader->add_action( 'admin_menu', $TSB_settings_admin_menu, 'add_admin_menu_page' );\n\n// $plugin_name_sample_admin_sub_menu1 = new Admin_Sub_Menu( Initial_Value::sample_sub_menu_page1() );\n// $this->loader->add_action( 'admin_menu', $plugin_name_sample_admin_sub_menu1, 'add_admin_sub_menu_page' );\n//\n// $plugin_name_sample_admin_sub_menu2 = new Admin_Sub_Menu( Initial_Value::sample_sub_menu_page2() );\n// $this->loader->add_action( 'admin_menu', $plugin_name_sample_admin_sub_menu2, 'add_admin_sub_menu_page' );\n\n }", "public function loadAdminMenu()\n {\n\t\t$file = $this->xoops_root_path . '/modules/' . $this->getInfo('dirname') . '/' . $this->getInfo('adminmenu');\n if ($this->getInfo('adminmenu') && $this->getInfo('adminmenu') != '' && \\XoopsLoad::fileExists($file)) {\n $adminmenu = array();\n include $file;\n $this->adminmenu = $adminmenu;\n }\n }", "public function get_menu()\n\t{\n\t\treturn $this->get_session('admin_menu_html');\n\t}", "public function getMenus()\n\t{\n\n\t}", "private function checkMenu()\n {\n\n }", "public function getAdminMenu()\n {\n return $this->menuBuilder;\n }", "function jpa_menu_administrator()\n{\n add_menu_page(JPA_NOMBRE,JPA_NOMBRE,'manage_options',JPA_RUTA . '/admin/jpa-configuration.php');\n add_submenu_page(JPA_RUTA . '/admin/jpa-configuration.php','Add resource','Add resource','manage_options',JPA_RUTA . '/admin/jpa-add_resource.php');\n}", "function at_try_menu()\n{\n add_menu_page('signup_list', //page title\n 'Sign Up List', //menu title\n 'manage_options', //capabilities\n 'Signup_List', //menu slug\n Signup_list //function\n );\n}", "function mainMenu() \r\n\t\t{\r\n\t\t\tif($this->RequestAction('/external_functions/verifiedAccess/'.$this->Auth->user('id').\"/1/mainMenu\") == true)\r\n\t\t\t{\r\n\t\t\t\t$this->set('title_for_layout', 'Fondos por rendir :: Menu Principal');\r\n\t\t\t\t$this->set('userAdmin', $this->Auth->user('admin'));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->Session->setFlash('No tienes permisos para ver esta pagina, consulta con el administrador del sistema.', 'flash_alert');\r\n\t\t\t\t$this->redirect(array('controller' => 'dashboard', 'action' => 'index'));\r\n\t\t\t}\r\n\t\t}", "public function test_admin_can_view_a_admin_page()\n {\n $user = factory(User::class)->make();\n $response = $this->actingAs($user)->get('/admin');\n $response->assertViewIs('admin.admin');\n }", "public function run() {\n $menus = [\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '0',\n 'body' => 'Main Navigation',\n 'type' => 'separator'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '1',\n 'icon' => 'home',\n 'name' => 'dashboard',\n 'uri' => 'admin',\n 'title' => 'Go to Dashboard',\n 'body' => 'Dashboard'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '5.1',\n 'icon' => 'group',\n 'name' => 'user',\n 'uri' => 'admin/user',\n 'title' => 'User Management',\n 'body' => 'Users'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9',\n 'body' => 'Settings',\n 'type' => 'separator'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.1',\n 'name' => 'setting',\n 'icon' => 'gear',\n 'uri' => '',\n 'title' => 'Pengaturan Website',\n 'body' => 'Pengaturan',\n 'type' => 'parent'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.2',\n 'name' => 'menu',\n 'icon' => 'bars',\n 'uri' => 'admin/menu',\n 'title' => 'Pengaturan Menu',\n 'body' => 'Menus'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.3',\n 'icon' => 'key',\n 'name' => 'permission',\n 'uri' => 'admin/permission',\n 'title' => 'Roles & Permissions',\n 'body' => 'Permissions'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.1-1',\n 'name' => 'setting',\n 'icon' => '',\n 'uri' => 'admin/setting/global/update',\n 'title' => 'Pengaturan Global',\n 'body' => 'Global'\n ]\n ];\n\n for ($i = 0; $i < count($menus); $i++) {\n $menus[$i] = factory(\\App\\Menu::class)->create($menus[$i]);\n }\n\n $menus[0]->roles()->attach(3);\n $menus[1]->roles()->attach(3);\n $menus[2]->roles()->attach(2);\n $menus[3]->roles()->attach(2);\n $menus[4]->roles()->attach(2);\n $menus[5]->roles()->attach(1);\n $menus[6]->roles()->attach(1);\n $menus[7]->roles()->attach(1);\n }", "protected function getMenuItems()\n {\n return $this->getService('config')->get()['menu']['admin'];\n }", "function wpse_136058_debug_admin_menu() {\n echo '<pre>' . print_r( $GLOBALS[ 'menu' ], TRUE) . '</pre>';\n}", "public function modMenu() {}", "public function modMenu() {}", "public function modMenu() {}", "function adminMenu()\n{\n if (function_exists('rstCheckAccessPermissions') && rstCheckAccessPermissions()) {\n // available for Contributors\n $capability = 'edit_posts';\n } else {\n // available only for Administrators\n $capability = 'manage_options';\n }\n // available only for Administrators\n $capability_for_settings = 'manage_options';\n add_menu_page(__('Row Seats', 'menu-test'), __('Row Seats', 'menu-test'), $capability, 'rst-intro', 'rst_intro_page', RSTPLN_URL . 'images/row-seat-ico.png');\n add_submenu_page('rst-intro', __('Row Seats Settings', 'menu-test'), __('Row Seats Settings', 'menu-test'), $capability_for_settings, 'rst-settings', 'rst_settings');\n\tadd_submenu_page('rst-intro', __('Payment Settings', 'menu-test'), __('Payment Settings', 'menu-test'), $capability_for_settings, 'rst-pay-settings', 'rst_pay_settings');\n add_submenu_page('rst-intro', __('Manage Seats', 'menu-test'), __('Manage Seats', 'menu-test'), $capability, 'rst-manage-seats', 'rst_manage_seats');\n\t///add_submenu_page('rst-intro', __('Special Price', 'menu-test'), __('Special Price', 'menu-test'), $capability, 'rst-special-price', 'rst_special_price');\n\tadd_submenu_page('rst-intro', __('Transactions', 'menu-test'), __('Transactions', 'menu-test'), $capability, 'rst-transactions', 'rst_transactions');\n add_submenu_page('rst-intro', __('Add an Event', 'menu-test'), __('Add an Event', 'menu-test'), $capability, 'rst-manage-seats-moncal', 'rst_manage_seats_moncalender');\n\tadd_submenu_page('rst-intro', __('Reports', 'menu-test'), __('Reports', 'menu-test'), $capability, 'rst-reports', 'rst_reports');\n //add_submenu_page('rst-intro', __('Wpuser Access', 'menu-test'), __('Wpuser Access', 'menu-test'), $capability, 'wpuser-access', 'wpuser_access');\n\t//add_submenu_page('rst-intro', __('Seat color', 'menu-test'), __('Seat color', 'menu-test'), $capability, 'seat-color', 'seat_color');\n\t\t//wp_register_script('jscolor.js', plugin_dir_url(__FILE__) . 'js/jscolor/jscolor.js', array('jquery'));\n\t\t//wp_enqueue_script('jscolor.js');\n}", "function create_admin_menu()\n {\n add_menu_page(\n 'Mattevideo Exercises', //page title\n 'Mattevideo Exercises', //menu title\n 'manage_options', //capabilities\n 'mattevideo_exercise', //menu slug\n array($this, 'mattevideo_exercise') //function\n );\n add_submenu_page('mattevideo_exercise', //parent slug\n 'Create Exercise', //page title\n 'Create Exercise', //menu title\n 'manage_options', //capability\n 'create_exercise', //menu slug\n array($this, 'create_exercise')); //function\n }", "function add_admin_menu() {\n\t\t$this->readme_page = new Launchable_AdminPage();\n\n\t\t$this->menu_id = add_menu_page(\n\t\t\t__( 'Launchable Options', $this->text_domain ), // Page Title\n\t\t\t__( 'Launchable', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t$this->text_domain, // Slug\n\t\t\tarray(&$this->options_page, 'readme_page') );\n\n\t\t$this->options_page = new Launchable_AdminPage();\n\t\tadd_submenu_page(\n\t\t\t$this->text_domain, // Slug\n\t\t\t__( 'Readme', $this->text_domain ), // Page Title\n\t\t\t__( 'Readme', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t'launchable-readme',//$this->text_domain, // Menu Slug\n\t\t\tarray(&$this->readme_page, 'readme_page') );\n\t}", "public function action_index()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\t// Make sure the administrator has a valid session...\n\t\tvalidateSession();\n\n\t\t// Load the language and templates....\n\t\tTxt::load('Admin');\n\t\ttheme()->getTemplates()->load('Admin');\n\t\tloadCSSFile('admin.css');\n\t\tloadJavascriptFile('admin.js', array(), 'admin_script');\n\n\t\t// The Admin functions require Jquery UI ....\n\t\t$modSettings['jquery_include_ui'] = true;\n\n\t\t// No indexing evil stuff.\n\t\t$context['robot_no_index'] = true;\n\n\t\t// Need these to do much\n\t\trequire_once(SUBSDIR . '/Admin.subs.php');\n\n\t\t// Actually create the menu!\n\t\t$admin_include_data = $this->loadMenu();\n\t\t$this->buildLinktree($admin_include_data);\n\n\t\tcallMenu($admin_include_data);\n\t}", "function admin()\n{\n global $app;\n\n $app->render('admin.html', [\n 'page' => mkPage(getMessageString('admin'), 0, 1),\n 'isadmin' => is_admin()]);\n}", "public function admin_menu() {\n\t\tadd_submenu_page( 'tools.php', 'EP Troubleshooting', 'EP Troubleshooting', 'manage_options', 'ep_troubleshoot', array(\n\t\t\t$this,\n\t\t\t'menu_page'\n\t\t) );\n\t}", "function plugin_getadminoption_nexmenu()\n{\n global $_TABLES, $_CONF,$LANG_NEXMENU00;\n\n if (SEC_hasRights('nexmenu.edit')) {\n return array($LANG_NEXMENU00['adminmenutitle'], $_CONF['site_admin_url'] . '/plugins/nexmenu/index.php');\n }\n\n}", "function admin_menu() {\n\t\t// The designation of add_MANAGEMENT_page causes the menu item to be listed under the Tools menu!\n\t\tadd_management_page('Revitalize Orders Output', 'Revitalize Orders', 'edit_posts', basename(__FILE__), array(&$this, 'page_handler'));\n\t}", "public function getMenus(){\n\n }", "private function gen_admin_menu()\n {\n $admin_menu = array (array(\n 'link' => 'plugins/dynamictemplate/admin/main_settings.php'.$this->SID,\n 'text' => $this->user->lang('dynamictemplate'),\n 'check' => 'a_dynamictemplate_main',\n 'icon' => 'fa-list-alt',\n ));\n\n return $admin_menu;\n }", "public function run()\n {\n $menus = [\n\n /*\n * Admin\n */\n [\n 'name' => 'Заявки и запросы',\n 'link' => '/admin/',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Заявки OSS',\n 'link' => '/admin/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Запросы SIB',\n 'link' => '/admin/be-partner-requests',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Пользователи',\n 'link' => '/admin/users',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Online Smart System',\n 'link' => '/admin/oss',\n 'icon' => 'fa fa-lg fa-fw fa-database',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Абонементы',\n 'link' => '/admin/oss/subscriptions',\n 'icon' => 'fa fa-fw fa-ticket',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Смена куратора',\n 'link' => '/admin/oss/change-curator',\n 'icon' => 'fa fa-lg fa-fw fa-refresh',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Новости',\n 'link' => '/admin/oss/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение',\n 'link' => '/admin/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpERA',\n 'link' => '/admin/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'SIB',\n 'link' => '/admin/sib',\n 'icon' => 'fa fa-lg fa-fw fa-briefcase',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Новости компании',\n 'link' => '/admin/sib/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Линейка событий',\n 'link' => '/admin/sib/events',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Промо и акции',\n 'link' => '/admin/sib/promos',\n 'icon' => 'fa fa-lg fa-fw fa-gift',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Документация',\n 'link' => '/admin/sib/documents',\n 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Отчеты',\n 'link' => '/admin/reports',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Финансовая аналитика',\n 'link' => '/admin/reports/financial-analytics',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Рейтинг чеков',\n 'link' => '/admin/reports/check-ratings',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'ФЦ за период',\n 'link' => '/admin/reports/fc-per-period',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'ФЦ по фин. периодам',\n 'link' => '/admin/reports/fc-per-fp',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'История ББС',\n 'link' => '/admin/reports/bbs-history',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'История выплат',\n 'link' => '/admin/reports/payment-history',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Баллы по бинару',\n 'link' => '/admin/reports/binary-points',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Настройки',\n 'link' => '/admin/settings',\n 'icon' => 'fa fa-lg fa-fw fa-cog',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Журнал',\n 'link' => '/admin/journal',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Тестирование',\n 'link' => '/admin/test',\n 'icon' => 'fa fa-lg fa-fw fa-cogs',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n\n\n /*\n * SIB\n */\n [\n 'name' => 'Финансы',\n 'link' => '/finance',\n 'icon' => 'fa fa-lg fa-fw fa-money',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Активность',\n 'link' => '/finance/activity',\n 'icon' => 'fa fa-lg fa-fw fa-clock-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк',\n 'link' => '/finance/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Платежный календарь',\n 'link' => '/finance/payment-calendar',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Лично приглашенные',\n 'link' => '/personal-invited',\n 'icon' => 'fa fa-lg fa-fw fa-share-alt fa-rotate-90',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Классическая схема',\n 'link' => '/classic',\n 'icon' => 'fa fa-lg fa-fw fa-chain',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Я и моя команда',\n 'link' => '/me-and-my-team',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Online Smart System',\n 'link' => '/oss',\n 'icon' => 'fa fa-lg fa-fw fa-database',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Новости OSS',\n 'link' => '/oss/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение OSS',\n 'link' => '/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Абонементы OSS',\n 'link' => '/oss/products',\n 'icon' => 'fa fa-lg fa-fw fa-ticket',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpERA',\n 'link' => '/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Соревнования OSS',\n 'link' => '/oss/competitions',\n 'icon' => 'fa fa-lg fa-fw fa-trophy',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Заявки OSS',\n 'link' => '/oss/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Команда OSS',\n 'link' => '/oss/teams',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк OSS',\n 'link' => '/oss/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Образование',\n 'link' => '/education',\n 'icon' => 'fa fa-lg fa-fw fa-book',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Партнёрское',\n 'link' => '/education/partners',\n 'icon' => 'fa fa-lg fa-fw fa-briefcase',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Школа ERA',\n 'link' => '/education/school-era',\n 'icon' => 'fa fa-lg fa-fw fa-heart-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Информация',\n 'link' => '/info',\n 'icon' => 'fa fa-lg fa-fw fa-info-circle',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Новости компании',\n 'link' => '/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Линейка событий',\n 'link' => '/info/events',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Промо и акции',\n 'link' => '/info/promos',\n 'icon' => 'fa fa-lg fa-fw fa-gift',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Документы (файлы)',\n 'link' => '/info/documents',\n 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n\n\n /*\n * OSS\n */\n [\n 'name' => 'Новости',\n 'link' => '/oss/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение',\n 'link' => '/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Абонементы',\n 'link' => '/oss/products',\n 'icon' => 'fa fa-lg fa-fw fa-ticket',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpEra',\n 'link' => '/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Соревнования',\n 'link' => '/oss/competitions',\n 'icon' => 'fa fa-lg fa-fw fa-trophy',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Заявки',\n 'link' => '/oss/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Команда',\n 'link' => '/oss/teams',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк',\n 'link' => '/oss/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Информация',\n 'link' => '/oss/info',\n 'icon' => 'fa fa-lg fa-fw fa-info-circle',\n 'cabinet_id' => 3,\n 'children' => [\n// [\n// 'name' => 'Документация',\n// 'link' => '/oss/info/documents',\n// 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n// 'cabinet_id' => 3,\n// 'children' => [],\n// ],\n [\n 'name' => 'Контакты',\n 'link' => '/oss/info/contacts',\n 'icon' => 'fa fa-lg fa-fw fa-phone',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n ],\n ],\n\n /*\n * Common\n */\n [\n 'name' => 'Мой профиль',\n 'link' => '/profile',\n 'icon' => 'fa fa-lg fa-fw fa-cog',\n 'cabinet_id' => null,\n 'children' => [],\n ],\n ];\n\n foreach ($menus as $menu) {\n $this->menuCreate($menu);\n }\n }", "function add_menu() {\n add_menu_page(\"Polls\", \"Polls\", \"administrator\", \"polls\", \"managePollsPage\");\n}", "function trimestral_module_init_menu_items()\n{\n $CI = &get_instance();\n\n $CI->app->add_quick_actions_link([\n 'name' => _l('trimestral_name'),\n 'url' => 'trimestral',\n ]);\n\n $CI->app_menu->add_sidebar_children_item('utilities', [\n 'slug' => 'trimestral',\n 'name' => _l('trimestral_name'),\n 'href' => admin_url('trimestral'),\n ]);\n}", "function cjpopups_admin_menu_page(){\n\t\tglobal $menu;\n\t\t$main_menu_exists = false;\n\t\tforeach ($menu as $key => $value) {\n\t\t\tif($value[2] == 'cj-products'){\n\t\t\t\t$main_menu_exists = true;\n\t\t\t}\n\t\t}\n\t\tif(!$main_menu_exists){\n\t\t\t$menu_icon = cjpopups_item_path('admin_assets_url', 'img/menu-icon.png');\n\t\t\tadd_menu_page( 'CSSJockey', 'CSSJockey', 'manage_options', 'cj-products', 'cjpopups_cj_products', $menu_icon);\n\t\t}\n\t\t$menu_icon = cjpopups_item_path('admin_assets_url', 'img/menu-icon.png');\n\t add_submenu_page( 'cj-products', cjpopups_item_info('page_title'), cjpopups_item_info('menu_title'), 'manage_options', cjpopups_item_info('page_slug'), 'cjpopups_admin_page_setup');\n\t do_action('cjpopups_admin_menu_hook');\n\t //remove_submenu_page( 'cj-products', 'cj-products' );\n}", "public function displayAdminPanel() {}", "public function page_administration_exists() {\n $menuxpath = \"//section[contains(@class,'block_settings')]//div[@id='settingsnav']\";\n $this->ensure_element_exists($menuxpath, 'xpath_element');\n }", "public function generateAdminDevMenus() {\n Menu::create([\n 'menu' => 'Home',\n 'icon' => 'fa fa-home',\n 'active' => 'home/*',\n 'menu_root' => null,\n 'appears_to' => User::UserTypeAdmin,\n 'order' => '0',\n 'link_to' => 'home'\n ]);\n\n Menu::create([\n 'menu' => 'Dashboard',\n 'icon' => 'fa fa-dashboard',\n 'active' => 'dashboard/*',\n 'menu_root' => null,\n 'appears_to' => User::UserTypeAdmin,\n 'order' => '1',\n 'link_to' => 'dashboard'\n ]);\n\n Menu::create([\n 'menu' => 'Ambiente',\n 'icon' => 'fa fa-tree',\n 'active' => 'decompose/*',\n 'menu_root' => null,\n 'appears_to' => User::UserTypeAdmin,\n 'order' => '2',\n 'link_to' => 'decompose'\n ]);\n\n Menu::create([\n 'menu' => 'Rotas',\n 'icon' => 'fa fa-map',\n 'active' => 'routes/*',\n 'menu_root' => null,\n 'appears_to' => User::UserTypeAdmin,\n 'order' => '3',\n 'link_to' => 'routes'\n ]);\n\n Menu::create([\n 'menu' => 'Env Editor',\n 'icon' => 'fa fa-code',\n 'active' => 'enveditor/*',\n 'menu_root' => null,\n 'appears_to' => User::UserTypeAdmin,\n 'order' => '4',\n 'link_to' => 'enveditor'\n ]);\n\n Menu::create([\n 'menu' => 'Logs',\n 'icon' => 'fa fa-pencil-square',\n 'active' => 'logs/*',\n 'menu_root' => null,\n 'appears_to' => User::UserTypeAdmin,\n 'order' => '5',\n 'link_to' => 'logs'\n ]);\n\n Menu::create([\n 'menu' => 'APIs',\n 'icon' => 'fa fa-code',\n 'active' => 'api/*',\n 'menu_root' => null,\n 'appears_to' => User::UserTypeAdmin,\n 'order' => '6',\n 'link_to' => 'api'\n ]);\n\n Menu::create([\n 'menu' => 'Usuarios',\n 'icon' => 'fa fa-users',\n 'active' => 'users/*',\n 'menu_root' => null,\n 'appears_to' => User::UserTypeAdmin,\n 'order' => '7',\n 'link_to' => 'users'\n ]);\n\n Menu::create([\n 'menu' => 'Paginas',\n 'icon' => 'fa fa-file-o',\n 'active' => 'pages/*',\n 'menu_root' => null,\n 'appears_to' => User::UserTypeAdmin,\n 'order' => '8',\n 'link_to' => 'pages'\n ]);\n\n Menu::create([\n 'menu' => 'Opçoes',\n 'icon' => 'fa fa-list-ul',\n 'active' => 'options/*',\n 'menu_root' => null,\n 'appears_to' => User::UserTypeAdmin,\n 'order' => '9',\n 'link_to' => 'options'\n ]);\n\n Menu::create([\n 'menu' => 'Menus',\n 'icon' => 'fa fa-bars',\n 'active' => 'menus/*',\n 'menu_root' => null,\n 'appears_to' => User::UserTypeAdmin,\n 'order' => '10',\n 'link_to' => 'menus'\n ]);\n\n Menu::create([\n 'menu' => 'Holder',\n 'icon' => 'fa fa-home',\n 'active' => 'holder/*',\n 'menu_root' => null,\n 'appears_to' => User::UserTypeAdmin,\n 'order' => '11',\n 'link_to' => 'holder'\n ]);\n\n Menu::create([\n 'menu' => 'Strings',\n 'icon' => 'fa fa-font',\n 'active' => 'strings/*',\n 'menu_root' => null,\n 'appears_to' => User::UserTypeAdmin,\n 'order' => '12',\n 'link_to' => 'strings'\n ]);\n }", "function wp_admin_bar_wp_menu($wp_admin_bar)\n {\n }", "private function instantiate_admin_pages() {\n $this->admin_objs[ 'menu' ] = new HRHS_Admin_Menu();\n }", "function wp_admin_bar_site_menu($wp_admin_bar)\n {\n }", "function manage()\n\t{\n\t\tglobal $template, $errors, $db, $mod_loader, $security;\n\t\t\n\t\t$menuid = ( isset( $_GET[ 'menuid' ] ) ) ? intval( $_GET[ 'menuid' ] ) : 0;\n\t\t\n\t\tif ( $menuid != 0 )\n\t\t{\n\t\t\t$sql = \"SELECT * FROM \" . MORECONTENT_MENU_TABLE . \" WHERE menu_parent='$menuid'\";\n\t\t\tif ( !$result = $db->sql_query( $sql ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( 'Couldn\\'t read database', CRITICAL_ERROR );\n\t\t\t}\n\t\t\t$submenus = $db->sql_fetchrowset( $result );\n\t\t\t\n\t\t\t$sql = \"SELECT m.*, c.* FROM \" . MORECONTENT_MENU_TABLE . \" m LEFT JOIN \" . MORECONTENT_CONTENT_TABLE . \" c ON c.menu_id=m.menu_id WHERE m.menu_id='$menuid' LIMIT 1\";\n\t\t\tif ( !$result = $db->sql_query( $sql ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( 'Couldn\\'t read database', CRITICAL_ERROR );\n\t\t\t}\n\t\t\t$menu = $db->sql_fetchrow( $result );\n\t\t}else\n\t\t{\n\t\t\t$sql = \"SELECT * FROM \" . MORECONTENT_MENU_TABLE . \" WHERE menu_level='0'\";\n\t\t\tif ( !$result = $db->sql_query( $sql ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( 'Couldn\\'t read database', CRITICAL_ERROR );\n\t\t\t}\n\t\t\t$submenus = $db->sql_fetchrowset( $result );\n\t\t\t\n\t\t\t$menu = array( 'menu_id' => 0, 'menu_parent' => 0, 'menu_level' => -1, 'menu_title' => $this->lang[ 'Menu_na' ], 'menu_content' => 0, 'id' => 0, 'content' => '' );\n\t\t}\n\t\t\n\t\t// get the editor\n\t\t$mods = $mod_loader->getmodule( 'editor', MOD_FETCH_NAME, NOT_ESSENTIAL );\n\t\t$mod_loader->port_vars( array( 'name' => 'editor1', 'quickpost' => FALSE, 'def_text' => stripslashes( $menu[ 'content' ] ) ) );\n\t\t$mod_loader->execute_modules( 0, 'show_editor' );\n\t\t$editor = $mod_loader->get_vars( array( 'editor_HTML', 'editor_WYSIWYG' ) );\n\t\t\n\t\t$frame = '<b><a href=\"%s\">%s</a></b> :: ';\n\t\t$parsed_submenus = '';\n\t\tif ( is_array( $submenus ) )\n\t\t{\n\t\t\tforeach ( $submenus as $sub )\n\t\t\t{\n\t\t\t\t$url = $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_MoreContent&s=manage&menuid=' . $sub[ 'menu_id' ] );\n\t\t\t\t$parsed_submenus .= sprintf( $frame, $url, $sub[ 'menu_title' ] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$template->assign_block_vars( 'manage', '', array(\n\t\t\t'L_TITLE' => $this->lang[ 'Manage_title' ],\n\t\t\t'L_EXPLAIN' => $this->lang[ 'Manage_explain' ],\n\t\t\t'L_TITLE2' => $this->lang[ 'Menu_title' ],\n\t\t\t'L_TITLE3' => $menu[ 'menu_title' ],\n\t\t\t'L_ADDMENU' => $this->lang[ 'Menu_add' ],\n\t\t\t'L_ADDTITLE' => $this->lang[ 'Menu_addtitle' ],\n\t\t\t'L_DELMENU' => $this->lang[ 'Menu_delete' ],\n\t\t\t'L_CHANGEMENU' => $this->lang[ 'Menu_change' ],\n\t\t\t'L_UP' => $this->lang[ 'Menu_up' ],\n\t\t\t\n\t\t\t'S_EDITOR' => $editor[ 'editor_HTML' ],\n\t\t\t'S_MENUS' => $parsed_submenus,\n\t\t\t'S_FORM_ACTION' => $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_MoreContent&s=manage2&menuid=' . $menu[ 'menu_id' ] . '&menulevel=' . $menu[ 'menu_level' ] ),\n\t\t\t\n\t\t\t'U_UP' => $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_MoreContent&s=manage&menuid=' . $menu[ 'menu_parent' ] ),\n\t\t) );\n\t\t$template->assign_switch( 'manage', TRUE );\n\t}", "function getMenuItems()\n {\n }", "function applicants_admin_actions() {\n //add_menu_page(\"Applicants\", \"Applicants\", 5, \"Applicants\", \"applicants_admin\");\n\tadd_menu_page( 'Applicants', 'Applicants', 'manage_options', 'applicants', 'applicants_admin', '', 27 );\n}", "public function adminMenu()\n\t{\n\t\t$this->app['events']->listen('routes.finish', function()\n\t\t{\n\t\t\tif (! $user = $this->app['auth']->user() ) return;\n\n\t\t\t$menu = $this->app['menu']->menu('admin-header-nav');\n\t\t\t\t$menu->setAttributes(array('class' => 'eight columns'));\n\n\t\t\t$usersMenu = $menu->item('users', 'Users');\n\t\t\t\t$usersMenu->item('manage-users', 'Manage users', route('admin.user.index'));\n\n\t\t\t$profileMenu = $menu->item('user', $user->name, route('admin.profile'));\n\t\t\t\t$profileMenu->item('logout', 'Log Out', route('logout'));\n\t\t});\n\t}", "private function showAdminMenu() : bool\n {\n return \\apply_filters(self::FILTER_SHOW_ADMIN_MENU, true) === true;\n }", "function get_registered_nav_menus()\n {\n }", "public function register_admin_menu(){\r\n $all_modules = HW_TGM_Module_Activation::get_register_modules();\r\n $module = $this->_option('module');\r\n $name = $module->module_name;\r\n $label = isset($all_modules[$name])? $all_modules[$name]['name'] : $name;\r\n\r\n $this->add_help_content(self::load_settings_page_hook_slug(HW_Module_Settings_page::PAGE_SLUG) ,$name , $label);\r\n }", "protected function prepend_admin()\n\t{\n\t\tl10n::set(__DIR__.'/locales/'.$this->okt->user->language.'/admin');\n\n\t\t# on détermine si on est actuellement sur ce module\n\t\t$this->onThisModule();\n\n\t\t# on ajoutent un item au menu admin\n\t\tif (!defined('OKT_DISABLE_MENU'))\n\t\t{\n\t\t\t$this->okt->page->estimateSubMenu = new htmlBlockList(null,adminPage::$formatHtmlSubMenu);\n\t\t\t$this->okt->page->mainMenu->add(\n\t\t\t\t__('m_estimate_menu_Estimates'),\n\t\t\t\t'module.php?m=estimate',\n\t\t\t\tON_ESTIMATE_MODULE,\n\t\t\t\t30,\n\t\t\t\t$this->okt->checkPerm('estimate'),\n\t\t\t\tnull,\n\t\t\t\t$this->okt->page->estimateSubMenu,\n\t\t\t\t$this->url().'/icon.png'\n\t\t\t);\n\t\t\t\t$this->okt->page->estimateSubMenu->add(\n\t\t\t\t\t__('m_estimate_menu_Estimates_list'),\n\t\t\t\t\t'module.php?m=estimate&amp;action=index',\n\t\t\t\t\tON_ESTIMATE_MODULE && (!$this->okt->page->action || $this->okt->page->action === 'index' || $this->okt->page->action === 'estimate'),\n\t\t\t\t\t1\n\t\t\t\t);\n\t\t\t\t$this->okt->page->estimateSubMenu->add(\n\t\t\t\t\t__('m_estimate_menu_Products'),\n\t\t\t\t\t'module.php?m=estimate&amp;action=products',\n\t\t\t\t\tON_ESTIMATE_MODULE && ($this->okt->page->action === 'products' || $this->okt->page->action === 'product'),\n\t\t\t\t\t2,\n\t\t\t\t\t$this->okt->checkPerm('estimate_products')\n\t\t\t\t);\n\t\t\t\t$this->okt->page->estimateSubMenu->add(\n\t\t\t\t\t__('m_estimate_menu_Accessories'),\n\t\t\t\t\t'module.php?m=estimate&amp;action=accessories',\n\t\t\t\t\tON_ESTIMATE_MODULE && ($this->okt->page->action === 'accessories' || $this->okt->page->action === 'accessory'),\n\t\t\t\t\t3,\n\t\t\t\t\t$this->config->enable_accessories && $this->okt->checkPerm('estimate_accessories')\n\t\t\t\t);\n\t\t\t\t$this->okt->page->estimateSubMenu->add(\n\t\t\t\t\t__('c_a_menu_configuration'),\n\t\t\t\t\t'module.php?m=estimate&amp;action=config',\n\t\t\t\t\tON_ESTIMATE_MODULE && ($this->okt->page->action === 'config'),\n\t\t\t\t\t10,\n\t\t\t\t\t$this->okt->checkPerm('estimate_config')\n\t\t\t\t);\n\t\t}\n\t}", "function adminMenu($params, &$smarty) {\n\t// is not CSS classed. It is impossible to determine if the current element will be the last active module\n\t// providing an admin interface, so this is the best way to do it.\n\t//$activeModules = array_reverse(Config::getActiveModules());\n\t$activeModules = Config::getActiveModules();\n\t\n\t$adminItems = array('<li class=\"borderRight\"><a href=\"/admin/\">DASHBOARD</a></li>');\n\t\n\t$i = 0;\n\t$thisUser = new User($_SESSION['authenticated_user']->getId());\n\tforeach ($activeModules as $module) {\n\t\tif($thisUser->hasPerm('admin') || $module['module'] == 'Campaigns'){\n\t\t\t$i++;\n\t\t\t// Use object reflection to reverse engineer the class functions\n\t\t\t$modulename = 'Module_' . $module['module'];\n\t\t\tinclude_once SITE_ROOT . '/modules/' . $module['module'] . '/' . $module['module'] . '.php';\n\t\t\t$blah = new $modulename();\n\t\t\t$test = new ReflectionClass($blah);\n\t\t\t\n\t\t\t// Determine if the current object provides and admin interface. Some modules may provide functionality\n\t\t\t// but not require a main admin interface, and instead accomplish their tasks with hooks or no interface\n\t\t\t// at all.\n\t\t\tif ($test->hasMethod('getAdminInterface')) {\n\t\t\t\t// If the array is empty push an un-classed array item onto the stack. If not, then push successive\n\t\t\t\t// array items with the required 'borderRight' class onto the stack.\n\t\t\t\t//if (count($adminItems) == 0) {\n\t\t\t\t//\t$adminItems = array('<li><a href=\"/admin/?module=' . $module['module'] . '\">' . strtolower($module['module']) . '</a></li>');\n\t\t\t\t//} else {\n\t\t\t\t//\tarray_unshift($adminItems, '<li><a href=\"/admin/?module=' . $module['module'] . '\">' . strtolower($module['module']) . '</a></li>');\n\t\t\t\t//}\n\t\t\t\tif (($i != count($activeModules) && $module['module'] != 'Campaigns') || ($module['module'] == 'Campaigns' && $i < 1)) {\n\t\t\t\t\t$liClass = ' class=\"borderRight\"';\n\t\t\t\t} else {\n\t\t\t\t\tunset($liClass);\n\t\t\t\t}\n\t\t\t\t$adminItems[] = '<li' . $liClass . '><a href=\"/admin/' . $module['module'] . '\">' . strtoupper($module['display_name']) . '</a></li>';\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\t$menuString = '<ul>';\n\t$menuString .= implode(null, $adminItems);\n\t$menuString .= '</ul>';\n\t\n\treturn $menuString;\n}", "static function admin_init ()\n {\n add_menu_page(\n __x('People', 'admin menu page title'),\n __x('People', 'admin menu title'),\n 'read',\n 'epfl-people',\n null, // Render callback\n 'dashicons-calendar', // Icon type\n 70 // Position\n );\n }", "public function testHome() { \n $array = $this->adminController->home();\n\n $this->assertEquals('Admin Panel', $array['title']);\n }", "function wp_admin_bar_my_sites_menu($wp_admin_bar)\n {\n }", "function wp_admin_bar_dashboard_view_site_menu($wp_admin_bar)\n {\n }", "public function Menu() {\n $user_role = get_option('oxi_addons_user_permission');\n $role_object = get_role($user_role);\n $first_key = '';\n if (isset($role_object->capabilities) && is_array($role_object->capabilities)) {\n reset($role_object->capabilities);\n $first_key = key($role_object->capabilities);\n } else {\n $first_key = 'manage_options';\n }\n add_submenu_page('oxi-addons', 'Elementor Addons', 'Elementor Addons', $first_key, 'oxi-el-addons', [$this, 'oxi_addons_elementors']);\n }", "function get_admin_menu_items()\n\t{\n\t\t$default = array($this->get_friendly_name(), $this->get_admin_description(), 'defaultadmin', $this->get_admin_section());\n\t\treturn array($default);\n\t}", "function entity_lists_admin_menu(\\Elgg\\Event $event) {\n if (!elgg_in_context('admin')) {\n return null;\n }\n \n /* @var $return MenuItems */\n $result = $event->getValue();\n \n $result[] = \\ElggMenuItem::factory([\n 'name' => 'entity_lists',\n 'text' => elgg_echo('admin:entity_lists'),\n 'href' => false,\n ]);\n\n if (EntityListsOptions::isUserEnabled()) { \n $result[] = \\ElggMenuItem::factory([\n 'name' => 'entity_lists:user',\n 'href' => elgg_normalize_url(\"admin/entity_lists/user\"),\n 'text' => elgg_echo(\"item:user\"),\n 'parent_name' => 'entity_lists',\n ]); \n }\n \n if (EntityListsOptions::isGroupEnabled()) { \n $result[] = \\ElggMenuItem::factory([\n 'name' => \"entity_lists:group\",\n 'href' => elgg_normalize_url(\"admin/entity_lists/group\"),\n 'text' => elgg_echo(\"item:group\"),\n 'parent_name' => 'entity_lists',\n ]);\n }\n \n if ($enables_types = EntityListsOptions::getEnabledEntities()) {\n foreach ($enables_types as $key => $e) { \n $result[] = \\ElggMenuItem::factory([\n 'name' => \"entity_lists:{$e}\",\n 'href' => elgg_normalize_url(\"admin/entity_lists/object?e={$e}\"),\n 'text' => elgg_echo(\"item:object:{$e}\"),\n 'parent_name' => 'entity_lists',\n ]);\n }\n } \n \n return $result;\n}", "public function testAdministrationAsAdmin()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit(new Login())\n ->loginAsUser('[email protected]', 'password');\n\n $browser->visit('/admin/dashboard')\n ->assertSee('Bonjour First user')\n ->assertSee('Gérer les utilisateurs')\n ->assertDontSee('Access denied');\n });\n }", "public function GetAdmin ();", "function adminMenu()\r\n{\r\n echo \"=============== ADMIN MENU ================\\n\";\r\n echo \"1.ADD LOAN\\n2.ADD CUSTOMER\\n3.check loans\\n4.get customer details\\n\";\r\n}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}" ]
[ "0.752425", "0.7481123", "0.7481123", "0.7481123", "0.7424119", "0.7341663", "0.73120207", "0.72790366", "0.72790366", "0.7277605", "0.7250286", "0.7166449", "0.7166398", "0.7162262", "0.70940125", "0.7069317", "0.7055192", "0.7049629", "0.7032223", "0.70124835", "0.70110583", "0.69848233", "0.69795877", "0.6949945", "0.6946648", "0.6940317", "0.6915004", "0.69133157", "0.69122756", "0.6898386", "0.6897347", "0.6897347", "0.689285", "0.6866023", "0.6854835", "0.6852694", "0.6851403", "0.6837926", "0.68234557", "0.6799066", "0.6786199", "0.6781849", "0.67802525", "0.6773679", "0.67677355", "0.67654127", "0.67628825", "0.6750464", "0.6741351", "0.6739627", "0.6738037", "0.6737165", "0.67368114", "0.6724945", "0.6724793", "0.6724397", "0.6710862", "0.6706009", "0.6701296", "0.67003053", "0.6694453", "0.6691969", "0.6689418", "0.6676335", "0.6674532", "0.66676795", "0.665174", "0.6641989", "0.6640617", "0.66372246", "0.6635298", "0.66318333", "0.66289455", "0.66277176", "0.66266876", "0.66205007", "0.66146725", "0.6612593", "0.66101146", "0.6608229", "0.6606111", "0.6606001", "0.6604639", "0.6602813", "0.6602741", "0.6586935", "0.6576411", "0.6574377", "0.657223", "0.65705615", "0.656931", "0.65690553", "0.65675", "0.6565988", "0.65646213", "0.6558462", "0.6558462", "0.6558462", "0.6558462", "0.6558462" ]
0.7660423
0
test required helpers load correctly
public function testRequireHelpers() { if (!$this->_hasTrigger('requireHelpersToLoad')) { return false; } $expected = $this->_manualCall('requireHelpersToLoad', $this->ViewtEvent); $result = $this->Event->trigger($this->ViewObject, $this->plugin . '.requireHelpersToLoad'); $this->assertEquals($expected, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadHelpers()\n {\n require_once __DIR__.'/helpers.php';\n }", "public function testTestHelpersLoaded()\n {\n $this->assertTrue(function_exists('runkit_function_rename'), \"Function runkit_function_rename is not defined. Please install PECL module runkit from https://github.com/zenovich/runkit.\");\n }", "public function loadHelpers(){\n $this->file->require('vendor/helpers.php');\n }", "public function testLoad() {\n $this->_loader->getSource('FilesystemTest.php');\n $this->_loader->getSource('FilesystemTest.php');\n\n $this->_loader->appendDir(dirname(__FILE__) . '/../Loader');\n $this->_loader->prependDir(dirname(__FILE__) . '/../Loader');\n }", "function _load_helpers()\r\n\t{\r\n\t\t// Load inflector helper for singular and plural functions\r\n\t\t$this->load->helper('inflector');\r\n\r\n\t\t// Load security helper for prepping functions\r\n\t\t$this->load->helper('security');\r\n\t}", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "private function loadHelpers()\n {\n foreach($this->helpers as $helper)\n {\n require app_path() . '/' . $helper;\n }\n }", "protected function loadHelpers(): void\n {\n $files = glob(__DIR__ . '/../Helpers/*.php');\n foreach ($files as $file) {\n require_once($file);\n }\n }", "protected function setUp(): void\n {\n require_once('src/functions/common/functions_convert.php');\n require_once('src/functions/common/functions_blocks.php');\n }", "#[@test]\n public function before() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('.', true));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[0]);\n }", "protected function _Load_Helpers() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/helpers');\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_helper_init',$this);\r\n }", "protected function setUp(): void\n {\n require_once('src/functions/common/functions_blocks.php');\n require_once('src/functions/editor/functions_pages.php');\n }", "function testLoad()\n {\n $this->assertTrue(true);\n }", "protected function _before()\n {\n $dir = realpath(__DIR__ . '/../../../src/');\n\n Autoload::addNamespace('', $dir);\n require_once $dir . '/Pckg/Collection/Helper/functions.php';\n }", "private function load_dependencies() {\n //require_once( $this->inc . 'class-best-faq-admin.php' );\n require_once( $this->inc . 'best-faq-shortcode.php' );\n }", "protected function load_libraries_for_additional_tests() {\n global $CFG;\n\n require_once($CFG->dirroot.'/elis/program/lib/setup.php');\n require_once(elispm::lib('data/userset.class.php'));\n require_once(elispm::lib('data/user.class.php'));\n require_once(elispm::lib('data/usermoodle.class.php'));\n require_once(elispm::lib('data/userset.class.php'));\n }", "protected function _loadFramework()\n {\n include 'Exception.php';\n include 'Coverage.php';\n include 'Result.php';\n include 'Result/Error.php';\n include 'Result/Failure.php';\n include 'Result/Success.php';\n include 'TestCase.php';\n include 'Tracker.php';\n }", "public function testArbitraryLoad()\n {\n // initialize a module with a controller.\n P4Cms_Module::setCoreModulesPath(TEST_ASSETS_PATH . '/core-modules');\n P4Cms_Module::fetch('Core')->init();\n\n // if registered, de-register it.\n if ($this->_isRegistered()) {\n $this->_disableAutoloader();\n }\n\n $this->assertFalse(\n class_exists('Core_Some_Class'),\n \"Core_Some_Class class should not be registered\"\n );\n\n $this->_enableAutoloader();\n $this->assertTrue(\n class_exists('Core_Some_Class'),\n \"Core_Some_Class class should be registered\"\n );\n }", "public function setUp() {\n $this->libraryLoader= \\lang\\ClassLoader::registerLoader(new \\lang\\archive\\ArchiveClassLoader(new Archive(\\lang\\XPClass::forName(\\xp::nameOf(__CLASS__))\n ->getPackage()\n ->getPackage('lib')\n ->getResourceAsStream('three-and-four.xar')\n )));\n }", "public static function loadFixture()\n {\n //include __DIR__ .'/../_files/customer.php';\n include __DIR__ .'/../_files/order_fee_variation.php';\n\n }", "protected function _initTest(){\n }", "public function testLoad()\n {\n MockPlugin::load('Make');\n $this->assertEquals(['Make'], MockPlugin::loaded());\n $this->assertTrue(MockPlugin::loaded('Make'));\n $config = MockPlugin::getLoaded();\n $this->assertEquals(ROOT . DS . 'tests' . DS . 'TestApp' . DS . 'plugins' . DS . 'make', $config['Make']['path']);\n $this->assertEquals(ROOT . DS . 'tests' . DS . 'TestApp' . DS . 'plugins' . DS . 'make', Plugin::path('Make'));\n $this->assertTrue($config['Make']['routes']);\n $this->assertTrue($config['Make']['bootstrap']);\n \n // Test with no routes and bootstrap\n MockPlugin::load('Make', ['routes' => false,'bootstrap' => false]);\n $this->assertTrue(MockPlugin::loaded('Make'));\n $config = MockPlugin::getLoaded();\n $this->assertFalse($config['Make']['routes']);\n $this->assertFalse($config['Make']['bootstrap']);\n }", "function agnosia_initialize_helpers() {\r\n\r\n\tinclude_once agnosia_get_path( '/inc/utils/agnosia-helpers.php' );\r\n\r\n}", "#[@test]\n public function after_is_default() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('.'));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[sizeof($loaders)- 1]);\n }", "private function _addHelper()\n {\n require __DIR__.'/../Support/SsoHelper.php';\n }", "#[@test]\n public function before_via_inspect() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('!.', null));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[0]);\n }", "private function load_dependencies() {\n\t\t// Load the views file.\n\t\trequire_once( dirname( __FILE__ ) . '/views-user-profile.php' );\n\n\t}", "function test_import_base()\n\t{\n\t\t$testLib = 'joomla._testdata.loader-data';\n\t\t$this -> assertFalse(defined('JUNIT_DATA_JLOADER'), 'Test set up failure.');\n\t\t$r = JLoader::import($testLib, dirname(__FILE__));\n\t\tif ($this -> assertTrue($r)) {\n\t\t\t$this -> assertTrue(defined('JUNIT_DATA_JLOADER'));\n\t\t}\n\n\t\t// retry\n\t\t$r = JLoader::import($testLib, dirname(__FILE__));\n\t\t$this->assertTrue($r);\n\t}", "protected function setUp()\n {\n if ($this->obj instanceof PHP_CompatInfo_Reference) {\n $this->ref = $this->obj->getAll();\n }\n if (isset($this->ref['extensions'])) {\n foreach ($this->ref['extensions'] as $extname => $opt) {\n if (!extension_loaded($extname)) {\n $this->markTestSkipped(\n \"The '$extname' extension is not available.\"\n );\n }\n }\n }\n }", "private static function initialLoad() {\n include_once __DIR__ . '/Storange.php';\n Storange::getPathDir('wowframework/');\n include_once __DIR__ . '/exceptions/LoadFiles.php';\n }", "protected function setUp() {\r\n parent::setUp();\r\n\r\n $this->_utils = $this->getProvider()->get('PM\\Main\\Utils');\r\n }", "public static function setUpBeforeClass()\n {\n //include_once __DIR__.'/../../../../util.php';\n }", "public function testImport() {\n return true;\n }", "public function autoloadFilesAreBuildCorrectlyDataProvider() {}", "public function testClassLoad(): void\n {\n $this->assertInstanceOf(ChangeMailHelper::class, $this->changeMailHelper);\n }", "protected function setUp()\n {\n // finding a default module\n }", "protected function loadHelper()\n {\n foreach ($this->vendor_helpers_path as $vendor_helper) {\n LoaderSingleton::getInstance()->load_require_once($vendor_helper);\n }\n\n /**\n * @var HelperDefinition $helper\n */\n $helper = Container::getInstance()->get(HelperDefinition::class);\n $helpers = $helper->init();\n foreach ($helpers as $h) {\n if (is_string($h)) {\n LoaderSingleton::getInstance()->load_require_once($h);\n }\n }\n }", "public function __construct() {\n\t\tforeach(glob(CORE_BASE . 'helpers/*.php') as $file) {\n\t\t\trequire_once $file;\n\t\t}\n\t}", "public static function setUpBeforeClass() {\n\t\t$loader = new \\Mockery\\Loader();\n\t\t$loader->register();\n\t}", "public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function loadViewTesting()\n {\n $this->addBladeViewTesting(__DIR__ . '/views');\n $this->cleanViews();\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}" ]
[ "0.75384116", "0.7385384", "0.73222613", "0.7165096", "0.7098309", "0.7049964", "0.7049964", "0.7049964", "0.69706184", "0.68683773", "0.6770976", "0.6752814", "0.67074716", "0.66594356", "0.66523826", "0.664614", "0.66202873", "0.65951055", "0.65697676", "0.6523928", "0.65113205", "0.65054756", "0.64913726", "0.6458518", "0.64308846", "0.64171326", "0.6409848", "0.63859355", "0.63748837", "0.63621145", "0.6359847", "0.63522553", "0.63479936", "0.6333435", "0.6330815", "0.6329998", "0.6323402", "0.6319116", "0.6307898", "0.63069206", "0.6267332", "0.62577176", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.624214", "0.6241", "0.6241", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374" ]
0.6972093
8
test required helpers load correctly
public function testRequireComponents() { if (!$this->_hasTrigger('requireComponentsToLoad')) { return false; } $expected = $this->_manualCall('requireComponentsToLoad', $this->ViewtEvent); $result = $this->Event->trigger($this->ViewObject, $this->plugin . '.requireComponentsToLoad'); $this->assertEquals($expected, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadHelpers()\n {\n require_once __DIR__.'/helpers.php';\n }", "public function testTestHelpersLoaded()\n {\n $this->assertTrue(function_exists('runkit_function_rename'), \"Function runkit_function_rename is not defined. Please install PECL module runkit from https://github.com/zenovich/runkit.\");\n }", "public function loadHelpers(){\n $this->file->require('vendor/helpers.php');\n }", "public function testLoad() {\n $this->_loader->getSource('FilesystemTest.php');\n $this->_loader->getSource('FilesystemTest.php');\n\n $this->_loader->appendDir(dirname(__FILE__) . '/../Loader');\n $this->_loader->prependDir(dirname(__FILE__) . '/../Loader');\n }", "function _load_helpers()\r\n\t{\r\n\t\t// Load inflector helper for singular and plural functions\r\n\t\t$this->load->helper('inflector');\r\n\r\n\t\t// Load security helper for prepping functions\r\n\t\t$this->load->helper('security');\r\n\t}", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testRequireHelpers() {\n\t\tif (!$this->_hasTrigger('requireHelpersToLoad')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('requireHelpersToLoad', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.requireHelpersToLoad');\n\t\t$this->assertEquals($expected, $result);\n\t}", "private function loadHelpers()\n {\n foreach($this->helpers as $helper)\n {\n require app_path() . '/' . $helper;\n }\n }", "protected function loadHelpers(): void\n {\n $files = glob(__DIR__ . '/../Helpers/*.php');\n foreach ($files as $file) {\n require_once($file);\n }\n }", "protected function setUp(): void\n {\n require_once('src/functions/common/functions_convert.php');\n require_once('src/functions/common/functions_blocks.php');\n }", "#[@test]\n public function before() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('.', true));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[0]);\n }", "protected function _Load_Helpers() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/helpers');\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_helper_init',$this);\r\n }", "protected function setUp(): void\n {\n require_once('src/functions/common/functions_blocks.php');\n require_once('src/functions/editor/functions_pages.php');\n }", "function testLoad()\n {\n $this->assertTrue(true);\n }", "protected function _before()\n {\n $dir = realpath(__DIR__ . '/../../../src/');\n\n Autoload::addNamespace('', $dir);\n require_once $dir . '/Pckg/Collection/Helper/functions.php';\n }", "private function load_dependencies() {\n //require_once( $this->inc . 'class-best-faq-admin.php' );\n require_once( $this->inc . 'best-faq-shortcode.php' );\n }", "protected function load_libraries_for_additional_tests() {\n global $CFG;\n\n require_once($CFG->dirroot.'/elis/program/lib/setup.php');\n require_once(elispm::lib('data/userset.class.php'));\n require_once(elispm::lib('data/user.class.php'));\n require_once(elispm::lib('data/usermoodle.class.php'));\n require_once(elispm::lib('data/userset.class.php'));\n }", "protected function _loadFramework()\n {\n include 'Exception.php';\n include 'Coverage.php';\n include 'Result.php';\n include 'Result/Error.php';\n include 'Result/Failure.php';\n include 'Result/Success.php';\n include 'TestCase.php';\n include 'Tracker.php';\n }", "public function testArbitraryLoad()\n {\n // initialize a module with a controller.\n P4Cms_Module::setCoreModulesPath(TEST_ASSETS_PATH . '/core-modules');\n P4Cms_Module::fetch('Core')->init();\n\n // if registered, de-register it.\n if ($this->_isRegistered()) {\n $this->_disableAutoloader();\n }\n\n $this->assertFalse(\n class_exists('Core_Some_Class'),\n \"Core_Some_Class class should not be registered\"\n );\n\n $this->_enableAutoloader();\n $this->assertTrue(\n class_exists('Core_Some_Class'),\n \"Core_Some_Class class should be registered\"\n );\n }", "public function setUp() {\n $this->libraryLoader= \\lang\\ClassLoader::registerLoader(new \\lang\\archive\\ArchiveClassLoader(new Archive(\\lang\\XPClass::forName(\\xp::nameOf(__CLASS__))\n ->getPackage()\n ->getPackage('lib')\n ->getResourceAsStream('three-and-four.xar')\n )));\n }", "public static function loadFixture()\n {\n //include __DIR__ .'/../_files/customer.php';\n include __DIR__ .'/../_files/order_fee_variation.php';\n\n }", "protected function _initTest(){\n }", "public function testLoad()\n {\n MockPlugin::load('Make');\n $this->assertEquals(['Make'], MockPlugin::loaded());\n $this->assertTrue(MockPlugin::loaded('Make'));\n $config = MockPlugin::getLoaded();\n $this->assertEquals(ROOT . DS . 'tests' . DS . 'TestApp' . DS . 'plugins' . DS . 'make', $config['Make']['path']);\n $this->assertEquals(ROOT . DS . 'tests' . DS . 'TestApp' . DS . 'plugins' . DS . 'make', Plugin::path('Make'));\n $this->assertTrue($config['Make']['routes']);\n $this->assertTrue($config['Make']['bootstrap']);\n \n // Test with no routes and bootstrap\n MockPlugin::load('Make', ['routes' => false,'bootstrap' => false]);\n $this->assertTrue(MockPlugin::loaded('Make'));\n $config = MockPlugin::getLoaded();\n $this->assertFalse($config['Make']['routes']);\n $this->assertFalse($config['Make']['bootstrap']);\n }", "function agnosia_initialize_helpers() {\r\n\r\n\tinclude_once agnosia_get_path( '/inc/utils/agnosia-helpers.php' );\r\n\r\n}", "#[@test]\n public function after_is_default() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('.'));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[sizeof($loaders)- 1]);\n }", "private function _addHelper()\n {\n require __DIR__.'/../Support/SsoHelper.php';\n }", "#[@test]\n public function before_via_inspect() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('!.', null));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[0]);\n }", "private function load_dependencies() {\n\t\t// Load the views file.\n\t\trequire_once( dirname( __FILE__ ) . '/views-user-profile.php' );\n\n\t}", "function test_import_base()\n\t{\n\t\t$testLib = 'joomla._testdata.loader-data';\n\t\t$this -> assertFalse(defined('JUNIT_DATA_JLOADER'), 'Test set up failure.');\n\t\t$r = JLoader::import($testLib, dirname(__FILE__));\n\t\tif ($this -> assertTrue($r)) {\n\t\t\t$this -> assertTrue(defined('JUNIT_DATA_JLOADER'));\n\t\t}\n\n\t\t// retry\n\t\t$r = JLoader::import($testLib, dirname(__FILE__));\n\t\t$this->assertTrue($r);\n\t}", "protected function setUp()\n {\n if ($this->obj instanceof PHP_CompatInfo_Reference) {\n $this->ref = $this->obj->getAll();\n }\n if (isset($this->ref['extensions'])) {\n foreach ($this->ref['extensions'] as $extname => $opt) {\n if (!extension_loaded($extname)) {\n $this->markTestSkipped(\n \"The '$extname' extension is not available.\"\n );\n }\n }\n }\n }", "private static function initialLoad() {\n include_once __DIR__ . '/Storange.php';\n Storange::getPathDir('wowframework/');\n include_once __DIR__ . '/exceptions/LoadFiles.php';\n }", "protected function setUp() {\r\n parent::setUp();\r\n\r\n $this->_utils = $this->getProvider()->get('PM\\Main\\Utils');\r\n }", "public static function setUpBeforeClass()\n {\n //include_once __DIR__.'/../../../../util.php';\n }", "public function testImport() {\n return true;\n }", "public function autoloadFilesAreBuildCorrectlyDataProvider() {}", "public function testClassLoad(): void\n {\n $this->assertInstanceOf(ChangeMailHelper::class, $this->changeMailHelper);\n }", "protected function setUp()\n {\n // finding a default module\n }", "protected function loadHelper()\n {\n foreach ($this->vendor_helpers_path as $vendor_helper) {\n LoaderSingleton::getInstance()->load_require_once($vendor_helper);\n }\n\n /**\n * @var HelperDefinition $helper\n */\n $helper = Container::getInstance()->get(HelperDefinition::class);\n $helpers = $helper->init();\n foreach ($helpers as $h) {\n if (is_string($h)) {\n LoaderSingleton::getInstance()->load_require_once($h);\n }\n }\n }", "public function __construct() {\n\t\tforeach(glob(CORE_BASE . 'helpers/*.php') as $file) {\n\t\t\trequire_once $file;\n\t\t}\n\t}", "public static function setUpBeforeClass() {\n\t\t$loader = new \\Mockery\\Loader();\n\t\t$loader->register();\n\t}", "public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function loadViewTesting()\n {\n $this->addBladeViewTesting(__DIR__ . '/views');\n $this->cleanViews();\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}" ]
[ "0.75384116", "0.7385384", "0.73222613", "0.7165096", "0.7098309", "0.7049964", "0.7049964", "0.7049964", "0.6972093", "0.69706184", "0.68683773", "0.6770976", "0.6752814", "0.67074716", "0.66594356", "0.66523826", "0.664614", "0.66202873", "0.65951055", "0.65697676", "0.6523928", "0.65113205", "0.65054756", "0.64913726", "0.6458518", "0.64308846", "0.64171326", "0.6409848", "0.63859355", "0.63748837", "0.63621145", "0.6359847", "0.63522553", "0.63479936", "0.6333435", "0.6330815", "0.6329998", "0.6323402", "0.6319116", "0.6307898", "0.63069206", "0.6267332", "0.62577176", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.624214", "0.6241", "0.6241", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374" ]
0.0
-1
test required helpers load correctly
public function testRequireCss() { if (!$this->_hasTrigger('requireCssToLoad')) { return false; } $expected = $this->_manualCall('requireCssToLoad', $this->ViewtEvent); $result = $this->Event->trigger($this->ViewObject, $this->plugin . '.requireCssToLoad'); $this->assertEquals($expected, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadHelpers()\n {\n require_once __DIR__.'/helpers.php';\n }", "public function testTestHelpersLoaded()\n {\n $this->assertTrue(function_exists('runkit_function_rename'), \"Function runkit_function_rename is not defined. Please install PECL module runkit from https://github.com/zenovich/runkit.\");\n }", "public function loadHelpers(){\n $this->file->require('vendor/helpers.php');\n }", "public function testLoad() {\n $this->_loader->getSource('FilesystemTest.php');\n $this->_loader->getSource('FilesystemTest.php');\n\n $this->_loader->appendDir(dirname(__FILE__) . '/../Loader');\n $this->_loader->prependDir(dirname(__FILE__) . '/../Loader');\n }", "function _load_helpers()\r\n\t{\r\n\t\t// Load inflector helper for singular and plural functions\r\n\t\t$this->load->helper('inflector');\r\n\r\n\t\t// Load security helper for prepping functions\r\n\t\t$this->load->helper('security');\r\n\t}", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testRequireHelpers() {\n\t\tif (!$this->_hasTrigger('requireHelpersToLoad')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('requireHelpersToLoad', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.requireHelpersToLoad');\n\t\t$this->assertEquals($expected, $result);\n\t}", "private function loadHelpers()\n {\n foreach($this->helpers as $helper)\n {\n require app_path() . '/' . $helper;\n }\n }", "protected function loadHelpers(): void\n {\n $files = glob(__DIR__ . '/../Helpers/*.php');\n foreach ($files as $file) {\n require_once($file);\n }\n }", "protected function setUp(): void\n {\n require_once('src/functions/common/functions_convert.php');\n require_once('src/functions/common/functions_blocks.php');\n }", "#[@test]\n public function before() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('.', true));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[0]);\n }", "protected function _Load_Helpers() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/helpers');\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_helper_init',$this);\r\n }", "protected function setUp(): void\n {\n require_once('src/functions/common/functions_blocks.php');\n require_once('src/functions/editor/functions_pages.php');\n }", "function testLoad()\n {\n $this->assertTrue(true);\n }", "protected function _before()\n {\n $dir = realpath(__DIR__ . '/../../../src/');\n\n Autoload::addNamespace('', $dir);\n require_once $dir . '/Pckg/Collection/Helper/functions.php';\n }", "private function load_dependencies() {\n //require_once( $this->inc . 'class-best-faq-admin.php' );\n require_once( $this->inc . 'best-faq-shortcode.php' );\n }", "protected function load_libraries_for_additional_tests() {\n global $CFG;\n\n require_once($CFG->dirroot.'/elis/program/lib/setup.php');\n require_once(elispm::lib('data/userset.class.php'));\n require_once(elispm::lib('data/user.class.php'));\n require_once(elispm::lib('data/usermoodle.class.php'));\n require_once(elispm::lib('data/userset.class.php'));\n }", "protected function _loadFramework()\n {\n include 'Exception.php';\n include 'Coverage.php';\n include 'Result.php';\n include 'Result/Error.php';\n include 'Result/Failure.php';\n include 'Result/Success.php';\n include 'TestCase.php';\n include 'Tracker.php';\n }", "public function testArbitraryLoad()\n {\n // initialize a module with a controller.\n P4Cms_Module::setCoreModulesPath(TEST_ASSETS_PATH . '/core-modules');\n P4Cms_Module::fetch('Core')->init();\n\n // if registered, de-register it.\n if ($this->_isRegistered()) {\n $this->_disableAutoloader();\n }\n\n $this->assertFalse(\n class_exists('Core_Some_Class'),\n \"Core_Some_Class class should not be registered\"\n );\n\n $this->_enableAutoloader();\n $this->assertTrue(\n class_exists('Core_Some_Class'),\n \"Core_Some_Class class should be registered\"\n );\n }", "public function setUp() {\n $this->libraryLoader= \\lang\\ClassLoader::registerLoader(new \\lang\\archive\\ArchiveClassLoader(new Archive(\\lang\\XPClass::forName(\\xp::nameOf(__CLASS__))\n ->getPackage()\n ->getPackage('lib')\n ->getResourceAsStream('three-and-four.xar')\n )));\n }", "public static function loadFixture()\n {\n //include __DIR__ .'/../_files/customer.php';\n include __DIR__ .'/../_files/order_fee_variation.php';\n\n }", "protected function _initTest(){\n }", "public function testLoad()\n {\n MockPlugin::load('Make');\n $this->assertEquals(['Make'], MockPlugin::loaded());\n $this->assertTrue(MockPlugin::loaded('Make'));\n $config = MockPlugin::getLoaded();\n $this->assertEquals(ROOT . DS . 'tests' . DS . 'TestApp' . DS . 'plugins' . DS . 'make', $config['Make']['path']);\n $this->assertEquals(ROOT . DS . 'tests' . DS . 'TestApp' . DS . 'plugins' . DS . 'make', Plugin::path('Make'));\n $this->assertTrue($config['Make']['routes']);\n $this->assertTrue($config['Make']['bootstrap']);\n \n // Test with no routes and bootstrap\n MockPlugin::load('Make', ['routes' => false,'bootstrap' => false]);\n $this->assertTrue(MockPlugin::loaded('Make'));\n $config = MockPlugin::getLoaded();\n $this->assertFalse($config['Make']['routes']);\n $this->assertFalse($config['Make']['bootstrap']);\n }", "function agnosia_initialize_helpers() {\r\n\r\n\tinclude_once agnosia_get_path( '/inc/utils/agnosia-helpers.php' );\r\n\r\n}", "#[@test]\n public function after_is_default() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('.'));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[sizeof($loaders)- 1]);\n }", "private function _addHelper()\n {\n require __DIR__.'/../Support/SsoHelper.php';\n }", "#[@test]\n public function before_via_inspect() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('!.', null));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[0]);\n }", "private function load_dependencies() {\n\t\t// Load the views file.\n\t\trequire_once( dirname( __FILE__ ) . '/views-user-profile.php' );\n\n\t}", "function test_import_base()\n\t{\n\t\t$testLib = 'joomla._testdata.loader-data';\n\t\t$this -> assertFalse(defined('JUNIT_DATA_JLOADER'), 'Test set up failure.');\n\t\t$r = JLoader::import($testLib, dirname(__FILE__));\n\t\tif ($this -> assertTrue($r)) {\n\t\t\t$this -> assertTrue(defined('JUNIT_DATA_JLOADER'));\n\t\t}\n\n\t\t// retry\n\t\t$r = JLoader::import($testLib, dirname(__FILE__));\n\t\t$this->assertTrue($r);\n\t}", "protected function setUp()\n {\n if ($this->obj instanceof PHP_CompatInfo_Reference) {\n $this->ref = $this->obj->getAll();\n }\n if (isset($this->ref['extensions'])) {\n foreach ($this->ref['extensions'] as $extname => $opt) {\n if (!extension_loaded($extname)) {\n $this->markTestSkipped(\n \"The '$extname' extension is not available.\"\n );\n }\n }\n }\n }", "private static function initialLoad() {\n include_once __DIR__ . '/Storange.php';\n Storange::getPathDir('wowframework/');\n include_once __DIR__ . '/exceptions/LoadFiles.php';\n }", "protected function setUp() {\r\n parent::setUp();\r\n\r\n $this->_utils = $this->getProvider()->get('PM\\Main\\Utils');\r\n }", "public static function setUpBeforeClass()\n {\n //include_once __DIR__.'/../../../../util.php';\n }", "public function testImport() {\n return true;\n }", "public function autoloadFilesAreBuildCorrectlyDataProvider() {}", "public function testClassLoad(): void\n {\n $this->assertInstanceOf(ChangeMailHelper::class, $this->changeMailHelper);\n }", "protected function setUp()\n {\n // finding a default module\n }", "protected function loadHelper()\n {\n foreach ($this->vendor_helpers_path as $vendor_helper) {\n LoaderSingleton::getInstance()->load_require_once($vendor_helper);\n }\n\n /**\n * @var HelperDefinition $helper\n */\n $helper = Container::getInstance()->get(HelperDefinition::class);\n $helpers = $helper->init();\n foreach ($helpers as $h) {\n if (is_string($h)) {\n LoaderSingleton::getInstance()->load_require_once($h);\n }\n }\n }", "public function __construct() {\n\t\tforeach(glob(CORE_BASE . 'helpers/*.php') as $file) {\n\t\t\trequire_once $file;\n\t\t}\n\t}", "public static function setUpBeforeClass() {\n\t\t$loader = new \\Mockery\\Loader();\n\t\t$loader->register();\n\t}", "public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function loadViewTesting()\n {\n $this->addBladeViewTesting(__DIR__ . '/views');\n $this->cleanViews();\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}" ]
[ "0.75384116", "0.7385384", "0.73222613", "0.7165096", "0.7098309", "0.7049964", "0.7049964", "0.7049964", "0.6972093", "0.69706184", "0.68683773", "0.6770976", "0.6752814", "0.67074716", "0.66594356", "0.66523826", "0.664614", "0.66202873", "0.65951055", "0.65697676", "0.6523928", "0.65113205", "0.65054756", "0.64913726", "0.6458518", "0.64308846", "0.64171326", "0.6409848", "0.63859355", "0.63748837", "0.63621145", "0.6359847", "0.63522553", "0.63479936", "0.6333435", "0.6330815", "0.6329998", "0.6323402", "0.6319116", "0.6307898", "0.63069206", "0.6267332", "0.62577176", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.624214", "0.6241", "0.6241", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374" ]
0.0
-1
test required helpers load correctly
public function testRequireJs() { if (!$this->_hasTrigger('requireJavascriptToLoad')) { return false; } $expected = $this->_manualCall('requireJavascriptToLoad', $this->ViewtEvent); $result = $this->Event->trigger($this->ViewObject, $this->plugin . '.requireJavascriptToLoad'); $this->assertEquals($expected, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadHelpers()\n {\n require_once __DIR__.'/helpers.php';\n }", "public function testTestHelpersLoaded()\n {\n $this->assertTrue(function_exists('runkit_function_rename'), \"Function runkit_function_rename is not defined. Please install PECL module runkit from https://github.com/zenovich/runkit.\");\n }", "public function loadHelpers(){\n $this->file->require('vendor/helpers.php');\n }", "public function testLoad() {\n $this->_loader->getSource('FilesystemTest.php');\n $this->_loader->getSource('FilesystemTest.php');\n\n $this->_loader->appendDir(dirname(__FILE__) . '/../Loader');\n $this->_loader->prependDir(dirname(__FILE__) . '/../Loader');\n }", "function _load_helpers()\r\n\t{\r\n\t\t// Load inflector helper for singular and plural functions\r\n\t\t$this->load->helper('inflector');\r\n\r\n\t\t// Load security helper for prepping functions\r\n\t\t$this->load->helper('security');\r\n\t}", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testRequireHelpers() {\n\t\tif (!$this->_hasTrigger('requireHelpersToLoad')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('requireHelpersToLoad', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.requireHelpersToLoad');\n\t\t$this->assertEquals($expected, $result);\n\t}", "private function loadHelpers()\n {\n foreach($this->helpers as $helper)\n {\n require app_path() . '/' . $helper;\n }\n }", "protected function loadHelpers(): void\n {\n $files = glob(__DIR__ . '/../Helpers/*.php');\n foreach ($files as $file) {\n require_once($file);\n }\n }", "protected function setUp(): void\n {\n require_once('src/functions/common/functions_convert.php');\n require_once('src/functions/common/functions_blocks.php');\n }", "#[@test]\n public function before() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('.', true));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[0]);\n }", "protected function _Load_Helpers() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/helpers');\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_helper_init',$this);\r\n }", "protected function setUp(): void\n {\n require_once('src/functions/common/functions_blocks.php');\n require_once('src/functions/editor/functions_pages.php');\n }", "function testLoad()\n {\n $this->assertTrue(true);\n }", "protected function _before()\n {\n $dir = realpath(__DIR__ . '/../../../src/');\n\n Autoload::addNamespace('', $dir);\n require_once $dir . '/Pckg/Collection/Helper/functions.php';\n }", "private function load_dependencies() {\n //require_once( $this->inc . 'class-best-faq-admin.php' );\n require_once( $this->inc . 'best-faq-shortcode.php' );\n }", "protected function load_libraries_for_additional_tests() {\n global $CFG;\n\n require_once($CFG->dirroot.'/elis/program/lib/setup.php');\n require_once(elispm::lib('data/userset.class.php'));\n require_once(elispm::lib('data/user.class.php'));\n require_once(elispm::lib('data/usermoodle.class.php'));\n require_once(elispm::lib('data/userset.class.php'));\n }", "protected function _loadFramework()\n {\n include 'Exception.php';\n include 'Coverage.php';\n include 'Result.php';\n include 'Result/Error.php';\n include 'Result/Failure.php';\n include 'Result/Success.php';\n include 'TestCase.php';\n include 'Tracker.php';\n }", "public function testArbitraryLoad()\n {\n // initialize a module with a controller.\n P4Cms_Module::setCoreModulesPath(TEST_ASSETS_PATH . '/core-modules');\n P4Cms_Module::fetch('Core')->init();\n\n // if registered, de-register it.\n if ($this->_isRegistered()) {\n $this->_disableAutoloader();\n }\n\n $this->assertFalse(\n class_exists('Core_Some_Class'),\n \"Core_Some_Class class should not be registered\"\n );\n\n $this->_enableAutoloader();\n $this->assertTrue(\n class_exists('Core_Some_Class'),\n \"Core_Some_Class class should be registered\"\n );\n }", "public function setUp() {\n $this->libraryLoader= \\lang\\ClassLoader::registerLoader(new \\lang\\archive\\ArchiveClassLoader(new Archive(\\lang\\XPClass::forName(\\xp::nameOf(__CLASS__))\n ->getPackage()\n ->getPackage('lib')\n ->getResourceAsStream('three-and-four.xar')\n )));\n }", "public static function loadFixture()\n {\n //include __DIR__ .'/../_files/customer.php';\n include __DIR__ .'/../_files/order_fee_variation.php';\n\n }", "protected function _initTest(){\n }", "public function testLoad()\n {\n MockPlugin::load('Make');\n $this->assertEquals(['Make'], MockPlugin::loaded());\n $this->assertTrue(MockPlugin::loaded('Make'));\n $config = MockPlugin::getLoaded();\n $this->assertEquals(ROOT . DS . 'tests' . DS . 'TestApp' . DS . 'plugins' . DS . 'make', $config['Make']['path']);\n $this->assertEquals(ROOT . DS . 'tests' . DS . 'TestApp' . DS . 'plugins' . DS . 'make', Plugin::path('Make'));\n $this->assertTrue($config['Make']['routes']);\n $this->assertTrue($config['Make']['bootstrap']);\n \n // Test with no routes and bootstrap\n MockPlugin::load('Make', ['routes' => false,'bootstrap' => false]);\n $this->assertTrue(MockPlugin::loaded('Make'));\n $config = MockPlugin::getLoaded();\n $this->assertFalse($config['Make']['routes']);\n $this->assertFalse($config['Make']['bootstrap']);\n }", "function agnosia_initialize_helpers() {\r\n\r\n\tinclude_once agnosia_get_path( '/inc/utils/agnosia-helpers.php' );\r\n\r\n}", "#[@test]\n public function after_is_default() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('.'));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[sizeof($loaders)- 1]);\n }", "private function _addHelper()\n {\n require __DIR__.'/../Support/SsoHelper.php';\n }", "#[@test]\n public function before_via_inspect() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('!.', null));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[0]);\n }", "private function load_dependencies() {\n\t\t// Load the views file.\n\t\trequire_once( dirname( __FILE__ ) . '/views-user-profile.php' );\n\n\t}", "function test_import_base()\n\t{\n\t\t$testLib = 'joomla._testdata.loader-data';\n\t\t$this -> assertFalse(defined('JUNIT_DATA_JLOADER'), 'Test set up failure.');\n\t\t$r = JLoader::import($testLib, dirname(__FILE__));\n\t\tif ($this -> assertTrue($r)) {\n\t\t\t$this -> assertTrue(defined('JUNIT_DATA_JLOADER'));\n\t\t}\n\n\t\t// retry\n\t\t$r = JLoader::import($testLib, dirname(__FILE__));\n\t\t$this->assertTrue($r);\n\t}", "protected function setUp()\n {\n if ($this->obj instanceof PHP_CompatInfo_Reference) {\n $this->ref = $this->obj->getAll();\n }\n if (isset($this->ref['extensions'])) {\n foreach ($this->ref['extensions'] as $extname => $opt) {\n if (!extension_loaded($extname)) {\n $this->markTestSkipped(\n \"The '$extname' extension is not available.\"\n );\n }\n }\n }\n }", "private static function initialLoad() {\n include_once __DIR__ . '/Storange.php';\n Storange::getPathDir('wowframework/');\n include_once __DIR__ . '/exceptions/LoadFiles.php';\n }", "protected function setUp() {\r\n parent::setUp();\r\n\r\n $this->_utils = $this->getProvider()->get('PM\\Main\\Utils');\r\n }", "public static function setUpBeforeClass()\n {\n //include_once __DIR__.'/../../../../util.php';\n }", "public function testImport() {\n return true;\n }", "public function autoloadFilesAreBuildCorrectlyDataProvider() {}", "public function testClassLoad(): void\n {\n $this->assertInstanceOf(ChangeMailHelper::class, $this->changeMailHelper);\n }", "protected function setUp()\n {\n // finding a default module\n }", "protected function loadHelper()\n {\n foreach ($this->vendor_helpers_path as $vendor_helper) {\n LoaderSingleton::getInstance()->load_require_once($vendor_helper);\n }\n\n /**\n * @var HelperDefinition $helper\n */\n $helper = Container::getInstance()->get(HelperDefinition::class);\n $helpers = $helper->init();\n foreach ($helpers as $h) {\n if (is_string($h)) {\n LoaderSingleton::getInstance()->load_require_once($h);\n }\n }\n }", "public function __construct() {\n\t\tforeach(glob(CORE_BASE . 'helpers/*.php') as $file) {\n\t\t\trequire_once $file;\n\t\t}\n\t}", "public static function setUpBeforeClass() {\n\t\t$loader = new \\Mockery\\Loader();\n\t\t$loader->register();\n\t}", "public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function loadViewTesting()\n {\n $this->addBladeViewTesting(__DIR__ . '/views');\n $this->cleanViews();\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}" ]
[ "0.75384116", "0.7385384", "0.73222613", "0.7165096", "0.7098309", "0.7049964", "0.7049964", "0.7049964", "0.6972093", "0.69706184", "0.68683773", "0.6770976", "0.6752814", "0.67074716", "0.66594356", "0.66523826", "0.664614", "0.66202873", "0.65951055", "0.65697676", "0.6523928", "0.65113205", "0.65054756", "0.64913726", "0.6458518", "0.64308846", "0.64171326", "0.6409848", "0.63859355", "0.63748837", "0.63621145", "0.6359847", "0.63522553", "0.63479936", "0.6333435", "0.6330815", "0.6329998", "0.6323402", "0.6319116", "0.6307898", "0.63069206", "0.6267332", "0.62577176", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.624214", "0.6241", "0.6241", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374" ]
0.0
-1
test required helpers load correctly
public function testUserProfile() { if (!$this->_hasTrigger('userProfile')) { return false; } $expected = $this->_manualCall('userProfile', $this->ViewtEvent); $result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile'); $this->assertEquals($expected, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadHelpers()\n {\n require_once __DIR__.'/helpers.php';\n }", "public function testTestHelpersLoaded()\n {\n $this->assertTrue(function_exists('runkit_function_rename'), \"Function runkit_function_rename is not defined. Please install PECL module runkit from https://github.com/zenovich/runkit.\");\n }", "public function loadHelpers(){\n $this->file->require('vendor/helpers.php');\n }", "public function testLoad() {\n $this->_loader->getSource('FilesystemTest.php');\n $this->_loader->getSource('FilesystemTest.php');\n\n $this->_loader->appendDir(dirname(__FILE__) . '/../Loader');\n $this->_loader->prependDir(dirname(__FILE__) . '/../Loader');\n }", "function _load_helpers()\r\n\t{\r\n\t\t// Load inflector helper for singular and plural functions\r\n\t\t$this->load->helper('inflector');\r\n\r\n\t\t// Load security helper for prepping functions\r\n\t\t$this->load->helper('security');\r\n\t}", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testRequireHelpers() {\n\t\tif (!$this->_hasTrigger('requireHelpersToLoad')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('requireHelpersToLoad', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.requireHelpersToLoad');\n\t\t$this->assertEquals($expected, $result);\n\t}", "private function loadHelpers()\n {\n foreach($this->helpers as $helper)\n {\n require app_path() . '/' . $helper;\n }\n }", "protected function loadHelpers(): void\n {\n $files = glob(__DIR__ . '/../Helpers/*.php');\n foreach ($files as $file) {\n require_once($file);\n }\n }", "protected function setUp(): void\n {\n require_once('src/functions/common/functions_convert.php');\n require_once('src/functions/common/functions_blocks.php');\n }", "#[@test]\n public function before() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('.', true));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[0]);\n }", "protected function _Load_Helpers() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/helpers');\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_helper_init',$this);\r\n }", "protected function setUp(): void\n {\n require_once('src/functions/common/functions_blocks.php');\n require_once('src/functions/editor/functions_pages.php');\n }", "function testLoad()\n {\n $this->assertTrue(true);\n }", "protected function _before()\n {\n $dir = realpath(__DIR__ . '/../../../src/');\n\n Autoload::addNamespace('', $dir);\n require_once $dir . '/Pckg/Collection/Helper/functions.php';\n }", "private function load_dependencies() {\n //require_once( $this->inc . 'class-best-faq-admin.php' );\n require_once( $this->inc . 'best-faq-shortcode.php' );\n }", "protected function load_libraries_for_additional_tests() {\n global $CFG;\n\n require_once($CFG->dirroot.'/elis/program/lib/setup.php');\n require_once(elispm::lib('data/userset.class.php'));\n require_once(elispm::lib('data/user.class.php'));\n require_once(elispm::lib('data/usermoodle.class.php'));\n require_once(elispm::lib('data/userset.class.php'));\n }", "protected function _loadFramework()\n {\n include 'Exception.php';\n include 'Coverage.php';\n include 'Result.php';\n include 'Result/Error.php';\n include 'Result/Failure.php';\n include 'Result/Success.php';\n include 'TestCase.php';\n include 'Tracker.php';\n }", "public function testArbitraryLoad()\n {\n // initialize a module with a controller.\n P4Cms_Module::setCoreModulesPath(TEST_ASSETS_PATH . '/core-modules');\n P4Cms_Module::fetch('Core')->init();\n\n // if registered, de-register it.\n if ($this->_isRegistered()) {\n $this->_disableAutoloader();\n }\n\n $this->assertFalse(\n class_exists('Core_Some_Class'),\n \"Core_Some_Class class should not be registered\"\n );\n\n $this->_enableAutoloader();\n $this->assertTrue(\n class_exists('Core_Some_Class'),\n \"Core_Some_Class class should be registered\"\n );\n }", "public function setUp() {\n $this->libraryLoader= \\lang\\ClassLoader::registerLoader(new \\lang\\archive\\ArchiveClassLoader(new Archive(\\lang\\XPClass::forName(\\xp::nameOf(__CLASS__))\n ->getPackage()\n ->getPackage('lib')\n ->getResourceAsStream('three-and-four.xar')\n )));\n }", "public static function loadFixture()\n {\n //include __DIR__ .'/../_files/customer.php';\n include __DIR__ .'/../_files/order_fee_variation.php';\n\n }", "protected function _initTest(){\n }", "public function testLoad()\n {\n MockPlugin::load('Make');\n $this->assertEquals(['Make'], MockPlugin::loaded());\n $this->assertTrue(MockPlugin::loaded('Make'));\n $config = MockPlugin::getLoaded();\n $this->assertEquals(ROOT . DS . 'tests' . DS . 'TestApp' . DS . 'plugins' . DS . 'make', $config['Make']['path']);\n $this->assertEquals(ROOT . DS . 'tests' . DS . 'TestApp' . DS . 'plugins' . DS . 'make', Plugin::path('Make'));\n $this->assertTrue($config['Make']['routes']);\n $this->assertTrue($config['Make']['bootstrap']);\n \n // Test with no routes and bootstrap\n MockPlugin::load('Make', ['routes' => false,'bootstrap' => false]);\n $this->assertTrue(MockPlugin::loaded('Make'));\n $config = MockPlugin::getLoaded();\n $this->assertFalse($config['Make']['routes']);\n $this->assertFalse($config['Make']['bootstrap']);\n }", "function agnosia_initialize_helpers() {\r\n\r\n\tinclude_once agnosia_get_path( '/inc/utils/agnosia-helpers.php' );\r\n\r\n}", "#[@test]\n public function after_is_default() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('.'));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[sizeof($loaders)- 1]);\n }", "private function _addHelper()\n {\n require __DIR__.'/../Support/SsoHelper.php';\n }", "#[@test]\n public function before_via_inspect() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('!.', null));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[0]);\n }", "private function load_dependencies() {\n\t\t// Load the views file.\n\t\trequire_once( dirname( __FILE__ ) . '/views-user-profile.php' );\n\n\t}", "function test_import_base()\n\t{\n\t\t$testLib = 'joomla._testdata.loader-data';\n\t\t$this -> assertFalse(defined('JUNIT_DATA_JLOADER'), 'Test set up failure.');\n\t\t$r = JLoader::import($testLib, dirname(__FILE__));\n\t\tif ($this -> assertTrue($r)) {\n\t\t\t$this -> assertTrue(defined('JUNIT_DATA_JLOADER'));\n\t\t}\n\n\t\t// retry\n\t\t$r = JLoader::import($testLib, dirname(__FILE__));\n\t\t$this->assertTrue($r);\n\t}", "protected function setUp()\n {\n if ($this->obj instanceof PHP_CompatInfo_Reference) {\n $this->ref = $this->obj->getAll();\n }\n if (isset($this->ref['extensions'])) {\n foreach ($this->ref['extensions'] as $extname => $opt) {\n if (!extension_loaded($extname)) {\n $this->markTestSkipped(\n \"The '$extname' extension is not available.\"\n );\n }\n }\n }\n }", "private static function initialLoad() {\n include_once __DIR__ . '/Storange.php';\n Storange::getPathDir('wowframework/');\n include_once __DIR__ . '/exceptions/LoadFiles.php';\n }", "protected function setUp() {\r\n parent::setUp();\r\n\r\n $this->_utils = $this->getProvider()->get('PM\\Main\\Utils');\r\n }", "public static function setUpBeforeClass()\n {\n //include_once __DIR__.'/../../../../util.php';\n }", "public function testImport() {\n return true;\n }", "public function autoloadFilesAreBuildCorrectlyDataProvider() {}", "public function testClassLoad(): void\n {\n $this->assertInstanceOf(ChangeMailHelper::class, $this->changeMailHelper);\n }", "protected function setUp()\n {\n // finding a default module\n }", "protected function loadHelper()\n {\n foreach ($this->vendor_helpers_path as $vendor_helper) {\n LoaderSingleton::getInstance()->load_require_once($vendor_helper);\n }\n\n /**\n * @var HelperDefinition $helper\n */\n $helper = Container::getInstance()->get(HelperDefinition::class);\n $helpers = $helper->init();\n foreach ($helpers as $h) {\n if (is_string($h)) {\n LoaderSingleton::getInstance()->load_require_once($h);\n }\n }\n }", "public function __construct() {\n\t\tforeach(glob(CORE_BASE . 'helpers/*.php') as $file) {\n\t\t\trequire_once $file;\n\t\t}\n\t}", "public static function setUpBeforeClass() {\n\t\t$loader = new \\Mockery\\Loader();\n\t\t$loader->register();\n\t}", "public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function loadViewTesting()\n {\n $this->addBladeViewTesting(__DIR__ . '/views');\n $this->cleanViews();\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}" ]
[ "0.75384116", "0.7385384", "0.73222613", "0.7165096", "0.7098309", "0.7049964", "0.7049964", "0.7049964", "0.6972093", "0.69706184", "0.68683773", "0.6770976", "0.6752814", "0.67074716", "0.66594356", "0.66523826", "0.664614", "0.66202873", "0.65951055", "0.65697676", "0.6523928", "0.65113205", "0.65054756", "0.64913726", "0.6458518", "0.64308846", "0.64171326", "0.6409848", "0.63859355", "0.63748837", "0.63621145", "0.6359847", "0.63522553", "0.63479936", "0.6333435", "0.6330815", "0.6329998", "0.6323402", "0.6319116", "0.6307898", "0.63069206", "0.6267332", "0.62577176", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.62425005", "0.624214", "0.6241", "0.6241", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374", "0.62402374" ]
0.0
-1
this can then be wrapped around the input field info to secure them (username and password)
function check_input($data){ if(isset($data)){ $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); $data = strip_tags($data); $data = htmlentities($data); return $data; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __sanitise() { $this->username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_SPECIAL_CHARS);\n $this->password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n $hashed_password = password_hash($password, PASSWORD_BCRYPT);\n $this->email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_SPECIAL_CHARS);\n $this->usertype = filter_input(INPUT_POST, 'lib_code', FILTER_SANITIZE_SPECIAL_CHARS);\n }", "private static function sanitize(){\n $_SERVER[\"PHP_AUTH_USER\"] = filter_var(filter_var($_SERVER[\"PHP_AUTH_USER\"], FILTER_SANITIZE_EMAIL), FILTER_VALIDATE_EMAIL);\n\n\t\tif (!$_SERVER[\"PHP_AUTH_USER\"]){\n\t\t\t// if email validation has failed\n\t\t\tthrow new UsernameNotAValidEmailAddress (\"Submitted UserName is not a valid email address\");\n\t\t}\n\n // sanitise POST data UserName\n Connection::$input['UserName'] = $_SERVER[\"PHP_AUTH_USER\"]; // This should never be sent in the post variables, instead, username should be sent in the header.\n Connection::$input['Password'] = $_SERVER[\"PHP_AUTH_PW\"]; // This also prevents UserName being updated.\n // A new password may be (in the future) sent via POST, but for now, this should not be updatable through this method.\n\n }", "function FilterData()\n\t{\n\t\t// Username and password should be trimmed, because we trim it on authentication\n\t\t$this->username = trim($this->username);\n\t\t$this->password = trim($this->password);\n\t}", "function __construct()\n {\n // consistent behavior on the user's side regarding special characters\n $this->username = filter_input(\n INPUT_POST,\n \"username\",\n FILTER_SANITIZE_STRING\n );\n $this->password = filter_input(\n INPUT_POST,\n \"password\",\n FILTER_SANITIZE_STRING\n );\n }", "private static function was_username_provided($input)\n {\n }", "function setup_login_data(){\n $loginData['loginUsersname'] = sanitize_input($_POST['loginUsersname']);\n $loginData['loginPassword'] = sanitize_password($_POST['loginPassword']);\n return $loginData;\n}", "private function validateUserInput() {\n\t\ttry {\n\t\t\t$this->clientUserName = $this->loginObserver->getClientUserName();\n\t\t\t$this->clientPassword = $this->loginObserver->getClientPassword();\n\t\t\t$this->loginModel->validateForm($this->clientUserName, $this->clientPassword);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->message = $e->getMessage();\n\t\t}\n\t}", "abstract protected function auth();", "public function authenticationWithValidAlphaCharClassPassword() {}", "public function authenticationWithValidAlphaCharClassPassword() {}", "public function authenticationWithValidAlphaCharClassPassword() {}", "function secure_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n // tbd mysql_real_escape_string\r\n return $data;\r\n}", "function secure_input($input) {\n\t\t\t$input = trim($input);\n\t\t\t$input = htmlspecialchars($input);\n\t\t\treturn $input;\n\t\t}", "abstract public function credentials();", "public function authenticationWithValidAsciiSpecialCharClassPassword() {}", "public function authenticationWithValidAsciiSpecialCharClassPassword() {}", "public function authenticationWithValidAsciiSpecialCharClassPassword() {}", "function readInputData() {\n $this->readUserVars(array('dvnUri', 'username', 'password'));\n $request =& PKPApplication::getRequest();\n $password = $request->getUserVar('password');\n if ($password === DATAVERSE_PLUGIN_PASSWORD_SLUG) {\n $plugin =& $this->_plugin;\n $password = $plugin->getSetting($this->_journalId, 'password');\n }\n $this->setData('password', $password);\n }", "function read(){\n\t\t\t\t\tif(isset($_POST['username']) && isset($_POST['password']) ){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t$this->_username = $_POST['username'];\n\t\t\t\t\t\t\t\t$this->_password = $_POST['password'];\n\t\t\t\t\t\t\t\t$this->_flag=true;\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}catch(Exception $e){\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}//if\n\t\t\t\t}", "function __construct() {\r\n $this->setPasscode(filter_input(INPUT_POST, 'passcode'));\r\n }", "function readInputData() {\n\t\t$this->readUserVars(array('username', 'oldPassword', 'password', 'password2', 'confirmHash'));\n\t}", "function sanitizePassword() {\n // If there is a password confirmation we put it to the checker, too\n $passCheckerInput = (strlen($this->passwordConf) > 0) ?\n array($this->password, $this->passwordConf) : $this->password;\n $passwordChecker = new PasswordChecker($passCheckerInput);\n if ($passwordChecker->getRelevance()) {\n $this->password = htmlspecialchars($this->password);\n } else {\n die(\"Error. Check your form data\");\n }\n }", "function __construct() {\n\t\tif ( !parent::getOption('profile-public-enable') )\n\t\t\tprotect('*');\n\n\t\t/* If the admin requires users to update their password. */\n\t\tif(!empty($_SESSION['pickme']['forcePwUpdate']))\n\t\t\t$msg = \"<div class='alert alert-warning'>\" . _('<strong>Alert</strong>: The administrator has requested all users to update their passwords.') . \"</div>\";\n\n\t\t// Save the username\n\t\t$this->username = !empty($_SESSION['pickme']['username']) ? $_SESSION['pickme']['username'] : _('Guest');\n\n\t\t/* Check if the user is a guest to this profile. */\n\t\t$this->determineGuest();\n\n\t\tif (!$this->guest && !empty($_POST)) :\n\t\t\t$this->retrieveFields();\n//echo '<pre>';print_r($_POST);echo '</pre>';\n\t\t\tforeach ($_POST as $field => $value)\n\t\t\t\t$this->settings[$field] = parent::secure($value);\n \n\t\t\t// Validate fields\n\t\t\t$this->validate();\n\n\t\t\t// Process form\n\t\t\tif(empty($this->error)) $this->process();\n\n\t\tendif;\n\n\t\t$this->retrieveFields();\n\n\t\tif(!$this->guest && isset($_GET['key']) && strlen($_GET['key']) == 32) {\n\t\t\t$this->key = parent::secure($_GET['key']);\n\t\t\t$this->updateEmailorPw();\n\t\t\t$this->retrieveFields();\n\t\t}\n\n\t\tif ( !empty ( $this->error ) || !empty ( $msg ) )\n\t\t\tparent::displayMessage( !empty($this->error) ? $this->error : (!empty($msg) ? $msg : ''), false);\n\n\t}", "abstract public function login(array $input);", "function wp_validate_application_password($input_user)\n {\n }", "public function sanitize_input_fields()\n {\n }", "function authenticate() {}", "function validate_login ($username, $password) {\n //\n // Clean whitespaces which may have been inputted with the username,\n // but not with the password.\n $data_to_clean = array(\n 'username' => $username\n );\n $cleaned_data = clean_data($data_to_clean);\n\n // Then, append the inputted password to the filtered data\n $cleaned_data['password'] = $password;\n $errors = validate_empty_fields($cleaned_data);\n\n // If no field provided is empty, proceed to validate username and password\n if (count($errors) == 0) {\n $validated_login = get_and_validate_user_details(\n $cleaned_data['username'],\n $cleaned_data['password']\n );\n } else {\n $validated_login = array('errors' => $errors);\n };\n return $validated_login;\n}", "private function _initUser()\n {\n $this->username = Request::varchar('f_username', true);\n $this->password = Request::varchar('f_password');\n $this->name = Request::varchar('f_name', true);\n $this->email = Request::email();\n }", "abstract protected function authenticate($username, $password);", "function loginHandler($inputs = []) {\n $username = $inputs['username'];\n $password = $inputs['password'];\n $sql = 'SELECT * FROM `admin` WHERE `name` = ? AND password = ?';\n $res = getOne($sql, [$username, $password]);\n if (!$res) {\n formatOutput(false, 'username or password error');\n }\n else{\n $buildingRes = getOne(\"SELECT * FROM `admin_building` WHERE admin_id =?\", [$res['id']]);\n $bid = isset($buildingRes['building_id']) ? $buildingRes['building_id'] : '0';\n setLogin($res['id'],$bid);\n formatOutput(true, 'login success', $res);\n }\n}", "function secure_input($data) {\n // strip unnecessary chars (extra space, tab, newline, etc)\n $data = trim($data);\n // remove backslashes (\\)\n $data = stripslashes($data);\n // save as HTML escaped code --> any scripts in input data will not run\n $data = htmlspecialchars($data);\n return $data;\n}", "function secure($input)\n {\n\n $input = trim($input);\n $input = htmlentities($input);\n return $input;\n }", "public function olvidoPassword(){\n\t}", "function test_authourization_fun( $vars ){\r\n\r\n if (isset($_GET['user']) && $_GET['user']){\r\n $_SERVER[\"PHP_AUTH_USER\"] = $_GET['user'];\r\n }else{\r\n $_SERVER[\"PHP_AUTH_USER\"] = 'NOUSER';\r\n }\r\n if (isset($_GET['pw']) && $_GET['pw']){\r\n $_SERVER[\"PHP_AUTH_PW\"] = $_GET['pw'];\r\n }else{\r\n $_SERVER[\"PHP_AUTH_PW\"] = 'ERRORPASSWORD';\r\n }\r\n}", "private function setUserPass(){\n if($this->_request->get(login_user)){\n $this->_user = $this->_request->get(login_user);\n }else{\n $this->_user = $this->getCookie();\n }\n $this->_pass = $this->_request->get('login-password');\n }", "function secure_input($data) {\n $data = trim($data);\n // remove backslashes (\\)\n $data = stripslashes($data);\n // save as HTML escaped code --> any scripts in input data will not run\n $data = htmlspecialchars($data);\n return $data;\n }", "function secureInput($string)\n {\n\n // define all the global variables\n global $database;\n\n return $database->secureInput($string);\n }", "function validate_login(array $safe_input, array &$field): bool\n{\n if (isset($safe_input['email'])) {\n if (!App\\App::$db->getRowsWhere('users', ['email' => $safe_input['email'], 'password' => $safe_input['password']])) {\n $field['error'] = 'Wrong login credentials';\n\n return false;\n }\n }\n\n return true;\n}", "function login_obscure()\n {\n return '<strong>Whoops</strong>: Your username or password are incorrect, please try again.';\n }", "function memberLoginHandler() {\n global $inputs;\n\n $username = $inputs['username'];\n $password = $inputs['password'];\n $sql = 'select * from `member` where name = ? and password = ?';\n $res = getOne($sql, [$username, $password]);\n\n if (!$res) {\n formatOutput(false, 'username or password error');\n } else {\n setMemberLogin($res['id']);\n formatOutput(true, 'login success', $res);\n }\n}", "public function necesitaCambiarPassword();", "function sanitizeFormPassword($inputText){ //green coloer = function name, Orange = parameter with variable\n\t$inputText = strip_tags($inputText);\t\n\treturn $inputText;\n}", "function external_db_show_password_fields()\n{\n return 0;\n}", "abstract protected function doLogin();", "public function authenticate();", "public function authenticate();", "public function authenticate();", "public function security($input)\r\n\t{\r\n\t\thtmlspecialchars($input);\r\n\t\tstripslashes($input);\r\n\r\n\t\treturn $input;\r\n\t}", "function get_info() {\n\n\n\n echo $this->username;\n echo $this->password;\n\n\n if ( ! $this->username || ! $this->password) {\n // CODE TO RELOAD SIGN-IN PAGE WITH 'ERROR' MESSAGE\n }\n\n else {\n echo $this->username;\n echo $this->password;\n\n $this->setup_page();\n\n // $this->connect_to_database();\n }\n }", "public function password($username)\n {\n }", "function security($input)\n{\n $input = mysql_real_escape_string($input);\n $input = strip_tags($input);\n $input = stripslashes($input);\n return $input;\n}", "public function setValue() {\n if (isset($_POST['email'], $_POST['password'])) {\n $this->email = $this->mysqli->real_escape_string($_POST['email']);\n $this->password = md5($this->mysqli->real_escape_string($_POST['password']));\n }\n }", "public function passwd() {\n\n $pass = $_POST['password'];\n\n $p = $this->inputmanager;\n\n return $p->passwdchk($pass);\n\n }", "public function getPassword() {}", "public function getSecuredPassword();", "protected function lookupUsername() {\n\t\tif (!isset($_POST['username'])) {\n\t\t\techo \"<p class=\\\"error\\\">Missing username</p>\\n\";\n\t\t\texit;\n\t\t}\n\t\t$this->username = $_POST['username'];\n\t}", "abstract protected function is_valid($username, $password);", "function sanitize_password(string $text = '')\n{\n return filter_var($text, FILTER_SANITIZE_STRING);\n}", "protected function getExplicitAuthFieldValues() {}", "public function loginForm(){\n self::$loginEmail = $_POST['login-email'];\n self::$loginPassword = $_POST['login-password'];\n \n self::sanitize();\n $this->tryLogIn();\n }", "public function authenticate() {}", "function login($username, $data) {\n if ($username != 'admin' || $data != 'secret') {\n return false;\n }\n return parent::login($username, $data);\n }", "abstract public function authenticate($user, $pass);", "public function authenticationWithValidNumericCharClassPassword() {}", "public function authenticationWithValidNumericCharClassPassword() {}", "public function authenticationWithValidNumericCharClassPassword() {}", "public function isPasswordField() {}", "public function authenticate($input)\r\n\t{\r\n\t\tif(isset($input['ce_key'])) $this->set_baseDn($input['ce_key']);\n\t\t\r\n\t\tif(!is_array($input))\r\n\t\t{\t\t\t\n\t\t\treturn $this->invalidCredentials('Invalid input. Please set uid or mail and userPassword');\r\n\t\t}\n\t\t\n\t\tif(empty($input['uid']) && empty($input['mail']))\r\n\t\t{\r\n\t\t\treturn $this->invalidCredentials('Your input should contain one of these attributes: uid or mail');\r\n\t\t}\r\n\n\t\tif(empty($input['userPassword']))\r\n\t\t{\r\n\t\t\treturn $this->invalidCredentials('Your input should contain the userPassword attribute');\r\n\t\t}\n\t\t\n\t\t//be sure that input is well formed and doesn't contain unnecessary fields\n\t\t$tmp = array();\n\t\tif(isset($input['uid'])) $tmp['uid'] = trim($input['uid']);\n\t\tif(isset($input['mail'])) $tmp['mail'] = trim($input['mail']);\n\t\t$tmp['userPassword'] = trim($input['userPassword']);\n\t\t$input = $tmp;\n\t\tunset($tmp);\n\t\t\n\t\tif(!empty($input['mail'])) {\r\n\t\t\t//look for a person using the mail attribute\r\n\t\t\t$search = array();\r\n\t\t\t$search['filter'] = '(mail='.strtolower($input['mail']).')';\n\t\t}\n\t\t\n\t\tif(!empty($input['uid'])) {\r\n\t\t\t//look for a person using the mail attribute\r\n\t\t\t$search = array();\r\n\t\t\t$search['filter'] = '(uid='.strtolower($input['uid']).')';\r\n\t\t}\n\t\t\r\n\t\t$result = $this->read($search);\r\n\t\t\t\r\n\t\tif(count($result['data']) > 1) {\r\n\t\t\t$this->result = new Ce_Return_Object();\r\n\t\t\t$this->result->data = array();\r\n\t\t\t$this->result->status_code = '500';\r\n\t\t\t$this->result->message = 'Internal Server Error';\r\n\t\t\t\t\r\n\t\t\treturn $this->result->returnAsArray();\r\n\t\t}\r\n\t\t\t\r\n\t\tif(count($result['data']) == 0) return $this->invalidCredentials();\n\t\t\t\t\n\t\t$person = $result['data']['0'];\n\t\t$stored_password = $person['userPassword'][0];\n\t\t\n\t\t$authenticated = false;\n\t\t\n\t\t//case 1: password is stored in LDAP not encrypted\n\t\t$given_password = $input['userPassword'];\n\t\tif($given_password == $stored_password) $authenticated = true;\n\n\t\t//case 2: password is stored in LDAP with MD5 encryption\t\t\n\t\t$given_password = '{MD5}'.base64_encode(pack(\"H*\",md5($input['userPassword'])));\n\t\tif($given_password == $stored_password) $authenticated = true; \n\n\t\t//case 3: password is stored in LDAP with SHA encryption\t\t\n\t\t$given_password = '{SHA}'.base64_encode(pack(\"H*\",sha1($input['userPassword'])));\r\n\t\tif($given_password == $stored_password) $authenticated = true;\r\n\n\t\t//case 3: password is stored in LDAP with CRYPT encryption\n\t\t//TODO http://php.net/manual/en/function.crypt.php\n\t\t\t\t\n\t\tif(!$authenticated) $this->invalidCredentials();\n\t\t\n\t\t$result = $this->result->returnAsArray();\n\t\t\n\t\t//TODO should I give back all contact's attributes or only part of them?\r\n\t\treturn $result;\t\t\r\n\t}", "private function pre_defined_password(): string\r\n {\r\n $regx = \"/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[#$@!%&*?])[A-Za-z\\d#$@!%&*?]{6,30}$/\";\r\n if (!preg_match($regx, $this->field)) {\r\n return $this->message(\"must 1 uppercase, lowercase, number & special char\");\r\n }\r\n }", "function doPasskeyLoginValidate(){\n\t\t\n\t\tif(@$this->identification == \"\" | @$this->passkey == \"\"){\t\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"Your Username and Password are required to complete this task.\", \"\");\t\t\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t}else{\n\t\t\t\n\t\t\t$this->basics->doPasskeyLogin(@$this->sanitize($this->identification) , @$this->obsfucate->makePass($this->sanitize($this->passkey)), $this->obsfucate->makeKey($this->sanitize($this->identification)) );\n\t\t\t\n\t\t}\n\t\t\n\t}", "function sanitizeFormUsername($inputText)\n{\n\n //The strip_tags() function strips a string from HTML, XML, and PHP tags. Strips all html elements that may be on a string \n //this is a security measure. Users can alter the site if they can submit html elements in a form. \n $inputText = strip_tags($inputText);\n\n //finding every single space in the string and replacing it with no space. Needed if a user enters a username with a space. \n //takes eveything in the first parameter and replaces it with whatever is located in the second parameter\n $inputText = str_replace(\" \", \"\", $inputText);\n\n return $inputText;\n}", "private function login(){\n \n }", "public function userWantsToLogin(){\n\t\tif(isset($_POST[self::$login]) && trim($_POST[self::$password]) != '' && trim($_POST[self::$name]) != '') {\n\t\t\t$this->username = $_POST[self::$name];\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function authenticate(string $username, string $password);", "function user_pass_ok($user_login, $user_pass)\n {\n }", "public function doAuthentication();", "public function render_field_basic_authentication() {\n\t\t$value = $this->get_setting( 'enable_basic_authentication', 'no' );\n\t\t?>\n\t\t<p class=\"satispress-togglable-field\">\n\t\t\t<label>\n\t\t\t\t<input type=\"checkbox\" name=\"satispress[enable_basic_authentication]\" id=\"satispress-enable-basic-authentication\" value=\"yes\" <?php checked( $value, 'yes' ); ?>>\n\t\t\t\t<?php _e( 'Enable HTTP Basic Authentication?', 'satispress' ); ?>\n\t\t\t</label>\n\t\t</p>\n\t\t<?php\n\t\t$htaccess = new SatisPress_Htaccess( $this->base_path );\n\t\tif ( ! $htaccess->is_writable() ) {\n\t\t\tprintf( '<p class=\"satispress-field-error\">%s</p>', __( \".htaccess file isn't writable.\" ) );\n\t\t}\n\t}", "function the_post_password()\n {\n }", "function sanitize ($data, $type) {\n if($type == 1){\n for($i = 0; $i < count($data); $i++) {\n $data[$i] = (string)$data[$i]; //ensure is string$\n $data[$i] = preg_replace(\"/[^a-zA-Z0-9 .!\\/]*/\",\"\", $data[$i]); //remove any characters that are not a-z, A-Z, 0-9...\n $data[$i] = substr($data[$i], 0, 20);//restrict length to 20 characters\n $data[$i] = htmlentities($data[$i], ENT_QUOTES, 'utf-8');\n $data[$i] = filter_var($data[$i], FILTER_SANITIZE_STRING);\n }\n //username must be longer than 5 \n //password must be 8 characters or more\n\n if(strlen($data[0]) < 5 || strlen($data[1]) < 8) {\n return false;\n }\n else {\n return $data;\n }\n }\n}", "public function authenticate($username, $password);", "public function authenticate($username, $password);", "public function getUserInput() {\n\n $backWithSession = isset($_SESSION['isLoggedIn']);\n $this->setBackWithSession($backWithSession);\n $userIsLoggedIn = $this->gateKeeper->getIsLoggedIn();\n $wantsToLogout = isset($_REQUEST[self::$logout]);\n $hasUserCookieSet = isset($_COOKIE[self::$cookieName]);\n $wantsToLogin = isset($_REQUEST[self::$login]);\n $postedRegistrationForm = $_SERVER[\"REQUEST_METHOD\"] === \"POST\" && isset($_REQUEST[\"register\"]);\n $clickedRegistrationLink = isset($_REQUEST[\"register\"]) && $_REQUEST[\"register\"] === \"1\";\n\n if ($userIsLoggedIn || $backWithSession) {\n\n if ($wantsToLogout) {\n $this->setWantsToLogout(true);\n }\n\n if ($backWithSession && $hasUserCookieSet) {\n $this->setWantsToLogin(true);\n $this->setBackWithSession(true);\n $this->user = new User();\n $this->user->setSessionID($this->getRandomSessionCookie($_COOKIE[self::$cookieName]));\n $this->user->setUsername($_COOKIE[self::$cookieName]);\n\n }\n\n } else {\n\n if ($wantsToLogin) {\n $this->setWantsToLogin(true);\n $this->initializeLogin();\n\n } else if ($postedRegistrationForm) {\n $this->setWantsToRegister(true);\n $this->initializeRegistration();\n\n } else if ($clickedRegistrationLink) {\n $this->setWantsToRegister(true);\n $this->shouldBypassController = true;\n\n }\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 getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "function sanitize_user_field($field, $value, $user_id, $context)\n {\n }", "function adminUpdateUserPassword()\n {\n \t# retrieve username passed in from GET Superglobal\n \tif(isset($_GET['userName']))\n\t{\n\t\t$userName=filter_input(INPUT_GET,'userName',FILTER_SANITIZE_STRING);\n\t}\n\t\n\t# submit update and check if was success\n \t$success=updatePassWord($userName);\n\t\n\techo 'Successful='.$success;\n }", "public static function renderPassword();", "function Secure()\r\n\t{\r\n\t\tarray_walk($_GET, array($this, 'secureGET'));\r\n\t\tarray_walk($_POST, array($this, 'securePOST'));\r\n\t}", "public function processLogin(): void;", "function getPassword(){\n\n}", "function validateApiCredentials() { \n if( $this->options['api_type'] == \"\" || $this->options['api_path'] == \"\" ) {\n $this->error_handler( 'Repository url not valid' );\n } elseif($this->options['username'] == \"\") {\n $this->error_handler( 'Username Required' );\n } else if($this->options['password'] == \"\") {\n $this->error_handler( 'Password Required' );\n }\n }", "function auth($username, $password) {\n\n if ($password == 'password') { \n return true;\n }\n return false;\n\n}", "public function AuthenticateUser($name, $password);", "public function login()\n {\n //$this->username = $username; // we are gonnna use the above property: $username here\n //$this->password = $password;\n // we want to call authuser from within login so\n $this->auth_user(); // we don't need to pass any arguments here because we know the class properties above this line\n\n }" ]
[ "0.73902076", "0.6900606", "0.6689111", "0.64898163", "0.6436966", "0.63090485", "0.6281904", "0.62783754", "0.6273743", "0.6273743", "0.6273743", "0.62428176", "0.62361634", "0.6179607", "0.6154741", "0.6154741", "0.6154741", "0.6120398", "0.6097505", "0.6074039", "0.6072597", "0.60570705", "0.60540324", "0.6045156", "0.60389626", "0.6014549", "0.60120595", "0.60078937", "0.6006992", "0.600108", "0.5995257", "0.5985462", "0.5976249", "0.5968702", "0.59618306", "0.5945681", "0.5930102", "0.5927727", "0.5912794", "0.5900765", "0.5891093", "0.58858025", "0.58776593", "0.5868924", "0.58530676", "0.584213", "0.584213", "0.584213", "0.5812378", "0.5805871", "0.57960457", "0.5793025", "0.5785795", "0.5759705", "0.5757173", "0.5751366", "0.57431805", "0.57398796", "0.57384396", "0.57319677", "0.5728701", "0.5728189", "0.57274526", "0.57226735", "0.5721925", "0.5721925", "0.5721925", "0.571943", "0.57156855", "0.57137966", "0.5704769", "0.56970435", "0.5696605", "0.5687213", "0.56737214", "0.56712234", "0.5669507", "0.56582624", "0.5652376", "0.5649256", "0.56464237", "0.56464237", "0.5639161", "0.5639104", "0.56378764", "0.56378764", "0.56378764", "0.56378764", "0.56378764", "0.56378764", "0.56378764", "0.5636528", "0.56361514", "0.5631633", "0.5629759", "0.56288844", "0.5628538", "0.56268615", "0.5626047", "0.56217617", "0.56128" ]
0.0
-1
wrap this aound the email to secure it
function check_email($data){ if(isset($data)){ $sanitized = filter_var($data, FILTER_SANITIZE_EMAIL); if (filter_var($sanitized, FILTER_VALIDATE_EMAIL)){ $data = $sanitized; $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); $data = strip_tags($data); $data = htmlentities($data); return $data; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sw_velocityconveyor_safe_email( $atts, $content ) {\n\nreturn '<a href=\"mailto:' . antispambot( $content ) . '\">' . antispambot( $content ) . '</a>';\n}", "function _spool_email()\n\t{\n\t\t// ------------------------------------------------------\n\t\t// 'email_send' hook.\n\t\t// - Optionally modifies and overrides sending of email.\n\t\t//\n\t\tif (ee()->extensions->active_hook('email_send') === TRUE)\n\t\t{\n\t\t\t$ret = ee()->extensions->call(\n\t\t\t\t'email_send',\n\t\t\t\tarray(\n\t\t\t\t\t'headers'\t\t=> &$this->_headers,\n\t\t\t\t\t'header_str'\t=> &$this->_header_str,\n\t\t\t\t\t'recipients'\t=> &$this->_recipients,\n\t\t\t\t\t'cc_array'\t\t=> &$this->_cc_array,\n\t\t\t\t\t'bcc_array'\t\t=> &$this->_bcc_array,\n\t\t\t\t\t'subject'\t\t=> &$this->_subject,\n\t\t\t\t\t'finalbody'\t\t=> &$this->_finalbody\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif (ee()->extensions->end_script === TRUE)\n\t\t\t{\n\t\t\t\tee()->extensions->end_script = FALSE;\n\t\t\t\treturn $ret;\n\t\t\t}\n\t\t}\n\n\t\treturn parent::_spool_email();\n\t}", "function ofa_secure_mail($email, $text) {\n $mailto = antispambot('mailto:' . $email);\n $txt = antispambot($text);\n return '<a href=\"' . $mailto . '\">' . $txt . '</a>';\n}", "private function emailAtLogin() {}", "function smarty_resource_mailTemplate_secure($tpl_name, &$mailTemplate)\r\n{\r\n return true;\r\n}", "function smarty_resource_email_template_secure($tpl_name, &$smarty)\n{\n return true;\n}", "protected function _send_secret()\n {\n // Overwrite view\n $this->view = new View_Auth_In;\n\n if (Request::current()->method() === HTTP_request::POST)\n {\n $email = Request::current()->post('email');\n\n if ( ! Valid::email($email))\n {\n $this->views->errors['email'] = \"Email invalide\"; //Kohana::message('models/user', 'email.valid');\n return;\n }\n\n $auth_user = Model::factory('User')->where('email', '=', $email)->find();\n\n if ( ! $auth_user->loaded())\n {\n $this->view->errors['email'] = \"Email utilisateur inconnu\"; //Kohana::message('models/user', 'email.unregistered');\n return;\n }\n\n $secret = Text::random('numeric', 6);\n Session::instance()->set('secret_hash', Auth::instance()->hash($secret));\n $auth_user->send_email(array(\n 'secret' => $secret,\n 'email_user' => $auth_user->email,\n 'email_contact' => Kohana::$config->load('guidoline.emails.contact.email'),\n 'url_home' => URL::site(Route::get('default')->uri(), TRUE),\n ), 'signin');\n\n Session::instance()->set('email', $email);\n\n // Vue pour la saisie du secret\n $this->view = new View_Auth_In_Validate;\n\n }\n }", "abstract protected function _sendMail ( );", "function sendemail($email){\n\t\t$hash_email = encrypt_decrypt('encrypt', $email);\n\t\t$link = 'http://localhost/carpool/edit_info.php?id='.urlencode($hash_email);\n\t\t$mail = new PHPMailer;\n\t\t$mail->isSMTP(); // Set mailer to use SMTP\n\t\t$mail->Host = 'smtp.mail.yahoo.com'; // Specify main and backup SMTP servers\n\t\t$mail->Port = 465; \n\t\t$mail->SMTPAuth = true; // Enable SMTP authentication\n\t\t$mail->Username = 'xxx'; // SMTP username\n\t\t$mail->Password = 'xxx'; // SMTP password\n\t\t$mail->SMTPSecure = 'ssl'; // Enable encryption, 'ssl' also accepted\n\t\t$mail->isHTML(true);\n\n\t\t$mail->From = 'xxx';\n\t\t$mail->FromName = 'Carpool Services';\t\t\n\t\t$mail->addAddress($email); // Add a recipient\n\t\t$mail->Subject = 'Modify your info';\n\t\t$mail->Body = 'Thank you for using Carpool. Please use the link below to edit your information. <br />'.$link;\t\t\n\t\t$mail->SMTPDebug = 1;\n\t\tif(!$mail->send()) {\n\t\t\t\treturn false;\n\t\t} else {\n\t\t\t\treturn true;\n}\n\t}", "public static function smtp_inner () \n { \n $html = null;\n\n $top = __( 'SMTP Send : Message', 'default-message' );\n $inner = self::smtp_inner_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'smtp', $top, $inner, $bottom );\n\n return $html;\n }", "protected function composeEmailToUser()\n\t{\n\t\t$theURL = ( empty($this->myReentryURL) ?\n\t\t\t\t$this->composeReentryURL() : $this->myReentryURL ) ;\n\t\t$s = $this->model->getRes( 'account/email_body_pwd_reset_instr/'\n\t\t\t. $this->myEmailAddr . '/'\n\t\t\t. $this->getRandomCharsFromToken() )\n\t\t\t. '<a href=\"' . $theURL . '\">' . $theURL . '</a>'\n\t\t\t;\n\t\treturn $s ;\n\t}", "function sanitizeEmail() {\n $pattern = \"/^[A-Z0-9._%+\\-]+@[A-Z0-9.\\-]+\\.[A-Z]{2,}$/i\";\n if (preg_match($pattern, $this->email)) {\n $this->email = filter_var($this->email, FILTER_SANITIZE_EMAIL);\n } else {\n die(\"Error. Check your form data\");\n }\n }", "function set_email_to_html(){\n\treturn true;\n}", "function ofa_secure_mail_shortcode($atts) {\n extract(shortcode_atts(array(\"email\" => '', \"text\" => ''), $atts));\n return ofa_secure_mail($email, $text);\n}", "function smarty_resource_mailTemplate_trusted($tpl_name, &$mailTemplate)\r\n{\r\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 send_security_info($subject,$debug_message) {\n\tob_start();\n\techo \"<pre>\";\n\techo \"$debug_message<br>\";\n\techo \"user_ip: \".get_ip().\"<br>\";\n\techo \"user_hostname: \".gethostbyaddr($_SERVER['REMOTE_ADDR']).\"<br>\";\n\techo \"server: \".gethostname().\"<br><br>\";\n\techo \"<u>_POST</u><br>\".print_r($_POST,true).\"<br><br>\";\n\techo \"<u>_GET</u><br>\".print_r($_GET,true).\"<br><br>\";\n\techo \"<u>_REQUEST</u><br>\".print_r($_REQUEST,true).\"<br><br>\";\n\t//echo \"<u>_HTTP_REQUEST</u><br>\".print_r($_HTTP_REQUEST,true).\"<br><br>\";\n\techo \"<u>_SERVER</u><br>\".print_r($_SERVER,true).\"<br><br>\";\n\techo \"<u>_SESSION</u><br>\".print_r($_SESSION,true).\"<br><br>\";\n\techo \"<u>_FILES</u><br>\".print_r($_FILES,true).\"<br><br>\";\n\techo \"<u>apache_request_headers</u><br>\".print_r(apache_request_headers(),true).\"<br><br>\";\n\techo \"<u>getallheaders</u><br>\".print_r(getallheaders(),true).\"<br><br>\";\n\techo \"</pre>\";\n\t$debug_message=ob_get_contents();\t\t// Set mail content\n\tob_get_clean();\n\n\tsend_email('[email protected]','[email protected]','','',$subject,$debug_message);\n}", "function sendemail($collegeid,$username){\r\n\t\t$to = ''.$collegeid.'@kristujayanti.com';\r\n\t\t//$to = '[email protected]';\t\t\r\n\t\t$from = '[email protected]';\r\n\t\t$subject = 'Password for the Placement Signup';\r\n\t\t//calling the function buildBody() that returns a string value..\r\n\t\t$message = buildBodysendemail($collegeid,$username,$from);\r\n\t\t$header = 'From: '.$from.'\r\n\t\tto: '.$to.'\r\n\t\tSubject: '.$subject.'\r\n\t\tContent-type: '.\"text/html\".'\r\n\t\tcharset: '.\"utf-8\".'';\r\n\t\tif(mail($to,$subject,$message,$header)){\r\n\t\t\techo 'true';\r\n\t\t\t?>\r\n\t\t\t\r\n\t\t\t<?php\r\n\t\t}\r\n\t\telse{\r\n\t\t\techo 'false';\r\n\t\t\t?>\r\n\t\t\t\r\n\t\t\t<?php\r\n\t\t}\r\n\t\t\r\n\t}", "function sanitize_email($email)\n {\n }", "protected function _sendMail ()\n {\n $this->_lastMessageId = $this->_ses->sendRawEmail(\n $this->header.$this->EOL.$this->body.$this->EOL,\n $this->_mail->getFrom() ? : '', $this->_mail->getRecipients()\n );\n }", "function prepare_message($m)\n{\n\t\t/*CLEAN MESSAGE INPUT - Only want to sign the plain text*/\n\t\t//Strip html tags to prepare signing of message content\n\t\t$m = preg_replace(\"/(^[\\r\\n]*|[\\r\\n]+)[\\s\\t]*[\\r\\n]+/\", \" \", $m); //Remove empty white lines in message and replace with space.\n\t\t\n\t\t$m = preg_replace(\"/&#?[a-z0-9]{2,8};/i\",\"\",$m); //Removes special characters such as &nbsp; - http://stackoverflow.com/questions/657643/how-to-remove-html-special-chars\n\t\t\n\t\t$m = p_trim_line($m); //trim each line using <br> as delimiter\n\t\t\t\n\t\t$m = strip_all_tags($m); //remove html tags\n\t\t\n\t\t$m = trim($m);\n\t\t\n\t\t$m = preg_replace('!\\s+!', ' ', $m); //reduce multiple white space into one white space - Outlook does this when receiving mail - http://stackoverflow.com/questions/2368539/php-replacing-multiple-spaces-with-a-single-space\n\n\t\treturn $m;\n}", "protected function SendRequestMail(){\n\n\t\t\t\tif(\n\t\t\t\t\tisset($this->parent) && is_object($this->parent)\n\n\t\t\t\t\t&& isset($this->parent->email) && is_string($this->parent->email)\n\n\t\t\t\t\t&& isset($this->parent->user) && is_array($this->parent->user)\n\n\t\t\t\t){\n\n\t\t\t\t\t$to = $this->parent->email;\n\n\t\t\t\t\t$lnk = \\_native::setvar(\\_native::varn('LOGIN_PAGE')) . $this->FACTORY_URL_PARAM \n\t\t\t\t\t\t\n\t\t\t\t\t\t. '&reference='.\\_nativeCrypt::encoder(\\date(\\_native::DATETIMEM_NUM), 'BASE64')\n\t\t\t\t\t\t\n\t\t\t\t\t\t. '&app=-'.\\_nativeCrypt::encoder(\\date(\\_native::TIME_NUM), 'BASE64')\n\t\t\t\t\t\t\n\t\t\t\t\t\t. '&tmp=' . $this->codex \n\t\t\t\t\t\t\n\t\t\t\t\t\t. '&email=' . $to\n\n\t\t\t\t\t\t;\n\n\t\t\t\t\t\n\t\t\t\t\t$title = 'Réinitialisation de mot de passe';\n\t\t\t\t\t\n\t\t\t\t\t$about = 'Commencez maintenant';\n\t\t\t\t\t\n\t\t\t\t\t$message = ''.ucwords($this->user['USERNAME']).',<p>Vous avez demandez à reinitialiser votre mot de passe. Pour cela vous devez suivre les instructions à la suite de ce lien.';\n\n\t\t\t\t\t\t$message .= '<br><br><b>NB</b><span class=\"mac\"> : Ce lien est valide quelque temps après la demande de réinitialisation de mot de passe.</span>.';\n\t\t\t\t\t\n\t\t\t\t\t$buttons = array(\n\n\t\t\t\t\t\t'active.now' => array(\n\n\t\t\t\t\t\t\t'title' => 'Réinitialisation du mot de passe'\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t,'link' => $lnk\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t,'focus' => true\n\n\t\t\t\t\t\t)\n\n\t\t\t\t\t);\n\n\n\t\t\t\t\t$c = \\GUSERS::mailTemplate($title, $about, $message, $buttons);\n\t\t\t\t\t\n\t\t\t\t\t$s = \\_native::varn('SITENAME') . ' - ' . $title;\n\n\t\t\t\t\t$h = 'MIME-Version: 1.0' . \"\\r\\n\";\n\n\t\t\t\t\t$h .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\n\n\t\t\t\t\t$h .= 'From: ' . \\_native::varn('SITENAME') . ' <no.reset.password@' . $_SERVER['HTTP_HOST'] . '>' . \"\\r\\n\";\n\n\t\t\t\t\t/* \n\t\t\t\t\t\tEnvoie \n\t\t\t\t\t*/\n\t\t\t\t\tif(@mail($to, $s, $c, $h)){\n\n\t\t\t\t\t\treturn true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse{\n\n\t\t\t\t\t\t$this->because('attempt.rup.request.mail.send.failed');\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse{\n\n\t\t\t\t\t$this->because('attempt.rup.request.mail.param.not.found');\n\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\n\t\t\t}", "function sendAuthEmail($email,$mailBody) {\n\t\ttry {\n\t\t\t$mail = new PHPMailer(true);\n\t\t\t$mail->SMTPDebug = 0; //SMTP Debug\n\t\t\t$mail->isSMTP();\n\t\t\t$mail->Host = \"smtp.gmail.com\";\n\t\t\t$mail->SMTPAuth = true;\n\t\t\t$mail->Username = '[email protected]';\n\t\t\t$mail->Password = 'randompassworfd';\n\t\t\t$mail->SMTPSecure = 'tls';\n\t\t\t$mail->Port = '587';\n\t\t\t/**\n\t\t\t * SMTPOptions work-around by @author : Synchro\n\t\t\t * This setting should removed on server and \n\t\t\t * mailing should be working on the server\n\t\t\t */\n\t\t\t$mail->SMTPOptions = array(\n\t\t\t\t'ssl' => array(\n\t\t\t\t\t'verify_peer' => false,\n\t\t\t\t\t'verify_peer_name' => false,\n\t\t\t\t\t'allow_self_signed' => true\n\t\t\t\t)\n\t\t\t);\n\t\t\t//Recipients\n\t\t\t$mail->setFrom('[email protected]', 'Do Not Reply');\n\t\t\t$mail->addAddress($email,'Yash Karanke'); // Add a recipient\n\t\t\t$mail->addReplyTo('[email protected]');\n\n\t\t\t //Content\n\t\t\t $mail->isHTML(true); // Set email format to HTML\n\t\t\t $mail->Subject = 'Authentication Email';\n\t\t\t $mail->Body = $mailBody;\n\t\t \n\t\t\t if($mail->send()){\n\t\t\t\treturn true;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t return false;\n\t\t\t\t exit();\n\t\t\t }\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\treturn $mail->ErrorInfo;\n\t\t}\n\t}", "function smarty_resource_email_template_trusted($tpl_name, &$smarty)\n{\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 }", "protected function prepare_mail()\n {\n // Subject\n $subject_text = $this->subject;\n $subject = '=?UTF-8?B?' . base64_encode($subject_text) . '?=';\n\n // Message\n $message = ($this->message);\n\n // To\n $to = '';\n\n foreach($this->to as $item){\n if(empty($item[1])){\n $to .= $item[0];\n }else {\n $to .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n // From\n $from = '';\n\n if(empty($this->from[1])){\n $from .= $this->from[0];\n }else {\n $from .= '=?UTF-8?B?' . base64_encode($this->from[1]) . '?= <'.$this->from[0].'>';\n }\n\n // Reply\n $reply = '';\n\n foreach($this->reply as $item){\n if(empty($item[1])){\n $reply .= $item[0];\n }else {\n $reply .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n if(!empty($reply)){\n $header_reply = 'Reply-To: ' . $reply . \"\\r\\n\"; // Reply-To\n }else{\n $header_reply='';\n }\n\n // CC\n $cc = '';\n\n foreach($this->cc as $item){\n if(empty($item[1])){\n $cc .= $item[0];\n }else {\n $cc .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n if(!empty($cc)){\n $header_cc = 'Cc: ' . $cc . \"\\r\\n\"; // Cc\n }else{\n $header_cc='';\n }\n\n // BCC\n $bcc = '';\n\n foreach($this->bcc as $item){\n if(empty($item[1])){\n $bcc .= $item[0];\n }else {\n $bcc .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n if(!empty($cc)){\n $header_bcc = 'Bcc: ' . $bcc . \"\\r\\n\"; // Bcc\n }else{\n $header_bcc = '';\n }\n\n // Type\n if($this->isHtml){\n $type = \"text/html\";\n }else{\n $type = \"text/plain\";\n }\n\n // Headers\n $headers = '';\n $headers .= 'From: ' . $from . \"\\r\\n\"; // From\n $headers .= 'MIME-Version: 1.0' . \"\\r\\n\"; // MIME\n $headers .= $header_reply; // Reply-To\n $headers .= $header_cc; // CC\n $headers .= $header_bcc; // BCC\n $headers .= 'X-Mailer: PHP/' . phpversion(); // Mailer\n\n // Attachments \n $files = $this->attachment; \n\n // Boundary \n $semi_rand = md5(time()); \n $mime_boundary = \"==Multipart_Boundary_x{$semi_rand}x\"; \n \n // Headers for attachment \n $headers .= \"\\nContent-Type: multipart/mixed;\\n\" . \" boundary=\\\"{$mime_boundary}\\\"\"; \n \n // Multipart boundary \n $message = \"--{$mime_boundary}\\n\" . \"Content-Type: $type; charset=\\\"UTF-8\\\"\\n\" . \n \"Content-Transfer-Encoding: 7bit\\n\\n\" . $message . \"\\n\\n\"; \n \n // Preparing attachment \n if(!empty($files)){ \n for($i=0;$i<count($files);$i++){ \n if(is_file($files[$i])){ \n $file_name = basename($files[$i]); \n $file_size = filesize($files[$i]); \n \n $message .= \"--{$mime_boundary}\\n\"; \n $fp = @fopen($files[$i], \"rb\"); \n $data = @fread($fp, $file_size); \n @fclose($fp); \n $data = chunk_split(base64_encode($data)); \n $message .= \"Content-Type: application/octet-stream; name=\\\"\".$file_name.\"\\\"\\n\" . \n \"Content-Description: \".$file_name.\"\\n\" . \n \"Content-Disposition: attachment;\\n\" . \" filename=\\\"\".$file_name.\"\\\"; size=\".$file_size.\";\\n\" . \n \"Content-Transfer-Encoding: base64\\n\\n\" . $data . \"\\n\\n\"; \n } \n } \n } \n \n $message .= \"--{$mime_boundary}--\"; \n\n return compact(\"subject\", \"message\", \"to\", \"headers\");\n }", "public function send() {\n $mail = $this->initializeMail();\n $mail->subject = $this->subject; \n $mail->MsgHTML($this->body);\n if($this->is_admin) {\n //send email to the admin\n $mail->setFrom($this->sender->email, $this->sender->name);\n $mail->addAddress(Config::get('app.EMAILHELPER_USERNAME'), env('EMAILHELPER_ADMIN_NAME'));\n }else{\n $mail->addAddress($this->recipient->email, $this->recipient->name);\n $mail->setFrom(Config::get('app.EMAILHELPER_USERNAME'), env('EMAILHELPER_ADMIN_NAME'));\n \n }\n $mail->send();\n return $mail;\n }", "protected function initDecryptedEmail()\n\t{\n\t\tadd_filter('comment_email', array($this->Main, 'getDecryptedEmail'));\n\t}", "function sendPassRecLink(string $email) {\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 }", "private function sendToEmail()\n {\n if ( $this->sendEmailWithPHPMailer )\n {\n // if need specific SMTP server setting from outside (i.e. google)\n try\n {\n $mail = new PHPMailer(true);\n $mail->IsSMTP();\n $mail->Mailer = \"smtp\";\n\n $mail->SMTPDebug = $this->SMTPDebug;\n $mail->SMTPAuth = $this->SMTPAuth;\n $mail->SMTPSecure = $this->SMTPSecure;\n $mail->Port = $this->SMTPPort;\n $mail->Host = $this->SMTPHost;\n $mail->Username = $this->SMTPUsername;\n $mail->Password = $this->SMTPPassword;\n\n $mail->IsHTML(true);\n $mail->AddAddress($this->securityEmail, $this->appName . ' Security');\n $mail->SetFrom($this->securityEmail, $this->appName . ' Security');\n $mail->AddReplyTo($this->securityEmail, $this->appName . ' Security');\n $mail->Subject = $this->appName . ' Error ID: ' . $this->errid;\n\n $mail->MsgHTML($this->getErrorString());\n\n $mail->Send();\n }\n catch ( Exception $ex )\n {\n $this->failedToEmailMsg = $mail->ErrorInfo;\n }\n }\n\n // if using smtp mail server from server's php.ini setting:\n else\n {\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\n $headers .= \"From: \" . $this->appName . \" Security <\" . $this->securityEmail . \">\\r\\n\";\n $headers .= \"Reply-To: \" . $this->securityEmail . \"\" . \"\\r\\n\";\n\n //Send the email\n if ( mail($this->securityEmail, $this->appName . ' Error ID: ' . $this->errid, $this->getErrorString(), $headers) === false )\n {\n $this->failedToEmailMsg = 'Is there a proper SMTP server running?';\n }\n }\n }", "function _send_email($to)\n{\n $subject = \"Volunteer Management - Someone needed Help!\";\n\n $message = \"Please comeback! Someone need help!\";\n\n $subject = \"=?UTF-8?B?\" . base64_encode($subject) . \"?=\";\n\n $headers[] = 'From: Team Shunno <no-replay@' . $GLOBALS['c_domain'] . '>';\n $headers[] = 'Content-Type: text/html; charset=UTF-8';\n\n return mail($to, $subject, $message, implode(\"\\r\\n\", $headers));\n}", "function emailTemplate($username, $password, $idcode ,$expiredate ,$package, $typePackage, $note,$isMagDevice)\n{\n\n if ($typePackage == \"IPTV\") {\n if ($isMagDevice == \"1\") {\n $corpo_credenziali = '<b>Link Portal:</b> ';\n $corpo_credenziali .= \"http://satopen-iptv.ddns.net:8000/c/\";\n $corpo_credenziali .= '<br><br><b>Package:</b> ';\n $corpo_credenziali .= \"IPTV $package\";\n $corpo_credenziali .= '<br><b>Expire Date:</b> ';\n $corpo_credenziali .= \"$expiredate (Year/Month/Day)\";\n $corpo_credenziali .= '<br><b>Payment Id-Code:</b> ';\n $corpo_credenziali .= \"$idcode\";\n $corpo_credenziali .= '<br><b>Note:</b> ';\n $corpo_credenziali .= \"$note\";\n $corpo_credenziali .= '<br><br><b>Iptv Note:</b> ';\n $corpo_credenziali .= '<br>Usage Google DNS on your device or router: 8.8.8.8 (Primary) 8.8.4.4 (Secondary)<br>Download and Install Our Enigma 2 Plugin http://satopen-panel.ddns.net/Download/IptvGate_World.ipk<br>Automatic Update Of Channel List, Personalizate Bouquet Channel, Play & Pause, Forward & Rewind, Search VOD, Account Info and many more<br>';\n \n }\n else {\n $corpo_credenziali = '<b>Username:</b> ';\n $corpo_credenziali .= \"$username\";\n $corpo_credenziali .= '<br><b>Password:</b> ';\n $corpo_credenziali .= \"$password\";\n $corpo_credenziali .= '<br><br><b>Your IPTV Account Data - AutoScript Enigma2:</b> ';\n $corpo_credenziali .= \"wget -O /etc/enigma2/iptv.sh \\\"http://satopen-iptv.ddns.net:8000/get.php?username=$username&password=$password&type=enigma22_script&output=mpegts\\\" && chmod 777 /etc/enigma2/iptv.sh && /etc/enigma2/iptv.sh\";\n $corpo_credenziali .= '<br><br><b>Your IPTV Account Data - Link VLC/Android/IOS/Smart-Tv Player:</b> ';\n $corpo_credenziali .= \"http://satopen-iptv.ddns.net:8000/get.php?username=$username&password=$password&type=m3u_plus&output=mpegts\";\n $corpo_credenziali .= '<br><br><b>Plugin WorldTeam 2.0:</b> ';\n $corpo_credenziali .= \"wget -q -O /tmp/IptvGate_World.ipk http://app-world.dyndns.tv/addons/plugin/tar/IptvGate_World.ipk; chmod 777 /tmp/IptvGate_World.ipk; opkg install /tmp/IptvGate_World.ipk; sleep 5; killall -9 enigma2\";\n $corpo_credenziali .= '<br><b>After open the Plugina and insert your Username and Password</b>';\n $corpo_credenziali .= '<br><br><b>Package:</b> ';\n $corpo_credenziali .= \"IPTV $package\";\n $corpo_credenziali .= '<br><b>Expire Date:</b> ';\n $corpo_credenziali .= \"$expiredate (Year/Month/Day)\";\n $corpo_credenziali .= '<br><b>Payment Id-Code:</b> ';\n $corpo_credenziali .= \"$idcode\";\n $corpo_credenziali .= '<br><b>Note:</b> ';\n $corpo_credenziali .= \"$note\";\n $corpo_credenziali .= '<br><br><b>Iptv Note:</b> ';\n $corpo_credenziali .= '<br>Usage Google DNS on your device or router: 8.8.8.8 (Primary) 8.8.4.4 (Secondary)<br>Download and Install Our Enigma 2 Plugin http://satopen-panel.ddns.net/Download/IptvGate_World.ipk<br>Automatic Update Of Channel List, Personalizate Bouquet Channel, Play & Pause, Forward & Rewind, Search VOD, Account Info and many more<br>';\n } \n }\n else {\n $corpo_credenziali = '<b>Username:</b> ';\n $corpo_credenziali .= \"$username\";\n $corpo_credenziali .= '<br><b>Password:</b> ';\n $corpo_credenziali .= \"$password\";\n $corpo_credenziali .= '<br><br><b>Your CardSharing Account Data - CLine:</b><br>';\n $corpo_credenziali .= \"C: satopen-client.ddns.net 23000 $username $password\";\n $corpo_credenziali .= '<br><br><b>Package:</b> ';\n $corpo_credenziali .= \"Cardsharing $package\";\n $corpo_credenziali .= '<br><b>Expire Date:</b> ';\n $corpo_credenziali .= \"$expiredate (Year/Month/Day)\";\n $corpo_credenziali .= '<br><b>Payment Id-Code:</b> ';\n $corpo_credenziali .= \"$idcode\";\n $corpo_credenziali .= '<br><b>Note:</b> ';\n $corpo_credenziali .= \"$note\";\n $corpo_credenziali .= '<br><br><b>CardSharing Note:</b> ';\n $corpo_credenziali .= '<br>Usage Google DNS on your device or router: 8.8.8.8 (Primary) 8.8.4.4 (Secondary)<br>Download and Install Our CCcam.prio in your decoder for fast zapping and zero freeze<br>http://www.satopen.cc/setup-cccam.html<br>';\n\n }\n\n \n \n $GLOBALS['head_email'] = '<html xmlns=\"http://www.w3.org/1999/xhtml\"> <head>\n\t\t\t\t <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t\t\t <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n\t\t\t\t <title>SatOpen Email</title>\n\t\t\t\t <style type=\"text/css\"> \n\t\t\t\t img {\n\t\t\t\t max-width: 600px;\n\t\t\t\t outline: none;\n\t\t\t\t text-decoration: none;\n\t\t\t\t -ms-interpolation-mode: bicubic;\n\t\t\t\t }\n\n\t\t\t\t a {\n\t\t\t\t border: 0;\n\t\t\t\t outline: none;\n\t\t\t\t }\n\n\t\t\t\t a img {\n\t\t\t\t border: none;\n\t\t\t\t }\n\n\t\t\t\t /* General styling */\n\n\t\t\t\t td, h1, h2, h3 {\n\t\t\t\t font-family: Helvetica, Arial, sans-serif;\n\t\t\t\t font-weight: 400;\n\t\t\t\t }\n\n\t\t\t\t td {\n\t\t\t\t font-size: 13px;\n\t\t\t\t line-height: 19px;\n\t\t\t\t text-align: left;\n\t\t\t\t }\n\n\t\t\t\t body {\n\t\t\t\t -webkit-font-smoothing:antialiased;\n\t\t\t\t -webkit-text-size-adjust:none;\n\t\t\t\t width: 100%;\n\t\t\t\t height: 100%;\n\t\t\t\t color: #37302d;\n\t\t\t\t background: #ffffff;\n\t\t\t\t }\n\n\t\t\t\t table {\n\t\t\t\t border-collapse: collapse !important;\n\t\t\t\t }\n\n\n\t\t\t\t h1, h2, h3, h4 {\n\t\t\t\t padding: 0;\n\t\t\t\t margin: 0;\n\t\t\t\t color: #444444;\n\t\t\t\t font-weight: 400;\n\t\t\t\t line-height: 110%;\n\t\t\t\t }\n\n\t\t\t\t h1 {\n\t\t\t\t font-size: 35px;\n\t\t\t\t }\n\n\t\t\t\t h2 {\n\t\t\t\t font-size: 30px;\n\t\t\t\t }\n\n\t\t\t\t h3 {\n\t\t\t\t font-size: 24px;\n\t\t\t\t }\n\n\t\t\t\t h4 {\n\t\t\t\t font-size: 18px;\n\t\t\t\t font-weight: normal;\n\t\t\t\t }\n\n\t\t\t\t .important-font {\n\t\t\t\t color: #21BEB4;\n\t\t\t\t font-weight: bold;\n\t\t\t\t }\n\n\t\t\t\t .hide {\n\t\t\t\t display: none !important;\n\t\t\t\t }\n\n\t\t\t\t .force-full-width {\n\t\t\t\t width: 100% !important;\n\t\t\t\t }\n\n\t\t\t\t </style>\n\n\t\t\t\t <style type=\"text/css\" media=\"screen\">\n\t\t\t\t @media screen {\n\t\t\t\t\t@import url(http://fonts.googleapis.com/css?family=Open+Sans:400);\n\n\t\t\t\t\t/* Thanks Outlook 2013! */\n\t\t\t\t\ttd, h1, h2, h3 {\n\t\t\t\t\t font-family: Open Sans, Helvetica Neue, Arial, sans-serif !important;\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t </style>\n\n\t\t\t\t <style type=\"text/css\" media=\"only screen and (max-width: 600px)\">\n\t\t\t\t /* Mobile styles */\n\t\t\t\t @media only screen and (max-width: 600px) {\n\n\t\t\t\t table[class=\"w320\"] {\n\t\t\t\t\twidth: 320px !important;\n\t\t\t\t }\n\n\t\t\t\t table[class=\"w300\"] {\n\t\t\t\t\twidth: 300px !important;\n\t\t\t\t }\n\n\t\t\t\t table[class=\"w290\"] {\n\t\t\t\t\twidth: 290px !important;\n\t\t\t\t }\n\n\t\t\t\t td[class=\"w320\"] {\n\t\t\t\t\twidth: 320px !important;\n\t\t\t\t }\n\n\t\t\t\t td[class~=\"mobile-padding\"] {\n\t\t\t\t\tpadding-left: 14px !important;\n\t\t\t\t\tpadding-right: 14px !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-padding-left\"] {\n\t\t\t\t\tpadding-left: 14px !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-padding-right\"] {\n\t\t\t\t\tpadding-right: 14px !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-padding-left-only\"] {\n\t\t\t\t\tpadding-left: 14px !important;\n\t\t\t\t\tpadding-right: 0 !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-padding-right-only\"] {\n\t\t\t\t\tpadding-right: 14px !important;\n\t\t\t\t\tpadding-left: 0 !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-block\"] {\n\t\t\t\t\tdisplay: block !important;\n\t\t\t\t\twidth: 100% !important;\n\t\t\t\t\ttext-align: left !important;\n\t\t\t\t\tpadding-left: 0 !important;\n\t\t\t\t\tpadding-right: 0 !important;\n\t\t\t\t\tpadding-bottom: 15px !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-no-padding-bottom\"] {\n\t\t\t\t\tpadding-bottom: 0 !important;\n\t\t\t\t }\n\n\t\t\t\t td[class~=\"mobile-center\"] {\n\t\t\t\t\ttext-align: center !important;\n\t\t\t\t }\n\n\t\t\t\t table[class*=\"mobile-center-block\"] {\n\t\t\t\t\tfloat: none !important;\n\t\t\t\t\tmargin: 0 auto !important;\n\t\t\t\t }\n\n\t\t\t\t *[class*=\"mobile-hide\"] {\n\t\t\t\t\tdisplay: none !important;\n\t\t\t\t\twidth: 0 !important;\n\t\t\t\t\theight: 0 !important;\n\t\t\t\t\tline-height: 0 !important;\n\t\t\t\t\tfont-size: 0 !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-border\"] {\n\t\t\t\t\tborder: 0 !important;\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t </style>\n\t\t\t\t</head>';\n\nif ($typePackage == \"IPTV\") {\n $corpo_email = $GLOBALS['head_email'];\n $corpo_email .= ' \n\t\t\t\t<body class=\"body\" style=\"padding:0; margin:0; display:block; background:#ffffff; -webkit-text-size-adjust:none\" bgcolor=\"#ffffff\">\n\t\t\t\t<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\">\n\t\t\t\t <tr>\n\t\t\t\t <td align=\"center\" valign=\"top\" bgcolor=\"#ffffff\" width=\"100%\">\n\n\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n\t\t\t\t <tr>\n\t\t\t\t\t<td style=\"background:#1f1f1f\" width=\"100%\">\n\n\t\t\t\t\t <center>\n\t\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"600\" class=\"w320\">\n\t\t\t\t\t <tr>\n\t\t\t\t\t\t<td valign=\"top\" class=\"mobile-block mobile-no-padding-bottom mobile-center\" width=\"270\" style=\"background:#1f1f1f;padding:10px 10px 10px 20px;\">\n\t\t\t\t\t\t <a data-click-track-id=\"1262\" href=\"#\" style=\"text-decoration:none;\">\n\t\t\t\t\t\t <img src=\"http://www.satopen.cc/uploads/1/3/3/0/13301587/1460553356.png\" width=\"142\" height=\"30\" alt=\"Your Logo\"/>\n\t\t\t\t\t\t </a>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td valign=\"top\" class=\"mobile-block mobile-center\" width=\"270\" style=\"background:#1f1f1f;padding:10px 15px 10px 10px\">\n\t\t\t\t\t\t <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"mobile-center-block\" align=\"right\">\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t <td align=\"right\">\n\t\t\t\t\t\t\t<a data-click-track-id=\"2952\" href=\"https://www.facebook.com/Satopencc-Best-CardSharingIPTV-Server-1738104009796186\">\n\t\t\t\t\t\t\t<img src=\"http://keenthemes.com/assets/img/emailtemplate/social_facebook.png\" width=\"30\" height=\"30\" alt=\"social icon\"/>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </table>\n\t\t\t\t\t </center>\n\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t\t<td style=\"border-bottom:1px solid #e7e7e7;\">\n\n\t\t\t\t\t <center>\n\t\t\t\t\t <table cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"w320\">\n\t\t\t\t\t <tr>\n\t\t\t\t\t\t<td align=\"left\" class=\"mobile-padding\" style=\"padding:20px 20px 0\">\n\n\t\t\t\t\t\t <br class=\"mobile-hide\" />\n\n\t\t\t\t\t\t <h1>Account Data on SatOpen.cc!</h1>\n\n\t\t\t\t\t\t <br>\n\t\t\t\t\t\t <b>Your Data for Help Area:</b><br><br>';\n $corpo_email .= $corpo_credenziali;\n $corpo_email .= '\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t <br>\n\n\t\t\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" bgcolor=\"#ffffff\">\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t <td style=\"width:130px;background:#D84A38;\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t <!--[if mso]>\n\t\t\t\t\t\t\t <v:rect xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" href=\"#\" style=\"height:33px;v-text-anchor:middle;width:130px;\" stroke=\"f\" fillcolor=\"#D84A38\">\n\t\t\t\t\t\t\t <w:anchorlock/>\n\t\t\t\t\t\t\t <center>\n\t\t\t\t\t\t\t <![endif]-->\n\t\t\t\t\t\t\t <a href=\"http://satopen.cc\"\n\t\t\t\t\t\t\tstyle=\"background-color:#D84A38;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:18px;font-weight:bold;line-height:33px;text-align:center;text-decoration:none;width:130px;-webkit-text-size-adjust:none;\">SatOpen.CC</a>\n\t\t\t\t\t\t\t <!--[if mso]>\n\t\t\t\t\t\t\t </center>\n\t\t\t\t\t\t\t </v:rect> \n\t\t\t\t\t\t\t <![endif]-->\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t <td width=\"316\" style=\"background-color:#ffffff; font-size:0; line-height:0;\">&nbsp;</td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t <br><br>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class=\"mobile-hide\" style=\"padding-top:20px;padding-bottom:0;vertical-align:bottom\">\n\t\t\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t <td align=\"right\" valign=\"bottom\" width=\"220\" style=\"padding-right:20px; padding-bottom:0; vertical-align:bottom;\">\n\t\t\t\t\t\t <img style=\"display:block\" src=\"https://www.filepicker.io/api/file/AvB8yENR7OdiUqonW05y\" width=\"174\" height=\"294\" alt=\"iphone\"/>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </table>\n\t\t\t\t\t </center>\n\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t\t<td valign=\"top\" style=\"background-color:#f8f8f8;border-bottom:1px solid #e7e7e7;\">\n\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t\t<td style=\"background-color:#1f1f1f;\">\n\t\t\t\t\t <center>\n\t\t\t\t\t <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"w320\" style=\"height:100%;color:#ffffff\" bgcolor=\"#1f1f1f\" >\n\t\t\t\t\t <tr>\n\t\t\t\t\t\t<td align=\"right\" valign=\"middle\" class=\"mobile-padding\" style=\"font-size:12px;padding:20px; background-color:#1f1f1f; color:#ffffff; text-align:left; \">\n\t\t\t\t\t\t <a style=\"color:#ffffff;\" href=\"http://www.satopen.cc/support.html\">Contact Us</a>&nbsp;&nbsp;|&nbsp;&nbsp;\n\t\t\t\t\t\t <a style=\"color:#ffffff;\" href=\"https://www.facebook.com/Satopencc-Best-CardSharingIPTV-Server-1738104009796186\">Facebook</a>&nbsp;&nbsp;|&nbsp;&nbsp;\n\t\t\t\t\t\t <a style=\"color:#ffffff;\" href=\"http://www.satopen.cc/support.html\">Support</a>\n\t\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 </center>\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t </table>\n\n\t\t\t\t </td>\n\t\t\t\t </tr>\n\t\t\t\t</table>\n\t\t\t\t</body>\n\t\t\t\t</html>\n\t\t\t\t';\n}\n\nelse {\n $corpo_email = $GLOBALS['head_email'];\n $corpo_email .= ' \n\t\t\t\t<body class=\"body\" style=\"padding:0; margin:0; display:block; background:#ffffff; -webkit-text-size-adjust:none\" bgcolor=\"#ffffff\">\n\t\t\t\t<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\">\n\t\t\t\t <tr>\n\t\t\t\t <td align=\"center\" valign=\"top\" bgcolor=\"#ffffff\" width=\"100%\">\n\n\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n\t\t\t\t <tr>\n\t\t\t\t\t<td style=\"background:#1f1f1f\" width=\"100%\">\n\n\t\t\t\t\t <center>\n\t\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"600\" class=\"w320\">\n\t\t\t\t\t <tr>\n\t\t\t\t\t\t<td valign=\"top\" class=\"mobile-block mobile-no-padding-bottom mobile-center\" width=\"270\" style=\"background:#1f1f1f;padding:10px 10px 10px 20px;\">\n\t\t\t\t\t\t <a data-click-track-id=\"1262\" href=\"#\" style=\"text-decoration:none;\">\n\t\t\t\t\t\t <img src=\"http://www.satopen.cc/uploads/1/3/3/0/13301587/1460553356.png\" width=\"142\" height=\"30\" alt=\"Your Logo\"/>\n\t\t\t\t\t\t </a>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td valign=\"top\" class=\"mobile-block mobile-center\" width=\"270\" style=\"background:#1f1f1f;padding:10px 15px 10px 10px\">\n\t\t\t\t\t\t <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"mobile-center-block\" align=\"right\">\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t <td align=\"right\">\n\t\t\t\t\t\t\t<a data-click-track-id=\"2952\" href=\"https://www.facebook.com/Satopencc-Best-CardSharingIPTV-Server-1738104009796186\">\n\t\t\t\t\t\t\t<img src=\"http://keenthemes.com/assets/img/emailtemplate/social_facebook.png\" width=\"30\" height=\"30\" alt=\"social icon\"/>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </table>\n\t\t\t\t\t </center>\n\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t\t<td style=\"border-bottom:1px solid #e7e7e7;\">\n\n\t\t\t\t\t <center>\n\t\t\t\t\t <table cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"w320\">\n\t\t\t\t\t <tr>\n\t\t\t\t\t\t<td align=\"left\" class=\"mobile-padding\" style=\"padding:20px 20px 0\">\n\n\t\t\t\t\t\t <br class=\"mobile-hide\" />\n\n\t\t\t\t\t\t <h1>Account Data on SatOpen.cc!</h1>\n\n\t\t\t\t\t\t <br>\n\t\t\t\t\t\t <b>Your Data for Help Area:</b><br><br>';\n $corpo_email .= $corpo_credenziali;\n $corpo_email .= '\n\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t <br>\n\n\t\t\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" bgcolor=\"#ffffff\">\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t <td style=\"width:130px;background:#D84A38;\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t <!--[if mso]>\n\t\t\t\t\t\t\t <v:rect xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" href=\"#\" style=\"height:33px;v-text-anchor:middle;width:130px;\" stroke=\"f\" fillcolor=\"#D84A38\">\n\t\t\t\t\t\t\t <w:anchorlock/>\n\t\t\t\t\t\t\t <center>\n\t\t\t\t\t\t\t <![endif]-->\n\t\t\t\t\t\t\t <a href=\"http://satopen.cc\"\n\t\t\t\t\t\t\tstyle=\"background-color:#D84A38;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:18px;font-weight:bold;line-height:33px;text-align:center;text-decoration:none;width:130px;-webkit-text-size-adjust:none;\">SatOpen.cc</a>\n\t\t\t\t\t\t\t <!--[if mso]>\n\t\t\t\t\t\t\t </center>\n\t\t\t\t\t\t\t </v:rect> \n\t\t\t\t\t\t\t <![endif]-->\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t <td width=\"316\" style=\"background-color:#ffffff; font-size:0; line-height:0;\">&nbsp;</td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t <br><br>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class=\"mobile-hide\" style=\"padding-top:20px;padding-bottom:0;vertical-align:bottom\">\n\t\t\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t <td align=\"right\" valign=\"bottom\" width=\"220\" style=\"padding-right:20px; padding-bottom:0; vertical-align:bottom;\">\n\t\t\t\t\t\t <img style=\"display:block\" src=\"https://www.filepicker.io/api/file/AvB8yENR7OdiUqonW05y\" width=\"174\" height=\"294\" alt=\"iphone\"/>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </table>\n\t\t\t\t\t </center>\n\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t\t<td valign=\"top\" style=\"background-color:#f8f8f8;border-bottom:1px solid #e7e7e7;\">\n\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t\t<td style=\"background-color:#1f1f1f;\">\n\t\t\t\t\t <center>\n\t\t\t\t\t <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"w320\" style=\"height:100%;color:#ffffff\" bgcolor=\"#1f1f1f\" >\n\t\t\t\t\t <tr>\n\t\t\t\t\t\t<td align=\"right\" valign=\"middle\" class=\"mobile-padding\" style=\"font-size:12px;padding:20px; background-color:#1f1f1f; color:#ffffff; text-align:left; \">\n\t\t\t\t\t\t <a style=\"color:#ffffff;\" href=\"http://www.satopen.cc/support.html\">Contact Us</a>&nbsp;&nbsp;|&nbsp;&nbsp;\n\t\t\t\t\t\t <a style=\"color:#ffffff;\" href=\"https://www.facebook.com/Satopencc-Best-CardSharingIPTV-Server-1738104009796186\">Facebook</a>&nbsp;&nbsp;|&nbsp;&nbsp;\n\t\t\t\t\t\t <a style=\"color:#ffffff;\" href=\"http://www.satopen.cc/support.html\">Support</a>\n\t\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 </center>\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t </table>\n\n\t\t\t\t </td>\n\t\t\t\t </tr>\n\t\t\t\t</table>\n\t\t\t\t</body>\n\t\t\t\t</html>\n\t\t\t\t';\n\n}\n\n return array($corpo_email,$corpo_credenziali);\n}", "function bp_course_process_mail($to,$subject,$message,$args=''){\n $template = html_entity_decode(get_option('wplms_email_template'));\n if(!isset($template) || !$template || strlen($template) < 5)\n return $message;\n \n\n $site_title = get_option('blogname');\n $site_description = get_option('blogdescription');\n $logo_url = vibe_get_option('logo');\n $logo = '<a href=\"'.get_option('home_url').'\"><img src=\"'.$logo_url.'\" alt=\"'.$site_title.'\" style=\"max-width:50%;\"/></a>';\n\n $sub_title = $subject; \n if(isset($args['user_id'])){\n if(is_numeric($args['user_id'])){\n $name = bp_core_get_userlink($args['user_id']);\n }else if(is_array($args['user_id'])){\n $userid = $args['user_id'][0];\n if(is_numeric($userid)){\n $name = bp_core_get_userlink($userid);\n }\n }\n }else\n $name = $to;\n\n $datetime = date_i18n( get_option( 'date_format' ), time());\n if(isset($args['item_id'])){\n $instructor_id = get_post_field('post_author', $args['item_id']);\n $sender = bp_core_get_user_displayname($instructor_id);\n $instructing_courses=apply_filters('wplms_instructing_courses_endpoint','instructing-courses');\n $sender_links = '<a href=\"'.bp_core_get_user_domain( $instructor_id ).'\">'.__('Profile','vibe-customtypes').'</a>&nbsp;|&nbsp;<a href=\"'.get_author_posts_url($instructor_id).$instructing_courses.'/\">'.__('Courses','vibe-customtypes').'</a>';\n $item = get_the_title($args['item_id']);\n $item_links = '<a href=\"'.get_permalink( $args['item_id'] ).'\">'.__('Link','vibe-customtypes').'</a>&nbsp;|&nbsp;<a href=\"'.bp_core_get_user_domain($instructor_id).'/\">'.__('Instructor','vibe-customtypes').'</a>';\n $unsubscribe_link = bp_core_get_user_domain($args['user_id']).'/settings/notifications';\n }else{\n $sender ='';\n $sender_links ='';\n $item ='';\n $item_links ='';\n $unsubscribe_link = '#';\n $template = str_replace('cellpadding=\"28\"','cellpadding=\"0\"',$template);\n }\n \n $copyright = vibe_get_option('copyright');\n $link_id = vibe_get_option('email_page');\n if(is_numeric($link_id)){\n $array = array(\n 'to' => $to,\n 'subject'=>$subject,\n 'message'=>$message,\n 'args'=>$args\n );\n $link = get_permalink($link_id).'?vars='.urlencode(json_encode($array));\n }else{\n $link = '#';\n }\n\n\n $template = str_replace('{{logo}}',$logo,$template);\n $template = str_replace('{{subject}}',$subject,$template);\n $template = str_replace('{{sub-title}}',$sub_title,$template);\n $template = str_replace('{{name}}',$name,$template);\n $template = str_replace('{{datetime}}',$datetime,$template);\n $template = str_replace('{{message}}',$message,$template);\n $template = str_replace('{{sender}}',$sender,$template);\n $template = str_replace('{{sender_links}}',$sender_links,$template);\n $template = str_replace('{{item}}',$item,$template);\n $template = str_replace('{{item_links}}',$item_links,$template);\n $template = str_replace('{{site_title}}',$site_title,$template);\n $template = str_replace('{{site_description}}',$site_description,$template);\n $template = str_replace('{{copyright}}',$copyright,$template);\n $template = str_replace('{{unsubscribe_link}}',$unsubscribe_link,$template);\n $template = str_replace('{{link}}',$link,$template);\n $template = bp_course_minify_output($template);\n return $template;\n}", "function plainMailEncoded($email,$subject,$message,$headers='',$enc='8bit',$charset='ISO-8859-1',$urlmode=null)\t{\n\n\t\tif ($urlmode)\t{\n\t\t\t$message=t3lib_div::substUrlsInPlainText($message,$urlmode);\n\t\t}\n\n\t\tt3lib_div::plainMailEncoded(\n\t\t\t$email,\n\t\t\t$subject,\n\t\t\t$message,\n\t\t\t$headers,\n\t\t\t$enc,\n\t\t\t$charset\n\t\t);\n\t}", "public function mail_varify(){\n \t$return = $this->login_model->mail_varify(); \t\n \tif($return){ \n \t$data['email'] = $return;\n \t$this->load->view('admin/set_password', $data); \n \t} else { \n\t \t\t$data['email'] = 'allredyUsed';\n \t$this->load->view('admin/set_password', $data);\n \t} \n }", "private function testEmail(){\n $this->user_panel->checkSecurity();\n $this->mail_handler->testEmailFunction();\n }", "function supermailer ($h) {\r\n $mail_addheaders = array();\r\n $mail_addheaders[] = 'From: '.$h['from'];\r\n $h['replyto'] == ''? $h['from']:$h['replyto']; # avoid anti-spam\r\n $mail_addheaders[] = 'Reply-To: '.$h['replyto'];\r\n if ($h['bcc'])\r\n $mail_addheaders[] = 'Bcc: '.$h['bcc'];\r\n $mail_addheaders[] = 'X-Mailer: '.(($GLOBALS['mail_xmailer'] == '')? 'supermailer/dsw/sh/2004': $GLOBALS['mail_xmailer']);\r\n $mail_addheaders_str = join(\"\\r\\n\",$mail_addheaders);\r\n #~ echo $mail_addheaders_str;exit;\r\n\r\n $mail_body = $h['body'];\r\n $mail_to = $h['to'];\r\n $mail_subject = $h['subject'];\r\n\r\n # Some MTA confuse \\r\\n and translate it to \\n\\n, causing double lines. This will makes them happy:\r\n $mail_addheaders_str = str_replace(\"\\r\\n\", \"\\n\", $mail_addheaders_str);\r\n $mail_body = str_replace(\"\\r\\n\", \"\\n\", $mail_body);\r\n\r\n return mail($mail_to, $mail_subject, $mail_body, $mail_addheaders_str);\r\n\r\n}", "public function dispatchEmailIfUserAuth($user)\n\t{\n\t\t$code_verification = rand(1000, 9999);\n\t\tSession::set('code_verification', $code_verification);\n\n\t\t$mail = new PHPMailer();\n\t\t$mail->IsSMTP();\n\t\t$mail->Mailer = 'smtp';\n\n\t\t$mail->SMTPDebug = 1; \n\t\t$mail->SMTPAuth = TRUE;\n\t\t$mail->SMTPSecure = \"tls\";\n\t\t$mail->Port = 587;\n\t\t$mail->Host = 'smtp.gmail.com';\n\t\t$mail->Username = GMAIL_ADDRESS;\n\t\t$mail->Password = GMAIL_PASSWORD;\n\n\t\t$mail->IsHTML(true);\n\t\t$mail->AddAddress($user->email);\n\t\t$mail->SetFrom(GMAIL_ADDRESS, 'PHP-developer');\n\n\t\t$mail->Subject = 'Confirm your registration with a code.';\n\t\t$content = '<b>Secret code: <h1>' . $code_verification . '</h1></b>';\n\n\t\t$mail->MsgHTML($content); \n\t\tif(!$mail->Send()) {\n\t\t // error\n\t\t Session::set('email_sended_failed', 'Email was not send to you. Try again.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t} else {\n\t\t // success\n\t\t\tSession::set('email_sended_success', 'Email was send. Check your email box.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t}\n\t}", "function mailUser($email) {\n\t//echo \"mail user <br>\";\n\t$mail = getSocksMailer();\n\t$mail->Subject = \"Litesprite Survey Completed\";\n\t$mail->AddEmbeddedImage('../images/paw.png', 'paw');\n\t$mail->msgHTML(file_get_contents('../emails/postSurvey.html'), dirname(__FILE__));\n\t$mail->AddAddress($email);\n\tsendMail($mail);\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 __construct() {\n\t\t\t\tparent :: __construct();\n\t\t\t\t$this->adminemail = $this->get_admin_email();\n\t\t\t\t$this->adminmobile = $this->get_admin_mobile();\n\t\t\t\t$siteInfo = $this->get_siteTitleUrl();\n\t\t\t\t$this->sitetitle = $siteInfo['title'];\n\t\t\t\t$this->siteurl = addHttp($siteInfo['url']);\n\n\t\t\t\t$headFootShortcode = array(\"{siteTitle}\",\"{siteUrl}\");\n\t\t\t\t$headFootVals = array($this->sitetitle,$this->siteurl);\n\n\t\t\t\t$mailsettings = $this->get_mailserver();\n\t\t\t\t$this->mailHeader = str_replace($headFootShortcode, $headFootVals, $mailsettings[0]->mail_header);\n\t\t\t\t$this->mailFooter = str_replace($headFootShortcode, $headFootVals, $mailsettings[0]->mail_footer);\n\t\t\t\t\n\t\t\t\tif ($mailsettings[0]->mail_default == \"smtp\") {\n\t\t\t\t\t\n\t\t\t\t\tif($mailsettings[0]->mail_secure == \"no\"){\n\t\t\t\t\t\t$secure = \"\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$secure = $mailsettings[0]->mail_secure.\"://\";\n\t\t\t\t\t}\n\t\t\t\t\t\t$this->sendfrom = $mailsettings[0]->mail_fromemail;\n\t\t\t\t\t\t$config = Array('protocol' => 'smtp', 'charset' => 'utf-8',\n\t\t\t\t\t\t\t'smtp_host' => $secure.$mailsettings[0]->mail_hostname, \n\t\t\t\t\t\t\t'smtp_port' => $mailsettings[0]->mail_port, \n\t\t\t\t\t\t\t'smtp_user' => $mailsettings[0]->mail_username, 'smtp_pass' => $mailsettings[0]->mail_password, 'mailtype' => 'html', 'charset' => 'iso-8859-1', 'wordwrap' => TRUE,'smtp_auth' => TRUE);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->load->library('email', $config);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t$this->sendfrom = $mailsettings[0]->mail_fromemail;\n\t\t\t\t\t\t$this->load->library('email');\n\t\t\t\t\t\t$this->email->set_mailtype(\"html\");\n\t\t\t\t}\n\n\t\t}", "function wrapBody($body=\"\"){\n if( $body != \"\" ){\n $this->Body = $body;\n }\n $this->Body = SITE_EMAILHEADER.$this->Body.\"\\n\\n\".SITE_EMAILFOOTER;\n }", "public function admin_mail_body($res,$key) {\n\n\t\t$ques = $this->_question->getquestion($res['question_id']);\n\n\t $url = Url::baseUrl().'/reset-password/token/'.$key;\n\n\t\t$output = '<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td><table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" style=\"border-collapse: collapse;\"><tr><td style=\"background: url('.Url::baseUrl().'/assets/img/bg.png) no-repeat;background-size: cover;padding: 50px 0;text-align: center;\"><img src=\"'.Url::baseUrl().'assets/img/logo-white.png\" style=\"width: 300px;\"></td></tr><tr><td style=\"padding: 40px;\"><table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td style=\"padding: 10px 0; \">Hello '.$res['username'].',</td></tr><tr><td style=\"padding: 10px 0; \">You are receiving this email because you contacted ADMIN for assistance regarding your \"Security Answer\" to reset your password. Please take note of your registered security answer below and click \"Reset Password\" to proceed</td></tr><tr><td style=\"padding: 20px;\"><table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td style=\"width: 150px; padding: 5px 0;\">Security Question</td><td>'.$ques['security_question'].'</td></tr><tr><td style=\"width: 150px; padding: 5px 0;\">Security Answer</td><td>'.$res['answer'].'</td></tr><tr><td colspan=\"2\" style=\"text-align: center; height: 80px; padding: 10px;\"><a href=\"'.$url.'\" style=\"padding: 10px; background: #f5f5f5; border: 1px solid #b2b2b2; text-transform: uppercase; text-decoration: none; color: #000\">Reset Password</a></td></tr></table></td></tr><tr><td style=\"padding: 20px 0 0 0;\">Best Regards,</td></tr><tr><td style=\"font-weight: 600;\">MSW ADMIN</td></tr></table></td></tr><tr><td style=\"background: url('.Url::baseUrl().'/assets/img/bg.png) no-repeat;background-size: cover;padding: 10px 0;text-align: center;\"></td></tr></table></td></tr></table>';\n\n\t\treturn $output;\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 sendecode()\n {\n $to = html_escape($this->input->post('email'));\n $message = html_escape($this->input->post('message'));\n $from = $this->session->userdata('sname');\n $refcode = $this->db->get_where('superuser', array('email' => $from))->row()->ref;\n $subject = 'Referrel Code :' . $refcode;\n $this->Email_model->send_smtp_mail($message, $subject, $to, $from);\n $this->session->set_flashdata('emailsent', \"Email Sent Successfully\");\n $this->vemailmodal();\n }", "function send_expired_email($member, $details)\n{\n $body = \"Dear %s,\n \nYour PLUG membership expired on %s.\n\nIf you wish to renew your PLUG membership, you have several options:\n\n\".PAYMENT_OPTIONS.\"\n \nMembership fees are \\$%s per year, or \\$%s per year for holders of a\ncurrent student or concession card.\n\nYou may choose not to renew your membership, in which case your PLUG\nshell account will expire 5 days after your membership lapsed. However,\nthe mailing list is still freely accessible to non-members.\n\nIf you have any queries, please do not hesitate to contact the PLUG\ncommittee via email at \".COMMITTEE_EMAIL.\".\n\nRegards,\n\nPLUG Membership Scripts\";\n\n $body = sprintf($body,\n $details['displayName'],\n $details['formattedexpiry'],\n FULL_AMOUNT / 100,\n CONCESSION_AMOUNT / 100\n );\n \n $subject = \"Your PLUG Membership has Expired\";\n \n if($member->send_user_email($body, $subject))\n {\n foreach($member->get_messages() as $message) echo \"$message\\n\";\n }else{\n foreach($member->get_errors() as $message) echo \"$message\\n\"; \n }\n}", "private function sendNotifyEmail(){\n $uS = Session::getInstance();\n $to = filter_var(trim($uS->referralFormEmail), FILTER_SANITIZE_EMAIL);\n\n try{\n if ($to !== FALSE && $to != '') {\n// $userData = $this->getUserData();\n $content = \"Hello,<br>\" . PHP_EOL . \"A new \" . $this->formTemplate->getTitle() . \" was submitted to \" . $uS->siteName . \". <br><br><a href='\" . $uS->resourceURL . \"house/register.php' target='_blank'>Click here to log into HHK and take action.</a><br>\" . PHP_EOL;\n\n $mail = prepareEmail();\n\n $mail->From = ($uS->NoReplyAddr ? $uS->NoReplyAddr : \"[email protected]\");\n $mail->FromName = htmlspecialchars_decode($uS->siteName, ENT_QUOTES);\n $mail->addAddress($to);\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New \" . Labels::getString(\"Register\", \"onlineReferralTitle\", \"Referral\") . \" submitted\";\n $mail->msgHTML($content);\n\n if ($mail->send() === FALSE) {\n return false;\n }else{\n return true;\n }\n }\n }catch(\\Exception $e){\n return false;\n }\n return false;\n }", "public function mailopen() {\n $signingKey = $_GET['signingKey'];\n $request = Database::table(\"requests\")->where(\"signing_key\", $signingKey)->first();\n $actionTakenBy = escape($request->email);\n /*\n * Check, whether IP address register is allowed in .env\n * If yes, then capture the user's IP address\n */\n if (env('REGISTER_IP_ADDRESS_IN_HISTORY') == 'Enabled') {\n $actionTakenBy .= ' ['.getUserIpAddr().']';\n }\n $activity = '<span class=\"text-primary\">'.$actionTakenBy.'</span> opened signing invitation email of this document.';\n Signer::keephistory($request->document, $activity, \"default\");\n $notification = '<span class=\"text-primary\">'.escape($request->email).'</span> has opened the email signing requests sent for this <a href=\"'.url(\"Document@open\").$request->document.'\">document</a>.';\n Signer::notification($request->sender, $notification, \"accept\");\n exit();\n }", "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}", "protected function gmailAuthenticate(){\n\n\t\t\n\t}", "function send_tempPass($email){\n\n\n $temp_pass = generate_temp_pass();\n $insert_to_db_pass = md5($temp_pass);\n $username = $_SESSION['username'];\n $email = htmlspecialchars($email);\n \n change_to_temp($insert_to_db_pass,$_SESSION['email'],$username);\n $to = $_SESSION['email'];\n\n $subject = \"Temporary Password\";\n\n //message to the user!\n $message = \"\n <html>\n <body style='background: #3B653D;'>\n <div>\n <h1 style = 'color:#ffffff; font-size:32px; text-align: center;'> Here is your account temporary password info $email !<br></h1>\n \n <span style = 'color:#ffffff;' font-size:20px;'> Temporary Password: $temp_pass </span><br>\n <span><a style = 'color:#ffffff;' href =http://farvlu.farmingdale.edu/~foxrc/BCS350_Project/change_password_link.php> Click here to change password </a> </span>\n \n </div>\n </body>\n </html>\";\n $headers = \"MIME-Version: 1.0\" . PHP_EOL;\n $headers .= \"Content-type:text/html;charset=UTF-8\" . PHP_EOL;\n $headers .= \"From: [email protected]\". PHP_EOL;\n mail($to,$subject,$message,$headers);\n\n}", "private function autoResponderEmailStr(){\n\t\t$NL=\"\\r\\n\";\n\t\t$s_style = 'font-size:'.$this->_emailFontSize.'; font-family:'.$this->_emailFontFamily.';';\n\t\t\n\t\t$s_emailContentRaw = $this->_autoResponderEmailContent;\n\t\t$s_emailContent = str_replace('{{tableContent}}', $this->getFormTableContent(), $s_emailContentRaw);\n\t\t\n\t\t$s_ret='<div style=\"'.$s_style.'\">'.$NL.$s_emailContent.$NL.'</div>';\n\t\treturn $s_ret;\n\t}", "function enviamail($datos) {\n //Create a new PHPMailer instance\n // Crear una nueva instancia de PHPMailer habilitando el tratamiento de excepciones\n try {\n $mail = new PHPMailer(true);\n// Configuramos el protocolo SMTP con autenticación\n $mail->IsSMTP();\n $mail->SMTPAuth = true;\n// Puerto de escucha del servidor\n $mail->Port = 587;\n// Dirección del servidor SMTP\n $mail->Host = 'mail.dentalia.com.mx';\n// Usuario y contraseña para autenticación en el servidor\n $mail->Username = \"[email protected]\";\n $mail->Password = \"x#l%=pcDw,TS\";\n $mail->SMTPOptions = array(\n 'ssl' => array(\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n 'allow_self_signed' => true\n )\n );\n\n//Set who the message is to be sent from\n $mail->setFrom('[email protected]', 'Dentalia');\n//Set an alternative reply-to address\n $mail->addReplyTo('[email protected]', 'Dentalia');\n//Set who the message is to be sent to\n //$mail->addAddress('[email protected]', 'Geovanny De Leon');\n $nombre = $datos['nombre'] . \" \" . $datos['apaterno'] . \" \" . $datos['amaterno'];\n $mail->addAddress($datos['email'], $nombre);\n //$mail->addCC('[email protected]', 'Geovanny De Leon');\n//Set the subject line\n $mail->Subject = utf8_decode('Confirmación de Cita en dentalia');\n//Read an HTML message body from an external file, convert referenced images to embedded,\n//convert HTML into a basic plain-text alternative body\n $msj = file_get_contents('parts/mailer.html');\n $replacename = str_replace(\"{patname}\", $nombre, $msj);\n $replaceclnic = str_replace(\"{nombreclinic}\", $datos['cliname'], $replacename);\n $dia = date(\"l\", strtotime($datos['fecha']));\n\n if ($dia == \"Monday\")\n $dia = \"Lunes\";\n if ($dia == \"Tuesday\")\n $dia = \"Martes\";\n if ($dia == \"Wednesday\")\n $dia = \"Miércoles\";\n if ($dia == \"Thursday\")\n $dia = \"Jueves\";\n if ($dia == \"Friday\")\n $dia = \"Viernes\";\n if ($dia == \"Saturday\")\n $dia = \"Sábado\";\n if ($dia == \"Sunday\")\n $dia = \"Domingo\";\n\n $mes = date(\"F\", strtotime($datos['fecha']));\n\n if ($mes == \"January\")\n $mes = \"Enero\";\n if ($mes == \"February\")\n $mes = \"Febrero\";\n if ($mes == \"March\")\n $mes = \"Marzo\";\n if ($mes == \"April\")\n $mes = \"Abril\";\n if ($mes == \"May\")\n $mes = \"Mayo\";\n if ($mes == \"June\")\n $mes = \"Junio\";\n if ($mes == \"July\")\n $mes = \"Julio\";\n if ($mes == \"August\")\n $mes = \"Agosto\";\n if ($mes == \"September\")\n $mes = \"Setiembre\";\n if ($mes == \"October\")\n $mes = \"Octubre\";\n if ($mes == \"November\")\n $mes = \"Noviembre\";\n if ($mes == \"December\")\n $mes = \"Diciembre\";\n $dia2 = date(\"d\", strtotime($datos['fecha']));\n $ano = date(\"Y\", strtotime($datos['fecha']));\n $replacefecha = str_replace(\"{fecha}\", $dia . \", \" . $dia2 . \" de \" . $mes . \" de \" . $ano, $replaceclnic);\n $hor = explode(\"-\", $datos['horai']);\n $horaini = date('h:ia', strtotime($hor[0]));\n $horaend = date('h:ia', strtotime($hor[1]));\n $horaconc = $horaini . \" a \" . $horaend;\n $replacef = str_replace(\"{horario}\", $horaconc, $replacefecha);\n\n// $ruta = \"webcal://\" . $_SERVER[\"SERVER_NAME\"] . \"/parts/evento.ics\";\n// /* reemplazamos para el calendario */\n// $replaceCal = str_replace(\"{ruta}\", $ruta, $replacef);\n\n $final = str_replace(\"{dirclinic}\", $datos['clidir'], $replacef);\n\n\n $mail->msgHTML(utf8_decode($final));\n\n\n// var_dump($final);\n// echo \"cual es el error?\";\n if ($mail->send()) {\n //echo \"Message sent!\";\n return true;\n } else {\n echo \"Mailer Error: \" . $mail->ErrorInfo;\n }\n } catch (Exception $e) {\n echo 'informacion sobre el mail: ', $e->getMessage(), \"\\n\";\n }\n }", "function emc_obfuscate_mailto_url( $email ) {\r\n\r\n\tif ( ! is_email( $email ) ) return false;\r\n\r\n\t$email = 'mailto:' . antispambot( $email );\r\n\r\n\treturn esc_url( $email );\r\n\r\n}", "function hrefCryptMail($mail)\n{\n $cs = \"mailto:\".$mail;\n $result=\"\";\n for($i=0;$i<strlen($cs);$i++) {\n $n=ord($cs[$i]);\n if($n>=8364)$n=128; \n $result.=chr($n+1);\n }\n $href=\"javascript:linkTo_UnCryptMailto('$result');\";\n return $href;\n}", "public function traerPorMail($email) {\n\n}", "public function getEmailOnBrokenLinkOnly() {}", "function sendemail($saltid, $subject, $html_content) {\n $dataSetting = $this->getSetting();\n $protocol = $dataSetting->MailProtocol;\n $host = $dataSetting->MailHost;\n $name = $dataSetting->MailName;\n $user = $dataSetting->MailUser;\n $pass = $dataSetting->MailPass;\n $port = $dataSetting->MailPort;\n\n $config['protocol'] = $protocol;\n $config['smtp_host'] = $host; //smtp host name\n $config['smtp_port'] = $port; //smtp port number\n $config['smtp_user'] = $user;\n $config['smtp_pass'] = $pass; //$from_email password\n $config['mailtype'] = 'html';\n $config['charset'] = 'utf-8';\n $config['wordwrap'] = TRUE;\n $config['newline'] = \"\\r\\n\"; //use double quotes\n\n $this->email->initialize($config);\n\n $this->email->from($user, $name);\n $this->email->to($saltid);\n $this->email->subject($subject);\n $message = $html_content;\n $this->email->message($message);\n return $this->email->send();\n }", "function constructRequest($unique_id)\n {\n if($unique_id != \"\")\n {\n\n // Now lets make sure we have a email\n if(!empty($this->_email))\n {\n\n // Now insert the data\n $query = $this->pdo->prepare(\"INSERT INTO forgotpassword VALUES('', :unique_id, :request_id, now())\");\n if($query->execute(array(':unique_id' => $unique_id, ':request_id' => $this->_request_id)))\n {\n // Now lets just send the email and be done\n $message = \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\">\n <html xmlns=\\\"http://www.w3.org/1999/xhtml\\\">\n <head>\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\" />\n <title>Demystifying Email Design</title>\n <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\"/>\n <link href='https://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900' rel='stylesheet' type='text/css'>\n </head>\n <body style=\\\"margin: 0; padding: 0;\\\">\n <style>\n *{\n font-family: 'Roboto';\n }\n \n .tableHolder{\n \n }\n \n .tableHolder tr td{\n padding: 20px;\n }\n </style>\n <table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\">\n <tr>\n <td>\n <table align=\\\"center\\\" border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"600\\\" class='tableHolder' style='border-right: 3px solid #292929;border-left: 3px solid #292929'>\n <tr class='tableHolder'>\n <td bgcolor='#292929' >\n <h3 style='text-align: center;font-weight: 300;font-size: 2.0em;color: #fff;'>Welcome to Sitelyft</h3>\n </td>\n </tr>\n <tr>\n <td>\n <h3 style='margin-top: 0px;padding-top: 0px;'>Hey!</h3>\n <p style='color: #777;'>Looks like you've forgotten your password! Dont worry we are here to help you, just press the button below to change your password.</p>\n <a href='\".site_url().\"/forgot_password/change_pass/\" . $this->_request_id . \"/\".$unique_id.\"' style='display: inline-block;\n margin-bottom: 0;\n font-weight: normal;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none;outline: none;\n padding: 10px 15px;\n font-size: 15px;\n line-height: 1.4;\n border: none;\n border-radius: 4px;\n -webkit-transition: border 0.25s linear,color 0.25s linear,background-color 0.25s linear;\n transition: border 0.25s linear,color 0.25s linear,background-color 0.25s linear;\n -webkit-font-smoothing: subpixel-antialiased; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15); color: #fff;\n background-color: #1abc9c;text-decoration: none;'>Reset Password!</a>\n </td>\n </tr>\n <tr bgcolor='#292929'>\n <td>\n <h3 style='text-align: center;font-weight: 300;font-size: 1.0em;color: #fff'>Trackasins &copy; 2019</h3>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </body>\n </html>\";\n\n $mg = Mailgun::create('key-f14cf94304da5471b926ec3e4487773f');\n $domain = \"trackasins.com\";\n $mg->messages()->send($domain, [\n 'from' => '[email protected]',\n 'to' => $this->_email,\n 'subject' => 'Reset Password',\n 'html' => $message\n ]);\n echo $this->_CI->response->make(\"Perfect we have sent you an email to reset your password!\", 'JSON', 1);\n return false;\n\n// $mgClient = new Mailgun('key-f14cf94304da5471b926ec3e4487773f');\n// $domain = \"trackasins.com\";\n// $result = $mgClient->sendMessage($domain, array(\n// \"from\" => \"[email protected]\",\n// \"to\" => $this->_email,\n// \"subject\" => \"Reset Password\",\n// \"text\" => $message\n// ));\n// echo \"112312312\";\n// print_r($result);\n// require 'mailgun-php/vendor/autoload.php';\n// use Mailgun\\Mailgun;\n//\n// $mgClient = new Mailgun('key-f14cf94304da5471b926ec3e4487773f');\n// $domain = \"trackasins.com\";\n//\n// $result = $mgClient->sendMessage(\"$domain\",\n// array( 'from' => '<[email protected]>',\n// 'to' => $this->_email,\n// 'subject' => 'Trackasins ',\n// 'html' => $message\n// ));\n\n// $this->_CI->email->from('[email protected]', 'Trackasins');\n// $this->_CI->email->to($this->_email);\n//\n// $this->_CI->email->subject('Reset Password');\n// $this->_CI->email->message($message);\n//\n// if ($this->_CI->email->send()){\n// echo $this->_CI->response->make(\"Perfect we have sent you an email to reset your password!\", 'JSON', 1);\n// return false;\n// }else{\n// echo $this->_CI->response->make(\"Something went wrong with emails\", 'JSON', 0);\n// return false;\n// }\n }else\n {\n echo $this->_CI->response->make(\"OOPS! An error has occurred\", 'JSON', 0);\n return false;\n }\n }\n }\n }", "function safe_mailto($email, $name = null, $opt = array(null))\n{\n\t$opt = array_merge(\n\t\tarray(\n\t\t\t'link' \t\t=> TRUE,\n\t\t\t'subject' \t=> '',\n\t\t\t'name' \t\t=> $name,\n\t\t\t'bcc' \t\t=> '',\n\t\t\t'cc' \t\t=> '',\n\t\t\t'class' \t=> 'email',\n\t\t\t'id' \t\t=> ''\n\t\t), \n\t$opt);\n\t\n\t$opt['subject']\t= !empty($opt['subject'])\t? 'subject='.$opt['subject'] : '';\n\t$opt['cc'] \t\t= !empty($opt['cc']) ? '&cc='.$opt['cc'] : '';\t\n\t$opt['bcc'] \t= !empty($opt['bcc']) ? '&bcc='.$opt['bcc'] : '';\n\t$opt['class'] \t= !empty($opt['class'])\t? ' class=\"'.$opt['class'].'\"' : '';\n\t$opt['id'] \t\t= !empty($opt['id'])\t? ' id=\"'.$opt['id'].'\"' : '';\n\t\n\tif($opt['link'] == TRUE)\n\t{\n\t\t$email = '<a target=\"_blank\" href=\"mailto:'.$email.'?'.$opt['subject'].$opt['cc'].$opt['bcc'].'\"'.$opt['class'].$opt['id'].'>'.$opt['name'].'</a>';\n\t}\n\n\t$email = str_replace(array('\"','@','.','/'),array('\\\"','\\100','\\56','\\057'),$email);\n\t$email = str_rot13($email);\n\t\n\treturn '<script type=\"text/javascript\">document.write(\"'.$email.'\".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<=\"Z\"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}));</script>';\n}", "function sendMail($to,$sub,$msg){\n $msg = wordwrap($msg,70);\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'From: Convolution 2017<[email protected]>' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n mail($to,$sub,$msg,$headers);\n}", "function enviaEmail($msgLog) {\n $msgLog = str_replace ( \"<q>\", \"<br>\", $msgLog );\n $assunto = 'Erro no Simec ' . date ( \"d-m-Y H:i:s\" ) . \" - \" . $_SESSION ['ambiente'];\n\n //$aDestinatarios = carregarUsuariosSessao();\n $remetente = array(\"nome\"=>\"SIMEC - \".strtoupper($_SESSION['sisdiretorio']).\" - \" . $_SESSION['usunome'] . \" - \" . $_SESSION['usuorgao'], \"email\"=>\"[email protected]\");\n $destinatarios = !empty($aDestinatarios[$_SESSION['sisid']]) ? $aDestinatarios[$_SESSION['sisid']] : array_keys($aDestinatarios['todos']);\n\n //simec_email($remetente, $destinatarios, $assunto, $msgLog);\n }", "function mailSocks($mail) {\n\t\t//echo 'mail socks <br>';\n\t\t$mail = getSocksMailer();\n\t\t$mail->AddAddress(\"[email protected]\");\n\t\t$mail->Subject = \"Litesprite Survey Completed: \". $_SESSION['client_key'];\n\t\t$mail->Body = 'Tester: ' . $_SESSION['client_key'] . ' has completed the survey: #'.$_SESSION['survey_id'].\" .\";\n\t\t$mail->WordWrap = 80;\n\t\tsendMail($mail);\n}", "public function cleanup(){\n\n //$this->_mail_type = 'html';\n //$this->_mail_encoding = 'utf-8';\n //$this->_transport_login = '';\n //$this->_transport = 'php';\n //$this->_transport_password = '';\n //$this->_transport_port = null;\n //$this->_transport_secure = null;\n //$this->_transport_host = null;\n $this->_lastError = null;\n $this->_subject = '';\n $this->_body = '';\n $this->_alt_body = '';\n $this->_attachements = array();\n $this->_from = '';\n $this->_fromName = null;\n $this->_replyto = array();\n $this->_addresses = array();\n $this->_cc = array();\n $this->_bcc = array();\n $this->_replyto = array();\n $this->_custom_headers = array();\n //$this->_is_embed_images = false;\n //$this->_is_track_links = false;\n //$this->_is_use_message_id = false;\n\n return $this;\n\n }", "public function __construct() {\r\n $this->html = false;\r\n $this->setFrom(EMAIL_FROM);\r\n }", "function initSmtpAuth(){\n $this->SMTPAuth = true;\n $this->Username = DOMAIN_USER;\n $this->Password = DOMAIN_PASS;\n }", "public function resend_email()\n\t{\t\n\t\t// figure out how to compose the body\n\t\tif ($this->that->HTML!='')\n\t\t{\n\t\t\t$body = (isset($this->that->HTML_rewritten)) ? $this->that->HTML_rewritten : $this->that->HTML;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$body = (isset($this->that->PLAIN_rewritten)) ? $this->that->PLAIN_rewritten : $this->that->PLAIN;\n\t\t}\n\n\t\t$is_not_html = $this->that->has_PLAIN_not_HTML();\n\n\t\t// get the attachment filenames\n\t\t$file_array = $this->that->get_file_name_array();\n\t\t\n\t\t// this function is in the email_send_helper\n\t\t// and requires a modified email library\n\t\t// settings for using google as the smtp machine are\n\t\t// embedded in the helper\n\t\t// you can replace this with a simpler email sender\n\t\tsend_email_by_google($this->get_list_address(),\n\t\t\t$this->get_resend_to(),\n\t\t\t$this->get_resend_cc(), \n\t\t\t$this->that->get_address_from(),\n\t\t\t$this->that->get_personal_from(),\n\t\t\t$this->that->get_subject(),\n\t\t\t$body, $is_not_html, $file_array);\n\t}", "function sendEmail($recipient,$subject, $bodyHTML){\n\t\t$headers = \"From: quota_store \\r\\n\";\n\t\t//$headers .= \"Reply-To: \" . strip_tags($_POST['req-email']) . \"\\r\\n\";\n\t\t//$headers .= \"CC: [email protected]\\r\\n\";\n\t\t$headers .= \"MIME-Version: 1.0\\r\\n\";\n\t\t$headers .= \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\";\t\t\n\t\t$salutation = '<p>Dear '.$recipient->firstname.' '.$recipient->lastname.',</p>';\n\t\t$footer = '<p><em>This is an automated message by the Quota Store.</em></p>';\n\t\t$content = '<html>';\n\t\t$content .='\t<body>';\t \t \n\t\t$content .= \t$salutation . $bodyHTML . $footer;\t\t\n\t\t$content .='\t</body>';\n\t\t$content .='</html>';\t\t\t\n\t\tmail($recipient->email, $subject, $content, $headers);\t\n\n\t}", "private function send_email($email) {\n $to = isset($email['to'])?$email['to']:[];\n if (!is_array($email['to'])) { \n $to = [$to];\n }\n $to = array_unique($to);\n\n $subject = isset($email['subject'])?$email['subject']:'No Subject';\n $content = isset($email['content'])?$email['content']:'No Body';\n\n // If MAIL_LIMIT_SEND is true, only send emails to those who are \n // specified in MAIL_LIMIT_ALLOW\n if (config('mail.limit_send') !== false) {\n $to = array_intersect($to,config('mail.limit_allow'));\n }\n\n // If we're not sending an email to anyone, just return\n if (empty($to)) {\n return false;\n }\n\n try {\n Mail::raw( $content, function($message) use($to, $subject) { \n $m = new \\Mustache_Engine;\n $message->to($to);\n $message->subject($subject); \n });\n } catch (\\Throwable $e) {\n // Failed to Send Email... Continue Anyway.\n }\n }", "function dmailer_prepare($row)\t{\n\t\tglobal $LANG;\n\n\t\t$sys_dmail_uid = $row['uid'];\n\t\tif ($row['flowedFormat']) {\n\t\t\t$this->flowedFormat = 1;\n\t\t}\n\t\tif ($row['charset']) {\n\t\t\t$this->charset = $row['charset'];\n\t\t}\n\t\tswitch ($row['encoding']) {\n\t\t\tcase 'base64':\n\t\t\t\t$this->useBase64();\n\t\t\t\tbreak;\n\t\t\tcase '8bit':\n\t\t\t\t$this->use8Bit();\n\t\t\t\tbreak;\n\t\t\tcase 'printed-quotable':\n\t\t\tdefault:\n\t\t\t\t$this->useQuotedPrintable();\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$this->theParts = unserialize($row['mailContent']);\n\t\t$this->messageid = $this->theParts['messageid'];\n\n\t\t$this->subject = $row['subject'];\n\t\t$this->subject = $LANG->csConvObj->conv($this->subject, $LANG->charSet, $this->charset);\n\t\t$this->subject = t3lib_div::encodeHeader($this->subject, ($this->alt_base64 ? 'base64' : 'quoted_printable'), $this->charset);\n\n\t\t$this->from_email = $row['from_email'];\n\t\t$this->from_name = ($row['from_name'] ? $LANG->csConvObj->conv($row['from_name'], $LANG->charSet, $this->charset) : '');\n\t\t$this->from_name = t3lib_div::encodeHeader($this->from_name, ($this->alt_base64 ? 'base64' : 'quoted_printable'), $this->charset);\n\t\t\n\t\t$this->replyto_email = ($row['replyto_email'] ? $row['replyto_email'] : '');\n\t\t$this->replyto_name = ($row['replyto_name'] ? $LANG->csConvObj->conv($row['replyto_name'], $LANG->charSet, $this->charset) : '');\n\t\t$this->replyto_name = t3lib_div::encodeHeader($this->replyto_name, ($this->alt_base64 ? 'base64' : 'quoted_printable'), $this->charset);\n\t\t\n\t\t$this->organisation = ($row['organisation'] ? $LANG->csConvObj->conv($row['organisation'], $LANG->charSet, $this->charset) : '');\n\t\t$this->organisation = t3lib_div::encodeHeader($this->organisation, ($this->alt_base64 ? 'base64' : 'quoted_printable'), $this->charset);\n\t\t\n\t\t$this->priority = tx_directmail_static::intInRangeWrapper($row['priority'], 1, 5);\n\t\t$this->mailer = 'TYPO3 Direct Mail module';\n\t\t$this->authCode_fieldList = ($row['authcode_fieldList'] ? $row['authcode_fieldList'] : 'uid');\n\n\t\t$this->dmailer['sectionBoundary'] = '<!--DMAILER_SECTION_BOUNDARY';\n\t\t$this->dmailer['html_content'] = base64_decode($this->theParts['html']['content']);\n\t\t$this->dmailer['plain_content'] = base64_decode($this->theParts['plain']['content']);\n\t\t$this->dmailer['messageID'] = $this->messageid;\n\t\t$this->dmailer['sys_dmail_uid'] = $sys_dmail_uid;\n\t\t$this->dmailer['sys_dmail_rec'] = $row;\n\n\t\t$this->dmailer['boundaryParts_html'] = explode($this->dmailer['sectionBoundary'], '_END-->'.$this->dmailer['html_content']);\n\t\tforeach ($this->dmailer['boundaryParts_html'] as $bKey => $bContent) {\n\t\t\t$this->dmailer['boundaryParts_html'][$bKey] = explode('-->', $bContent, 2);\n\n\t\t\t\t// Remove useless HTML comments\n\t\t\tif (substr($this->dmailer['boundaryParts_html'][$bKey][0],1) == 'END') {\n\t\t\t\t$this->dmailer['boundaryParts_html'][$bKey][1] = $this->removeHTMLComments($this->dmailer['boundaryParts_html'][$bKey][1]);\n\t\t\t}\n\n\t\t\t\t// Now, analyzing which media files are used in this part of the mail:\n\t\t\t$mediaParts = explode('cid:part', $this->dmailer['boundaryParts_html'][$bKey][1]);\n\t\t\treset($mediaParts);\n\t\t\tnext($mediaParts);\n\t\t\twhile(list(,$part) = each($mediaParts)) {\n\t\t\t\t$this->dmailer['boundaryParts_html'][$bKey]['mediaList'] .= ',' . strtok($part, '.');\n\t\t\t}\n\t\t}\n\t\t$this->dmailer['boundaryParts_plain'] = explode($this->dmailer['sectionBoundary'], '_END-->'.$this->dmailer['plain_content']);\n\t\tforeach ($this->dmailer['boundaryParts_plain'] as $bKey => $bContent) {\n\t\t\t$this->dmailer['boundaryParts_plain'][$bKey] = explode('-->', $bContent, 2);\n\t\t}\n\n\t\t$this->flag_html = ($this->theParts['html']['content'] ? 1 : 0);\n\t\t$this->flag_plain = ($this->theParts['plain']['content'] ? 1 : 0);\n\t\t$this->includeMedia = $row['includeMedia'];\n\t}", "public function emailtemplete($email)\n\t{\t\n\t\t$templetedata = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta name=\"viewport\" content=\"width=device-width\" />\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n<title>Verify your account</title>\n<style>/* -------------------------------------\n GLOBAL\n A very basic CSS reset\n------------------------------------- */\n* {\n margin: 0;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n box-sizing: border-box;\n font-size: 14px;\n}\n\nimg {\n max-width: 100%;\n}\n\nbody {\n -webkit-font-smoothing: antialiased;\n -webkit-text-size-adjust: none;\n width: 100% !important;\n height: 100%;\n line-height: 1.6em;\n /* 1.6em * 14px = 22.4px, use px to get airier line-height also in Thunderbird, and Yahoo!, Outlook.com, AOL webmail clients */\n /*line-height: 22px;*/\n}\n\ntable td {\n vertical-align: top;\n}\n\nbody {\n background-color: #f6f6f6;\n}\n\n.body-wrap {\n background-color: #f6f6f6;\n width: 100%;\n}\n\n.container {\n display: block !important;\n max-width: 600px !important;\n margin: 0 auto !important;\n /* makes it centered */\n clear: both !important;\n}\n\n.content {\n max-width: 600px;\n margin: 0 auto;\n display: block;\n padding: 20px;\n}\n\n/* -------------------------------------\n HEADER, FOOTER, MAIN\n------------------------------------- */\n.main {\n background-color: #fff;\n border: 1px solid #e9e9e9;\n border-radius: 3px;\n}\n\n.content-wrap {\n padding: 20px;\n}\n\n.content-block {\n padding: 0 0 20px;\n}\n\n.header {\n width: 100%;\n margin-bottom: 20px;\n}\n\n.footer {\n width: 100%;\n clear: both;\n color: #999;\n padding: 20px;\n}\n.footer p, .footer a, .footer td {\n color: #999;\n font-size: 12px;\n}\n\n/* -------------------------------------\n TYPOGRAPHY\n------------------------------------- */\nh1, h2, h3 {\n font-family: \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;\n color: #000;\n margin: 40px 0 0;\n line-height: 1.2em;\n font-weight: 400;\n}\n\nh1 {\n font-size: 32px;\n font-weight: 500;\n /* 1.2em * 32px = 38.4px, use px to get airier line-height also in Thunderbird, and Yahoo!, Outlook.com, AOL webmail clients */\n /*line-height: 38px;*/\n}\n\nh2 {\n font-size: 24px;\n /* 1.2em * 24px = 28.8px, use px to get airier line-height also in Thunderbird, and Yahoo!, Outlook.com, AOL webmail clients */\n /*line-height: 29px;*/\n}\n\nh3 {\n font-size: 18px;\n /* 1.2em * 18px = 21.6px, use px to get airier line-height also in Thunderbird, and Yahoo!, Outlook.com, AOL webmail clients */\n /*line-height: 22px;*/\n}\n\nh4 {\n font-size: 14px;\n font-weight: 600;\n}\n\np, ul, ol {\n margin-bottom: 10px;\n font-weight: normal;\n}\np li, ul li, ol li {\n margin-left: 5px;\n list-style-position: inside;\n}\n\n/* -------------------------------------\n LINKS & BUTTONS\n------------------------------------- */\na {\n color: #348eda;\n text-decoration: underline;\n}\n\n.btn-primary {\n text-decoration: none;\n color: #FFF;\n background-color: #348eda;\n border: solid #348eda;\n border-width: 10px 20px;\n line-height: 2em;\n /* 2em * 14px = 28px, use px to get airier line-height also in Thunderbird, and Yahoo!, Outlook.com, AOL webmail clients */\n /*line-height: 28px;*/\n font-weight: bold;\n text-align: center;\n cursor: pointer;\n display: inline-block;\n border-radius: 5px;\n text-transform: capitalize;\n}\n\n/* -------------------------------------\n OTHER STYLES THAT MIGHT BE USEFUL\n------------------------------------- */\n.last {\n margin-bottom: 0;\n}\n\n.first {\n margin-top: 0;\n}\n\n.aligncenter {\n text-align: center;\n}\n\n.alignright {\n text-align: right;\n}\n\n.alignleft {\n text-align: left;\n}\n\n.clear {\n clear: both;\n}\n\n/* -------------------------------------\n ALERTS\n Change the class depending on warning email, good email or bad email\n------------------------------------- */\n.alert {\n font-size: 16px;\n color: #fff;\n font-weight: 500;\n padding: 20px;\n text-align: center;\n border-radius: 3px 3px 0 0;\n}\n.alert a {\n color: #fff;\n text-decoration: none;\n font-weight: 500;\n font-size: 16px;\n}\n.alert.alert-warning {\n background-color: #FF9F00;\n}\n.alert.alert-bad {\n background-color: #D0021B;\n}\n.alert.alert-good {\n background-color: #68B90F;\n}\n\n/* -------------------------------------\n INVOICE\n Styles for the billing table\n------------------------------------- */\n.invoice {\n margin: 40px auto;\n text-align: left;\n width: 80%;\n}\n.invoice td {\n padding: 5px 0;\n}\n.invoice .invoice-items {\n width: 100%;\n}\n.invoice .invoice-items td {\n border-top: #eee 1px solid;\n}\n.invoice .invoice-items .total td {\n border-top: 2px solid #333;\n border-bottom: 2px solid #333;\n font-weight: 700;\n}\n\n/* -------------------------------------\n RESPONSIVE AND MOBILE FRIENDLY STYLES\n------------------------------------- */\n@media only screen and (max-width: 640px) {\n body {\n padding: 0 !important;\n }\n\n h1, h2, h3, h4 {\n font-weight: 800 !important;\n margin: 20px 0 5px !important;\n }\n\n h1 {\n font-size: 22px !important;\n }\n\n h2 {\n font-size: 18px !important;\n }\n\n h3 {\n font-size: 16px !important;\n }\n\n .container {\n padding: 0 !important;\n width: 100% !important;\n }\n\n .content {\n padding: 0 !important;\n }\n\n .content-wrap {\n padding: 10px !important;\n }\n\n .invoice {\n width: 100% !important;\n }\n}\n\n/*# sourceMappingURL=styles.css.map */\n</style>\n</head>\n\n<body itemscope itemtype=\"http://schema.org/EmailMessage\">\n\n<table class=\"body-wrap\">\n\t<tr>\n\t\t<td></td>\n\t\t<td class=\"container\" width=\"600\">\n\t\t\t<div class=\"content\">\n\t\t\t\t<table class=\"main\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"alert alert-warning\">\n\t\t\t\t\t\t\tVerify your account\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"content-wrap\">\n\t\t\t\t\t\t\t<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\"content-block\">\n\t\t\t\t\t\t\t\t\t\tDear customer Pleas <strong>Click</strong> Below link .\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\"content-block\">\n\t\t\t\t\t\t\t\t\t\t<a href=\"'.base_url().'varify/'.urlencode(base64_encode($email)).'\" class=\"btn-primary\">verify</a>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\"content-block\">\n\t\t\t\t\t\t\t\t\t\tThanks for choosing 11needs.com.\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t<div class=\"footer\">\n\t\t\t\t\t<table width=\"100%\">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class=\"aligncenter content-block\"></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</div></div>\n\t\t</td>\n\t\t<td></td>\n\t</tr>\n</table>\n\n</body>\n</html>';\n\t\treturn $templetedata;\n\t}", "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 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}", "function sendMail($to, $subject, $msg)\r\n{\r\n $mail = new PHPMailer();\r\n $mail->SMTPDebug = 0;\r\n $mail->IsSMTP();\r\n $mail->SMTPAuth = true;\r\n $mail->SMTPSecure = 'tls';\r\n $mail->Host = \"smtp.gmail.com\";\r\n $mail->Port = 587;\r\n $mail->IsHTML(true);\r\n $mail->CharSet = 'UTF-8';\r\n $mail->Username = \"[email protected]\";\r\n $mail->Password = \"Assamunivproj21@\";\r\n $mail->SetFrom(\"[email protected]\");\r\n $mail->Subject = $subject;\r\n $mail->Body = $msg;\r\n $mail->AddAddress($to);\r\n $mail->SMTPOptions = array('ssl' => array(\r\n 'verify_peer' => false,\r\n 'verify_peer_name' => false,\r\n 'allow_self_signed' => false\r\n ));\r\n\r\n return $mail->Send();\r\n}", "function sendHTMLMail($content,$recipient,$dummy,$fromEmail,$fromName,$replyTo='',$recepientsCopy='',$recepientsBcc='')\t{\n\t\tif (trim($recipient) && trim($content))\t{\n\t\t\t$cls=t3lib_div::makeInstanceClassName('t3lib_htmlmail');\n\t\t\tif (class_exists($cls))\t{\t// If htmlmail lib is included, then generate a nice HTML-email\n\t\t\t\t$parts = spliti('<title>|</title>',$content,3);\n\t\t\t\t$subject = trim($parts[1]) ? trim($parts[1]) : 'TYPO3 FE Admin message';\n\n\t\t\t\t$Typo3_htmlmail = t3lib_div::makeInstance('t3lib_htmlmail');\n\t\t\t\t$Typo3_htmlmail->start();\n\t\t\t\t$Typo3_htmlmail->useBase64();\n\n\t\t\t\t$Typo3_htmlmail->subject = $subject;\n\t\t\t\t$Typo3_htmlmail->from_email = $fromEmail;\n\t\t\t\t$Typo3_htmlmail->from_name = $fromName;\n\t\t\t\t$Typo3_htmlmail->replyto_email = $replyTo ? $replyTo : $fromEmail;\n\t\t\t\t$Typo3_htmlmail->replyto_name = $replyTo ? '' : $fromName;\n\t\t\t\t//modif by CMD - add return path information\n\t\t\t\t$Typo3_htmlmail->returnPath = $replyTo ? $replyTo : $fromEmail;\n\t\t\t\t$Typo3_htmlmail->organisation = '';\n\t\t\t\t$Typo3_htmlmail->priority = 3;\n\n\t\t\t\t\t// HTML\n\t\t\t\t$Typo3_htmlmail->theParts['html']['content'] = $content;\t// Fetches the content of the page\n\t\t\t\t$Typo3_htmlmail->theParts['html']['path'] = '';\n\t\t\t\t$Typo3_htmlmail->extractMediaLinks();\n\t\t\t\t$Typo3_htmlmail->extractHyperLinks();\n\t\t\t\t$Typo3_htmlmail->fetchHTMLMedia();\n\t\t\t\t$Typo3_htmlmail->substMediaNamesInHTML(0);\t// 0 = relative\n\t\t\t\t$Typo3_htmlmail->substHREFsInHTML();\n\t\t\t\t$Typo3_htmlmail->setHTML($Typo3_htmlmail->encodeMsg($Typo3_htmlmail->theParts['html']['content']));\n\n\t\t\t\t\t// PLAIN\n\t\t\t\t$Typo3_htmlmail->addPlain('');\n\n\t\t\t\t\t// SET Headers and Content\n\t\t\t\t$Typo3_htmlmail->setHeaders();\n\t\t\t\t$Typo3_htmlmail->setContent();\n\t\t\t\t$Typo3_htmlmail->setRecipient($recipient);\n\t\t\t\t$Typo3_htmlmail->recipient_copy=$recepientsCopy;\n\t\t\t\t$Typo3_htmlmail->recipient_blindcopy=$recepientsBcc;\n\t\t//\t\tdebug($Typo3_htmlmail->theParts);\n\t\t\t\t$Typo3_htmlmail->sendtheMail();\n\t\t\t} else {\n\t\t\t\tdebug('SYSTEM ERROR: No HTML-mail library loaded. Set \"page.config.incT3Lib_htmlmail = 1\" is your TypoScript template.');\n\t\t\t}\n\t\t}\n\t}", "function EMAIL_tc($e_to,$e_to_name,$e_subject,$e_in_subject,$e_body){\n\t\t\t\t\t$transport = Swift_MailTransport::newInstance();\n\t\t\t\t\t\n\t\t\t\t\t// Create the message\n\t\t\t\t\t$message = Swift_Message::newInstance();\n\t\t\t\t\t$message->setTo(array(\n\t\t\t\t\t $e_to => $e_to_name\n\t\t\t\t\t));\n\t\t\t\t\t$message->setSubject($e_subject . \" - UnitedGaming\");\n\t\t\t\t\t\n\t\t\t\t\t$message->setBody(\n\t\t\t\t\t'<html>\n\t\t\t\t\t<link href=\\'http://fonts.googleapis.com/css?family=Source+Sans+Pro\\' rel=\\'stylesheet\\' type=\\'text/css\\'>\n\t\t\t\t\t<table border=\"0\" align=\"center\" width=\"99%\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td><a href=\"http://unitedgaming.org\" target=\"_blank\" title=\"UnitedGaming\" alt=\"UnitedGaming\"><img src=\"http://unitedgaming.org/mainlogo.png\" alt=\"UnitedGaming\" border=\"0\"/></td>\n\t\t\t\t\t<td><span style=\"font-family: \\'Source Sans Pro\\', sans-serif;\"><font size=\"6px\" color=\"#BD3538\">'.$e_in_subject.'</font></span></td>\n\t\t\t\t\t</tr>' \n\t\t\t\t\t.\n\t\t\t\t\t'<br/><br /><br/><tr>\n\t\t\t\t\t<td colspan=\"2\"><font size=\"3px\" color=\"#303030\">'.$e_body.'\n\t\t\t\t\t </td></tr><tr><td><br/><span style=\"font-family: \\'Source Sans Pro\\', sans-serif;\"><font size=\"2px\">Kind Regards,<br/>Chuevo</font></span></td><td></td></tr></table></html>\n\t\t\t\t\t ');\n\t\t\t\t\t$message->setFrom(\"[email protected]\", \"UnitedGaming\");\n\t\t\t\t\t$type = $message->getHeaders()->get('Content-Type');\n\t\t\n\t\t\t\t\t$type->setValue('text/html');\n\t\t\t\t\t$type->setParameter('charset', 'utf-8');\n\t\t\t\t\t\n\t\t\t\t\t//echo $type->toString();\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t\n\t\t\t\t\tContent-Type: text/html; charset=utf-8\n\t\t\t\t\t\n\t\t\t\t\t*/\n\t\t\t\t\t// Send the email\n\t\t\t\t\t$mailer = Swift_Mailer::newInstance($transport);\n\t\t\t\t\t$mailer->send($message);\n\t\t}", "function SendEmail($fromuserid,$touserid, $subject, $message ) {\n\t//$email = '[email protected]'; //comment this line to turn off redirect.\n\t\n\t//$subject = \"Your ClubHouse Web Membership\";\n\t$headers = \"From: TONYS CLUBHOUSE<[email protected]>\\nX-Mailer: PHP/\" . phpversion(). \"\\r\\n\";\n\t$headers .= 'Bcc: [email protected]' . \"\\r\\n\";\n //$message = \"\"; \n \n mail($email, $subject, $message, $headers); \n}", "static function unwrap_email($html_email) {\n\n if (self::_has_markers($html_email)) {\n $html_email = self::unwrap_html_element($html_email);\n } else {\n //KEEP FOR OLD EMAIL COMPATIBILITY\n // Extracts only the body part\n $x = strpos($html_email, '<body');\n if ($x) {\n $x = strpos($html_email, '>', $x);\n $y = strpos($html_email, '</body>');\n $html_email = substr($html_email, $x + 1, $y - $x - 1);\n }\n\n /* Cleans up uncorrectly stored newsletter bodies */\n $html_email = preg_replace('/<style\\s+.*?>.*?<\\\\/style>/is', '', $html_email);\n $html_email = preg_replace('/<meta.*?>/', '', $html_email);\n $html_email = preg_replace('/<title\\s+.*?>.*?<\\\\/title>/i', '', $html_email);\n $html_email = trim($html_email);\n }\n\n // Required since esc_html DOES NOT escape the HTML entities (apparently)\n $html_email = str_replace('&', '&amp;', $html_email);\n $html_email = str_replace('\"', '&quot;', $html_email);\n $html_email = str_replace('<', '&lt;', $html_email);\n $html_email = str_replace('>', '&gt;', $html_email);\n\n return $html_email;\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}", "function sEmail( $email )\r\n\t\t{\r\n\t\t return filter_var( $email, FILTER_SANITIZE_EMAIL );\r\n\t\t \r\n\t\t}", "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 sendEmailPassword($user_id, $password){\n\t\n\t $result = $GLOBALS['db']->query(\"SELECT email1, email2, first_name, last_name FROM users WHERE id='$user_id'\");\n\t $row = $GLOBALS['db']->fetchByAssoc($result);\n\t \n\t if(empty($row['email1']) && empty($row['email2'])){\n\t \n\t $_SESSION['login_error'] = 'Please contact an administrator to setup up your email address associated to this account';\n\t return;\n\t }\n\t \n\t require_once(\"include/SugarPHPMailer.php\");\n\t\t$notify_mail = new SugarPHPMailer();\n\t\t$notify_mail->CharSet = AppConfig::setting('email.default_charset');\n\t\t$notify_mail->AddAddress(((!empty($row['email1']))?$row['email1']: $row['email2']), $row['first_name'] . ' ' . $row['last_name'] );\n \n\t\tif (empty($_SESSION['authenticated_user_language'])) {\n\t\t\t$current_language = AppConfig::setting('locale.defaults.language');\n\t\t}\n\t\telse {\n\t\t\t$current_language = $_SESSION['authenticated_user_language'];\n\t\t}\n\n\t\t$notify_mail->Subject = 'info@hand Token';\n\t\t$notify_mail->Body = 'Your info@hand session authentication token is: ' . $password;\n\t\tif(AppConfig::setting('email.send_type') == \"SMTP\") {\n\t\t\t$notify_mail->Mailer = \"smtp\";\n\t\t\t$notify_mail->Host = AppConfig::setting('email.smtp_server');\n\t\t\t$notify_mail->Port = AppConfig::setting('email.smtp_port');\n\t\t\tif (AppConfig::setting('email.smtp_auth_req')) {\n\t\t\t\t$notify_mail->SMTPAuth = TRUE;\n\t\t\t\t$notify_mail->Username = AppConfig::setting('email.smtp_user');\n\t\t\t\t$notify_mail->Password = AppConfig::setting('email.smtp_password');\n\t\t\t}\n\t\t}\n\n\t\t$notify_mail->From = 'no-reply@' . AppConfig::setting(array('email.from_host_name', 'site.host_name'));\n\t\t$notify_mail->FromName = 'info@hand Authentication';\n\n\t\tif(!$notify_mail->Send()) {\n\t\t\t$GLOBALS['log']->warn(\"Notifications: error sending e-mail (method: {$notify_mail->Mailer}), (error: {$notify_mail->ErrorInfo})\");\n\t\t}\n\t\telse {\n\t\t\t$GLOBALS['log']->info(\"Notifications: e-mail successfully sent\");\n\t\t}\n\t\n\t\t\t\n\t\t\n\t}", "function paid_sendEmail_admin($details) {\n\n\t\t\t$currencycode = $details->currCode;\n\t\t\t$currencysign = $details->currSymbol;\n\n\t\t\t\t$custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$remaining = $details->remainingAmount;\n\t\t\t\t$custemail = $details->accountEmail;\t\t\t\t\n\t\t\t\t$additionaNotes = $details->additionaNotes;\t\t\t\t\n\t\t\t\t$sendto = $this->adminemail;\n\n\t\t\t\t$sitetitle = \"\";\n\n\t\t\t\t$invoicelink = \"<a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$template = $this->shortcode_variables(\"bookingpaidadmin\");\n\t\t\t\t$details = email_template_detail(\"bookingpaidadmin\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"bookingpaidadmin\");\n\t\t\t\t$values = array($invoiceid, $refno, $deposit, $totalamount, $custemail, $custid, $country, $phone, $currencycode, $currencysign, $invoicelink, $sitetitle, $name,$additionaNotes);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $this->adminmobile, \"bookingpaidadmin\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('Booking Payment Notification');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n\n //------------------------------------queue email in database-------------------------------\n /** THIS WIL NOT SEND BUT QUEUE THE EMAILS*/\n if ($email == 'mailqueue_ticket_reply') {\n\n //email vars\n $this->data['email_vars']['email_title'] = $this->data['lang']['lang_support_ticket_reply'];\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('general_notification_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //dynamic email vars - email body\n $this->data['email_vars']['email_message'] = '\n <div style=\" border:#CCCCCC solid 1px; padding:8px;\">\n <span style=\"text-decoration: underline; font-weight:bold;\">\n ' . $this->data['lang']['lang_title'] . '</span><br>\n ' . $this->input->post('tickets_title') . '<br><br>\n <span style=\"text-decoration: underline; font-weight:bold;\">\n ' . $this->data['lang']['lang_message'] . '</span><br>\n ' . $this->input->post('tickets_replies_message') . '\n <p><div style=\"padding:5px; background-color:#fbe9d0;\">'.$this->data['lang']['lang_support_do_not_reply'].'</div></div>';\n\n //dynamic email vars - general\n $this->data['email_vars']['addressed_to'] = $this->data['lang']['lang_hello'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'].'/ticket/'.$this->input->post('tickets_replies_ticket_id');\n\n //get the email address of staff assigned to this ticket. (email preferences are checked)\n $team_members_email = $this->teamprofile_model->notificationsEmail($this->input->post('tickets_assigned_to_id'));\n $this->data['debug'][] = $this->teamprofile_model->debug_data;\n\n //add to email queue\n if ($team_members_email != '') {\n\n //set sqldata() for database\n $sqldata['email_queue_message'] = parse_email_template($template['message'], $this->data['email_vars']);\n $sqldata['email_queue_subject'] = $this->data['lang']['lang_support_ticket_reply'];\n $sqldata['email_queue_email'] = $team_members_email;\n\n //add to email queue database - excluding uploader (no need to send them an email)\n $this->email_queue_model->addToQueue($sqldata);\n $this->data['debug'][] = $this->email_queue_model->debug_data;\n }\n\n }\n }", "public function sendEmail()\n {\n $user = User::findOne([\n 'email' => $this->email,\n 'status' => User::STATUS_INACTIVE\n ]);\n\n if ($user === null) {\n return false;\n }\n\n $verifyLink = Yii::$app->urlManager->createAbsoluteUrl(['site/verify-email', 'token' => $user->verification_token]);\n\n // Получатель\n $sendTo = $this->email;\n\n // Формирование заголовка письма\n $subject = 'Подтверждение регистрации на ' . Yii::$app->name;\n\n // Формирование тела письма\n $msg = \"<html><body style='font-family:Arial,sans-serif;'>\";\n $msg .= \"<h2 style='font-weight:bold;border-bottom:1px dotted #ccc;'>\" . $subject . \"</h2>\\r\\n\";\n $msg .= \"<p>Приветствуем, \" . Html::encode($user->username) . \",</p>\\r\\n\";\n $msg .= \"<p>Перейдите по ссылке ниже, чтобы подтвердить свою электронную почту:</p>\\r\\n\";\n $msg .= \"<p>\" . Html::a(Html::encode($verifyLink), $verifyLink) . \"</p>\\r\\n\";\n $msg .= \"</body></html>\";\n\n // Отправитель\n $headers = \"From: \". Yii::$app->params['supportEmail'] . \"\\r\\n\";\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-Type: text/html;charset=utf-8 \\r\\n\";\n\n // отправка сообщения\n if(@mail($sendTo, $subject, $msg, $headers)) {\n return true;\n } else {\n return false;\n }\n /*\n return Yii::$app\n ->mailer\n ->compose(\n ['html' => 'emailVerify-html', 'text' => 'emailVerify-text'],\n ['user' => $user]\n )\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name . ' robot'])\n ->setTo($this->email)\n ->setSubject('Подтверждение регистрации на ' . Yii::$app->name)\n ->send();\n */\n }", "public function run()\n {\n if ($this->allowOverride) {\n $to = $this->arg('to');\n $cc = $this->arg('cc');\n $bcc = $this->arg('bcc');\n $subject = $this->arg('subject');\n\n /* if class vars is defined, dont override it */\n if ($to) {\n $this->email->to($to);\n }\n\n if ($cc) {\n $this->email->cc($cc);\n }\n\n if ($bcc) {\n $this->email->bcc($bcc);\n }\n\n if ($subject) {\n $this->email->subject($subject);\n }\n\n $content = $this->arg('content');\n if (! $content) {\n $content = $this->getContent();\n }\n\n if ($this->contentType == \"html\") {\n $this->email->html($content);\n } else {\n $this->email->text($content);\n }\n } else {\n $this->extractFieldsFromThis();\n }\n\n return $this->send();\n }", "public function FindPw(){\n\t\t\n\t\t$html = fopen(\"../../../../../../FindPw.php\",\"w\") or die(\"unable to make email\");\n\n\t\t$contents = \n\t\t'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1-strict.dtd\">\n\t\t<html lang=\"en\">\n\t\t<head>\n\t\t\t<meta charset=\"UTF-8\">\n\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n\t\t</head>\n\t\t<body>\n\t\t<table align=\"center\" width=\"620\" height=\"270\" bgcolor=\"#ffffff\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t<tbody>\n\t\t\t<tr id=\"mail_lubycon_logo\">\n\t\t\t\t<td>\n\t\t\t\t\t<img src=\"../../CH/img/resist_mail/mail_header.png\" class=\"mail_header\" >\n\t\t\t\t</td>\n\t\t\t</tr>\n \t<tr id=\"mail_hello\">\n \t<td align=\"left\" style=\"font-family:Arial, Helvetica, sans-serif; font-size: 40px; color:#444444;\">\n \t<br />\n \t &nbsp;Hello. <font size=\"40px\" color=\"#48cfad\">:)</font>\n <br />\n <br />\n </td>\n </tr>\n <tr id=\"mail_description\">\n \t<td align=\"left\" style=\"font-family:Arial, Helvetica, sans-serif; font-size: 15px; color:#444444; line-height:25px;\">\n \t\t\t&nbsp;&nbsp;&nbsp;\n Your temporary password has been sent to the registered email.<br /><br />\n\t\t\t\t\t&nbsp;&nbsp;&nbsp;\n\t\t\t\t\t<font size=\"4px\">\n\t\t\t\t\tHere your temporary password is : '.$this->token.'\n\t\t\t\t\t</font>\n\t\t\t\t\t<br /><br />\n\t\t\t\t\t&nbsp;&nbsp;&nbsp;\n\n\t\t\t\t\tIf this is not you, Please Contact.<br />\n &nbsp;&nbsp;&nbsp;\n <br />\n <br />\n \t</td>\n </tr>\n <tr>\n <td align=\"left\" style=\"font-family:Arial, Helvetica, sans-serif; font-size: 15px; color:#444444; line-height:20px;\">\n \t<br />\n &nbsp;&nbsp;&nbsp;\n \tIf you have any problems or questions, please send e-mail to \n <a id=\"mailadress\" href=\"mailto:[email protected]\" style=\"text-decoration:none;\">\n \t<font color=\"#48cfad\" size=\"+1\">[email protected]</font>\n </a>\n </td>\n </tr>\n </tbody>\n\t\t</table>\n\t\t</body>\n\t\t';\n\n\t\tfwrite($html, $contents);\n\t\tfclose($html);\n\t}", "public function sendEmailVerificationNotification();", "protected function prepareMessage() {\n\n\t\tif (empty($this->messageTemplate)) {\n\t\t\tthrow new \\RuntimeException('Messenger: message template was not defined', 1354536584);\n\t\t}\n\n\t\tif (empty($this->to)) {\n\t\t\tthrow new \\RuntimeException('Messenger: no recipient was defined', 1354536585);\n\t\t}\n\n\t\t// Substitute markers\n\t\t$subject = $this->getContentRenderer()->render($this->messageTemplate->getSubject(), $this->markers);\n\t\t$body = $this->getContentRenderer()->render($this->messageTemplate->getBody(), $this->markers);\n\n\t\t// Parse Markdown only if necessary\n\t\tif ($this->messageTemplate->getTemplateEngine() === TemplateEngine::FLUID_AND_MARKDOWN) {\n\t\t\t$body = Markdown::defaultTransform($body);\n\t\t}\n\n\t\t$this->getMailMessage()->setTo($this->getTo())\n\t\t\t->setCc($this->getCc())\n\t\t\t->setBcc($this->getBcc())\n\t\t\t->setFrom($this->getSender())\n\t\t\t->setReplyTo($this->getReplyTo())\n\t\t\t->setSubject($subject)\n\t\t\t->setBody($body, 'text/html');\n\n\t\t// Attach plain text version if HTML tags are found in body\n\t\tif ($this->hasHtml($body)) {\n\t\t\t$text = Html2Text::getInstance()->convert($body);\n\t\t\t$this->getMailMessage()->addPart($text, 'text/plain');\n\t\t}\n\n\t\t// Handle attachment\n\t\tforeach ($this->attachments as $attachment) {\n\t\t\t$this->getMailMessage()->attach($attachment);\n\t\t}\n\t}", "public function getAuthoremail() {}", "function SentVerificationEmail($email,$username,$password){\n \t$to = $email;\n\t$subject = 'DoggieCare Forget Password';\n\t$message = 'Username ='.$username.' || Password='.$password;\n\t$headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\nmail($to, $subject, $message, $headers);\n \n }", "private function prepare()\n\t{\n\n\n\t\t// Config\n\t\t$this->mail->isSMTP();\n\t\t$this->mail->Host = Config::get('mail_smtp');\n\t\t$this->mail->SMTPAuth = true;\n\t\t$this->mail->Username = Config::get('mail_username');\n\t\t$this->mail->Password = Config::get('mail_password');\n\t\t$this->mail->SMTPSecure = 'tls';\n\t\t$this->mail->Port = Config::get('mail_port');\n\t\t$this->mail->setFrom(Config::get('mail_fromemail'), Config::get('mail_fromname'));\n\t\t$this->mail->isHTML(true);\n\n\t\tif(!$this->mail->send())\n\t\t{\n\t\t\t// die('Mailer Error: ' . $this->mail->ErrorInfo);\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t return true;\n\t\t}\n\t}", "function _osg_singout_notifier_prep_message($info,$data) {\n global $base_url;\n $message = array();\n $separator = md5(time());\n // carriage return type (we use a PHP end of line constant)\n $eol = PHP_EOL;\n\n //$params['to'] = $record['email'];\n $recipient = $info['first_name'].' '.$info['last_name'].' <[email protected]'.'>';\n $sender = variable_get('site_mail', '[email protected]');\n $message['subject'] = 'These Performances are available for registration.';\n $fudge = count($data) > 2?'s':'';\n $fudge = \"Please visit <a href=\\\"$base_url\\\">\".variable_get('site_name','[Some Cool Site]').\"</a>\"\n .\" and indicate your attendance plan for the following event$fudge:\";\n $data[0] = $fudge;\n $body = implode(\"<br>\",$data);\n\n\n\n $message['body'] = $body;\n\n debug($message,'$message');\n //drupal_mail($module, $key, $to, $language, $params = array(), $from = NULL, $send = TRUE)\n drupal_mail('osg_singout_notifier'\n , 'registration_needed'\n , $recipient\n , language_default()\n , $message\n , $sender\n );\n\n}", "function antispambot($email_address, $hex_encoding = 0)\n {\n }", "private function _build_mail () {\n if (empty($this->sendto) && (empty($this->body) && empty($this->htmlbody))) {\n throw new Exception(\"Cannot send, need more information\");\n }\n\n // build the headers\n $this->headers = \"\";\n\n $this->xheaders['To'] = implode(',', $this->sendto);\n\n $cc_header_name = ($this->apply_windows_bugfix) ? 'cc': 'Cc';\n if (!empty($this->sendcc)) $this->xheaders[$cc_header_name] = implode(',', $this->sendcc);\n if (!empty($this->sendbcc)) $this->xheaders['Bcc'] = implode(',', $this->sendbcc);\n\n if($this->receipt) {\n if(isset($this->xheaders['Reply-To'])) {\n $this->xheaders['Disposition-Notification-To'] = $this->xheaders['Reply-To'];\n }\n elseif (isset($this->xheaders['From'])) {\n $this->xheaders['Disposition-Notification-To'] = $this->xheaders['From'];\n }\n }\n\n if($this->charset != '') {\n $this->xheaders['Mime-Version'] = '1.0';\n $this->xheaders['Content-Type'] = 'text/plain; charset='.$this->charset;\n $this->xheaders['Content-Transfer-Encoding'] = $this->ctencoding;\n }\n\n if (!$this->xheaders['X-Mailer']) {\n $this->xheaders['X-Mailer'] = 'King-Fu MimeMail';\n }\n\n // setup the body ready for sending\n $this->_set_body();\n\n foreach ($this->xheaders as $head => $value) {\n $rgx = ($this->apply_windows_bugfix) ? 'Subject' : 'Subject|To'; // don't strip out To header for bugfix\n if (!preg_match('/^'.$rgx.'$/i', $head)) $this->headers .= $head.': '.strtr($value, \"\\r\\n\", ' ').\"\\n\";\n }\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 send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }", "abstract protected function _getEmail($info);", "function forgotPassword($emailTO) {\n global $user, $pass;\n\n return $params = array(\n 'api_user' => $user,\n 'api_key' => $pass,\n 'to' => $emailTO,\n 'subject' => 'E-Mart: Reset password',\n 'html' => \"<html>\n <head></head>\n <body>\n <p>You have been outbid by another bidder.\n Please click on the link below to bid agiain:<br>\n <span><a href=\\\"www.e-mart.azurewebsites.net\\\">URL</a></span>\n </p>\n </body>\n </html>\",\n 'text' => 'testing body',\n 'from' => '[email protected]'\n );\n}", "function mailer() {\n\t\tJRequest::checkToken() or die( JText::_( 'Invalid Token' ) );\n\t\t$email = JRequest::getVar('email');\n\t\t$title = JRequest::getVar('title');\n\t\t$from = array($email, $title);\n\t\t// set emailadres from the site\n\t\t$config =&JFactory::getConfig();\n\t\t// Get some variables from the component options\n\t\t$app = JFactory::getApplication('site');\n\t\t$componentParams = $app->getParams('com_mdcontact');\n\t\t$email_to = $componentParams->get('email_to');\n\t\t$subject = $componentParams->get('subject');\n\t\t$to = array($email_to, $email_to );\n\t\t// Set some variables for the email message\n\t\t$copy = JRequest::getVar('copy');;\n\t\t$body = JRequest::getVar('description');;\n\t\n\t\t// Invoke JMail Class\n\t\t$mailer = JFactory::getMailer();\n\t\n\t\t// Set sender array so that my name will show up neatly in your inbox\n\t\t$mailer->setSender($from);\n\t\t$mailer->addRecipient($to);\n\t\t// Set cc if copy is checked\n\t\tif ($copy=='1'){\n\t\t\t$mailer->addCC($from);\n\t\t\t}\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->setBody($body);\n\t\t$send = $mailer->Send();\n\t\t// set the redirect page\n\t\t$redirect = JRoute::_('index.php?option=com_mdcontact&view=contact&task=add');\n\t\tif ( $send !== true ) {\n\t\t\tJFactory::getApplication()->enqueueMessage('Your message is not send, please try again later', 'error');\n\t\t\t$this->setRedirect( $redirect);\n\t\t} else {\n\t\tparent::apply();\n\t}\n\t}" ]
[ "0.6612036", "0.62259114", "0.6204501", "0.60813826", "0.6065707", "0.5975393", "0.595818", "0.59504324", "0.5937685", "0.5908396", "0.5904669", "0.5823813", "0.5817505", "0.5798891", "0.57713485", "0.57422376", "0.5717919", "0.568849", "0.56616765", "0.5644484", "0.56401855", "0.5637503", "0.5615014", "0.5609755", "0.560378", "0.5594186", "0.5588606", "0.5568742", "0.5555497", "0.5544078", "0.55294347", "0.5518165", "0.55156", "0.5498147", "0.54948235", "0.5491093", "0.54780537", "0.5476763", "0.5464679", "0.5447536", "0.5443922", "0.5436416", "0.5420218", "0.5419555", "0.541315", "0.5411757", "0.5411641", "0.5394921", "0.53929114", "0.5386337", "0.5383759", "0.5377973", "0.5375527", "0.53750455", "0.537346", "0.5371679", "0.5371438", "0.53661853", "0.5365779", "0.53550005", "0.5352471", "0.5349986", "0.53484964", "0.5342001", "0.53417456", "0.5341037", "0.5335649", "0.5330981", "0.5329717", "0.5328673", "0.5328376", "0.53179985", "0.5315445", "0.53134423", "0.5311809", "0.5310241", "0.5304953", "0.53006625", "0.5296389", "0.5290219", "0.52890605", "0.5288291", "0.5287537", "0.5286748", "0.52809525", "0.5277727", "0.5276987", "0.5272881", "0.5271393", "0.526137", "0.5260192", "0.5251185", "0.52497923", "0.524973", "0.5249099", "0.5248931", "0.5243747", "0.5240728", "0.52402234", "0.52369255", "0.5230001" ]
0.0
-1
Run the database seeds.
public function run() { User::create([ 'email' => '[email protected]', 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret 'rol' => 'administrador', 'nivel'=>'0', 'nombre'=>'InTraining', 'apellido_1'=>'InTraining', 'telefono'=>'3222434296', 'fecha_nacimiento'=>'1993-05-09 00:00:00', 'slug' => '', ]); User::create([ 'email' => '[email protected]', 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret 'rol' => 'cliente', 'nivel'=>'0', 'nombre'=>'Camilo', 'apellido_1'=>'Hernandez', 'apellido_2'=>'Castillo', 'telefono'=>'3222434296', 'fecha_nacimiento'=>'1993-05-09 00:00:00', 'slug' => 'camilo.hernandez', 'remember_token' => str_random(10), ]); User::create([ 'email' => '[email protected]', 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret 'rol' => 'entrenador', 'nivel'=>'1', 'nombre'=>'Melissa', 'apellido_1'=>'Mogollon', 'apellido_2'=>'Elles', 'descripcion' => 'Soy una gran entrenadora que le gusta motivar a las personas para impulsarlos a alcanzar sus metas', 'telefono'=>'3168710356', 'fecha_nacimiento'=>'1992-12-12 00:00:00', 'slug' => 'melissa.mogollon', 'remember_token' => str_random(10), ]); factory(User::class)->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
MESAJUL CU EROAREA RETURNAT
function errorMsg($msg){ $error = array("eroare" => $msg); echo JSON_encode($error); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getArea(){}", "abstract protected function getArea();", "public function mostrarArea() {\n \n //FUNCION CON LA CONSULTA A REALIZAR\n $sql = \"SELECT * FROM AREA_MAQUINA \";\n $this->_conexion->ejecutar_sentencia($sql);\n return $this->_conexion->retorna_select();\n \n }", "function grandeArea($a,$b,$c){\r\n\t\t$fGArea= new fachada_grandeArea();\r\n\t\t$oGArea=$fGArea->grandeArea($a,$b,$c);\r\n\t\treturn $oGArea;\r\n\t}", "function area($a,$b,$c){\r\n\t\t$fArea= new fachada_area();\r\n\t\t$oArea=$fArea->area($a,$b,$c);\r\n\t\treturn $oArea;\r\n\t}", "function getForResumenArea($area){\n\t\t\t$tipos = array(\n\t\t\t\t0=>\"CE\",\n\t\t\t\t1=>\"DS\",\n\t\t\t\t2=>\"Q\",\n\t\t\t\t3=>\"AB\",\n\t\t\t\t4=>\"DM\",\n\t\t\t\t5=>\"M\",\n\t\t\t\t6=>\"R\",\n\t\t\t\t7=>\"D\",\n\t\t\t\t8=>\"P\",\n\t\t\t\t9=>\"PA\",\n\t\t\t\t10=>\"EL\",\n\t\t\t\t11=>\"S\",\n\t\t\t\t12=>\"CI\",\n\t\t\t\t13=>\"IP\",\n\t\t\t\t14=>\"IA\",\n\t\t\t\t15=>\"DI\",\n\t\t\t\t16=>\"IPA\",\n\t\t\t\t17=>\"E\",\n\t\t\t\t18=>\"RE\",\n\t\t\t\t19=>\"C\",\n\t\t\t\t20=>\"L\",\n\t\t\t\t21=>\"LA\",\n\t\t\t\t22=>\"I\",\n\t\t\t\t23=>\"IL\",\n\t\t\t\t24=>\"DL\",\n\t\t\t\t25=>\"DE\",\n\t\t\t\t26=>\"CB\",\n\t\t\t\t27=>\"CA\"\n\t\t\t\t);\n\t\t\t$respuesta = array();\n\t\t\tforeach ($tipos as $value) {\n\t\t\t\t$sql = \"select count(*) as total from $this->tabla \n\t\t\t\t\t\tjoin referencias\n\t\t\t\t\t\t\ton referencias.id_referencia = $this->tabla.id_referencia\n\t\t\t\t\t\tjoin areas\n\t\t\t\t\t\t\ton areas.id_area = referencias.id_area\n\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t$this->tabla.tipo_discontinuidad = '\".$value.\"' \n\t\t\t\t\t\t\tand areas.id_area=\".$area.\"\n\t\t\t\t\";\n\n\t\t\t\t$resultado = $this->conexion->query($sql);\n\t\t\t\tif($resultado->num_rows > 0){\n\t\t\t\t\t$row=$resultado->fetch_assoc() ;\n\t\t\t\t\tif($row['total']>0){\n\t\t\t\t\t\t$respuesta[$value] = $row['total'] ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn json_encode($respuesta) ;\n\t\t}", "function get_duo_areas() {\n \t\n }", "public function getArea() {\r\n return $this -> lato * $this -> lato ;\r\n }", "function getAreaPorDeptoSinAsignar(){\r\n\r\n $cens_id = $this->input->post('id_censo');\r\n $depa_id = $this->input->post('id_depto');\r\n $areas = $this->Areas->ObtenerXDepaSinAsignar($cens_id, $depa_id)->areas->area;\r\n\r\n echo json_encode($areas);\r\n\r\n }", "function tipoDeLlamada($codInternacional, $codArea)\n{\n if ($codInternacional == 54)\n {\n if ($codArea == 299)\n {\n return \"corta\";\n }\n\n return \"larga\";\n }\n return \"internacional\";\n}", "function getForResumenIntArea($area){\n\t\t\t$tipos = array(\n\t\t\t\t0=>\"CI\",\n\t\t\t\t1=>\"IP\",\n\t\t\t\t2=>\"IA\",\n\t\t\t\t3=>\"DI\",\n\t\t\t\t4=>\"IPA\",\n\t\t\t\t5=>\"E\",\n\t\t\t\t6=>\"RE\",\n\t\t\t\t7=>\"C\",\n\t\t\t\t8=>\"L\",\n\t\t\t\t9=>\"LA\",\n\t\t\t\t10=>\"I\",\n\t\t\t\t11=>\"IL\"\n\t\t\t\t);\n\t\t\t$respuesta = array();\n\t\t\tforeach ($tipos as $value) {\n\t\t\t\t$sql = \"select count(*) as total from $this->tabla \n\t\t\t\t\t\tjoin referencias\n\t\t\t\t\t\t\ton referencias.id_referencia = $this->tabla.id_referencia\n\t\t\t\t\t\tjoin areas\n\t\t\t\t\t\t\ton areas.id_area = referencias.id_area\n\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t$this->tabla.tipo_discontinuidad = '\".$value.\"' \n\t\t\t\t\t\t\tand areas.id_area=\".$area.\"\n\t\t\t\t\";\n\n\t\t\t\t$resultado = $this->conexion->query($sql);\n\t\t\t\tif($resultado->num_rows > 0){\n\t\t\t\t\t$row=$resultado->fetch_assoc() ;\n\t\t\t\t\tif($row['total']>0){\n\t\t\t\t\t\t$respuesta[$value] = $row['total'] ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn json_encode($respuesta) ;\n\t\t}", "public function getArea(){\n return $this -> side * $this -> side;\n }", "function en_rojo($anio){\n $ar=array();\n $ar['anio']=$anio;\n $sql=\"select sigla,descripcion from unidad_acad \";\n $sql = toba::perfil_de_datos()->filtrar($sql);\n $resul=toba::db('designa')->consultar($sql);\n $ar['uni_acad']=$resul[0]['sigla'];\n $res=$this->get_totales($ar);//monto1+monto2=gastado\n $band=false;\n $i=0;\n $long=count($res);\n while(!$band && $i<$long){\n \n if(($res[$i]['credito']-($res[$i]['monto1']+$res[$i]['monto2']))<-50){//if($gaste>$resul[$i]['cred']){\n $band=true;\n }\n \n $i++;\n }\n return $band;\n \n }", "function getForResumenExtArea($area){\n\t\t\t$tipos = array(\n\t\t\t\t0=>\"CE\",\n\t\t\t\t1=>\"DS\",\n\t\t\t\t2=>\"Q\",\n\t\t\t\t3=>\"AB\",\n\t\t\t\t4=>\"DM\",\n\t\t\t\t5=>\"M\",\n\t\t\t\t6=>\"R\",\n\t\t\t\t7=>\"D\",\n\t\t\t\t8=>\"P\",\n\t\t\t\t9=>\"PA\",\n\t\t\t\t10=>\"EL\",\n\t\t\t\t11=>\"S\",\n\t\t\t\t12=>\"DL\",\n\t\t\t\t13=>\"DE\",\n\t\t\t\t14=>\"CB\",\n\t\t\t\t15=>\"CA\"\n\t\t\t\t);\n\t\t\t$respuesta = array();\n\t\t\tforeach ($tipos as $value) {\n\t\t\t\t$sql = \"select count(*) as total from $this->tabla \n\t\t\t\t\t\tjoin referencias\n\t\t\t\t\t\t\ton referencias.id_referencia = $this->tabla.id_referencia\n\t\t\t\t\t\tjoin areas\n\t\t\t\t\t\t\ton areas.id_area = referencias.id_area\n\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t$this->tabla.tipo_discontinuidad = '\".$value.\"' \n\t\t\t\t\t\t\tand areas.id_area=\".$area.\"\n\t\t\t\t\";\n\n\t\t\t\t$resultado = $this->conexion->query($sql);\n\t\t\t\tif($resultado->num_rows > 0){\n\t\t\t\t\t$row=$resultado->fetch_assoc() ;\n\t\t\t\t\tif($row['total']>0){\n\t\t\t\t\t\t$respuesta[$value] = $row['total'] ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn json_encode($respuesta) ;\n\t\t}", "public function getAgenciaConta();", "public function getCentroArea() {\n return $this->_centro; \n }", "public static function ADMIN_AREA_GET_AREA_VIEW_DATA(){\n\t $SQL_String = \"SELECT ano,area_code,area_type,area_name,area_descrip,area_link,area_gates,area_load,accept_max_day,accept_min_day,revise_day,cancel_day,filled_day,wait_list,member_max,auto_pass,time_open,time_close,refer_json,form_json,_open FROM area_main WHERE area_code=:area_code AND _keep=1 ;\";\n\t return $SQL_String;\n\t}", "function calculaAreaCuadrado($valor){\n\t\treturn $valor*$valor;\n\t}", "function niveles($area){\n\t\tif ($area->cveentidad2=='0') return 1;\n\t\tif ($area->cveentidad3=='0') return 2;\n\t\tif ($area->cveentidad4=='0') return 3;\n\t\tif ($area->cveentidad5=='0') return 4;\n\t\tif ($area->cveentidad6=='0') return 5;\n\t\tif ($area->cveentidad7=='0') return 6;\n\t}", "function subArea($a,$b,$c){\r\n\t\t$fSArea= new fachada_subArea();\r\n\t\t$oSArea=$fSArea->subArea($a,$b,$c);\r\n\t\treturn $oSArea;\r\n\t}", "private function trovaRegione($provincia) {\r\n switch ($provincia) {\r\n case 'CHIETI':\r\n case 'PESCARA':\r\n case \"L'AQUILA\":\r\n case 'TERAMO':\r\n $regione = 'ABRUZZO';\r\n break;\r\n case 'MATERA':\r\n case 'POTENZA':\r\n $regione = 'BASILICATA';\r\n break;\r\n case 'CATANZARO':\r\n case 'COSENZA':\r\n case 'CROTONE':\r\n case 'REGGIO DI CALABRIA':\r\n case 'VIBO VALENTIA':\r\n $regione = 'CALABRIA';\r\n break;\r\n case 'AVELLINO':\r\n case 'BENEVENTO':\r\n case 'CASERTA':\r\n case 'NAPOLI':\r\n case 'SALERNO':\r\n $regione = 'CAMPANIA';\r\n break;\r\n case 'BOLOGNA':\r\n case 'FERRARA':\r\n case 'FORLI’-CESENA':\r\n case 'MODENA':\r\n case 'PARMA':\r\n case 'PIACENZA':\r\n case 'RAVENNA':\r\n case \"REGGIO NELL'EMILIA\":\r\n case 'RIMINI':\r\n $regione = 'EMILIA ROMAGNA';\r\n break;\r\n case 'GORIZIA':\r\n case 'PORDENONE':\r\n case 'TRIESTE':\r\n case 'UDINE':\r\n $regione = 'FRIULI VENEZIA GIULIA';\r\n break;\r\n case 'FROSINONE':\r\n case 'LATINA':\r\n case 'RIETI':\r\n case 'ROMA':\r\n case 'VITERBO':\r\n $regione = 'LAZIO';\r\n break;\r\n case 'GENOVA':\r\n case 'IMPERIA':\r\n case 'LA SPEZIA':\r\n case 'SAVONA':\r\n $regione = 'LIGURIA';\r\n break;\r\n case 'BERGAMO':\r\n case 'BRESCIA':\r\n case 'COMO':\r\n case 'CREMONA':\r\n case 'LECCO':\r\n case 'LODI':\r\n case 'MANTOVA':\r\n case 'MILANO':\r\n case 'MONZA E DELLA BRIANZA':\r\n case 'PAVIA':\r\n case 'SONDRIO':\r\n case 'VARESE':\r\n $regione = 'LOMBARDIA';\r\n break;\r\n case 'ANCONA':\r\n case 'ASCOLI PICENO':\r\n case 'FERMO':\r\n case 'MACERATA':\r\n case 'PESARO E URBINO':\r\n $regione = 'MARCHE';\r\n break;\r\n case 'CAMPOBASSO':\r\n case 'ISERNIA':\r\n $regione = 'MOLISE';\r\n break;\r\n case 'ALESSANDRIA':\r\n case 'ASTI':\r\n case 'BIELLA':\r\n case 'CUNEO':\r\n case 'NOVARA':\r\n case 'TORINO':\r\n case 'VERBANO-CUSIO-OSSOLA':\r\n case 'VERCELLI':\r\n $regione = 'PIEMONTE';\r\n break;\r\n case 'BARI':\r\n case 'BARLETTA-ANDRIA-TRANI':\r\n case 'BRINDISI':\r\n case 'FOGGIA':\r\n case 'LECCE':\r\n case 'TARANTO':\r\n $regione = 'PUGLIA';\r\n break;\r\n case 'CAGLIARI':\r\n case 'CARBONIA-IGLESIAS':\r\n case 'MEDIO CAMPIDANO':\r\n case 'NUORO':\r\n case 'OGLIASTRA':\r\n case 'OLBIA-TEMPIO':\r\n case 'ORISTANO':\r\n case 'SASSARI':\r\n $regione = 'SARDEGNA';\r\n break;\r\n case 'AGRIGENTO':\r\n case 'CALTANISSETTA':\r\n case 'CATANIA':\r\n case 'ENNA':\r\n case 'MESSINA':\r\n case 'PALERMO':\r\n case 'RAGUSA':\r\n case 'SIRACUSA':\r\n case 'TRAPANI':\r\n $regione = 'SICILIA';\r\n break;\r\n case 'AREZZO':\r\n case 'FIRENZE':\r\n case 'GROSSETO':\r\n case 'LIVORNO':\r\n case 'LUCCA':\r\n case 'MASSA-CARRARA':\r\n case 'PISA':\r\n case 'PISTOIA':\r\n case 'PRATO':\r\n case 'SIENA':\r\n $regione = 'TOSCANA';\r\n break;\r\n case 'BOLZANO':\r\n case 'TRENTO':\r\n $regione = 'TRENTINO ALTO ADIGE';\r\n break;\r\n case 'PERUGIA':\r\n case 'TERNI':\r\n $regione = 'UMBRIA';\r\n break;\r\n case 'AOSTA':\r\n $regione = \"VALLE D'AOSTA\";\r\n break;\r\n case 'BELLUNO':\r\n case 'PADOVA':\r\n case 'ROVIGO':\r\n case 'TREVISO':\r\n case 'VENEZIA':\r\n case 'VERONA':\r\n case 'VICENZA':\r\n $regione = 'VENETO';\r\n break;\r\n }\r\n return $regione;\r\n }", "public function Pareas(){\n if($this->empleado->cargo->permisoscargo->areas) return true;\n return false;\n }", "public function getCurrentArea(): AreaContract;", "function crearArea($codigoArea,$descripcionArea,$codigoJefe,$cod_rolf)\r\n {\r\n $cnn = new conexion();\r\n $con = $cnn->conectarsql();\r\n \r\n $sql=\"INSERT INTO [dbo].[tb_area]\r\n ([cod_area]\r\n ,[des_area]\r\n ,[cod_jefe]\r\n ,[cod_rolf]\r\n )\r\n cod_rolf\r\n VALUES\r\n ('\".$codigoArea.\"'\r\n ,'\".$descripcionArea.\"'\r\n ,'\".$codigoJefe.\"'\r\n ,\".$cod_rolf.\")\";\r\n \r\n $consulta = sqlsrv_query ($con,$sql);\r\n \r\n if( $consulta === false ) {\r\n $rpta = \"No se grabó correctamente.\";\r\n }else{\r\n $rpta = \"Se grabó correctamente.\";\r\n }\r\n \r\n return $rpta; \r\n }", "private function ts_getAreas()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // #41811, dwildt, 1+\n $currHitsSum = $this->hits_sum[ $this->curr_tableField ];\n\n // Get TS configuration of the current filter / tableField\n //$conf_name = $this->conf_view['filter.'][$table . '.'][$field];\n $conf_array = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ];\n\n // Get areas from TS\n // SWITCH area key\n switch ( $this->pObj->objCal->arr_area[ $this->curr_tableField ][ 'key' ] )\n {\n case ('strings') :\n $arr_result = $this->pObj->objCal->area_strings( $conf_array, null, $this->curr_tableField );\n break;\n case ('interval') :\n $arr_result = $this->pObj->objCal->area_interval( $conf_array, null, $this->curr_tableField );\n break;\n// case ('from_to_fields') :\n// break;\n default:\n // DRS - Development Reporting System\n if ( $this->pObj->b_drs_error )\n {\n $prompt = 'undefined value in switch: ' .\n '\\'' . $this->pObj->objCal->arr_area[ $this->curr_tableField ][ 'key' ] . '\\'.';\n t3lib_div :: devLog( '[ERROR/FILTER+CAL] ' . $prompt, $this->pObj->extKey, 3 );\n $prompt = 'Areas won\\'t handled!';\n t3lib_div :: devLog( '[WARN/FILTER+CAL] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // DRS - Development Reporting System\n return;\n }\n // SWITCH area key\n $areas = $arr_result[ 'data' ][ 'values' ];\n unset( $arr_result );\n // Get areas from TS\n // #41811, dwildt, 1+\n $this->hits_sum[ $this->curr_tableField ] = $currHitsSum;\n\n // DRS\n if ( $this->pObj->b_drs_cal || $this->pObj->b_drs_filter )\n {\n $arr_prompt = null;\n foreach ( ( array ) $areas as $key => $value )\n {\n $arr_prompt[] = '[' . $key . '] = ' . $value;\n }\n $prompt = 'values are: ' . implode( ', ', ( array ) $arr_prompt );\n t3lib_div :: devLog( '[INFO/FILTER+CAL] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n // RETURN areas\n return $areas;\n }", "function mapFunction($location) \r\n\t\t{\r\n\t\t\treturn $location['area'];\r\n\t\t}", "function consultarUna(){\n try {\n $IDREQ=$this->objRequerimiento->getIDREQ();\t\n $objControlConexion = new ControlConexion();\n $objControlConexion->abrirBd();\n $comandoSql = \"select FKAREA from Requerimiento where IDREQ = '\".$IDREQ.\"' \";\n $rs = $objControlConexion->ejecutarSelect($comandoSql);\n $registro = $rs->fetch_array(MYSQLI_BOTH);\n ($registro!=null)?$id = $registro[\"FKAREA\"]:$id = \"undefine\";\n $this->objRequerimiento->setID($id);\n $objControlConexion->cerrarBd();\n return $this->objRequerimiento;\n } catch(PDOException $e) {\n echo \"Error: \" . $e->getMessage();\n }\n }", "public function area() : float {}", "function crearArea($descripcionArea,$codigoJefe,$cod_rolf)\r\n {\r\n $cnn = new conexion();\r\n $con = $cnn->conectarsql();\r\n \r\n $sql=\"EXEC SP_tb_area_INSERTAR \r\n '\".$descripcionArea.\"'\r\n ,'\".$codigoJefe.\"'\r\n ,\".$cod_rolf.\"\";\r\n \r\n $consulta = sqlsrv_query ($con,$sql);\r\n \r\n if( $consulta === false ) {\r\n $rpta = \"No se grabó correctamente.\";\r\n }else{\r\n $rpta = \"Se grabó correctamente.\";\r\n }\r\n \r\n return $rpta; \r\n }", "public function calcArea(){\n\t\treturn $this -> radius * $this -> radius * pi();\n\t}", "function hitungDenda(){\n\n return 0;\n }", "function cc_ho_vetrina($agenzia, $rif){\n\tglobal $invetrina;\n\t\n\t// $agenzia qua è il numero interno di Cometa\n\tif( isset( $invetrina[$agenzia] ) ){\t\t\n\t\t\n\t\tif ($invetrina[$agenzia]['imm'] == $rif) {\n\t\t\t// questo immobile è in vetrina\n\t\t\t$vetrina = '1';\n\t\t\tcc_import_immobili_error_log($rif.\" è in vetrina\");\n\t\t\t\n\t\t\t// vediamo se è lo stesso di quello che era già in vetrina o meno\n\t\t\t$oldrif = cc_get_rif_vetrina( substr($rif, 0, 2) );\n\t\t\tcc_import_immobili_error_log(\"oldrif: \".$oldrif);\n\t\t\t\n\t\t\t// se l'immobile attualemnte in vetrina non è questo tolgo quello attuale da vetrina\n\t\t\tif($oldrif != $rif) {\n\t\t\t\tcc_updateVetrina($oldrif); \n\t\t\t\tcc_import_immobili_error_log(\"Tolgo vetrina da \".$oldrif);\n\t\t\t}\n\t\t}else{\n\t\t\t$vetrina = '0';\n\t\t}\t\t\n\t\n\t}else{\n\t\t$vetrina = '0';\n\t}\n\t\n\treturn $vetrina;\n}", "public function getCentroArmazenagemSaida()\n {\n return $this->centro_armazenagem_saida;\n }", "function getOGRole();", "function getOGRole();", "function busca_hueco_almacen(&$Localizaciones,$numero_huecos){\n\tfor($i = 1;$i < $numero_huecos['n_planta'];$i++)\n\t\t for($j = 1;$j < $numero_huecos['n_pasillo'];$j++)\n\t\t\t\t for($k = 1;$k < $numero_huecos['n_fila'];$k++)\n\t\t\t\t\t\tfor($l = 1;$l < $numero_huecos['n_columna'];$l++)\n\t\t\t\t\t\t\t\t if($Localizaciones[$i][$j][$k][$l] != 1){\n\t\t\t\t\t\t\t\t\t $Localizaciones[$i][$j][$k][$l] = 1;\n\t\t\t\t\t\t\t\t\t return array( \"planta\" => $i ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"pasillo\" => $j ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"fila\" => $k ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"columna\" => $l ,\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 }\n}", "public function get_locationAreaCode(): int\n {\n return $this->_lac;\n }", "public function get_locationAreaCode(): int\n {\n return $this->_lac;\n }", "public abstract function Ataca();", "public function additionArea()\n {\n global $dbh;\n $sql = $dbh->prepare(\"INSERT INTO `area`(`nameaa`, `nameae`, `groupa`, `deleta`)VALUES('$this->nameaa' ,'$this->nameae' ,'$this->groupa' ,'$this->deleta')\");\n $result = $sql->execute();\n $id = $dbh->lastInsertId();\n return array ($result,$id);\n }", "public function getArea()\n{\n return 2* 3.14*$this->radius*($this->radius + $this->height);\n}", "function ObtenerExistenciaTotal($IdArea){\n\t/*Se usa para obtener su existencia y para obtener el codigo de lote[despliegue del detalle]*/\n\t\t$querySelect=\"select sum(farm_medicinaexistenciaxarea.Existencia)as Existencia,farm_medicinaexistenciaxarea.IdMedicina\n\t\t\t\t\t\tfrom farm_medicinaexistenciaxarea\n\t\t\t\t\t\twhere farm_medicinaexistenciaxarea.IdMedicina in(select mnt_areamedicina.IdMedicina from mnt_areamedicina where mnt_areamedicina.IdArea='$IdArea')\n\t\t\t\t\t\tgroup by farm_medicinaexistenciaxarea.IdMedicina\";\n\t\t$resp=pg_query($querySelect);\n\t\treturn($resp);\n\t}", "public function getChapeau();", "function selmundat($xent, &$area, &$habit, &$freg, &$dia_fer, &$des_fer ) {\n\t$sqls=\"select * from munp1.municip where cod = '$xent'\";\n\t$ress=mysql_db_query(\"munp1\",$sqls); //\n\t\tif ($ress) {\n\t\t\t\t$regs=mysql_fetch_array($ress);\n\t\t\t\tif ( $regs ) {\n\t\t\t\t\t\t\t\t$area = $regs[\"med_area\"];\n\t\t\t\t\t\t\t\t$habit = $regs[\"num_habit\"];\n\t\t\t\t\t\t\t\t$freg = $regs[\"num_freg\"];\n\t\t\t\t\t\t\t\t$dia_fer = $regs[\"dat_fermun\"];\n\t\t\t\t\t\t\t\t$des_fer = $regs[\"des_fermun\"];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmysql_free_result($ress);\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n \t\t\t\t\telse return 0;\n\t\t }\n// printf(\"vai sair 0\");\nreturn 0;\n}", "public function obtenerViajesplusAbonados();", "function getAreaPorDepto(){\r\n\r\n $depa_id = $this->input->post('id_depto');\r\n $areas = $this->Areas->ObtenerXDepartamentos($depa_id)->areas->area;\r\n echo json_encode($areas);\r\n }", "public function getArea()\n {\n return $this->area;\n }", "public function getArea()\n {\n return $this->area;\n }", "public function getArea()\n {\n return $this->area;\n }", "public function getAreaRegion()\n {\n return $this->area_region;\n }", "public function cercaP() {\r\n $operatore = $_SESSION[\"op\"];\r\n $ruolo = $operatore->getFunzione();\r\n\r\n $ricerca = array();\r\n $ricerca[\"numeroPratica\"] = isset($_REQUEST[\"numeroPratica\"]) ? $_REQUEST[\"numeroPratica\"] : null;\r\n $ricerca[\"statoPratica\"] = isset($_REQUEST[\"statoPratica\"]) ? $_REQUEST[\"statoPratica\"] : null;\r\n $ricerca[\"tipoPratica\"] = isset($_REQUEST[\"tipoPratica\"]) ? $_REQUEST[\"tipoPratica\"] : null;\r\n $ricerca[\"incaricato\"] = isset($_REQUEST[\"incaricato\"]) ? $_REQUEST[\"incaricato\"] : null;\r\n $ricerca[\"flagAllaFirma\"] = isset($_REQUEST[\"flagAllaFirma\"]) ? $_REQUEST[\"flagAllaFirma\"] : null;\r\n $ricerca[\"flagFirmata\"] = isset($_REQUEST[\"flagFirmata\"]) ? $_REQUEST[\"flagFirmata\"] : null;\r\n $ricerca[\"flagInAttesa\"] = isset($_REQUEST[\"flagInAttesa\"]) ? $_REQUEST[\"flagInAttesa\"] : null;\r\n $ricerca[\"flagSoprintendenza\"] = isset($_REQUEST[\"flagSoprintendenza\"]) ? $_REQUEST[\"flagSoprintendenza\"] : null;\r\n $offset = isset($_REQUEST[\"offset\"]) ? $_REQUEST[\"offset\"] : 0;\r\n $numero = isset($_REQUEST[\"numero\"]) ? $_REQUEST[\"numero\"] : 15;\r\n $richiestaFirmate = isset($_REQUEST[\"richiestaFirmate\"]) ? $_REQUEST[\"richiestaFirmate\"] : 0;\r\n\r\n if ($ruolo < 2) {\r\n $ricerca[\"incaricato\"] = $operatore->getId();\r\n }\r\n\r\n //$numeroPratiche = PraticaFactory::numeroTotalePratiche();\r\n $numeroPratiche= PraticaFactory::elencoNumeroP($ricerca);\r\n \r\n if ($offset >= $numeroPratiche) {\r\n $offset = 0;\r\n }\r\n if ($offset < 1) {\r\n $offset = 0;\r\n }\r\n\r\n if ($richiestaFirmate === 0) {\r\n $href = '<a href=\"index.php?page=operatore&cmd=aggiornaP&numeroP=';\r\n } elseif ($ruolo > 2) {\r\n $href = '<a href=\"index.php?page=responsabile&cmd=firmaP&numeroP=';\r\n }\r\n\r\n $pratiche = PraticaFactory::elencoP($ricerca, $offset, $numero);\r\n \r\n $x = count($pratiche);\r\n $data = \"\";\r\n for ($i = 0; $i < $x; $i++) {\r\n $data.= \"<tr class=\\\"\" . ($i % 2 == 1 ? \"a\" : \"b\") . \"\\\"><td>\" . $href\r\n . $pratiche[$i]->getNumeroPratica() . \"\\\">\" . $pratiche[$i]->getNumeroPratica() . \"</a></td>\"\r\n . \"<td>\" . $pratiche[$i]->getDataCaricamento(true) . \"</td>\"\r\n . \"<td>\" . $pratiche[$i]->getRichiedente() . \"</td>\"\r\n . \"<td>\" . PraticaFactory::tipoPratica($pratiche[$i]->getTipoPratica()) . \"</td>\"\r\n . \"<td>\" . PraticaFactory::statoPratica($pratiche[$i]->getStatoPratica()) . \"</td>\"\r\n . \"<td>\" . OperatoreFactory::getOperatore($pratiche[$i]->getIncaricato())->getNominativo() . \"</td>\"\r\n . \"</tr>\";\r\n }\r\n\r\n header('Cache-Control: no-cache, must-revalidate');\r\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\r\n header('Content-type: application/json');\r\n $json = array();\r\n $json[\"testo\"] = $data;\r\n $json[\"numeroPratiche\"] = $numeroPratiche;\r\n $json[\"numRow\"] = $x;\r\n echo json_encode($json);\r\n }", "function ambil_soal() { \n $tampil = $this->db->query(\"SELECT * FROM IKD.IKD_D_SOAL_QUISIONER ORDER BY KD_SOAL ASC\")->result_array();\n\t\treturn $tampil;\n }", "private function get_min_nivel_area($atr){\r\n $tercero_aux = $atr[terceros];\r\n unset($atr[terceros]);\r\n if (count($this->id_org_acceso) <= 0){\r\n $this->cargar_acceso_nodos($atr); \r\n }\r\n //print_r($atr);\r\n $sql = \"select min(level) nivel from mos_organizacion where id IN (\". implode(',', array_keys($this->id_org_acceso)) . \")\";\r\n //echo $sql;\r\n $data = $this->dbl->query($sql);\r\n $this->nivel_area = $data[0][nivel];\r\n $atr[terceros] = $tercero_aux;\r\n $this->id_org_acceso = array();\r\n $this->cargar_acceso_nodos($atr);\r\n //echo $this->nivel_area;\r\n }", "function obtenerEnlaceArroba($nombre){\n\treturn\t$nombre;\n\t//\treturn $nombrex;\n\t}", "function InscricaoAvaliacao($codAtividade, $codAluno){\n\n }", "public static function ADMIN_AREA_GET_AREA_EDIT_DATA(){\n\t $SQL_String = \"SELECT area_type,area_name,area_descrip,area_link,area_gates,area_load,accept_max_day,accept_min_day,revise_day,cancel_day,filled_day,wait_list,member_max,auto_pass,time_open,time_close,refer_json,form_json FROM area_main WHERE area_code=:area_code AND _keep=1 ;\";\n\t return $SQL_String;\n\t}", "function DatosArea($idArea) {\n\t\t\t$sql=\"SELECT a.id_claveArea, a.nomArea, e.id_claveEdi \n\t\t\t\t FROM area a \n\t\t\t\t INNER JOIN edificio e \n\t\t\t\t ON a.id_claveArea=e.id_claveEdi \n\t\t\t\t WHERE a.id_claveArea=e.id_claveEdi\";\n\t\t\t$result=$this->db->query($sql)->execute();\n\t\t\treturn $result->current();\n\t\t}", "function getArea(){\r\n return ($this->width * $this->height);\r\n }", "public function ingresarArbol($atr){\n // print_r($atr);\n try {\n $atr = $this->dbl->corregir_parametros($atr); \n $sql = \"INSERT INTO mos_requisitos_organizacion(id_area,id_requisito)\n VALUES(\n $atr[id],$atr[id_requisito]\n )\";\n //echo $sql;\n $this->dbl->insert_update($sql);\n return \"La asociacion '$atr[id_requisito]' ha sido ingresado con exito\";\n } catch(Exception $e) {\n $error = $e->getMessage(); \n if (preg_match(\"/mos_requisitos_organizacion_key/\",$error ) == true) \n return \"Ya existe el area seleccionada asociada al requisito.\"; \n return $error; \n }\n }", "public static function ADMIN_AREA_GET_AREA_LIST(){\n\t $SQL_String = \"SELECT * FROM area_main WHERE _keep=1 ORDER BY ano ASC;\";\n\t return $SQL_String;\n\t}", "public function insertCattarea()\r\n {\r\n $atributos=array( $this->correlativo , $this->nombre , $this->descripcion , $this->estados , $this->idcatcargo );\r\n //descomentarear la línea siguiente y comentarear la anterior si la llave primaria no es autoincremental\r\n //$atributos=array( $this->idcattarea , $this->correlativo , $this->nombre , $this->descripcion , $this->estados , $this->idcatcargo );\r\n\r\n return $this->conexionCattarea->insertarRegistro($atributos);\r\n }", "public function getPlaca(){ return $this->placa;}", "public function getMinArea();", "public function getMataPelajaran();", "function showDataBySedeArea($SEDE, $AREA)\n{\n global $mysqli;\n $query = new Query($mysqli, \"SELECT nombre,apellido,sede,area_i FROM inscritos2017 where sede = ? and area_i = ? \");\n $parametros = array(\"ii\", &$SEDE, &$AREA);\n $data = $query->getresults($parametros);\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}", "public function boleta()\n\t{\n\t\t//\n\t}", "public function getSacadoCidadeUF();", "public function getNomeMappaArea() {\n return $this->_nomeMappa; \n }", "function check_in_area($moo = 0, $district = 0)\n{\n $ci =& get_instance();\n $moo = intval($moo);\n $district = intval($district);\n if ($district == 7052) { // ตำบลบ้านเกาะ\n switch ($moo) {\n case 4:\n return true;\n break;\n default:\n break;\n }\n }\n /*\n else {\n $hr = $ci->load->database('hr',true);\n $hr_db = $hr->database;\n $ps_id = $ci->session->userdata('UsPsCode');\n if($ps_id != \"\"){\n $sql = \"SELECT ps_in_area FROM `{$hr_db}`.`hr_person` WHERE ps_id = ?\";\n $query = $hr->query($sql, array($ps_id));\n if($query->row()->ps_in_area == 'Y')\n return true;\n }\n }\n */\n return false;\n}", "public function getAceite();", "function solicitudes_en_tramite($id_area){\n //Consulta\n $sql =\n \"SELECT\n solicitudes.solicitudes.Pk_Id_Solicitud,\n solicitudes.solicitudes.Fecha_Creacion,\n solicitudes.solicitudes.Radicado_Entrada,\n solicitudes.solicitudes.Nombres,\n solicitudes.solicitudes.Solicitud_Descripcion AS Descripcion,\n solicitudes.tbl_tramos.Nombre AS Tramo\n FROM\n solicitudes.solicitudes\n INNER JOIN apps.usuarios ON solicitudes.solicitudes.Fk_Id_Usuario = apps.usuarios.Pk_Id_Usuario\n INNER JOIN solicitudes.tbl_tramos ON solicitudes.solicitudes.Fk_Id_Tramo = solicitudes.tbl_tramos.Pk_Id_Tramo\n WHERE\n solicitudes.solicitudes.Fk_Id_Solicitud_Estado = 1 AND\n solicitudes.solicitudes.Fk_Id_Area_Encargada = {$id_area}\n ORDER BY\n solicitudes.solicitudes.Fecha_Creacion ASC\";\n\n //Se retorna el resultado de la consulta\n return $this->db->query($sql)->result();\n }", "abstract public function region();", "public function getRischioArea() {\n return $this->_rischio; \n }", "public function verlinealista(){\n\t$resultado=$this->producto->verlinealista();\n return $resultado;\n\t\t\t\n\t\t}", "public function getUbigeoCodeUbigeo($code){\n\n //$con=Db::conectarBd(\"mysql5022.site4now.net\",\"db_a4d0c2_actecpe\",\"a4d0c2_actecpe\",\"ActecPeru123\");\n\t\t$con=Db::conectarBd(getenv('localhost'),getenv('dbname'),getenv('db_user_name'),getenv('db_password'));\n $sth = $con->prepare(\"CALL sp_ubigeoxcode(?)\");\n $sth->execute(array($code));\n $rs = $sth->fetchAll();\n if(empty($rs)){\n\n $statusError = [\n \"rs\" => \"no data was found for the code -> \".$code,\n \"status\" => 404,\n ];\n \n return $statusError;\n }else{\n return $rs;\n }\n \n}", "public function abono();", "function mapit_get_voting_area_info($area) {\n global $mapit_client;\n $params = func_get_args();\n $result = $mapit_client->call('MaPit.get_voting_area_info', $params);\n return $result;\n}", "function listar_areas(){\n $sql =\n \"SELECT\n tbl_area_encargada.Pk_Id_Area_Encargada,\n tbl_area_encargada.Nombre\n FROM\n destinatarios_email\n INNER JOIN tbl_area_encargada ON destinatarios_email.Fk_Id_Area_Encargada = tbl_area_encargada.Pk_Id_Area_Encargada\n GROUP BY\n destinatarios_email.Fk_Id_Area_Encargada\n ORDER BY\n destinatarios_email.Fk_Id_Area_Encargada ASC\";\n\n //Se retorna el resultado de la consulta\n return $this->db->query($sql)->result();\n }", "public function getCentroArmazenagemEntrada()\n {\n return $this->centro_armazenagem_entrada;\n }", "public function getCentro($atributo){\r\n return $this-> $atributo;\r\n }", "public function getcboregAreazona($parametros) {\n \n $procedure = \"call usp_at_audi_getcboregAreazona(?)\";\n\t\t$query = $this->db-> query($procedure,$parametros);\n \n if ($query->num_rows() > 0) {\n\n $listas = '<option value=\"\" selected=\"selected\">::Elegir</option>';\n \n foreach ($query->result() as $row)\n {\n $listas .= '<option value=\"'.$row->CESTABLEAREA.'\">'.$row->DESTABLEAREA.'</option>'; \n }\n return $listas;\n }{\n return false;\n }\t\n }", "public function plus_abonados();", "public function getConfineArea() {\n return $this->_confine; \n }", "public function getAreaCode($data){\n\t\t$res=array();\n\t\tforeach ($data as $i => $value) {\n\t\t\t if(substr($i,0,5)=='area_'){\t\t\t\t \t\n\t\t\t\t $res [] = substr($i,5);\t\n\t\t\t }\n\t\t}\n\t\tsort($res);\t\t\n\t\treturn $res;\t\t\n\t}", "private function calculeResult()\n {\n\n if ($this->nClouds <= 0) {\n $this->result['status'] = 'warning';\n $this->result['msg'] = 'Nemhuma nuvem informada!';\n } elseif ($this->nAirports <= 0) {\n $this->result['status'] = 'warning';\n $this->result['msg'] = 'Nemhum aeroporto informado!';\n } else {\n while (sizeof($this->airports) < $this->nAirports) {\n $this->today = array_values($this->scene); // copia scena\n foreach ($this->scene as $rowKey => $row) {\n foreach ($row as $colKey => $col) {\n if ($col == '*') {\n $this->expandCloud($rowKey, $colKey);\n }\n }\n }\n $this->scene = $this->today; // atualiza scena\n $this->nDays++;\n //debug\n //$this->debug();\n }\n $this->result['status'] = 'success';\n $this->result['msg'] = 'Primeiro aeroporto atingido em: ' . $this->airports[0][2] . ' dias.';\n $this->result['msg'] .= ' / linha: ' . ($this->airports[0][0] + 1) . ', coluna: ' . ($this->airports[0][1] + 1) . '<br>';\n $this->result['msg'] .= 'Todos os aeroporto atingido em: ' . $this->airports[sizeof($this->airports) - 1][2] . ' dias.';\n }\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}", "public function getMaxArea();", "function atuOrcreceitaval($codrec,$mes,$valor){\n $msg = \"0|Registro Atualizado !\";\n $clorcreceitaval = new cl_orcreceitaval;\t\t\n $clorcreceita = new cl_orcreceita;\t\t\n if ($mes == 0 || $mes =='0' || $mes === 0){\n // ajusta o saldo previsto\n\t$clorcreceita->o70_valor = $valor;\n\t$clorcreceita->o70_codrec= $codrec;\n\t$clorcreceita->o70_anousu= db_getsession(\"DB_anousu\");\n $rr= $clorcreceita->alterar(db_getsession(\"DB_anousu\"),$codrec);\n\tif ($clorcreceita->erro_status==='0'){\n\t $msg = \"1|\".$clorcreceita->erro_msg;\n\t}else {\n\t $msg = \"0|\".$clorcreceita->erro_msg; \n\t} \n return $msg;\n } \n if ($valor > 0){\n $clorcreceitaval->o71_coddoc = 100; \n }else{\n $clorcreceitaval->o71_coddoc = 101; \n }\n $clorcreceitaval->o71_anousu = db_getsession(\"DB_anousu\"); \n $clorcreceitaval->o71_mes = $mes; \n $clorcreceitaval->o71_codrec = $codrec;\n $clorcreceitaval->o71_valor = $valor; \n\n\n $rr = $clorcreceitaval->sql_record($clorcreceitaval->sql_query_file(db_getsession(\"DB_anousu\"),$codrec,$clorcreceitaval->o71_coddoc,$mes));\n if ($clorcreceitaval->numrows >0){\n $clorcreceitaval->alterar($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n\n } else { \n $clorcreceitaval->incluir($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n }\t \n \n $erro = $clorcreceitaval->erro_msg;\n if ($clorcreceitaval->erro_status===0){\n $msg= \"1|\".$erro;\n\treturn $msg;\n } else {\n $msg = \"0|\".$clorcreceitaval->erro_msg;\n return $msg;\n }\n}", "public function pasaje_abonado();", "public function pilihDusun() {\n $data = $this->data_dusun->getAllArea();\n echo json_encode($data);\n }", "public function run()\n {\n $defregions = array(\n array('lg_code' => 1000, 'md_code' => 0, 'sm_code' => 1, 'area_name' => '札幌市' ),\n array('lg_code' => 1000, 'md_code' => 0, 'sm_code' => 2, 'area_name' => 'その他北海道' ),\n array('lg_code' => 2000, 'md_code' => 100, 'sm_code' => 1, 'area_name' => '青森県' ),\n array('lg_code' => 2000, 'md_code' => 200, 'sm_code' => 2, 'area_name' => '秋田県' ),\n array('lg_code' => 2000, 'md_code' => 300, 'sm_code' => 3, 'area_name' => '岩手県' ),\n array('lg_code' => 2000, 'md_code' => 400, 'sm_code' => 4, 'area_name' => '山形県' ),\n array('lg_code' => 2000, 'md_code' => 500, 'sm_code' => 5, 'area_name' => '仙台市' ),\n array('lg_code' => 2000, 'md_code' => 500, 'sm_code' => 6, 'area_name' => 'その他宮城県' ),\n array('lg_code' => 2000, 'md_code' => 600, 'sm_code' => 7, 'area_name' => '福島県' ),\n array('lg_code' => 3000, 'md_code' => 100, 'sm_code' => 1, 'area_name' => '富山県' ),\n array('lg_code' => 3000, 'md_code' => 100, 'sm_code' => 2, 'area_name' => '石川県' ),\n array('lg_code' => 3000, 'md_code' => 100, 'sm_code' => 3, 'area_name' => '福井県' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 1, 'area_name' => '池袋・目白' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 2, 'area_name' => '赤羽・王子・板橋・成増' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 3, 'area_name' => '新宿・代々木・高田馬場・飯田橋' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 4, 'area_name' => '練馬・大泉学園・荻窪・中野' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 5, 'area_name' => '渋谷・青山・恵比寿' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 6, 'area_name' => '明大前・三軒茶屋・自由が丘・駒沢' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 7, 'area_name' => '赤坂・六本木・新橋' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 8, 'area_name' => '品川・大森・蒲田・五反田' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 9, 'area_name' => '上野・浅草・錦糸町・神田' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 10, 'area_name' => '亀有・小岩・葛西' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 11, 'area_name' => '北千住・竹ノ塚' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 12, 'area_name' => '立川・八王子・福生・国分寺' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 13, 'area_name' => '町田・多摩' ),\n array('lg_code' => 4000, 'md_code' => 100, 'sm_code' => 14, 'area_name' => '調布・吉祥寺・西東京' ),\n array('lg_code' => 4000, 'md_code' => 200, 'sm_code' => 1, 'area_name' => '横浜・上大岡・金沢・鶴見' ),\n array('lg_code' => 4000, 'md_code' => 200, 'sm_code' => 2, 'area_name' => '戸塚・瀬谷・青葉台・たまプラーザ' ),\n array('lg_code' => 4000, 'md_code' => 200, 'sm_code' => 3, 'area_name' => '川崎市'),\n array('lg_code' => 4000, 'md_code' => 200, 'sm_code' => 4, 'area_name' => '横須賀・藤沢' ),\n array('lg_code' => 4000, 'md_code' => 200, 'sm_code' => 5, 'area_name' => '茅ヶ崎・平塚・小田原' ),\n array('lg_code' => 4000, 'md_code' => 200, 'sm_code' => 6, 'area_name' => '厚木・相模原・大和' ),\n array('lg_code' => 4000, 'md_code' => 300, 'sm_code' => 1, 'area_name' => 'さいたま・川口・蕨' ),\n array('lg_code' => 4000, 'md_code' => 300, 'sm_code' => 2, 'area_name' => '越谷・久喜・春日部・草加' ),\n array('lg_code' => 4000, 'md_code' => 300, 'sm_code' => 3, 'area_name' => '所沢・川越・新座・和光' ),\n array('lg_code' => 4000, 'md_code' => 300, 'sm_code' => 4, 'area_name' => '熊谷・鴻巣・上尾' ),\n array('lg_code' => 4000, 'md_code' => 400, 'sm_code' => 1, 'area_name' => '千葉・木更津' ),\n array('lg_code' => 4000, 'md_code' => 400, 'sm_code' => 2, 'area_name' => '柏・松戸' ),\n array('lg_code' => 4000, 'md_code' => 400, 'sm_code' => 3, 'area_name' => '船橋' ),\n array('lg_code' => 4000, 'md_code' => 500, 'sm_code' => 1, 'area_name' => '群馬県' ),\n array('lg_code' => 4000, 'md_code' => 600, 'sm_code' => 1, 'area_name' => '栃木県' ),\n array('lg_code' => 4000, 'md_code' => 700, 'sm_code' => 1, 'area_name' => '茨城県' ),\n array('lg_code' => 5000, 'md_code' => 100, 'sm_code' => 1, 'area_name' => '新潟県' ),\n array('lg_code' => 5000, 'md_code' => 200, 'sm_code' => 1, 'area_name' => '長野県' ),\n array('lg_code' => 5000, 'md_code' => 300, 'sm_code' => 1, 'area_name' => '山梨県' ),\n array('lg_code' => 6000, 'md_code' => 100, 'sm_code' => 1, 'area_name' => '浜松' ),\n array('lg_code' => 6000, 'md_code' => 100, 'sm_code' => 2, 'area_name' => 'その他静岡県' ),\n array('lg_code' => 6000, 'md_code' => 200, 'sm_code' => 1, 'area_name' => '名駅・栄・金山' ),\n array('lg_code' => 6000, 'md_code' => 200, 'sm_code' => 2, 'area_name' => '藤が丘・今池・八事・野並' ),\n array('lg_code' => 6000, 'md_code' => 200, 'sm_code' => 3, 'area_name' => '小牧・北名古屋・一宮・春日井' ),\n array('lg_code' => 6000, 'md_code' => 200, 'sm_code' => 4, 'area_name' => '豊田・刈谷・岡崎・豊橋' ),\n array('lg_code' => 6000, 'md_code' => 300, 'sm_code' => 1, 'area_name' => '岐阜県' ),\n array('lg_code' => 6000, 'md_code' => 400, 'sm_code' => 1, 'area_name' => '三重県' ),\n array('lg_code' => 7000, 'md_code' => 100, 'sm_code' => 1, 'area_name' => '梅田・京橋・十三・新大阪' ),\n array('lg_code' => 7000, 'md_code' => 100, 'sm_code' => 2, 'area_name' => '心斎橋・難波・天王寺' ),\n array('lg_code' => 7000, 'md_code' => 100, 'sm_code' => 3, 'area_name' => '堺・岸和田・泉佐野・八尾' ),\n array('lg_code' => 7000, 'md_code' => 100, 'sm_code' => 4, 'area_name' => '枚方・寝屋川・東大阪' ),\n array('lg_code' => 7000, 'md_code' => 100, 'sm_code' => 5, 'area_name' => '豊中・池田・吹田・茨木' ),\n array('lg_code' => 7000, 'md_code' => 200, 'sm_code' => 1, 'area_name' => '京都府' ),\n array('lg_code' => 7000, 'md_code' => 300, 'sm_code' => 1, 'area_name' => '神戸市内' ),\n array('lg_code' => 7000, 'md_code' => 300, 'sm_code' => 2, 'area_name' => 'その他兵庫県' ),\n array('lg_code' => 7000, 'md_code' => 400, 'sm_code' => 1, 'area_name' => '奈良県' ),\n array('lg_code' => 7000, 'md_code' => 500, 'sm_code' => 2, 'area_name' => '滋賀県' ),\n array('lg_code' => 7000, 'md_code' => 600, 'sm_code' => 3, 'area_name' => '和歌山県' ),\n array('lg_code' => 8000, 'md_code' => 100, 'sm_code' => 1, 'area_name' => '岡山県' ),\n array('lg_code' => 8000, 'md_code' => 200, 'sm_code' => 2, 'area_name' => '広島県' ),\n array('lg_code' => 8000, 'md_code' => 300, 'sm_code' => 3, 'area_name' => '鳥取県' ),\n array('lg_code' => 8000, 'md_code' => 400, 'sm_code' => 4, 'area_name' => '島根県' ),\n array('lg_code' => 8000, 'md_code' => 500, 'sm_code' => 5, 'area_name' => '山口県' ),\n array('lg_code' => 9000, 'md_code' => 100, 'sm_code' => 1, 'area_name' => '愛媛県' ),\n array('lg_code' => 9000, 'md_code' => 200, 'sm_code' => 1, 'area_name' => '徳島県' ),\n array('lg_code' => 9000, 'md_code' => 300, 'sm_code' => 1, 'area_name' => '香川県' ),\n array('lg_code' => 9000, 'md_code' => 400, 'sm_code' => 1, 'area_name' => '高知県' ),\n array('lg_code' => 10000, 'md_code' => 100, 'sm_code' => 1, 'area_name' => '福岡市内' ),\n array('lg_code' => 10000, 'md_code' => 100, 'sm_code' => 2, 'area_name' => 'その他福岡県' ),\n array('lg_code' => 10000, 'md_code' => 200, 'sm_code' => 1, 'area_name' => '熊本県' ),\n array('lg_code' => 10000, 'md_code' => 300, 'sm_code' => 1, 'area_name' => '佐賀県' ),\n array('lg_code' => 10000, 'md_code' => 400, 'sm_code' => 1, 'area_name' => '長崎県' ),\n array('lg_code' => 10000, 'md_code' => 500, 'sm_code' => 1, 'area_name' => '大分県' ),\n array('lg_code' => 10000, 'md_code' => 600, 'sm_code' => 1, 'area_name' => '宮崎県' ),\n array('lg_code' => 10000, 'md_code' => 700, 'sm_code' => 1, 'area_name' => '鹿児島県' ),\n array('lg_code' => 10000, 'md_code' => 800, 'sm_code' => 1, 'area_name' => '沖縄県' ),\n );\n DB::table('regions')->insert($defregions);\n }", "function part2() {\n foreach ($this->areas as $a) {\n extract($a); // creates in scope: $id, $x, $y, $w, $h\n $area = $this->charCounter($id, $this->fabric);\n echo \"$id: $area\\n\";\n if ($area == $w * $h) {\n die(\"$id fills $area cells and is not overlapped.\\n\");\n }\n }\n echo \"No region found.\\n\";\n }", "public function corregir_boletas_por_sector($sectores = 0, $mes = 0, $anio = 0)\n\t{\n\t\t// if($sectores == 0 )\n\t\t// \t$sectores = $this->input->post('select_tablet');\n\t\t// if($mes == 0 )\n\t\t// \t$mes = $this->input->post('mes');\n\t\t// if($anio == 0 )\n\t\t// \t$anio = $this->input->post('anio');\n\t\t// if($sectores === 0 )\n\t\t// \t{\n\t\t// \t\techo \"Error\";die();\n\t\t// \t}\n\t\t// elseif($sectores == \"A\")\n\t\t// \t$sectores = [ \"A\", \"Jardines del Sur\", \"Aberanstain\", \"Medina\", \"Salas\", \"Santa Barbara\" , \"V Elisa\"];\n\t\t// else $sectores = [ \"B\", \"C\", \"David\", \"ASENTAMIENTO OLMOS\", \"Zaldivar\" ];\n\t\t$todas_las_variables = $this->Nuevo_model->get_data(\"configuracion\");\n\t\t$mediciones_desde_query = $this->Nuevo_model->get_sectores_query_corregir($sectores, $mes, $anio );\n\t\t//var_dump($mediciones_desde_query);die();\n\t\tif($mediciones_desde_query != false)\n\t\t{\n\t\t\t$indice_actual = 0;\n\t\t\tforeach ($mediciones_desde_query as $key ) {\n\t\t\t\tif( ($key->Factura_MedicionAnterior == 0) && ($key->Factura_MedicionActual == 1) ) // bandera de tablet\n\t\t\t\t\tcontinue;\n\t\t\t\tif( ( floatval($key->Factura_PagoMonto) != floatval(0)) && ($key->Factura_PagoContado != NULL) && ($key->Factura_PagoContado != NULL) ) //si esta pagada no se re calcula\n\t\t\t\t\tcontinue;\n\t\t\t\tif( ($key->Conexion_Categoria == 1) || ($key->Conexion_Categoria == \"Familiar\") || ($key->Conexion_Categoria ==\"Familiar \") )\n\t\t\t\t{\n\t\t\t\t\t$precio_metros = $todas_las_variables[3]->Configuracion_Valor;\n\t\t\t\t\t$metros_basicos = $todas_las_variables[5]->Configuracion_Valor;\n\t\t\t\t\t$precio_bsico = $todas_las_variables[4]->Configuracion_Valor;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$precio_metros = $todas_las_variables[6]->Configuracion_Valor;\n\t\t\t\t\t$metros_basicos = $todas_las_variables[8]->Configuracion_Valor;\n\t\t\t\t\t$precio_bsico = $todas_las_variables[7]->Configuracion_Valor;\n\t\t\t\t}\n\t\t\t\t$anterior = $key->Factura_MedicionAnterior;\n\t\t\t\t$actual = $key->Factura_MedicionActual;\n\t\t\t\t$inputExcedente = intval($actual) - intval($anterior) - intval($metros_basicos);\n\t\t\t\tif($inputExcedente < 0 )\n\t\t\t\t\t$inputExcedente = 0;\n\t\t\t\t$importe_medicion = 0;\n\t\t\t\tif($inputExcedente == 0)\n\t\t\t\t\t$importe_medicion = 0;\n\t\t\t\telse $importe_medicion = floatval($precio_metros) * floatval($inputExcedente);\n\t\t\t\t//calculo el subtotal y total\n\t\t\t\t$sub_total = floatval($key->Factura_TarifaSocial) \n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_Deuda)\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_ExcedentePrecio )\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_CuotaSocial )\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_Riego )\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_PM_Cuota_Precio)\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_PPC_Precio)\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_Multa);\n\t\t\t\t$total = $sub_total;\n\t\t\t\t$bonificacion = 0;\n\t\t\t\tif($key->Conexion_Deuda == 0)\n\t\t\t\t\t\t//$bonificacion_pago_puntual = (floatval ($excedente) + floatval($tarifa_basica)) * floatval (5) / floatval(100) ;//con bonificacion\n\t\t\t\t\t\t$bonificacion = (floatval ($inputExcedente) + floatval($key->Factura_TarifaSocial)) * floatval (5) / floatval(100) ;//con bonificacion\n\t\t\t\t$total =\tfloatval($total)\n\t\t\t\t\t\t\t\t\t\t- floatval($key->Factura_Acuenta)\n\t\t\t\t\t\t\t\t\t\t- floatval($bonificacion);\n\t\t\t\t//vtos\n\t\t\t\t$vto_2_precio = floatval($total) + floatval($total) * floatval($todas_las_variables[18]->Configuracion_Valor);\n\t\t\t\t$vto_1_precio = $total;\n\t\t\t\t$indice_actual++;\n\t\t\t\t$datos_factura_nueva = array(\n\t\t\t\t\t'Factura_SubTotal' => floatval($sub_total),\n\t\t\t\t\t'Factura_Total' => floatval($total),\n\t\t\t\t\t'Factura_Vencimiento1_Precio' => floatval($vto_1_precio),\n\t\t\t\t\t'Factura_Vencimiento2_Precio' => floatval($vto_2_precio),\n\t\t\t\t\t'Factura_ExcedentePrecio' => floatval($importe_medicion),\n\t\t\t\t\t'Factura_Excedentem3' => $inputExcedente\n\t\t\t\t\t );\n\t\t\t\t$resultado[$indice_actual] = $this->Nuevo_model->update_data_tres_campos($datos_factura_nueva, $key->Conexion_Id, \"facturacion_nueva\",\"Factura_Conexion_Id\", \"Factura_Mes\", $mes, \"Factura_Año\", $anio);\n\t\t\t\tvar_dump($datos_factura_nueva,$key->Conexion_Id);\n\t\t\t}\n\t\t\tvar_dump($datos_factura_nueva);\n\t\t}\n\t\telse\n\t\t\tvar_dump(\"Error. no hay medciones para las variables\");\t\n\t}", "function calcularAreaRect ($base, $altura){\n return $base * $altura;\n\n}", "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 cargarInformacion($oid,&$nomTarea){\n conectar($conexion);\n $sql=\"SELECT DS_NOMTAREA\n FROM ADM_TAREAS\n WHERE OID = '$oid'\";\n $executeQuery = mysqli_query($conexion,$sql);\n $row=mysqli_fetch_array($executeQuery);\n $nomTarea = $row['DS_NOMTAREA'];\n mysqli_close($conexion);\n}", "function reporteSolicitudCentros()\n {\n $dataSource = new DataSource();\n\n /*$this->objParam->addParametroConsulta('ordenacion','id_obligacion_pago');\n $this->objParam->addParametroConsulta('dir_ordenacion','ASC');\n $this->objParam->addParametroConsulta('cantidad',1000);\n $this->objParam->addParametroConsulta('puntero',0);*/\n\n //consulta por los datos de la obligacion de pago\n $this->objFunc = $this->create('MODObligacionPago');\n $resultObligacionPago = $this->objFunc->reporteSolicitudCentros($this->objParam);\n\n if ($resultObligacionPago->getTipo() == 'EXITO') {\n\n $datosObligacionPago = $resultObligacionPago->getDatos();\n\n $dataSource->putParameter('desc_proveedor', $datosObligacionPago[0]['desc_proveedor']);\n $dataSource->putParameter('estado', $datosObligacionPago[0]['estado']);\n $dataSource->putParameter('tipo_obligacion', $datosObligacionPago[0]['tipo_obligacion']);\n $dataSource->putParameter('obs', $datosObligacionPago[0]['obs']);\n $dataSource->putParameter('nombre_subsistema', $datosObligacionPago[0]['nombre_subsistema']);\n $dataSource->putParameter('porc_retgar', $datosObligacionPago[0]['porc_retgar']);\n $dataSource->putParameter('porc_anticipo', $datosObligacionPago[0]['porc_anticipo']);\n $dataSource->putParameter('nombre_depto', $datosObligacionPago[0]['nombre_depto']);\n $dataSource->putParameter('num_tramite', $datosObligacionPago[0]['num_tramite']);\n $dataSource->putParameter('fecha', $datosObligacionPago[0]['fecha']);\n $dataSource->putParameter('numero', $datosObligacionPago[0]['numero']);\n $dataSource->putParameter('tipo_cambio_conv', $datosObligacionPago[0]['tipo_cambio_conv']);\n $dataSource->putParameter('comprometido', $datosObligacionPago[0]['comprometido']);\n $dataSource->putParameter('nro_cuota_vigente', $datosObligacionPago[0]['nro_cuota_vigente']);\n $dataSource->putParameter('pago_variable', $datosObligacionPago[0]['pago_variable']);\n $dataSource->putParameter('moneda', $datosObligacionPago[0]['moneda']);\n $dataSource->putParameter('id_moneda', $datosObligacionPago[0]['id_moneda']);\n $dataSource->putParameter('id_obligacion_pago', $datosObligacionPago[0]['id_obligacion_pago']);\n\n $this->objParam->addParametro('id_moneda', $datosObligacionPago[0]['id_moneda']);\n $this->objParam->addParametro('id_obligacion_pago', $datosObligacionPago[0]['id_obligacion_pago']);\n //consulta por el detalle de obligacion\n $this->objParam->addParametroConsulta('ordenacion', 'id_obligacion_det');\n $this->objParam->addParametroConsulta('dir_ordenacion', 'ASC');\n $this->objParam->addParametroConsulta('cantidad', 1000);\n $this->objParam->addParametroConsulta('puntero', 0);\n\n\n //listado del detalle\n $this->objFunc = $this->create('MODObligacionPago');\n $resultObligacion = $this->objFunc->listarObligacion($this->objParam);\n\n if ($resultObligacion->getTipo() == 'EXITO') {\n\n $datosObligacion = $resultObligacion->getDatos();\n $dataSource->setDataSet($datosObligacion);\n $nombreArchivo = 'Reporte.pdf';\n $reporte = new RComEjePag();\n $reporte->setDataSource($dataSource);\n $reportWriter = new ReportWriter($reporte, dirname(__FILE__) . '/../../reportes_generados/' . $nombreArchivo);\n $reportWriter->writeReport(ReportWriter::PDF);\n $mensajeExito = new Mensaje();\n\n $mensajeExito->setMensaje('EXITO', 'Reporte.php', 'Reporte generado',\n 'Se generó con éxito el reporte: ' . $nombreArchivo, 'control');\n\n $mensajeExito->setArchivoGenerado($nombreArchivo);\n $this->res = $mensajeExito;\n $this->res->imprimirRespuesta($this->res->generarJson());\n } else {\n $resultObligacion->imprimirRespuesta($resultObligacion->generarJson());\n\n }\n } else {\n\n $resultObligacionPago->imprimirRespuesta($resultObligacionPago->generarJson());\n }\n }", "function getAlc(){\r\n return array(\"saki\", \"vodka\", \"rum\", \"whiskey\", \"tequila\", \"gin\");\r\n }", "public function getStartCollegamentiArea() {\n return $this->_startCollegamenti; \n }", "function mapit_get_voting_area_geometry($area, $polygon_type = null) {\n global $mapit_client;\n $params = func_get_args();\n $result = $mapit_client->call('MaPit.get_voting_area_geometry', $params);\n return $result;\n}", "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 }" ]
[ "0.7018638", "0.65589947", "0.651964", "0.6472906", "0.6412635", "0.6336528", "0.625828", "0.6240538", "0.61972094", "0.6143607", "0.6139034", "0.5941792", "0.59114116", "0.5866288", "0.58298874", "0.58123213", "0.57976705", "0.57927185", "0.5784621", "0.5781465", "0.5781284", "0.577687", "0.57684517", "0.5750698", "0.57305074", "0.5718765", "0.5711846", "0.56978303", "0.56792194", "0.56739247", "0.5664314", "0.5652845", "0.56522375", "0.56514424", "0.56514424", "0.5644476", "0.5642457", "0.5642457", "0.564048", "0.563154", "0.5625386", "0.560133", "0.5584437", "0.55659914", "0.5564785", "0.5564181", "0.5543151", "0.5543151", "0.5543151", "0.55431384", "0.55378497", "0.5536956", "0.5530727", "0.5526711", "0.5519355", "0.551657", "0.550099", "0.549257", "0.5486227", "0.5483857", "0.54805976", "0.547261", "0.5471899", "0.5470151", "0.54596466", "0.545816", "0.54508436", "0.5448514", "0.5446975", "0.5440692", "0.5439966", "0.54345596", "0.54345196", "0.5428115", "0.5423146", "0.54225373", "0.5407062", "0.54052806", "0.5398513", "0.5396985", "0.539135", "0.5388102", "0.537905", "0.5374726", "0.5370465", "0.5369687", "0.5359838", "0.5357491", "0.5351706", "0.5350648", "0.5344069", "0.53405076", "0.5339659", "0.533881", "0.5336496", "0.5330943", "0.5328818", "0.53264165", "0.5325498", "0.5323747", "0.5321018" ]
0.0
-1
We register tabs on the server side to receive data on page load and hang the ajax handler
public function register_tabs() { require_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/base-form-tab.php' ); require_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/captcha.php' ); require_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/active-campaign.php' ); require_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/get-response.php' ); require_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/mailchimp.php' ); $tabs = apply_filters( 'jet-engine/dashboard/form-tabs', array( new Captcha(), new Active_Campaign(), new Get_Response(), new Mailchimp(), ) ); foreach ( $tabs as $tab ) { if ( $tab instanceof Base_Form_Tab ) { $this->register_tab( $tab ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ajaxProcessGetTabModulesList()\n {\n }", "public function ajaxProcessSaveTabModulePreferences()\n {\n }", "public function handleAjaxRequest();", "private function ajaxManagerAbc(){\n\t\tcheck_ajax_referer('ajax-security-code', 'security');\n\t\trequire_once $this->sPath . '/tpl/ajax/ajax-manager-abc/display.php';\n\t\tdie();\n\t}", "public function initAjax()\n {\n }", "protected function setup_tabs() {\n\n\t\t// If there's a remote info file give it priority and override any existing parameters.\n\t\tif ( $url = $this->browser_args['remote_info'] ) {\n\t\t\t$info = $this->get_remote_info( $url );\n\n\t\t\tif ( ! empty( $info ) ) {\n\t\t\t\t$this->browser_args = wp_parse_args( $info, $this->browser_args );\n\t\t\t}\n\n\t\t}\n\n\t\t// Display the 'popular' tab if enabled.\n\t\tif ( 'true' == $this->browser_args['show_popular'] ) {\n\n\t\t\t$this->browser_args['tabs']['popular'] = array(\n\t\t\t\t'name' => __( 'Popular', 'wp-shp-browser' ),\n\t\t\t\t'url' => ''\n\t\t\t);\n\n\t\t}\n\n\t\t// Set the default tab if not already set.\n\t\tif ( ! $this->browser_args['default_tab'] ) {\n\t\t\t$default_tab = array_keys( $this->browser_args['tabs'] );\n\t\t\t$default_tab = $default_tab[0];\n\n\t\t\t$this->browser_args['default_tab'] = $default_tab;\n\t\t}\n\n\t}", "protected function createTabs() {}", "function activity_tabs_init(){\n // add our own css\n elgg_extend_view('css/elgg', 'activity_tabs/css');\n \n elgg_register_page_handler('activity_tabs', 'activity_tabs_pagehandler');\n elgg_register_event_handler('pagesetup', 'system', 'activity_tabs_pagesetup');\n \n // default menu items are registered with relative paths\n // need to change it due to different page handlers\n elgg_register_plugin_hook_handler('register', 'menu:filter', 'activity_tabs_filtermenu');\n \n // set user activity link on menu:user_hover dropdown\n $user_activity = elgg_get_plugin_setting('user_activity', 'mt_activity_tabs');\n \n if($user_activity != 'no'){\n elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'activity_tabs_user_hover');\n elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'activity_tabs_user_hover');\n }\n}", "public function maybe_run_ajax_cache()\n {\n }", "public function init_ajax() {\r\n\t\t$this->add_action( 'mainwp-child_clone_backupcreate', array( &$this, 'clone_backup_create' ) );\r\n\t\t$this->add_action( 'mainwp-child_clone_backupcreatepoll', array( &$this, 'clone_backup_create_poll' ) );\r\n\t\t$this->add_action( 'mainwp-child_clone_backupdownload', array( &$this, 'clone_backup_download' ) );\r\n\t\t$this->add_action( 'mainwp-child_clone_backupdownloadpoll', array( &$this, 'clone_backup_download_poll' ) );\r\n\t\t$this->add_action( 'mainwp-child_clone_backupextract', array( &$this, 'clone_backup_extract' ) );\r\n\t}", "protected function init_tabs() {\r\n\t\t$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'firstrun' ), $_SERVER['REQUEST_URI'] );\r\n\r\n\t\tadd_action( 'qc_settings_head', 'qc_status_colors_css' );\r\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );\r\n\r\n\t\t$this->tabs->add( 'general', __( 'General', APP_TD ) );\r\n\r\n\t\t$this->tab_sections['general']['main'] = array(\r\n\t\t\t'title' => __( 'General Settings', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Permissions', APP_TD ),\r\n\t\t\t\t\t'type' => 'radio',\r\n\t\t\t\t\t'name' => 'assigned_perms',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'protected' => __( 'Users can only view their own tickets and tickets they are assigned to.', APP_TD ),\r\n\t\t\t\t\t\t'read-only' => __( 'Users can view all tickets.', APP_TD ),\r\n\t\t\t\t\t\t'read-write' => __( 'Users can view and updated all tickets.', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Lock Site from Visitors', APP_TD ),\r\n\t\t\t\t\t'name' => 'lock_site',\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'desc' => __( 'Yes', APP_TD ),\r\n\t\t\t\t\t'tip' => __( 'Visitors will be asked to login, and will not be able to browse site. Also content of the sidebars and menus will be hidden.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['states'] = array(\r\n\t\t\t'title' => __( 'States', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Default State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'This state will be selected by default when creating a ticket.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_new',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Resolved State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'Tickets in this state are assumed to no longer need attention.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_closed',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\t\t$this->tab_sections['general']['colors'] = array(\r\n\t\t\t'fields' => $this->status_colors_options(),\r\n\t\t\t'renderer' => array( $this, 'render_status_colors' ),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['modules'] = array(\r\n\t\t\t'title' => __( 'Modules', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Enable Modules', APP_TD ),\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'name' => 'modules',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'assignment' => __( 'Assignment', APP_TD ),\r\n\t\t\t\t\t\t'attachments' => __( 'Attachments', APP_TD ),\r\n\t\t\t\t\t\t'categories' => __( 'Categories', APP_TD ),\r\n\t\t\t\t\t\t'changesets' => __( 'Changesets', APP_TD ),\r\n\t\t\t\t\t\t'milestones' => __( 'Milestones', APP_TD ),\r\n\t\t\t\t\t\t'priorities' => __( 'Priorities', APP_TD ),\r\n\t\t\t\t\t\t'tags' => __( 'Tags', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'tip' => __( 'Choose the modules that you want to use on your site.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t}", "public static function handle_ajax() {\n\t\tHelpers::ajax_wrapper( array( self::class, 'ajax_handler_body' ) );\n\t}", "public function actionRenderTab() {\n\n if (isset($_GET['name']) && isset($_GET['type'])) {\n $model = $this->loadModel();\n $this->renderPartial('/project/' . $_GET['type'] . 'Wrapper',\n array('model' => $model,\n 'render' => $_GET['name'],\n 'tab_fk' => $_GET['tab_fk']));\n } elseif (isset($_GET['ajaxPanel']) && $_GET['ajaxPanel']) {\n if (!isset($_GET['ajax'])) {\n echo CJSON::encode(array('status' => 't',\n 'response' => $this->renderPartial('/project/ajaxInterface', array('params' => $_GET), true, true)));\n } elseif (isset($_GET['ajax'])) {\n echo $this->renderPartial('/project/ajaxInterface', array('params' => $_GET), true, true);\n }\n Yii::app()->end();\n } else {\n echo CJSON::encode(array('status' => 'f',\n 'response' => 'There was a problem rendering this panel.'));\n Yii::app()->end();\n }\n }", "public function actionRenderHierarchyTab() {\n var_dump($_GET);\n if (!isset($_GET['ajax'])) {\n echo CJSON::encode(array('status' => 't',\n 'response' => $this->renderPartial('/project/ajaxInterface', array('params' => $_GET), true, true)));\n } elseif (isset($_GET['ajax'])) {\n echo $this->renderPartial('/project/ajaxInterface', array('params' => $_GET), true, true);\n }\n Yii::app()->end();\n }", "abstract public function LowAjax();", "function dumpForAjax()\r\n {\r\n $this->updateControl();\r\n $this->commonScript();\r\n }", "abstract public function HighAjax();", "public function ajax_load_available_items()\n {\n }", "public function loadAjax() {\n\t \n\t\t$this->classificationFacade->loadAjax($_GET);\n\t\t\n\t}", "function fetch_log_ajax() { \n\n\t// Only for LOG tab\n\tglobal $pn4p_active_tab;\n\tif (TAB_LOG != $pn4p_active_tab) {\n\t\treturn;\n\t}\n\n\t?>\n\t<script type=\"text/javascript\" >\n\n\tvar fetchLog = function() {\n\n\t\tvar data = {\n\t\t\t'action': 'fetch_log_action'\n\t\t};\n\n\t\t// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php\n\t\tjQuery.post(ajaxurl, data, function(response) {\n\t\t\tjQuery(\"#log-content\").html(response);\n\t\t\tsetTimeout(fetchLog, 2000);\n\t\t});\n\t};\n\n\tjQuery(document).ready(function($){\n\t\tfetchLog();\n\t});\n\n\t</script> \n\t<?php\n}", "function ajaxList() {\r\n $this->rdAuth->noStudentsAllowed();\r\n // Set up the list\r\n $this->setUpAjaxList();\r\n // Process the request for data\r\n $this->AjaxList->asyncGet();\r\n }", "public function beforeFilter(){ \n\t\t//$this->disable_cache();\n\t\t$this->show_tabs(100);\n\t}", "public function on_load() {\r\n\t\t// If a free user, update the limits.\r\n\t\tif ( ! WP_Smush::is_pro() ) {\r\n\t\t\t// Reset transient.\r\n\t\t\tCore::check_bulk_limit( true );\r\n\t\t}\r\n\r\n\t\t// Init the tabs.\r\n\t\t$this->tabs = apply_filters(\r\n\t\t\t'smush_setting_tabs',\r\n\t\t\tarray(\r\n\t\t\t\t'bulk' => __( 'Bulk Smush', 'wp-smushit' ),\r\n\t\t\t\t'directory' => __( 'Directory Smush', 'wp-smushit' ),\r\n\t\t\t\t'integrations' => __( 'Integrations', 'wp-smushit' ),\r\n\t\t\t\t'lazy_load' => __( 'Lazy Load', 'wp-smushit' ),\r\n\t\t\t\t'cdn' => __( 'CDN', 'wp-smushit' ),\r\n\t\t\t\t'webp' => __( 'Local WebP', 'wp-smushit' ),\r\n\t\t\t\t'tools' => __( 'Tools', 'wp-smushit' ),\r\n\t\t\t\t'settings' => __( 'Settings', 'wp-smushit' ),\r\n\t\t\t\t'tutorials' => __( 'Tutorials', 'wp-smushit' ),\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t// Don't display if Dashboard's whitelabel is hiding the documentation.\r\n\t\tif ( apply_filters( 'wpmudev_branding_hide_doc_link', false ) ) {\r\n\t\t\tunset( $this->tabs['tutorials'] );\r\n\t\t}\r\n\r\n\t\t$access = Settings::can_access();\r\n\r\n\t\tif ( ( ! is_network_admin() && ! $access ) || ( is_network_admin() && true === $access ) ) {\r\n\t\t\tunset( $this->tabs['bulk'] );\r\n\t\t\tunset( $this->tabs['integrations'] );\r\n\t\t\tunset( $this->tabs['lazy_load'] );\r\n\t\t\tunset( $this->tabs['cdn'] );\r\n\t\t\tunset( $this->tabs['tools'] );\r\n\t\t\tunset( $this->tabs['tutorials'] );\r\n\t\t}\r\n\r\n\t\tif ( is_network_admin() && is_array( $access ) ) {\r\n\t\t\tforeach ( $this->tabs as $tab => $name ) {\r\n\t\t\t\tif ( ! in_array( $tab, $access, true ) ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tunset( $this->tabs[ $tab ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( ! is_network_admin() && is_array( $access ) ) {\r\n\t\t\tforeach ( $this->tabs as $tab => $name ) {\r\n\t\t\t\tif ( in_array( $tab, $access, true ) ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tunset( $this->tabs[ $tab ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Disabled on all subsites.\r\n\t\tif ( is_multisite() && ! is_network_admin() ) {\r\n\t\t\tunset( $this->tabs['webp'] );\r\n\t\t\tunset( $this->tabs['settings'] );\r\n\t\t}\r\n\t}", "public function startTabs() {\n\t\t\tglobal $oSecurity; \n\t\t\t$arTabs = array( \n\t\t\t\t\"home\" => array(\n\t\t\t\t\t\"title\" => \"Home\", \n\t\t\t\t\t\"url\" => \"main.php\", \n\t\t\t\t\t\"classes\" => array(\"menu-item\", \"home\"), \n\t\t\t\t) \n\t\t\t); \n\t\t\t$oOwaesTypes = new owaestype(); \n\t\t\tforeach ($oOwaesTypes->getAllTypes() as $strKey=>$strTitle) {\n\t\t\t\t$arTabs[\"market.\" . $strKey] = array(\n\t\t\t\t\t\"title\" => $strTitle, \n\t\t\t\t\t\"url\" => \"index.php?t=\" . $strKey, \n\t\t\t\t\t\"classes\" => array(\"menu-item\", $strKey), \n\t\t\t\t);\n\t\t\t}\n\t\t\t/*$arTabs[\"users\"] = array(\n\t\t\t\t\t\"title\" => \"gebruikers\", \n\t\t\t\t\t\"url\" => \"users.php\", \n\t\t\t\t\t\"classes\" => array(\"users\", \"extratab\"), \n\t\t\t\t);*/\n\t\t\tif ($this->bLoggedInUser) {\n\t\t\t\t/*$oInbox = new inbox();\n\t\t\t\tif (count($oInbox->discussions()) > 0) {\n\t\t\t\t\t$arTabs[\"messages\"] = array(\n\t\t\t\t\t\t\"title\" => \"berichten\", \n\t\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\t\"classes\" => array(\"extratab\", \"mailbox\"), \n\t\t\t\t\t\t\"sub\" => array(),\n\t\t\t\t\t); \n\t\t\t\t\tforeach ($oInbox->discussions() as $iKey=>$arUser) {\n\t\t\t\t\t\tif ($arUser[\"unread\"] > 0) {\n\t\t\t\t\t\t\t$arTabs[\"messages\"][\"sub\"][$arUser[\"names\"] . \" (\" . $arUser[\"unread\"] . \")\"] = array(\"conversation.php?users=\" . $arUser[\"ids\"], \"conversation unread\"); \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$arTabs[\"messages\"][\"sub\"][$arUser[\"names\"]] = array(\"conversation.php?users=\" . $arUser[\"ids\"], \"conversation\"); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n */\n $arTabs[\"lijsten\"] = array (\n \"title\" => \"Lijsten\", \n\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\"classes\" => array(\"dropdown-toggle\", \"lijsten\", \"menu-item\"), \n\t\t\t\t\t\"sub\" => array(),\n );\n \n if (user(me())->levelrights(\"groepslijst\")) $arTabs[\"lijsten\"][\"sub\"][\"Groepen\"] = array(\"groups.php\", \"groups\");\n if (user(me())->levelrights(\"gebruikerslijst\")) $arTabs[\"lijsten\"][\"sub\"][\"Gebruikers\"] = array(\"users.php\", \"gebruikers\");\n $arTabs[\"lijsten\"][\"sub\"][\"Vrienden\"] = array(\"friends.php\", \"friends\");\n\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Badges\"] = array(\"badges.php\", \"badges\");\n\t\t\t\tif ($oSecurity->admin()) {\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Admin\"] = array(\"admin.php\", \"admin\");\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Reports\"] = array(\"meldingen.php\", \"meldingen\");\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Groepen\"] = array(\"admin.groepen.php\", \"groups\");\n\t\t\t\t}\n \n $arTabs[\"account\"] = array (\n \"title\" => \"Account\", \n\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\"classes\" => array(\"dropdown-toggle\", \"account\", \"menu-item\"), \n\t\t\t\t\t\"sub\" => array(),\n );\n $arTabs[\"account\"][\"sub\"][\"Profiel\"] = array(\"profile.php\", \"profiel\");\t\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Berichten\"] = array(\"conversation.php\", \"berichten\");\t\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Instellingen\"] = array(\"settings.php\", \"instellingen\");\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Paswoord aanpassen\"] = array(\"modal.changepass.php\", \"paswoord domodal\");\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Afmelden\"] = array(\"logout.php\", \"afmelden\");\t\n \n\t\t\t\t/*$arTabs[\"settings\"] = array(\n\t\t\t\t\t\"title\" => \"instellingen\", \n\t\t\t\t\t\"url\" => \"settings.php\", \n\t\t\t\t\t\"classes\" => array(\"extratab\", \"settings\"), \n\t\t\t\t\t\"sub\" => array(),\n\t\t\t\t);\n \n\t\t\t\tforeach (user(me())->groups() as $oGroep) {\n\t\t\t\t\t$arTabs[\"settings\"][\"sub\"][$oGroep->naam()] = array(\"group.php?id=\" . $oGroep->id(), \"groep\"); \n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t//if ($oSecurity->admin()) $arTabs[\"account\"][\"sub\"][\"admin\"] = array(\"admin.php\", \"admin\"); \n\t\t\t\t/*\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"instellingen\"] = array(\"settings.php\", \"settings\");\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"profiel\"] = array(\"profile.php\", \"profile\");\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"uitloggen\"] = array(\"logout.php\", \"login\");\n */\n\t\t\t} else {\n\t\t\t\t$arTabs[\"login\"] = array(\n\t\t\t\t\t\"url\" => \"login.php?p=\" . urlencode($this->filename()), \n\t\t\t\t\t\"classes\" => array(\"menu-item\", \"login\"), \n\t\t\t\t); \n\t\t\t}\n\t\t\tif (isset($arTabs[$this->tab()][\"classes\"])) $arTabs[$this->tab()][\"classes\"][] = \"active\"; \n \n $strHTML = \"\";\n $strHTML .= \"<nav class=\\\"navbar navbar-default\\\">\";\n $strHTML .= \"<div class=\\\"container\\\"><div class=\\\"row\\\"><div class=\\\"navbar-header\\\">\";\n $strHTML .= \"<a href=\\\"main.php\\\"><h1 class=\\\"navbar-brand\\\">OWAES</h1></a>\";\n $strHTML .= \"<button class=\\\"navbar-toggle\\\" type=\\\"button\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#navbar-main\\\"><span class=\\\"icon-bar\\\"></span><span class=\\\"icon-bar\\\"></span><span class=\\\"icon-bar\\\"></span></button>\";\n\t\t\t$strHTML .= \"</div><div class=\\\"navbar-collapse collapse\\\" id=\\\"navbar-main\\\"><ul class=\\\"nav navbar-nav navbar-right\\\">\"; \n\t\t\tforeach ($arTabs as $strKey => $arDetails) {\n\t\t\t\t$strTitel = isset($arDetails[\"title\"]) ? $arDetails[\"title\"] : $strKey; \n if (!isset($arDetails[\"sub\"])){\n $strHTML .= \"<li>\";\n\t\t\t\t $strHTML .= \"<a href=\\\"\" . fixPath($arDetails[\"url\"]) . \"\\\" class=\\\"\" . implode(\" \", $arDetails[\"classes\"]) . \"\\\">\";\n $strHTML .= \"<span class=\\\"icon\\\"></span>\";\n $strHTML .= \"<span class=\\\"title\\\">$strTitel</span></a>\";\n $strHTML .= \"</li>\";\n } else{\n $strHTML .= \"<li class=\\\"dropdown\\\">\";\n $strHTML .= \"<a href=\\\"\" . fixPath($arDetails[\"url\"]) . \"\\\" class=\\\"\" . implode(\" \", $arDetails[\"classes\"]) . \"\\\" data-toggle=\\\"dropdown\\\">\";\n $strHTML .= \"<span class=\\\"icon\\\"></span>\";\n $strHTML .= \"<span class=\\\"title\\\">$strTitel</span> <span class=\\\"caret\\\"></span></a>\";\n \n $strHTML .= \"<ul class=\\\"dropdown-menu\\\">\"; \n\t\t\t\t\tforeach ($arDetails[\"sub\"] as $strSubTitel => $arSubDetails) {\n\t\t\t\t\t\t$strHTML .= \"<li><a href=\\\"\" . fixPath($arSubDetails[0]) . \"\\\" class=\\\"\" . $arSubDetails[1] . \"\\\"><span class=\\\"icon-\" . $arSubDetails[1] . \"\\\"></span><span>$strSubTitel</span></a></li>\";\n\t\t\t\t\t}\n\t\t\t\t\t$strHTML .= \"</ul>\"; \n $strHTML .= \"</li>\";\n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t$strHTML .= \"</ul></div></div></div></nav>\"; \n\t\t\t//$strHTML .= \"<div class=\\\"clock\\\">\" . clock() . \"</div>\"; \n\t\t\t/*$strHTML .= \"<form class=\\\"search\\\" action=\\\"\" . fixPath(\"search.php\") . \"\\\" method=\\\"get\\\">\n\t\t\t\t\t\t\t<input class=\\\"searchfield\\\" type=\\\"text\\\" name=\\\"q\\\" \" . (isset($_GET[\"q\"])?(\"value=\\\"\" . inputfield($_GET[\"q\"]) . \"\\\"\"):\"\") . \" />\n\t\t\t\t\t\t\t<input class=\\\"searchbutton\\\" type=\\\"submit\\\" value=\\\"zoeken\\\" />\n\t\t\t\t\t\t</form>\"; */\n //$strHTML .= \"<ul class=\\\"popupmessages\\\"></ul>\"; \n\t\t\tif (!$this->bLoggedInUser) { \n\t\t\t\t$strHTML .= \"<div class=\\\"loginbar\\\">\n\t\t\t\t\t\t\t\tLog in: \n\t\t\t\t\t\t\t\t<form action=\\\"\" . fixPath(\"login.php\") . \"\\\" method=\\\"post\\\">\n\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"from\\\" id=\\\"from\\\" value=\\\"\" . $this->filename(TRUE) . \"\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"username\\\" id=\\\"username\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"password\\\" name=\\\"pass\\\" id=\\\"pass\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"submit\\\" name=\\\"dologin\\\" value=\\\"inloggen\\\" />\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\tof <a href=\\\"\" . fixPath(\"login.php?p=\" . urlencode($this->filename())) . \"\\\">registreer</a>\n\t\t\t\t\t\t\t</div>\";\n\t\t\t} \n\t\t\t//$strHTML .= \"<div id=\\\"ADMIN\\\">\n\t\t\t//\t\t\t\t\t<ul><a href=\\\"#\\\" rel=\\\"SQL\\\">show/hide SQL</a></ul>\n\t\t\t//\t\t\t\t</div>\";\n\t\t\t\n\t\t\tif(settings(\"analytics\")!=\"\") {\n\t\t\t\t$strHTML = \"<script>\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n ga('create', '\" . settings(\"analytics\") . \"', 'auto');\n ga('send', 'pageview');\n\n</script>\" . $strHTML; \t\n\t\t\t}\n\t\t\t\n\t\t\treturn $strHTML; \n\t\t}", "public function init() {\n $baseAssetsPath = Yii::getPathOfAlias('application.components.assets.AjaxPager');\n $cs = Yii::app()->clientScript;\n $cs->registerScriptFile(Yii::app()->getAssetManager()->publish($baseAssetsPath . '/ajaxPager.js'));\n\n if (is_null($this->ajaxOptions)) {\n $this->ajaxOptions = array();\n }\n\n $ajaxOptions = array(\n 'data' => array('page' => 'js:function(){ return window.page + 1; }', 'sort' => \"js:(typeof sort != 'undefined') ? sort : ''\"),\n 'dataType' => 'json',\n 'context' => 'this',\n 'success' => 'js:nextItemsSuccess',\n );\n $this->ajaxOptions = CMap::mergeArray($ajaxOptions, $this->ajaxOptions);\n $this->ajaxOptions['url']=$this->ajaxLink;\n }", "function init()\n\t{\n\t\t$this->setType(\"tabs\");\n\t}", "public function init_ajax() {\n\n\t\tparent::init_ajax();\n\n\t\t// Add AJAX callback for retreiving folder contents.\n\t\tadd_action( 'wp_ajax_gfdropbox_folder_contents', array( $this, 'ajax_get_folder_contents' ) );\n\n\t\t// Add AJAX callback for de-authorizing with Dropbox.\n\t\tadd_action( 'wp_ajax_gfdropbox_deauthorize', array( $this, 'ajax_deauthorize' ) );\n\n\t\t// Add AJAX callback for checking app key/secret validity.\n\t\tadd_action( 'wp_ajax_gfdropbox_valid_app_key_secret', array( $this, 'ajax_is_valid_app_key_secret' ) );\n\n\t}", "public function wpAjaxListener()\n\t{\n\t\t// die if nonce is not valid\n\t\t$this->checkNonce();\n\n // ADI-357 unescape already escaped $_POST\n $post = stripslashes_deep($_POST);\n\n\t\t// is $post does not contain data, then return\n\t\tif (empty($post['data'])) {\n\t\t\treturn;\n\t\t}\n\n\t\t// if user has got insufficient permission, then leave\n\t\tif (!$this->currentUserHasCapability()) {\n\t\t\treturn;\n\t\t}\n\n\t\t$data = $post['data'];\n\n\t\t$this->saveBlogProfileAssociations($data);\n\t\t$this->saveDefaultProfile($data);\n\t}", "function handleRequest(){\n\n check_ajax_referer( 'mvc-ajax' );\n \n $class = apply_filters( 'mvc_theme_ajax_handle_class', $this->getControllerObject( $_POST['controller'] ), $_POST );\n\n if( !$this->no_priv ){\n if( !isset( $class->ajax_allow ) || !in_array( $_POST['method'], $class->ajax_allow ) ){\n echo 'This method has not been added to the ajax_allow allowed list';\n exit();\n } \n }\n\n $data = $class->{$_POST['method']}($_POST['args']);\n \n if( !is_string( $data ) ){\n echo json_encode( $data );\n } else {\n echo $data;\n }\n exit(); \n }", "function force_initial_load()\n\t{\n\t\t$this->no_ajax = TRUE;\n\t}", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"FIELDTHEMES\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab_2->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldBrandSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configuge brands\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "public function registerTabs()\n {\n\n Tab::put('promotion.promotion-code', function (TabItem $tab) {\n $tab->key('promotion.promotion-code.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::promotion.promotion-code._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.product.cards._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.image')\n ->label('avored::system.images')\n ->view('avored::catalog.product.cards.images');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.property')\n ->label('avored::system.property')\n ->view('avored::catalog.product.cards.property');\n });\n\n // Tab::put('catalog.product', function (TabItem $tab) {\n // $tab->key('catalog.product.attribute')\n // ->label('avored::system.tab.attribute')\n // ->view('avored::catalog.product.cards.attribute');\n // });\n\n /****** CATALOG CATEGORY TABS *******/\n Tab::put('catalog.category', function (TabItem $tab) {\n $tab->key('catalog.category.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.category._fields');\n });\n\n /****** CATALOG PROPERTY TABS *******/\n Tab::put('catalog.property', function (TabItem $tab) {\n $tab->key('catalog.property.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.property._fields');\n });\n\n /****** CATALOG ATTRIBUTE TABS *******/\n Tab::put('catalog.attribute', function (TabItem $tab) {\n $tab->key('catalog.attribute.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.attribute._fields');\n });\n\n /******CMS PAGES TABS *******/\n Tab::put('cms.page', function (TabItem $tab) {\n $tab->key('cms.page.info')\n ->label('avored::system.basic_info')\n ->view('avored::cms.page._fields');\n });\n\n /******ORDER ORDER STATUS TABS *******/\n Tab::put('order.order-status', function (TabItem $tab) {\n $tab->key('order.order-status.info')\n ->label('avored::system.basic_info')\n ->view('avored::order.order-status._fields');\n });\n\n /****** CUSTOMER GROUPS TABS *******/\n Tab::put('user.customer-group', function (TabItem $tab) {\n $tab->key('user.customer-group.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer-group._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.customer._addresses');\n });\n\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer.show');\n });\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.address._fields');\n });\n\n /******USER ADMIN USER TABS *******/\n Tab::put('user.staff', function (TabItem $tab) {\n $tab->key('user.staff.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.staff._fields');\n });\n Tab::put('user.subscriber', function (TabItem $tab) {\n $tab->key('user.subscriber.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.subscriber._fields');\n });\n\n /******SYSTEM CURRENCY TABS *******/\n Tab::put('system.currency', function (TabItem $tab) {\n $tab->key('system.currency.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.currency._fields');\n });\n\n /******SYSTEM STATE TABS *******/\n Tab::put('system.state', function (TabItem $tab) {\n $tab->key('system.state.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.state._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.role', function (TabItem $tab) {\n $tab->key('system.role.info')\n ->label('avored::system.basic_info')\n ->view('avored::system.role._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.language', function (TabItem $tab) {\n $tab->key('system.language.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.language._fields');\n });\n\n /******SYSTEM CONFIGURATION TABS *******/\n Tab::put('system.configuration', function (TabItem $tab) {\n $tab->key('system.configuration.basic')\n ->label('avored::system.basic_configuration')\n ->view('avored::system.configuration.cards.basic');\n });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.user')\n // ->label('avored::system.tab.user_configuration')\n // ->view('avored::system.configuration.cards.user');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.tax')\n // ->label('avored::system.tax_configuration')\n // ->view('avored::system.configuration.cards.tax');\n // });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.shipping')\n // ->label('avored::system.tab.shipping_configuration')\n // ->view('avored::system.configuration.cards.shipping');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.payment')\n // ->label('avored::system.tab.payment_configuration')\n // ->view('avored::system.configuration.cards.payment');\n // });\n }", "function ajax_serverActions()\n{\n\n $cc = new CapabilityCheck('serverActions', $_POST);\n if (!$cc->checkCapability()) {\n return;\n }\n\n check_ajax_referer('CPWP');\n\n $cpjm = new CPJobManager('serverActions', $_POST);\n $cpjm->RunJob();\n\n}", "public function ajax_backend_call()\n {\n\n // Security check\n check_ajax_referer('referer_id', 'nonce');\n\n $response = 'OK';\n // Send response in JSON format\n // wp_send_json( $response );\n // wp_send_json_error();\n wp_send_json_success($response);\n\n die();\n }", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"Fieldthemes\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n\t// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldFeaturedProductSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configure featured products\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "private function admin_ajax_routing() {\n\n\t\t// Load API injection\n\t\t$this->add_action( 'wp_ajax_flowdrive_get_profile', $this->api, 'getUserProfile');\n\t\t$this->add_action( 'wp_ajax_flowdrive_get_base_folders', $this->api, 'getBaseFolders');\n\t\t$this->add_action( 'wp_ajax_flowdrive_get_layer', $this->api, 'getLayer');\n\t\t$this->add_action( 'wp_ajax_flowdrive_compare', $this->api, 'compare');\n\t\t$this->add_action( 'wp_ajax_flowdrive_get_folder_contents', $this->api, 'getFolderContents');\n\t\t$this->add_action( 'wp_ajax_flowdrive_post_item', $this->api, 'postItem');\n\t}", "private function include_tabs_server() {\n\n\t\t// No upgrades needed - show every thing.\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/general.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/services.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/callbacks.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/ufw_firewall.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/backup.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/monit.php';\n\n\t\t// Possibly add required files for ssh console.\n\t\t$option_hide_ssh_console = get_option( 'wpcd_wpapp_ssh_console_hide' );\n\t\tif ( ! empty( $option_hide_ssh_console ) && true == boolval( $option_hide_ssh_console ) ) {\n\t\t\t// ssh console tab should be hidden unless a wp-config option forces it to be shown - so check for that here.\n\t\t\tif ( defined( 'WPCD_HIDE_SSH_CONSOLE' ) && ! WPCD_HIDE_SSH_CONSOLE ) {\n\t\t\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/ssh_console.php';\n\t\t\t}\n\t\t} else {\n\t\t\t// possibly show the console unless a wp-config option forces it to be hidden so check for that here.\n\t\t\tif ( ! defined( 'WPCD_HIDE_SSH_CONSOLE' ) || ( defined( 'WPCD_HIDE_SSH_CONSOLE' ) && ! WPCD_HIDE_SSH_CONSOLE ) ) {\n\t\t\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/ssh_console.php';\n\t\t\t}\n\t\t}\n\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/statistics.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/tools.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/tweaks.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/upgrade.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/sites.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/power.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/users.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/logs.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/fail2ban.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/sshkeys.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/monitorix.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs-server/goaccess.php';\n\n\t\t/**\n\t\t * Need to add new tabs or add data to existing tabs from an add-on?\n\t\t * Then this action hook MUST be used! Otherwise, weird\n\t\t * stuff will happen and you will not know why!\n\t\t */\n\t\tdo_action( 'wpcd_wpapp_include_server_tabs' );\n\n\t}", "function _listRequestTab(){\r\n\t\r\n\tglobal $usertoken;\r\n\t\r\n\t$TABS='<table><tr>'\r\n\t.'<td>'._button('Erstellung','listWF(1)').'</td>'\r\n\t.'<td>'._button('Abgegeben','listWF(2)').'</td>'\r\n\t.'<td>'._button('Akzeptiert','listWF(3)').'</td>'\r\n\t.'<td>'._button('Abgelehnt','listWF(4)').'</td>'\r\n\t.'<td>'._button('Prozessiert','listWF(5)').'</td>'\r\n\t.'<td>'._button('Geschlossen','listWF(6)').'</td>'\r\n\t.'</tr></table><hr/>';\r\n\t\r\n\techo setPageTitle('&Uuml;bersicht aller Antr&auml;ge f&uuml;r Benutzer: '.$usertoken['uname']);\r\n\techo setPageControlTabs($TABS);\r\n}", "abstract public function bootEndTab();", "function prepare_ajax(): void {\r\n if (is_admin()) {\r\n JKNTime::reset_timezone();\r\n\r\n // Register AJAX and enqueue JS\r\n MJKGTSchedulerAJAX::hook_ajax();\r\n MJKGTSchedulerAJAX::enqueue_js($this->slug());\r\n }\r\n }", "protected function beforeAjax()\n {\n if ($this->initialized) {\n return;\n }\n\n $this->controller->pageAction();\n $this->validateField();\n $this->prepareVars();\n $this->initialized = true;\n }", "public function execute()\n\t{\n\t\t$isAjax = $this->getRequest()->isAjax();\n\t\tif ($isAjax){\n\t\t\t$layout = $this->_layout;\n\t\t\t$layout->getUpdate()->load(['listingtabs_index_ajax']);\n\t\t\t$layout->generateXml();\n $output = $layout->getOutput();\n $this->getResponse()->setHeader('Content-type', 'application/json');\n\t\t\tdie($this->jsonEncoder->encode(array('items_markup' => $output)));\n }\n\t\t$resultPage = $this->resultPageFactory->create();\n\t\t$resultPage->getConfig()->getTitle()->prepend(__('SM Listing Tabs'));\n\t\treturn $resultPage;\n\t}", "protected function getScripts() {\n \n $_aJSArray = json_encode( $this->aFieldTypeSlugs );\n return <<<JAVASCRIPTS\n/* For tabs */\nvar enableAPFTabbedBox = function( nodeTabBoxContainer ) {\n jQuery( nodeTabBoxContainer ).each( function() {\n jQuery( this ).find( '.tab-box-tab' ).each( function( i ) {\n \n if ( 0 === i ) {\n jQuery( this ).addClass( 'active' );\n }\n \n jQuery( this ).click( function( e ){\n \n // Prevents jumping to the anchor which moves the scroll bar.\n e.preventDefault();\n \n // Remove the active tab and set the clicked tab to be active.\n jQuery( this ).siblings( 'li.active' ).removeClass( 'active' );\n jQuery( this ).addClass( 'active' );\n \n // Find the element id and select the content element with it.\n var thisTab = jQuery( this ).find( 'a' ).attr( 'href' );\n active_content = jQuery( this ).closest( '.tab-box-container' ).find( thisTab ).css( 'display', 'block' ); \n active_content.siblings().css( 'display', 'none' );\n \n });\n }); \n });\n}; \n\njQuery( document ).ready( function() {\n \n enableAPFTabbedBox( jQuery( '.tab-box-container' ) );\n\n /* The repeatable event */\n jQuery().registerAPFCallback( { \n /**\n * The repeatable field callback for the add event.\n * \n * @param object node\n * @param string the field type slug\n * @param string the field container tag ID\n * @param integer the caller type. 1 : repeatable sections. 0 : repeatable fields.\n */ \n added_repeatable_field: function( oClonedField, sFieldType, sFieldTagID, iCallType ) {\n\n /* If it is not the color field type, do nothing. */\n if ( jQuery.inArray( sFieldType, $_aJSArray ) <= -1 ) { return; }\n\n oClonedField.nextAll().andSelf().each( function() { \n jQuery( this ).find( 'div' ).incrementIDAttribute( 'id' );\n jQuery( this ).find( 'li.tab-box-tab a' ).incrementIDAttribute( 'href' );\n jQuery( this ).find( 'li.category-list' ).incrementIDAttribute( 'id' );\n enableAPFTabbedBox( jQuery( this ).find( '.tab-box-container' ) );\n }); \n \n },\n /**\n * The repeatable field callback for the remove event.\n * \n * @param object the field container element next to the removed field container.\n * @param string the field type slug\n * @param string the field container tag ID\n * @param integer the caller type. 1 : repeatable sections. 0 : repeatable fields.\n */ \n removed_repeatable_field: function( oNextFieldConainer, sFieldType, sFieldTagID, iCallType ) {\n\n /* If it is not the color field type, do nothing. */\n if ( jQuery.inArray( sFieldType, $_aJSArray ) <= -1 ) { return; }\n\n oNextFieldConainer.nextAll().andSelf().each( function() {\n jQuery( this ).find( 'div' ).decrementIDAttribute( 'id' );\n jQuery( this ).find( 'li.tab-box-tab a' ).decrementIDAttribute( 'href' );\n jQuery( this ).find( 'li.category-list' ).decrementIDAttribute( 'id' );\n }); \n \n }\n });\n}); \nJAVASCRIPTS;\n\n }", "public static function func_ajax_load_menu() {\n\t\t\t \n\t\t\t\tglobal $wpdb;\n\t\t\t\t\n\t\t\t\tif(!defined('DOING_AJAX')){\n wp_redirect (site_url());\n exit;\n } else {\n\t\t\t\t echo self::load_listings();\n\t\t\t\t die();\n\t\t\t\t}\n\t\t\n\t\t}", "public function handle_tab() {\n\t\t$screen = get_current_screen();\n\t\t// Run only when post_id is present\n\t\tif (( ! isset( $_GET['post'] ) || ! is_numeric( $_GET['post'])) && $screen->id != 'toplevel_page_acf-options' ) {\n\t\t\treturn;\n\t\t}\n\t\tif ($screen->id != 'toplevel_page_acf-options') {\n\t\t\t$post_id = sanitize_key( $_GET['post'] );\n\t\t} else {\n\t\t\t$post_id = $screen->id;\n\t\t}\n\t\t// Check for existing transient\n\t\t$current_tab = get_transient( $this->_transient_name );\n\t\t// Use value only once, delete transient right away\n\t\tdelete_transient( $this->_transient_name );\n\t\t// The first tab is selected by default\n\t\t$tab_index = 0;\n\t\t// Get tab index for current post\n\t\tif ( $current_tab['post_id'] === $post_id ) {\n\t\t\t$tab_index = $current_tab['tab_index'];\n\t\t}\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\t(function($) {\n\t\t\t\t/**\n\t\t\t\t * Global to save the current index of selected tab\n\t\t\t\t * @type int\n\t\t\t\t */\n\t\t\t\twindow.acf_current_tab_index = null;\n\t\t\t\tacf.add_action('ready', function( $el ){\n\t\t\t\t\tvar tabIndex = <?php echo $tab_index; ?>\n\t\t\t\t\t// Get tab element by index\n\t\t\t\t\tvar $li = $('.acf-tab-group').find('li:eq(<?php echo $tab_index; ?>)');\n\t\t\t\t\t// Select tab only when it’s not the first tab, which is selected by default\n\t\t\t\t\tif (0 !== tabIndex) {\n\t\t\t\t\t\t$li.find('a').click();\n\t\t\t\t\t}\n\t\t\t\t\twindow.acf_current_tab_index = tabIndex;\n\t\t\t\t});\n\t\t\t\tacf.add_action('refresh', function($tabGroup) {\n\t\t\t\t\tvar $currentTab;\n\t\t\t\t\tvar currentTabIndex = window.acf_current_tab_index;\n\t\t\t\t\tvar newTabIndex;\n\t\t\t\t\t// Bail out if we have no jQuery object\n\t\t\t\t\tif (false === $tabGroup instanceof jQuery) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$currentTab = $tabGroup.find('li.active');\n\t\t\t\t\t// Bail out if no active tab was found\n\t\t\t\t\tif ($currentTab.length === 0) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// Get index of active tab\n\t\t\t\t\tnewTabIndex = $currentTab.index();\n\n\t\t\t\t\t// Bail out if index is initial or previously selected tab is the same\n\t\t\t\t\tif (null === currentTabIndex || newTabIndex === currentTabIndex) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\twindow.acf_current_tab_index = newTabIndex;\n\t\t\t\t\t// Send tabIndex to backend to save transient\n\t\t\t\t\t$.ajax(ajaxurl, {\n\t\t\t\t method: 'post',\n\t\t\t\t data: {\n\t\t\t\t\t\t\taction: 'acf_save_current_tab',\n\t\t\t\t\t\t\ttab_index: newTabIndex,\n\t\t\t\t\t\t\tpost_id: '<?php echo $post_id; ?>'\n\t\t\t\t }\n\t\t\t });\n\t\t\t\t});\n\t\t\t})(jQuery);\n\t\t</script>\n\t\t<?php\n\t}", "function show_tabs($tabs) {\n// $this->log(__CLASS__ . \".\" . __FUNCTION__ . \"() for \" . $this->controller->request->params['controller'] . '/' . $this->controller->request->params['action'], LOG_DEBUG);\n\n if (!is_array($tabs)){\n $args = func_get_args();\n }\n else $args = $tabs;\n\n foreach($args as $tabID){\n $tabMap = Configure::read('tabControllerActionMap');\n $controller = $tabMap[$tabID]['controller'];\n $action = $tabMap[$tabID]['action'];\n $isAuthorized = $this->controller->DhairAuth->isAuthorizedForUrl($controller,$action); \n\n if (!$isAuthorized)\n {\n unset($args[array_search($tabID, $args)]);\n }\n elseif ($controller == 'surveys' && $action == 'index'\n && empty($this->controller->session_link)){\n unset($args[array_search($tabID, $args)]);\n }\n\n }\n\n $this->tabs_for_layout = $args;\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...) tabs_for_layout after auth filter: \" . print_r($this->tabs_for_layout, true) /**. \", here's the stack: \" . Debugger::trace() */, LOG_DEBUG);\n\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...), next: calculateTabsToRemoveOrDisable()\" /*. Debugger::trace()*/ , LOG_DEBUG);\n $this->calculateTabsToRemoveOrDisable();\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...), just did calculateTabsToRemoveOrDisable()\" /*. Debugger::trace()*/ , LOG_DEBUG);\n $this->controller->set('tabsToDisable', $this->tabsToDisable);\n\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...), here's tabs_for_layout: \" . print_r($this->tabs_for_layout, true) /*. Debugger::trace()*/ , LOG_DEBUG);\n $this->controller->set('tabs_for_layout', $this->tabs_for_layout);\n }", "public function adminAjax()\r\n\t{\r\n\t\treturn;\r\n\t}", "public function ajax_frontend_call()\n {\n\n // Security check\n check_ajax_referer('referer_id', 'nonce');\n\n $response = 'OK';\n // Send response in JSON format\n // wp_send_json( $response );\n // wp_send_json_error();\n wp_send_json_success($response);\n\n die();\n }", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"Fieldthemes\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldSpecialProduct\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configure specials products\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "function setTabs(){\n global $ilTabs, $ilCtrl, $ilAccess, $ilLocator;\n\n // show current quiz round inlcuding link and QR code (deadline)\n if ($ilAccess->checkAccess(\"read\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showCurrentRound\", $this->txt(\"tabmenu_showCurrentRound\"), $ilCtrl->getLinkTarget($this, \"showCurrentRound\"));\n }\n\n // tab for the \"edit quiz\" command\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"editQuiz\", $this->txt(\"tabmenu_edit_quiz\"), $ilCtrl->getLinkTarget($this, \"editQuiz\"));\n }\n\n // show round results\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showResults\", $this->txt(\"tabmenu_show_result\"), $ilCtrl->getLinkTarget($this, \"showResults\"));\n }\n\n // a \"properties\" tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"properties\", $this->txt(\"tabmenu_properties\"), $ilCtrl->getLinkTarget($this, \"editProperties\"));\n $this->addPermissionTab();\n }\n\n // information Tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"info\", $this->txt(\"tabmenu_info\"), $ilCtrl->getLinkTarget($this, \"info\"));\n }\n\n }", "function add_staff_tab() {\n\n\t\t\t$count = isset($_POST['count']) ? absint($_POST['count']) : false;\n\t\t\t$this->block_id = isset($_POST['block_id']) ? $_POST['block_id'] : 'mtheme-block-9999';\n\n\t\t\t//default key/value for the tab\n\t\t\t$tab = array(\n\t\t\t\t'social_text' => __('Social Site Name','mthemelocal'),\n\t\t\t\t'social_icon' => '',\n\t\t\t\t'social_link' => ''\n\t\t\t);\n\n\t\t\tif($count) {\n\t\t\t\t$this->tab($tab, $count);\n\t\t\t} else {\n\t\t\t\tdie(-1);\n\t\t\t}\n\n\t\t\tdie();\n\t\t}", "public function generateTabsForAutoLoad (){\n\n if ( $_SESSION['tabs_to_auto_load']['client_service_level_settings']) {\n\n $client_id_to_rewiev = intval($_SESSION['tabs_to_auto_load']['client_service_level_settings']['client_id']);\n\n $client = Clients::model()->with('service_settings', 'service_payments','company')->findByPk($client_id_to_rewiev);\n if ($client) {\n $serviceLevels = ServiceLevelSettings::getServiceLevelsOptionsList();\n $settings = $client->service_settings;\n $items = ServiceLevelSettings::getServiceLevelsOptionsList();\n $summary_sl_settings = ServiceLevelSettings::getSummarySettings($client_id_to_rewiev);\n $dcss = DelayedClientServiceSettings::model()->findByPk($client_id_to_rewiev);\n $pending_client_service_settings = PendingClientServiceSettings::model()->findByAttributes(array(\n 'Client_ID'=> $client->Client_ID,\n 'Approved'=>1\n ));\n\n $view_data = $this->renderPartial('client_service_level_settings' , array(\n 'client' => $client,\n 'settings' => $settings,\n 'payments' => $client->service_payments,\n 'serviceLevels' => $serviceLevels,\n 'items'=>$items,\n 'summary_sl_settings'=>$summary_sl_settings,\n 'pending_client_service_settings'=>$pending_client_service_settings,\n 'dcss'=>$dcss\n ),true);\n\n $return_array['client_service_level_settings']['auto_loaded_data'] = $view_data;\n $return_array['client_service_level_settings']['client'] = $client;\n }\n }\n\n if ( $_SESSION['tabs_to_auto_load']['client_users_list_appr_value']) {\n $client_id_to_rewiev = intval($_SESSION['tabs_to_auto_load']['client_users_list_appr_value']['client_id']);\n $approvers_array = UsersClientList::getApproversArray($client_id_to_rewiev);\n\n $view_data = $this->renderPartial('client_users_list_appr_value' , array(\n 'approvers_array'=>$approvers_array,\n ),true);\n\n $return_array['client_users_list_appr_value']['auto_loaded_data'] = $view_data;\n $return_array['client_users_list_appr_value']['client'] = Clients::model()->with('company', 'users')->findByPk($client_id_to_rewiev);;\n }\n\n return $return_array;\n }", "public function ee_breakouts_page_load() {}", "private function include_tabs() {\n\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/tabs.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/general.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/backup.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/ssl.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/cache.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/sftp.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/clone-site.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/copy-to-existing-site.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/site-sync.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/crons.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/php-options.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/change-domain.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/misc.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/tweaks.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/tools.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/theme-and-plugin-updates.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/phpmyadmin.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/6g_firewall.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/7g_firewall.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/statistics.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/logs.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/redirect-rules.php';\n\n\t\tif ( defined( 'WPCD_SHOW_SITE_USERS_TAB' ) && WPCD_SHOW_SITE_USERS_TAB ) {\n\t\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/site-system-users.php';\n\t\t}\n\n\t\t/**\n\t\t * Need to add new tabs or add data to existing tabs from an add-on?\n\t\t * Then this action hook MUST be used! Otherwise, weird\n\t\t * stuff will happen and you will not know why!\n\t\t */\n\t\tdo_action( 'wpcd_wpapp_include_app_tabs' );\n\n\t}", "protected function initializeHandle()\n {\n // empty on purpose because AbstractAjaxAction still overwrites $this->view with StandaloneView\n }", "public function addTab() {\n\t\tglobal $REQUEST_DATA;\n\n\t\treturn SystemDatabaseManager::getInstance()->runAutoInsert('employee_appraisal_tab', \n array('appraisalTabName','appraisalProofText'), array(trim($REQUEST_DATA['tabName']),trim($REQUEST_DATA['tabProofText'])) \n );\n\t}", "function kirki_pro_load_tab_control() {\n\n\t\t// Stop, if Kirki is not installed.\n\t\tif ( ! defined( 'KIRKI_VERSION' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Stop, if Kirki PRO (bundle) is already installed.\n\t\tif ( defined( 'KIRKI_PRO_VERSION' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Stop, if Kirki Pro Tabs is already installed.\n\t\tif ( class_exists( '\\Kirki\\Pro\\Tabs\\Init' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! function_exists( 'get_plugin_data' ) ) {\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/plugin.php';\n\t\t}\n\n\t\t$plugin_data = get_plugin_data( __FILE__ );\n\n\t\tdefine( 'KIRKI_PRO_TAB_VERSION', $plugin_data['Version'] );\n\t\tdefine( 'KIRKI_PRO_TAB_PLUGIN_FILE', __FILE__ );\n\n\t\trequire_once __DIR__ . '/vendor/autoload.php';\n\n\t\tnew \\Kirki\\Pro\\Tabs\\Init();\n\n\t}", "function isms_component_messages_addtab($cbtype, &$cbdata)\n{\n $settings_raw = get_option(\"isms_component_options\");\n if ($settings_raw == \"\")\n $settings = array();\n else\n $settings = unserialize($settings_raw);\n $enabled = grab_array_var($settings, \"enabled\", 0);\n if ($enabled != 1)\n return;\n\n $newtab = array(\n \"id\" => \"isms\",\n \"title\" => \"iSMS\",\n );\n\n $cbdata[\"tabs\"][] = $newtab;\n}", "public function set_tabs() {\n\t\t\t$tabs = [\n\t\t\t\t[\n\t\t\t\t\t'id' => 'business_info',\n\t\t\t\t\t'title' => __( 'Business info', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'admin-home',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'opening_hours',\n\t\t\t\t\t'title' => __( 'Opening hours', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'clock',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'maps_settings',\n\t\t\t\t\t'title' => __( 'Map settings', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'location-alt',\n\t\t\t\t],\n\t\t\t];\n\n\t\t\t$tabs = apply_filters( 'wpseo-local-location-meta-tabs', $tabs );\n\n\t\t\t$this->tabs = $tabs;\n\t\t}", "function render_tabs( $attributes ) {\n\t\t\t\tglobal $post;\n\t\t\t\t// If a page, then do split\n\t\t\t\t// Get ids of children\n\t\t\t\t$children = get_pages( array(\n\t\t\t\t\t\t'child_of' => $post->ID\n\t\t\t\t\t\t, 'parent' => $post->ID\n\t\t\t\t\t\t, 'sort_column' => 'menu_order'\n\t\t\t\t) );\n\n\t\t\t\t$child_titles = array();\n\t\t\t\t$child_contents = \"\n\";\n// TODO: start jquery 'loading' action here.\n\n\t\t\t\t$child_tablinks = \"\n<div id='subpage-tabs' class='ui-tabs'>\n\t<ul>\n\";\n\t\t\t\tforeach ( $children as $child ) {\n\t\t\t\t\t$child_tablinks .= \"\t\t<li><a href='#ctab-$child->ID'>$child->post_title</a></li>\n\";\n\t\t\t\t\t// Render any shortcodes\n\t\t\t\t\t$new_content = do_shortcode( $child->post_content );\n\t\t\t\t\t$child_contents .= \"<div id='ctab-$child->ID' class='ui-tabs-hide'>\n$new_content\n</div>\n\";\n\t\t\t\t}\n\t\t\t\t$child_tablinks .= \"\t</ul>\n\";\n\t\t\t\t$child_contents .= \"</div>\n<script type='text/javascript'>\n/*<![CDATA[*/\njQuery(\n\tfunction(){\n\t\tjQuery('#subpage-tabs').tabs();\n }\n);\n/*]]>*/\n</script>\n\";\n// TODO: destroy jquery 'loading' action here.\n\n\t\t\t\t$content = $child_tablinks . $child_contents;\n\t\t\t\treturn $content;\n\t\t}", "private function ajaxController()\n {\n\n switch ($this->request['action']) {\n case 'add_task':\n $result = $this->addTask($this->request);\n break;\n case 'task_edit_popup':\n $result = $this->getEditTaskPopupData($this->request['task_id']);\n break;\n case 'edit_task':\n $result = $this->editTask($this->request);\n break;\n default:\n return false;\n }\n\n echo json_encode($result);\n exit();\n }", "function getCustomTabsInfo(){\n $custom_tabs_info = array(array('name' => 'Tab1', 'url' => 'javascript://'),\n array('name' => 'Tab2', 'url' => 'javascript://'),\n array('name' => 'Tab3', 'url' => 'javascript://'), );\n $link = mysql_connect(DB_HOST, DB_USER, DB_PASS);\n mysql_select_db(DB_NAME);\n $sql = \"select * from healingcrystals_user_custom_tabs where user_id='\" . $this->getId() . \"'\";\n $result = mysql_query($sql);\n if (mysql_num_rows($result)){\n while($entry = mysql_fetch_assoc($result)){\n $custom_tabs_info[$entry['tab_index']-1]['name'] = $entry['tab_description'];\n $custom_tabs_info[$entry['tab_index']-1]['url'] = $entry['tab_link'];\n }\n }\n mysql_close($link);\n return $custom_tabs_info;\n }", "public function ajaxTab(UserInterface $user, $subpage) {\n $content = $this->renderBlock($user, $subpage);\n $url = Url::fromRoute('page_manager.page_view_contacts_dashboard_contact', [\n 'user' => $user->id(),\n 'subpage' => $subpage,\n ]);\n\n // Create AJAX Response object.\n $response = new AjaxResponse();\n $response->addCommand(new ContactsTab($content, $subpage, $url->toString()));\n\n // Return ajax response.\n return $response;\n }", "public function register_data_tab( $tabs ) {\r\n $tabs['tm_extra_product_options'] = array(\r\n 'label' => __( 'TM Extra Product Options', TM_EPO_TRANSLATION ),\r\n 'target' => 'tm_extra_product_options',\r\n 'class' => array( 'tm_epo_class', 'hide_if_grouped' )\r\n );\r\n return $tabs;\r\n }", "static function AjaxAutoload()\r\n\t{\r\n\t\t\r\n\t}", "public function bkap_load_resource_ajax_admin() {\n add_action( 'wp_ajax_bkap_add_resource', array( &$this, 'bkap_add_resource' ) );\n\n // ajax for deleting a single resource.\n add_action( 'wp_ajax_bkap_delete_resource', array( &$this, 'bkap_delete_resource' ) );\n }", "public function ajaxProcessdisplayModulesHook(){\n $result = \"\";\n $id_hook = (int)Tools::getValue('id_hook');\n $hookname = Hook::getNameById($id_hook);\n $id_option = (int)Tools::getValue('id_option');\n $option = new Options($id_option);\n if ($hookname && Validate::isHookName($hookname) && $option && Validate::isLoadedObject($option)){\n if ($hookname =='displayHomeTab' || $hookname =='displayHomeTabContent')\n $optionModulesHook = OvicLayoutControl::getModuleExecList($hookname);\n else\n $optionModulesHook = OvicLayoutControl::getModuleExecList();\n $moduleOption = '';\n $HookedModulesArr = OvicLayoutControl::getModulesHook($option->theme,$option->alias, $hookname);\n $HookedModulesArr = Tools::jsonDecode($HookedModulesArr['modules'],true);\n //$result .= print_r($HookedModules);\n $HookedModules = array();\n $Hookedexecute = array();\n if ($HookedModulesArr && is_array($HookedModulesArr) && sizeof($HookedModulesArr))\n foreach ($HookedModulesArr as $key => $HookedModule){\n $HookedModules[] = (int)$HookedModule[0];\n $Hookedexecute[] = (int)$HookedModule[1];\n }\n $allmoduleDisable = true;\n $moduleArr = array();\n if ($optionModulesHook && count($optionModulesHook)>0){\n foreach ($optionModulesHook as $module){\n $disableModule = false;\n $moduleObject = Module::getInstanceById($module['id_module']);\n if ($hookname =='displayHomeTab' || $hookname =='displayHomeTabContent'){\n if (in_array($module['id_module'],$HookedModules)){\n $disableModule = true;\n }\n }else{\n if (in_array($module['id_module'],$HookedModules)){\n $moduleHookCallable = OvicLayoutControl::getHooksByModule($moduleObject);\n if (count($moduleHookCallable)>1){\n $disableModule = true;\n foreach ($moduleHookCallable as $h){\n if (!in_array($h['id_hook'],$Hookedexecute)){\n $disableModule = false;\n break;\n }\n }\n }else{\n $disableModule = true;\n }\n }\n }\n if ($moduleObject->tab != 'analytics_stats'){\n $moduleArr[$moduleObject->displayName]['id_module'] = $module['id_module'];\n $moduleArr[$moduleObject->displayName]['disabled'] = $disableModule;\n //$moduleOption .='<option '.($disableModule? 'disabled':'').' value='.$module['id_module'].'>'.$moduleObject->displayName.'</option>';\n }\n if (!$disableModule){\n $allmoduleDisable = false;\n }\n }\n ksort($moduleArr);\n foreach ($moduleArr as $name => $moduleObj){\n $moduleOption .='<option '.($moduleObj['disabled']? 'disabled':'').' value='.$moduleObj['id_module'].'>'.$name.'</option>';\n }\n }\n $tpl = $this->createTemplate('new_popup.tpl');\n $tpl->assign( array(\n 'postUrl' => self::$currentIndex.'&token='.Tools::getAdminTokenLite('AdminLayoutBuilder'),\n 'id_hook' => $id_hook,\n 'hookname' => $hookname,\n 'id_option' => $id_option,\n 'moduleOption' => $moduleOption,\n ));\n $result .= $tpl->fetch();\n }\n die(Tools::jsonEncode($result));\n }", "public function ajax_response()\n {\n }", "public function handle_ajax( ITSEC_Login_Interstitial_Session $session, array $data ) { }", "public function beforeRender() {\n if (in_array($this->request->action, array('agentlist')) && $this->request->controller == 'Users') {\n\t\t\t$this->set('tabList', 'aList');\n\n\t\t}else if(in_array($this->request->action, array('customer')) && $this->request->controller == 'Users'){\n $this->set('tabList', 'cList');\n\n }else if(in_array($this->request->action, array('price')) && $this->request->controller == 'Users'){\n $this->set('tabList', 'pList');\n\n }else if(in_array($this->request->action, array('entry')) && $this->request->controller == 'Users'){\n $this->set('tabList', 'eList');\n\n }else if(in_array($this->request->action, array('Expense')) && $this->request->controller == 'Users'){\n $this->set('tabList', 'exList');\n\n }else if(in_array($this->request->action, array('managerlist')) && $this->request->controller == 'Users'){\n $this->set('tabList', 'mList');\n\n }else {\n\t\t\t$this->set('tabList', '');\n\n\t\t}\n\t\t$this->response->disableCache();\n }", "function admin_init() {\n\t\t\twp_enqueue_script('common');\n\t\t\twp_enqueue_script('wp-lists');\n\t\t\twp_enqueue_script('postbox');\n\n\t\t\t// Group = setings_fields, name of options, validation callback\n\t\t\tregister_setting( 'subpages_as_tabs_options', 'subpages_as_tabs_options', array( $this, 'options_validate' ) );\n\t\t\t// Unique ID, section title displayed, section callback, page name = do_settings_section\n\t\t\tadd_settings_section( 'subpages_tabs_section', '', array( $this, 'main_section' ), 'subpage_tabs_plugin' );\n\t\t\t// Unique ID, Title, function callback, page name = do_settings_section, section name\n\t\t\tadd_settings_field( 'spat_active_tab_background', __( 'Active Tab Background' ), array( $this, 'active_tab_background'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\t/**/\n\t\t\tadd_settings_field( 'spat_active_tab_foreground', __('Active Tab Text' ), array( $this, 'active_tab_foreground'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\tadd_settings_field( 'spat_inactive_tab_background', __( 'Inactive Tab Background' ), array( $this, 'inactive_tab_background'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\tadd_settings_field( 'spat_inactive_tab_foreground', __('Inactive Tab Text' ), array( $this, 'inactive_tab_foreground'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\n\t\t\tadd_settings_field( 'border', __('Border' ), array( $this, 'border'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\t//*/\n\t\t}", "function getTabs(&$tabs_gui)\n\t{\n\t\tglobal $rbacsystem;\n\n\t\t// properties\n\t\tif ($rbacsystem->checkAccess(\"write\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"edit_properties\",\n\t\t\t\t\"repository.php?cmd=properties&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"properties\");\n\t\t}\n\n\t\t// edit permission\n\t\tif ($rbacsystem->checkAccess(\"edit_permission\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"perm_settings\",\n\t\t\t\t\"repository.php?cmd=permissions&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"permissions\");\n\t\t}\n\t}", "public function installKbTabs()\n {\n $parentTab = new Tab();\n $parentTab->name = array();\n foreach (Language::getLanguages(true) as $lang) {\n $parentTab->name[$lang['id_lang']] = $this->l('Knowband Web Push Notification');\n }\n\n $parentTab->class_name = self::PARENT_TAB_CLASS;\n $parentTab->module = $this->name;\n $parentTab->active = 1;\n $parentTab->id_parent = Tab::getIdFromClassName(self::SELL_CLASS_NAME);\n $parentTab->icon = 'notifications';\n $parentTab->add();\n\n $id_parent_tab = (int) Tab::getIdFromClassName(self::PARENT_TAB_CLASS);\n $admin_menus = $this->adminSubMenus();\n\n foreach ($admin_menus as $menu) {\n $tab = new Tab();\n foreach (Language::getLanguages(true) as $lang) {\n $tab->name[$lang['id_lang']] = $this->l($menu['name']);\n }\n\n $tab->class_name = $menu['class_name'];\n $tab->module = $this->name;\n $tab->active = $menu['active'];\n $tab->id_parent = $id_parent_tab;\n $tab->add($this->id);\n }\n return true;\n }", "public function beforeFilter() { \n\t\t//$this->disable_cache();\n\t\t$this->show_tabs(2);\n\t\t// check module access\n\t\t\n\t}", "protected function registerTab()\n {\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.review')\n ->label('a-review::review.product-tab')\n ->view('a-review::admin.review.tab');\n });\n }", "public function postLoad() {}", "public function __construct ()\n {\n if(preg_match(\"/ajax/i\", $_SERVER['REQUEST_URI'])) {\n Helper::render ();\n } else {\n $this->setupPage();\n $this->callTemplateParts($this->templateFiles);\n $this->setupPageEnd();\n }\n }", "function bp_dynamic_tab_content() {\n\treturn BP_Dynamic_User_Tab_Content::get_instance();\n}", "function __construct(){\n if (is_admin()){\n //add settings tab\n add_filter( 'woocommerce_settings_tabs_array', array($this,'woocommerce_settings_tabs_array'), 50 );\n //show settings tab\n add_action( 'woocommerce_settings_tabs_'.$this->id, array($this,'show_settings_tab' ));\n //save settings tab\n add_action( 'woocommerce_update_options_'.$this->id, array($this,'update_settings_tab' ));\n \n //add tabs select field\n add_action('woocommerce_admin_field_'.$this->post_type,array($this,'show_'.$this->post_type.'_field' ),10);\n //save tabs select field\n add_action( 'woocommerce_update_option_'.$this->post_type,array($this,'save_'.$this->post_type.'_field' ),10);\n \n //add product tab link in admin\n add_action( 'woocommerce_product_write_panel_tabs', array($this,'woocommerce_product_write_panel_tabs' ));\n //add product tab content in admin\n add_action('woocommerce_product_write_panels', array($this,'woocommerce_product_write_panels'));\n //save product selected tabs\n add_action('woocommerce_process_product_meta', array($this,'woocommerce_process_product_meta'), 10, 2);\n }else{\n //add tabs to product page\n add_filter( 'woocommerce_product_tabs', array($this,'woocommerce_product_tabs') );\n }\n //ajax search handler\n add_action('wp_ajax_woocommerce_json_custom_tabs', array($this,'woocommerce_json_custom_tabs'));\n //register_post_type\n add_action( 'init', array($this,'custom_product_tabs_post_type'), 0 );\n }", "public function get_data_berita_on_slider_page(){\r\r\n\t\tif( $this->input->is_ajax_request() ){\r\r\n\t\t\t$this->get_data_ajax_berita_on_slider_page();\r\r\n\t\t}else{\r\r\n\t\t\tredirect(base_url());\r\r\n\t\t}\r\r\n\t}", "function dashboard_bundles()\r\n{\r\n\t$Templatic_connector = New Templatic_connector;\r\n\trequire_once(TEVOLUTION_PAGE_TEMPLATES_DIR.'classes/main.connector.class.php' );\t\r\n\tif(isset($_REQUEST['tab']) && $_REQUEST['tab'] =='extend') { \t\r\n\t\t$Templatic_connector->templ_extend();\r\n\t}else if(isset($_REQUEST['tab']) && $_REQUEST['tab'] =='payment-gateways') { \t\r\n\t\t$Templatic_connector->templ_payment_gateway();\r\n\t}else if(isset($_REQUEST['tab']) && $_REQUEST['tab'] =='system_status') { \t\r\n\t\t$Templatic_connector->templ_system_status();\r\n\t}\r\n\telse if((!isset($_REQUEST['tab'])&& @$_REQUEST['tab']=='') || isset($_REQUEST['tab']) && $_REQUEST['tab'] =='overview') { \t\r\n\t\t$Templatic_connector->templ_overview();\r\n\t\t$Templatic_connector->templ_dashboard_extends();\r\n\t}\r\n \r\n}", "function ListPage_Ajax(&$params) \n\t{\n\t\t// call parent constructor\n\t\tparent::ListPage ($params);\t\n\t}", "function tabber_tabs_plugin_init() {\n\n\t// Loads and registers the new widget.\n\tadd_action( 'widgets_init', 'tabber_tabs_load_widget' );\n\n\t// Add Javascript if not admin area. No need to run in backend.\n\tif ( !is_admin() ) {\n\t\t\n\t};\n\n\t// Hide Tabber until page load \n\tadd_action( 'wp_head', 'tabber_tabs_temp_hide' );\n\t\t\n\t// Load css \n\tadd_action( 'wp_head', 'tabber_tabs_css' );\n\t\n}", "function add_from_tab_content () {\n require_once dirname(__FILE__).'/templates/form-tab-content.php';\n }", "public function getloadTab($patientId,$careplanId,Request $request)\r\n {\r\n $dataView['data']=''; \r\n try{ \r\n $id = encrypt_decrypt('decrypt',$careplanId);\r\n $patient_id = encrypt_decrypt('decrypt',$patientId);\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n if ($request->ajax()) {\r\n if ($request->has('tab') && $request->input('tab') == 'team') {\r\n $carePlanDetail = $this->careplan->getCareplanDetail($id);\r\n $dataView['data'] = View::make('patients.caseload.care_plan.careteam_tab')->with('carePlanDetail', $carePlanDetail)->render();\r\n \r\n }\r\n\r\n if ($request->has('tab') && $request->input('tab') == 'otherinfo') {\r\n $patient = $this->patient->patientDetail($patientId, true);\r\n $otherContacts = $patient['patient_other_info']['otherContacts'];\r\n $dataView['data'] = View::make('patients.caseload.care_plan.other_info_tab')->with('otherContacts', $otherContacts)->render();\r\n \r\n }\r\n if ($request->has('tab') && $request->input('tab') == 'emergency_contact') {\r\n $patient = $this->patient->patientDetail($patientId, false);\r\n $dataView['data'] = View::make('patients.caseload.care_plan.emergency_contact_info_tab')->with('patient', $patient['patient_info'])->render();\r\n \r\n }\r\n\r\n if ($request->has('tab') && $request->input('tab') == 'diagnosis_goals') {\r\n\r\n $careplanId = encrypt_decrypt('decrypt',$careplanId);\r\n $diagnosisList = $this->careplan->getCareplanDiagnosis($careplanId);\r\n $patient = $this->patient->patientDetail($patientId, false);\r\n $dataView['data'] = View::make('patients.caseload.care_plan.diagnosis_goal_tab')->with('diagnosisList', $diagnosisList)->render();\r\n \r\n }\r\n\r\n if ($request->has('tab') && $request->input('tab') == 'medication') {\r\n $patient = $this->patient->patientDetail($patientId, false);\r\n $previous_medications = $this->medication->medicationList($patient_id);\r\n $dataView['data'] = View::make('patients.caseload.care_plan.medication_tab')->with('previous_medications', $previous_medications)->with('patient', $patient['patient_info'])->render();\r\n \r\n }\r\n\r\n if ($request->has('tab') && $request->input('tab') == 'allergy') {\r\n $patient = $this->patient->patientDetail($patientId, false);\r\n $previous_allergies = $this->allergy->allergyLists($patient_id);\r\n $dataView['data'] = View::make('patients.caseload.care_plan.allergy_tab')->with('previous_allergies', $previous_allergies)->with('patient', $patient['patient_info'])->render();\r\n \r\n }\r\n\r\n if ($request->has('tab') && $request->input('tab') == 'vital') {\r\n\r\n $patient = $this->patient->patientDetail($patientId, false);\r\n $vitalList = $this->assessment->getVitalListForCareplan($careplanId, $patientId);\r\n $dataView['data'] = View::make('patients.caseload.care_plan.vital_tab')->with('vitalList', $vitalList)->with('patient', $patient['patient_info'])->render();\r\n \r\n }\r\n\r\n if ($request->has('tab') && $request->input('tab') == 'assessments') {\r\n $patient = $this->patient->patientDetail($patientId, false);\r\n $assessmentList = $this->assessment->getLists($patient_id,$id);\r\n $dataView['data'] = View::make('patients.caseload.care_plan.assessments_tab')->with('assessmentList', $assessmentList)->with('patient', $patient['patient_info'])->with('id', $id)->render();\r\n \r\n }\r\n\r\n if ($request->has('tab') && $request->input('tab') == 'checkpoints') {\r\n $patient = $this->patient->patientDetail($patientId, false);\r\n $checkpointList = $this->checkpoint->getLists($patient_id,$id);\r\n $dataView['data'] = View::make('patients.caseload.care_plan.checkpoints_tab')->with('checkpointList', $checkpointList)->with('patient', $patient['patient_info'])->with('id', $id)->render();\r\n \r\n }\r\n\r\n if ($request->has('tab') && $request->input('tab') == 'barriers') {\r\n $patient = $this->patient->patientDetail($patientId, false);\r\n $barrierList = $this->assessment->getBarrierListForCareplan($careplanId, $patientId);\r\n $dataView['data'] = View::make('patients.caseload.care_plan.barriers_tab')->with('barrierList', $barrierList)->with('patient', $patient['patient_info'])->render();\r\n }\r\n\r\n if ($request->has('tab') && $request->input('tab') == 'intervention') {\r\n $patient = $this->patient->patientDetail($patientId, false);\r\n $interventionList = $this->intervention->getLists($patient_id,$id);\r\n $dataView['data'] = View::make('patients.caseload.care_plan.interventions_tab')->with('interventionList', $interventionList)->with('patient', $patient['patient_info'])->with('id', $id)->render();\r\n }\r\n\r\n if ($request->has('tab') && $request->input('tab') == 'notes') {\r\n $patient = $this->patient->patientDetail($patientId, false);\r\n $carePlanDetail = $this->careplan->getCareplanDetail($id);\r\n $dataView['data'] = View::make('patients.caseload.care_plan.notes_tab')->with('carePlanDetail', $carePlanDetail)->render();\r\n }\r\n }\r\n return response()->json(['html'=>$dataView],200);\r\n }", "public function installTabs()\n {\n TabManager::addTab('AdminTraining', 'Training Menu', 'training', 'AdminTools');\n TabManager::addTab('AdminTrainingIndexClass', 'Controller exemple', 'training', 'AdminTraining');\n TabManager::addTab('AdminTrainingGridClass', 'Grid exemple', 'training', 'AdminTraining');\n\n return true;\n }", "function activity_tabs_pagesetup($event, $object_type, $object){\n // register filter tabs\n $context = elgg_get_context();\n \n if(elgg_is_logged_in() && ($context == 'activity' || $context == 'activity_tabs')){\n $user = elgg_get_logged_in_user_entity();\n $filter_context = get_input('filter_context', FALSE);\n $collections = get_user_access_collections($user->guid);\n $groups = $user->getGroups('', 0);\n \n // iterate through collections and add tabs as necessary\n foreach($collections as $collection){\n $name = $collection->name;\n \n // ignore group acls, they will be done in the groups section\n if(substr($name, 0, 7) == 'Group: ') {\n continue; \n }\n \n $collectionid = \"collection_\" . $collection->id;\n $enable = elgg_get_plugin_user_setting($collectionid, $user->guid, 'mt_activity_tabs');\n $order = elgg_get_plugin_user_setting($collectionid . \"_priority\", $user->guid, 'mt_activity_tabs');\n $priority = 500;\n if(is_numeric($order)){\n $priority += $order;\n }\n \n if($enable == 'yes'){\n // we need to create a tab\n $tab = array(\n 'name' => $collectionid,\n 'text' => $name,\n 'href' => \"activity_tabs/collection/{$collection->id}/\" . elgg_get_friendly_title($name),\n 'selected' => ($filter_context == $collectionid),\n 'priority' => $priority,\n );\n \n elgg_register_menu_item('filter', $tab);\n }\n }\n \n \n // iterate through groups and add tabs as necessary\n foreach($groups as $group){\n $name = $group->name;\n \n $groupid = \"group_\" . $group->guid;\n $enable = elgg_get_plugin_user_setting($groupid, $user->guid, 'mt_activity_tabs');\n $order = elgg_get_plugin_user_setting($groupid . \"_priority\", $user->guid, 'mt_activity_tabs');\n $priority = 500;\n if(is_numeric($order)){\n $priority += $order;\n }\n \n if($enable == 'yes'){\n // we need to create a tab\n $tab = array(\n 'name' => $groupid,\n 'text' => $name,\n 'href' => \"activity_tabs/group/{$group->guid}/\" . elgg_get_friendly_title($name),\n 'selected' => ($filter_context == $groupid),\n 'priority' => $priority,\n );\n \n elgg_register_menu_item('filter', $tab);\n }\n }\n \n // register menu item for configuring tabs\n $link = array(\n 'name' => 'configure_activity_tabs',\n 'text' => elgg_echo('activity_tabs:configure'),\n 'href' => 'settings/plugins/' . $user->username,\n );\n \n elgg_register_menu_item('page', $link);\n }\n}", "function ajax_saveSettings()\n{\n\n $cc = new CapabilityCheck('saveSettings');\n if (!$cc->checkCapability()) {\n return;\n }\n\n $message = 'Saving sitewide CyberPanel settings.';\n\n check_ajax_referer('CPWP');\n $cpjm = new CPJobManager('saveSettings', $_POST, $message);\n $cpjm->RunJob();\n}", "public function init_hooks() {\r\n add_action('wp_ajax_labb_admin_ajax', array($this, 'labb_admin_ajax'));\r\n // Load admin ajax js script\r\n add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));\r\n\r\n }", "protected function _Load_AJAX() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/ajax');\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_ajax_init',$this);\r\n }", "public function postLoad() { }", "function jquery_create_tabs( $tab_id, $tabs, $callback, $prefix = '' )\n {\n global $page_info;\n\n $page_info['head'][] = _jquery_tabs( $tab_id );\n\n echo ( $prefix . '<div id=\"' . htmlentities( $tab_id ) . '\">' . \"\\n\" );\n\n echo ( $prefix . \"\\t\" . '<ul>' . \"\\n\" );\n foreach ( $tabs as $tk => $tv )\n {\n echo ( $prefix . \"\\t\\t\" . '<li><a href=\"#' . htmlentities( $tk ) . '\">' . htmlentities( $tv ) . '</a></li>' . \"\\n\" );\n }\n echo ( $prefix . \"\\t\" . '</ul>' . \"\\n\" );\n\n foreach ( $tabs as $tk => $tv )\n {\n echo ( $prefix . \"\\t\" . '<div id=\"' . htmlentities( $tk ) . '\">' . \"\\n\" );\n\n call_user_func_array( $callback, array( $tk, ( $prefix . \"\\t\\t\" ) ) );\n\n echo ( $prefix . \"\\t\" . '</div>' . \"\\n\" );\n }\n\n echo ( $prefix . '</div>' . \"\\n\" );\n }", "public function preDispatch()\n\t{\n\t\t$this->_initView();\n\t\t//if its an AJAX request stop here - can be simulated via ?ajax GET parameter sent in the request\n\t\tif ($this->_request->isXmlHttpRequest() || isset($_GET['ajax']))\n\t\t{\n\t\t\tZend_Controller_Action_HelperBroker::removeHelper('Layout');\n\t\t}\n\t\t/*\n\t\tif (!$this->getRequest()->isXmlHttpRequest())\n\t\t{\n\t\t\t$messages = array();\n\t\t\t$messages['error'] = $this->_helper->FlashMessenger->setNamespace('error')->getMessages();\n\t\t\t$messages['success'] = $this->_helper->FlashMessenger->setNamespace('success')->getMessages();\n\t\t\t$this->view->messages = $messages;\n\t\t}\n\t\t*/\n\t\t//Sets the base url to the javascripts of the application\n \n $authNamespace = new Zend_Session_Namespace('Zend_Auth');\n $timeout = $authNamespace->timeout;\n $time_render = time();\n \n\t\t$script = '\n\t\t\tvar base_url = \"' . $this->view->baseUrl().'\",\n timeout = \"'.$timeout.'\",\n\t\t\t time_render = \"' .$time_render.'\";\n\t\t';\n \n\t\t$this->view->headScript()->prependScript($script, $type = 'text/javascript', $attrs = array());\n $this->view->inlineScript()->appendFile(($this->view->baseUrl().'/js/contadorsessao.js'), 'text/javascript');\n \n\t}", "function media_upload_tabs()\n {\n }", "function ajax_add()\n {\n\t\n }", "function ajax_jobStatus()\n{\n\n $cc = new CapabilityCheck('jobStatus');\n if (!$cc->checkCapability()) {\n return;\n }\n\n check_ajax_referer('CPWP');\n\n $cpjm = new CPJobManager('jobStatus', $_POST);\n $cpjm->RunJob();\n}", "function _erpal_book_helper_book_global_menu_tabs(&$data, $current_nid=false, $active_tabs=array()) {\n\n static $processed = false;\n\n if ($processed)\n return; //we want no duplicate tabs if somebody calls this twice\n\n $processed = true;\n\n erpal_make_local_tab($data, t('Books'), 'books/books', array(), in_array('books', $active_tabs)); \n erpal_make_local_tab($data, t('Templates'), 'books/templates', array(), in_array('templates', $active_tabs)); \n}", "public function beforeFilter() { \n\t\t//$this->disable_cache();\n\t\t$this->show_tabs(105);\n\t\t// check module access\n\t\t\n\t}", "function handleRequest() ;", "function ajax_fetchProviderAPIs()\n{\n\n $cc = new CapabilityCheck('fetchProviderAPIs');\n if (!$cc->checkCapability()) {\n return;\n }\n\n check_ajax_referer('CPWP');\n\n $cpjm = new CPJobManager('fetchProviderAPIs', $_POST);\n $cpjm->RunJob();\n}" ]
[ "0.66183734", "0.64499587", "0.6153605", "0.6076405", "0.5821438", "0.5715551", "0.5709364", "0.562989", "0.55993766", "0.5559306", "0.5533709", "0.55288756", "0.5512318", "0.5496288", "0.54909325", "0.54853857", "0.5478368", "0.5469039", "0.54635924", "0.5462142", "0.5456195", "0.545291", "0.54444325", "0.5433717", "0.54280365", "0.5423977", "0.54056984", "0.53862", "0.53847826", "0.5354209", "0.5351582", "0.534535", "0.53441685", "0.532729", "0.53150773", "0.5308113", "0.5294596", "0.52832395", "0.52520204", "0.5248067", "0.52474195", "0.5241189", "0.52336025", "0.52210146", "0.5218708", "0.52135795", "0.5206936", "0.52037156", "0.52011657", "0.51953775", "0.5181042", "0.5179852", "0.51773745", "0.51753", "0.51733285", "0.51727396", "0.51655346", "0.5162815", "0.5153838", "0.51441646", "0.51373416", "0.5121332", "0.5115029", "0.51038426", "0.5103104", "0.5098925", "0.50978935", "0.5094548", "0.50910753", "0.5088793", "0.50822306", "0.50750786", "0.5064663", "0.50568825", "0.5055894", "0.5055364", "0.5052563", "0.5050724", "0.5047785", "0.50446737", "0.5043956", "0.5041623", "0.50397146", "0.5039415", "0.5037171", "0.50269717", "0.5024999", "0.502386", "0.5022083", "0.50204927", "0.50199014", "0.501624", "0.50158644", "0.50137216", "0.5010163", "0.500707", "0.50039464", "0.50012845", "0.49983236", "0.4998008" ]
0.6028216
4
Create a new token.
protected function loginAs(User $user) { $payload = [ 'iss' => "lumen-jwt", // Issuer of the token 'sub' => $user->id, // Subject of the token 'iat' => time(), // Time when JWT was issued. 'exp' => time() + 60*60 // Expiration time ]; // As you can see we are passing `JWT_SECRET` as the second parameter that will // be used to decode the token in the future. $this->token = JWT::encode($payload, env('JWT_SECRET')); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createToken();", "public function createNewToken()\n {\n return $this->getBandrek()->generateToken();\n }", "public function create(Token $token): void;", "public function generateToken();", "public function createToken()\n\t{\n\t\t$domain = $this->config->get('app.domain');\n\n\t\t$data = [\n\t\t\t'iss' => $domain,\n\t\t\t'aud' => $domain,\n\t\t\t'iat' => time(),\n\t\t\t'exp' => time () + $this->expiration,\n\t\t];\n\n\t\t$token = JWT::encode($data, $this->config->get('app.app_key'));\n\n\t\t$this->createAuth([\n\t\t\t'token' => $token,\n\t\t\t'expires_at' => date('Y-m-d h:i:s', $data['exp'])\n\t\t]);\n\n\t\treturn $token;\n\t}", "public function token()\n {\n // echo 'pk';\n try {\n $this->heimdall->createToken();\n } catch (Exception $exception) {\n $this->heimdall->handleException($exception);\n }\n }", "public function generateToken()\n\t{\n\t\treturn Token::make();\n\t}", "public function createTokens()\n {\n\n }", "protected function createToken()\n {\n if ($this->client->getRefreshToken()) {\n $this->client->fetchAccessTokenWithRefreshToken($this->client->getRefreshToken());\n } else {\n // Request authorization from the user.\n $authUrl = $this->client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $this->client->fetchAccessTokenWithAuthCode($authCode);\n $this->client->setAccessToken($accessToken);\n\n // Check to see if there was an error.\n if (array_key_exists('error', $accessToken)) {\n throw new Exception(join(', ', $accessToken));\n }\n }\n // Save the token to a file.\n if (!file_exists(dirname($this->token))) {\n mkdir(dirname($this->token), 0700, true);\n }\n file_put_contents($this->token, json_encode($this->client->getAccessToken()));\n }", "public function create_token(array $data)\n\t{\n\t\t// Create the token\n\t\tdo\n\t\t{\n\t\t\t$token = sha1(uniqid(Text::random('alnum', 32), TRUE));\n\t\t}\n\t\twhile($this->get_token($token)->loaded());\n\n\t\t// Store token in database\n\t\treturn $this->set(array(\n\t\t\t'user'\t\t => $data['user_id'],\n\t\t\t'expires'\t => $data['expires'],\n\t\t\t'user_agent' => $data['user_agent'],\n\t\t\t'token'\t\t => $token,\n\t\t))->save();\n\t}", "protected function create_token()\n {\n do {\n $token = sha1(uniqid(\\Phalcon\\Text::random(\\Phalcon\\Text::RANDOM_ALNUM, 32), true));\n } while (Tokens::findFirst(array('token=:token:', 'bind' => array(':token' => $token))));\n\n return $token;\n }", "public function createAdminToken();", "protected function create_token(Entities\\Token &$token = NULL)\n\t{\n\t\t// Create a new autologin token if not passed as argument\n\t\tif($token === NULL)\n\t\t{\n\t\t \t$token = new Entities\\Token;\n\t\t}\n\n\t\t// Set the expire time and hash of the user agent\n\t\t$token->setExpires(time() + $this->_config['lifetime']);\n\t\t$token->setUserAgent(sha1(Request::$user_agent));\n\n\t\t// Create a new token each time the token is saved\n\t\twhile (TRUE)\n\t\t{\n\t\t\t// Create a random token\n\t\t\t$hash = text::random('alnum', 32);\n\n\t\t\t// Make sure the token does not already exist\n\t\t\tif(ORM::load('Token')->findOneBy(array('hash' => $hash)) === NULL)\n\t\t\t{\n\t\t\t\t// A unique token has been found\n\t\t\t\t$token->setHash($hash);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $token;\n\t}", "private function createToken()\n {\n $this->token = md5(time().uniqid());\n return true;\n }", "public function create()\n {\n\t\t\n\t\t//this->authorize('create', Token::class);\n\t\t$jsvalidator = JsValidator::make([\n\t\t\t'user_id' => 'numeric|nullable|exits:users,id',\n\t\t\t'account' => 'numeric|required|exits:accounts,id',\n\t\t\t'name' => 'required|string|max:75',\n\t\t\t'slug' => 'nullable|string',\n\t\t\t'contract_address' => 'nullable|string|max:42',\n\t\t\t'contract_ABI_array' => 'nullable|string',\n\t\t\t'contract_Bin' => 'nullable|string',\n\t\t\t'token_price' => 'required|numeric',\n\t\t\t'symbol' => 'required|string',\n\t\t\t'decimals' => 'required|numeric',\n\t\t\t'logo' => 'required|file',\n\t\t\t'image' => 'required|file',\n\t\t\t'website' => 'required|string|url',\n\t\t\t'twitter' => 'required|string|url',\n\t\t\t'facebook' => 'required|string|url',\n\t\t\t'description' => 'required|string',\n\t\t\t'technology' => 'nullable|string',\n\t\t\t'features' => 'required|string',\n\t\t]);\n\t\t$accounts = auth()->user()->accounts;\n\t\t$page_title = \"title\";\n //$data['users'] = User::latest()->paginate(20);\n return view('admin.tokens.create',compact('jsvalidator','accounts','page_title'));\n }", "public function create(){\n\t\treturn view('_admin.tokens.create');\n\t}", "public function createToken()\n {\n $key = base64_encode(getenv('JWT_SECRET'));\n $payload = array(\n \"jti\" => base64_encode(random_bytes(32)),\n \"iat\" => time(),\n \"iss\" => getenv('BASE_URL'),\n \"nbf\" => time() + 10,\n \"exp\" => time() + (3600 * 24 * 15),\n \"data\" => [\n \"user\" => [\n \"username\" => $this->username,\n \"uuid\" => $this->uuid\n ]\n ]\n );\n try {\n return $this->container->jwt::encode($payload, $key, 'HS256');\n } catch (Exception $e) {\n return false;\n }\n }", "public function testCreateToken()\n {\n $response = $this->actingAsTestingUser()\n ->withEncryptionKey()\n ->get(route('tokens.create'));\n\n $response->assertStatus(200);\n $response->assertViewIs('tokens.form');\n }", "function createToken() {\n\treturn bin2hex(openssl_random_pseudo_bytes(32));\n}", "private function createPingToken(): Token\n {\n return new Token(\n TokenUUID::createById($this->pingToken),\n ''\n );\n }", "public static function generate(): Token\n {\n $token = bin2hex(random_bytes(256));\n return new Token($token);\n }", "public function createAuthToken() {\n $url = URIResource::Make($this->path, array($this->id, 'tokens'));\n $token = $this->client->post($url, null);\n return new EndpointsToken($token);\n }", "public function createToken(): self\n {\n $rawToken = random_bytes(self::TOKEN_SIZE);\n $this->token = Base64::encode($rawToken);\n $this->selector = Base64::encode(mb_substr($rawToken, 0, self::SELECTOR_SIZE, '8bit'));\n $this->hashedVerifier = Base64::encode(hash(Colloportus::HASH_FUNCTION, mb_substr($rawToken, self::SELECTOR_SIZE, self::VERIFIER_SIZE, '8bit'), true));\n\n return $this;\n }", "public function createPaymenttoken(\n Requestmodels\\Paymenttokencreate $requestModel\n ) {\n $chargeMapper = new Chargesmapper($requestModel);\n\n $requestPayload = array(\n 'authorization' => $this->apiSetting->getSecretKey(),\n 'mode' => $this->apiSetting->getMode(),\n 'postedParam' => $chargeMapper->requestPayloadConverter(),\n );\n\n $processCharge = Apihttpclient::postRequest(\n $this->apiUrl->getPaymenttokensApiUri(),\n $this->apiSetting->getSecretKey(), $requestPayload\n );\n\n return new Responsemodels\\Paymenttoken($processCharge);\n }", "function create_token()\n {\n $secretKey = \"B1sm1LLAH1rrohmaan1rroh11m\";\n\n // Generates a random string of ten digits\n $salt = mt_rand();\n\n // Computes the signature by hashing the salt with the secret key as the key\n $signature = hash_hmac('sha256', $salt, $secretKey, false);\n // $signature = hash('md5', $salt.$secretKey);\n\n // return $signature;\n return urlsafeB64Encode($signature);\n }", "public function newToken ($def)\n {\n $ucol = $this->user_field;\n if (is_object($def) && is_callable([$def, 'get_id']))\n { // A user object was passed.\n $uid = $def->get_id();\n $def = [$ucol=>$uid];\n }\n elseif (is_array($def) && isset($def[$ucol]))\n { // A simple array of properties.\n $uid = $def[$ucol];\n if (is_object($uid) && is_callable([$uid, 'get_id']))\n { // It's an object, convert it to a uid.\n $uid = $uid->get_id();\n $def[$ucol] = $uid;\n }\n }\n else\n {\n throw new \\Exception(\"Invalid user sent to newToken()\");\n }\n\n $ecol = $this->expire_field;\n if (isset($def[$ecol]))\n { \n if (is_string($def[$ecol]))\n { // Ensure the value is in the correct format.\n $def[$ecol] = (time() + $this->expire_value($def[$ecol]));\n }\n elseif (!is_numeric($def[$ecol]))\n {\n throw new \\Exception(\"Invalid expire value sent to newToken()\");\n }\n }\n else\n { // Use the default expire value.\n if (is_int($this->default_expire))\n $def[$ecol] = $this->default_expire;\n elseif (is_string($this->default_expire))\n $def[$ecol] = $this->expire_value($this->default_expire);\n }\n $kcol = $this->key_field;\n $def[$kcol] = $this->generate_key();\n $token = $this->newChild($def);\n $token->save();\n return $token;\n }", "public function create()\n {\n //on that view we manipulate a token\n return view(\"trello.token\");\n }", "public function createToken(CreateTokenRequest $request)\n {\n $this->apiData = $this->tokenService->createToken($request);\n\n return $this->success();\n }", "public function testCreateToken(){\n\t\tPayU::$apiLogin = PayUTestUtil::API_LOGIN;\n\t\tPayU::$apiKey = PayUTestUtil::API_KEY;\n\t\t\n\t\tEnvironment::setPaymentsCustomUrl(PayUTestUtil::PAYMENTS_CUSTOM_URL);\n\t\t\n\t\t$parameters = PayUTestUtil::buildParametersCreateToken();\n\t\t\n\t\t$response = PayUTokens::create($parameters);\n\t\t\n\t\t$this->assertEquals(PayUResponseCode::SUCCESS, $response->code);\n\t\t$this->assertNotNull($response->creditCardToken);\n\t\t$this->assertNotNull($response->creditCardToken->creditCardTokenId);\n\t\t\t\t\n\t}", "public function create_token()\n {\n $this->load->library('wsresponse');\n $this->load->library('wschecker');\n $this->wsresponse->setOptionsResponse();\n \n $this->load->model('rest_model');\n $remote_addr = $this->wschecker->getHTTPRealIPAddr();\n $user_agent = $this->wschecker->getHTTPUserAgent();\n $prepare_str = $remote_addr . \"@@\" . $user_agent . \"@@\" . time();\n $ws_token = hash(\"SHA256\", $this->wschecker->encrypt($prepare_str));\n\n $inser_arr['vWSToken'] = $ws_token;\n $inser_arr['vIPAddress'] = $remote_addr;\n $inser_arr['vUserAgent'] = $user_agent;\n $inser_arr['dLastAccess'] = date(\"Y-m-d H:i:s\");\n $res = $this->rest_model->insertToken($inser_arr);\n if ($res) {\n $settings_arr['success'] = 1;\n $settings_arr['message'] = \"Token generated successfully..!\";\n $data_arr['ws_token'] = $ws_token;\n } else {\n $settings_arr['success'] = 0;\n $settings_arr['message'] = \"Token generation failed..!\";\n $data_arr = array();\n }\n $responce_arr['settings'] = $settings_arr;\n $responce_arr['data'] = $data_arr;\n $this->wsresponse->sendWSResponse($responce_arr);\n }", "protected function createNewToken($token){\n $user = auth()->user();\n $captain = false;\n $team = Team::find($user->team_id);\n if($team){\n if($team->user_id == $user->id) {\n $captain = true;\n }else{\n $captain = false;\n }\n \n $teamId = $team->id;\n }else{\n $teamId = null;\n }\n \n return response()->json([\n 'access_token' => $token,\n 'user_id' => $user->id,\n 'username' => $user->name,\n 'captain' => $captain,\n 'team_id' => $teamId,\n ]);\n }", "public function getToken();", "public function getToken();", "public function getToken();", "public function getToken();", "public function generateToken()\n\t{\n\t\tif( empty( $this->myAccountID ) )\n\t\t\tthrow PasswordResetException::toss( $this, 'NO_ACCOUNT_ID' ) ;\n\t\tif( empty( $this->myAuthID ) )\n\t\t\tthrow PasswordResetException::toss( $this, 'NO_AUTH_ID' ) ;\n\t\t$this->myNewToken = AuthDB::generatePrefixedAuthToken( static::TOKEN_PREFIX ) ;\n\t\t$theSql = SqlBuilder::withModel($this->model)\n\t\t\t->startWith( 'INSERT INTO ' )->add( $this->model->tnAuthTokens )\n\t\t\t->add( 'SET ' )\n\t\t\t->mustAddParam('created_by', $_SERVER['REMOTE_ADDR'])\n\t\t\t->setParamPrefix( ', ' )\n\t\t\t->mustAddParam('created_ts', $this->model->utc_now())\n\t\t\t->mustAddParam( 'auth_id', $this->myAuthID )\n\t\t\t->mustAddParam( 'account_id', $this->myAccountID )\n\t\t\t->mustAddParam( 'token', $this->myNewToken )\n\t\t\t//->logSqlDebug(__METHOD__) //DEBUG\n\t\t\t;\n\t\ttry\n\t\t{\n\t\t\t//execDML() on parameterized queries ALWAYS returns true,\n\t\t\t// exceptions are the only means of detecting failure here.\n\t\t\t$theSql->execDML() ;\n\t\t\treturn $this ;\n\t\t}\n\t\tcatch( PDOException $pdoe )\n\t\t{\n\t\t\t$this->myNewToken = null ;\n\t\t\tthrow PasswordResetException::toss( $this, 'TOKEN_GENERATION_FAILED' ) ;\n\t\t}\n\t}", "public function createToken(Event $event)\n {\n $subject = $event->getSubject();\n\n if ($subject->success) {\n $subject->entity->token = Text::uuid();\n $this->getController()->loadModel()->save($subject->entity);\n }\n }", "protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth()->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n }", "function createtoken()\n {\n $token = \"token-\" . mt_rand();\n // put in the token, created time\n $_SESSION[$token] = time();\n return $token;\n }", "public function creating(Request $request)\n {\n $request->token = newToken();\n }", "protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth('api')->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n }", "public static function create(): string\n {\n $payload = ['random' => base64_encode(random_bytes(32))];\n $tokenDecoded = new TokenDecoded([], $payload);\n\n $privateKey = @file_get_contents(self::PRIVATE_KEYFILE);\n if ($privateKey === false) {\n echo 'creating Keys..';\n self::createKeys();\n $privateKey = file_get_contents(self::PRIVATE_KEYFILE);\n }\n\n $tokenEncoded = $tokenDecoded->encode($privateKey, JWT::ALGORITHM_RS256);\n return $tokenEncoded;\n }", "private function makeFakeToken()\n {\n return factory(Token::class)->make(array(\n 'user_id' => $this->getTestingUser(),\n ));\n }", "protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth('api')->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n\n\n }", "protected function createToken(array $tokenConfig = [])\n\t{\n\t\tif (!array_key_exists('class', $tokenConfig)) {\n\t\t\t$tokenConfig['class'] = OAuthToken::className();\n\t\t}\n\t\treturn Yii::createObject($tokenConfig);\n\t}", "public function create()\n {\n return view('admin.tokens.create');\n }", "public function create()\n\t{\n\t\t$c = bin2hex(random_bytes(32));\t\t\t\t\t\t\n\t\t$cnametoken = md5('cookie-name!' . time());\t\t\t// cookie name ; can be seen in the first 32 digits of string token\n\t\t$cname = md5('md5-cookie-name!' . $cnametoken);\t\t// real cookie name ; this is the cookie key set in the browser\n\t\t\n\t\t// stores the value in the client\n\t\t$this->_intf->set($cname, $c);\n\t\t\n\t\t// returns computed token\n\t\treturn $this->compute($cnametoken, $c, basename(__FILE__));\n\t}", "protected function createNewToken($token)\n {\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth()->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n }", "function newToken($params = array()){\n\t\t$data =\t[\n\t\t\t\"client_id\"=>$this->client_id, \n\t\t\t\"client_secret\"=> $this->client_secret,\n\t\t\t\"refresh_token\"=> $this->refresh_token\n\t\t\t];\n\t\t\n\t\t//echo json_encode($data), PHP_EOL; //die();\n\t\t$r = false;\n\t\tMpApi::sleep(); \n\t\t$response = json_decode($this->callCurl('POST' , '/new/token' , false, $data ),true);\n\t\t\n\t\t//print_r($response); die('pp');\n\t\t\n\t\tif(isset($response['access_token']) AND $response['access_token'] != ''){\n\t\t\t$this->access_token = $response['access_token'];\n\t\t\t$this->refresh_token = $response['refresh_token'];\n\t\t\t//echo '<!-- New tokens generated: ' . print_r($response,1) . '-->';\n\t\t\t$r = $response['access_token'];\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\treturn $r;\n\t}", "private function createCSRFToken() {\r\n\t \r\n\t // Check that the token is still valid\r\n\t if( empty($this->input('session', 'token_creation')) ||\r\n\t (time() - $this->input('session', 'token_creation')) > TOKEN_KEEPALIVE ) {\r\n \t\t// The token needs to be refreshed, delete every previous request token for the user\r\n \t\tSecurity::deleteToken();\r\n \t\t\r\n \t\t// Create a new token\r\n \t\t$token = Security::generateToken();\r\n \t\t\r\n \t\t// Store the token in the session\r\n \t\t$this->input('session', 'token', $token);\r\n \t\t\r\n \t\t// Set the token creation time to the current time\r\n \t\t$this->input('session', 'token_creation', (string)time());\r\n\t }\r\n\t\t\r\n\t\t// Set the token in the template\r\n\t\t$this->output->setArguments(array(VAR_CSRF_TOKEN => $this->input('session', 'token')));\r\n\t}", "static public function factory($personId, $function, $expireDate = null)\n\t{\n\t\t$token = new Token();\n\t\t$token->person_id = $personId;\n\t\t$token->token = str_replace('.', '', uniqid('', true));\n\t\t$token->function = $function;\n\t\t$token->expire_date = $expireDate;\n\t\t$token->save();\n\t\t\n\t\treturn $token;\n\t}", "function create_token($filename = '.token')\n{\n try {\n $dir = VAR_FOLDER . DS;\n if (!file_exists($dir)) {\n mkdir($dir, 0755, true);\n }\n $file = fopen($dir . DS . $filename, \"w\");\n fwrite($file, bin2hex(random_bytes(32)) . \"\\n\");\n fclose($file);\n } catch (Exception $e) {\n throw new Exception($e->getMessage(), $e->getCode());\n }\n}", "public static function createAccessToken(){\r\n\t\t$token = new AccessToken(substr(sha1(microtime()), 0, 30));\r\n\t\treturn $token;\r\n\t}", "public function createToken() {\r\n\t\t$characters = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\r\n\t\t\t'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9');\r\n\t\t$counter = 0;\r\n\t\t$resultString = \"\";\r\n\t\t\r\n\t\twhile ($counter < Page::TOKEN_LENGTH) {\r\n\t\t\t$nextRand = mt_rand(0, (count($characters) - 1));\r\n\t\t\t\r\n\t\t\tif (!Strings::contains($resultString, sprintf('%1$s', $characters[$nextRand]))) {\r\n\t\t\t\t$resultString .= $characters[$nextRand];\r\n\t\t\t\t\r\n\t\t\t\t$counter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $resultString;\r\n\t}", "public function generateNewToken() : string\n {\n $token = \"\";\n try {\n $fullUrl = $this->_getFullUrl(Config::AUTH_URL);\n $result = $this->client->post($fullUrl, [\n \"client_id\" => Config::CLIENT_ID,\n \"email\" => Config::EMAIL,\n \"name\" => Config::NAME\n ]);\n $data = json_decode($result->getBody()->getContents());\n $token = $data->data->sl_token;\n\n } catch (Exception $e) {\n echo $this->responseService\n ->withStatus($e->getCode())\n ->single([], \"data\", null, $e->getMessage());\n }\n return $token;\n }", "protected function createNewToken($token)\n {\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth('api')->factory()->getTTL() * 60,\n 'user' => auth('api')->user()\n ]);\n }", "function gen_token()\n\t{\n\t\t$ci = get_instance()->load->helper('myencrypt');\n\t\treturn create_token();\n\t}", "public function createAnonymousToken();", "protected function buildToken() {\n }", "function createToken($name)\n{\n\t$token=NULL;\n\t$token=uniqid(rand(), true);\n\t$_SESSION[$name.'Token']=$token;\n\t$_SESSION[$name.'Token_time']=time();\n\treturn $token;\n}", "protected function createToken()\n {\n $currentServerIp = $this->request->server('SERVER_ADDR');\n\n $secretKey = $this->config['doublespark_contaobridge_secret_key'];\n\n return md5('phpbbbridge'.date('d/m/Y').$currentServerIp.$secretKey);\n }", "public function store(CreateTokenRequest $request)\n {\n $input = $request->all();\n\n $token = $this->tokenRepository->create($input);\n\n Flash::success('Token saved successfully.');\n\n return redirect(route('admin.tokens.index'));\n }", "function generate() {\n\n if ($_SERVER[\"REQUEST_METHOD\"] !== 'POST') {\n http_response_code(403);\n echo 'Forbidden';\n die();\n } else {\n //fetch posted data\n $posted_data = file_get_contents('php://input');\n $input = (array) json_decode($posted_data);\n $data = $this->_pre_token_validation($input);\n }\n\n $token = $this->_generate_token($data);\n http_response_code(200);\n echo $token;\n }", "public function createToken ($tokenName = 'form_token', $tokenExpirationTime = 300) {\n\t\tif (isset($_SESSION[$tokenName])) {\n\t\t\t$this->token['name'] = $tokenName;\n\t\t\t$this->token['value'] = $_SESSION[$tokenName];\n\t\t\t$this->token['expirationTime'] = $_SESSION[\"{$tokenName}_expiration_time\"];\n\t\t} else {\n\t\t\tif (!is_null($this->token['name']))\n\t\t\t\t$this->unsetToken($this->token); // Unset previous token\n\n\t\t\t$this->token['name'] = $tokenName;\n\t\t\t$this->token['value'] = md5(uniqid('auth', true));\n\n\t\t\tif (is_null($this->token['expirationTime']))\n\t\t\t\t$this->token['expirationTime'] = $tokenExpirationTime;\n\n\t\t\t$_SESSION[$tokenName] = $this->token['value'];\n\t\t\t$_SESSION[\"{$tokenName}_time\"] = time();\n\t\t\t$_SESSION[\"{$tokenName}_expiration_time\"] = $this->token['expirationTime'];\n\t\t}\n\n\t\treturn $this->token;\n\t}", "function new_token_create($billing_first_name,$billing_last_name,$card_no,$month,$year,$cvc,$billing_city,$billing_country,$billing_address_1,$billing_address_2,$billing_state,$billing_email)\n {\n \t\n \ttry {\n \t $token= \\Stripe\\Token::create(array(\n \t\t \"card\" => array(\n\t \"name\" => $billing_first_name. \" \" .$billing_last_name,\n \t\t \"number\" => $card_no,\n \t\t \"exp_month\" => $month,\n \t\t \"exp_year\" => $year,\n \t \"cvc\" => $cvc,\n \t \"address_city\"=> $billing_city,\n \"address_country\"=> $billing_country,\n \"address_line1\"=> $billing_address_1,\n \"address_line2\"=> $billing_address_2,\n \"address_state\"=> $billing_state,\n \t\t \"metadata\" => array(\"customer_email\" => $billing_email),\n \t\t )\n\t\t ));\n\n\t\t} catch(\\Stripe\\Exception\\CardException $e) {\n \n echo 'Status is:' . $e->getHttpStatus() . '\\n';\n echo 'Type is:' . $e->getError()->type . '\\n';\n echo 'Code is:' . $e->getError()->code . '\\n';\n \n echo 'Param is:' . $e->getError()->param . '\\n';\n echo 'Message is:' . $e->getError()->message . '\\n';\n } catch (\\Stripe\\Exception\\RateLimitException $e) {\n \n } catch (\\Stripe\\Exception\\InvalidRequestException $e) {\n \n } catch (\\Stripe\\Exception\\AuthenticationException $e) {\n \n } catch (\\Stripe\\Exception\\ApiConnectionException $e) {\n \n } catch (\\Stripe\\Exception\\ApiErrorException $e) {\n\n } catch (Exception $e) {\n \techo $e;\n \n } \n return $token; \n\t}", "private static function create_token( $timestamp )\n\t{\n\t\t$token = substr( md5( $timestamp . Options::get( 'GUID' ) ), 0, 10 );\n\t\t$token = Plugins::filter( 'jambo_token', $token, $timestamp );\n\t\treturn $token;\n\t}", "public function createToken(string $name, array $abilities = ['*'])\n {\n $token = $this->tokens()->create([\n 'name' => $name,\n 'token' => hash('sha256', $plainTextToken = Str::random(40)),\n 'abilities' => $abilities,\n ]);\n\n $prefix = $token->getAttribute('hash_id') ?? $token->getKey();\n\n return new NewAccessToken($token, $prefix.'|'.$plainTextToken);\n }", "public function getToken()\n\t{\n\n\t}", "function create_client_token(){\n \t$clientToken = Braintree_ClientToken::generate();\n \treturn $clientToken;\n }", "public function testCreateTokenFromIdentity()\n {\n }", "protected function newToken(): string\n {\n $new = $this->fetchNewToken();\n\n $this->cache->put(\n $this->key,\n encrypt($new['access_token']),\n $new['expires_in'] / 60 - 1\n );\n\n return $new['access_token'];\n }", "public function generateNewToken()\n {\n $this->token = uniqid(null, true);\n return ($this->token);\n }", "public function createToken($network, $pairing_code);", "public function newToken(Request $request)\n {\n// $forPage = $request->input('forPage');\n \n $applicationSid = config('services.twilio')['applicationSid'];\n $accountSid = config('services.twilio')['accountSid'];\n $authToken = config('services.twilio')['authToken'];\n // // $appSid = env('TWILIO_APPLICATION_SID');\n \n $clientToken = new ClientToken($accountSid,$authToken);\n \n $clientToken->allowClientOutgoing($applicationSid);\n\n // if ($forPage == '/cats') {\n $clientToken->allowClientIncoming('support_agent');\n // } else {\n // $clientToken->allowClientIncoming('customer');\n // }\n\n $token = $clientToken->generateToken();\n return response()->json($token);\n }", "public function regenerateToken();", "protected function createNewToken($token, $state = \"login\")\n {\n $message = 'Successfully logged in';\n if($state != \"login\"){\n $message = 'Register Successfully';\n }\n return response()->json([\n 'response_code' => 99,\n 'error' => false,\n 'message' => $message,\n 'access_token' => $token,\n 'expires_in' => auth()->factory()->getTTL() * 60,\n 'result' => auth()->user()\n ]);\n }", "function __create_auth_token($email, $password, $account_type, $service) {\n\n return new AuthToken($email, $password, $account_type, $service);\n\n}", "public function generateToken()\n {\n $request = $this->call('v1/auth/token', Constants::METHOD_POST, [\n 'timestamp' => time(),\n 'nonce' => $this->generateNonce(),\n ]);\n\n return isset($request['token']) ? $request['token'] : false;\n }", "public function testCreateWithValidTlToken()\n {\n // Populate data\n $tlID = $this->_populateTL();\n $dealerID = $this->_populateDealer();\n $dealerAccountID = $this->_populateDealerAccount();\n $branchID = $this->_populateBranch();\n\n // Create token\n $token = str_random(5);\n $encryptedToken = $this->token->encode($tlID, $token);\n \n // Do request\n $this->_request('POST', '/api/1.5.0/news-create', ['token' => $encryptedToken, 'title' => 'news', 'content' => 'content'])\n ->_result(['result' => 'success']);\n }", "public function creating(Token $instance)\n {\n $this->deleteUserTokens($instance->user_id);\n $instance->expires_at = Carbon::now()->addMinutes(config('token.lifetime'));\n $instance->password = Uuid::uuid4()->toString();\n }", "public function createToken($ccData) {\n $stripeToken = \\Stripe_Token::create(array(\"card\" => array(\"number\" => $ccData['card_number'], \n \"exp_month\" => $ccData['expMonth'], \n \"exp_year\" => $ccData['expYear'], \n \"cvc\" => $ccData['cvv'])));\n return $stripeToken;\n }", "public function requestToken() {\n \n $result = $this->doRequest('v1.0/token?grant_type=1', 'GET');\n\n $this->_setToken($result->result->access_token);\n $this->_setRefreshToken($result->result->refresh_token);\n $this->_setExpireTime($result->result->expire_time);\n $this->_setUid($result->result->uid);\n\n }", "public function generateToken(){\n //if(empty($_SESSION['token']) && (empty($_SESSION['tokenAge']) || (time() - (int)$_SESSION['tokenAge']) > (int)$this->maxAge)){\n if(function_exists('random_bytes')){\n $_SESSION['token'] = bin2hex(random_bytes(32));\n }elseif(function_exists('mcrypt_create_iv')){\n $_SESSION['token'] = bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM));\n }else{\n $_SESSION['token'] = bin2hex(openssl_random_pseudo_bytes(32));\n }\n $_SESSION['tokenAge'] = time();\n //} \n }", "function _generate_token($data) {\n\n //generate 32 digit random string\n $random_string = $this->_generate_rand_str();\n\n //build data array variables (required for table insert)\n if (!isset($data['expiry_date'])) {\n $data['expiry_date'] = time() + $this->default_token_lifespan;\n }\n \n $data['token'] = $random_string;\n $params = $data;\n\n if (isset($params['set_cookie'])) {\n unset($params['set_cookie']);\n }\n\n $this->model->insert($params, 'trongate_tokens');\n\n if (isset($data['set_cookie'])) {\n setcookie('trongatetoken', $random_string, $data['expiry_date'], '/');\n } else {\n $_SESSION['trongatetoken'] = $random_string;\n }\n\n return $random_string;\n }", "public function createToken()\n {\n $mock = $this->mock('Dhii\\Parser\\Tokenizer\\TokenInterface')\n ->get()\n ->has()\n ->getKey()\n ->getValue()\n ->getLineNumber()\n ->getColumnNumber()\n ->new();\n\n return $mock;\n }", "private function setToken() {\n\n /* valid register */\n $request = $this->post('/v1/register', [\n 'firstname' => 'John',\n 'lastname' => 'Doe',\n 'email' => '[email protected]',\n 'password' => 'secret',\n ]);\n\n /* valid login */\n $this->post('/v1/login', [\n 'email' => '[email protected]',\n 'password' => 'secret',\n ]);\n\n }", "static function createToken($user, $lifespan = 172800 /* (seconds) 2 days */){\n\n\t\tif($existingVerificationToken = self::get(\"user = $user->id\")){\n\n\t\t\t$existingVerificationToken->delete();\n\t\t}\n\n\t\t$verificationToken = new self();\n\t\t$verificationToken->user = $user->id;\n\t\t$verificationToken->token = bin2hex(openssl_random_pseudo_bytes(16));\n\t\t$verificationToken->lifespan = $lifespan;\n\t\t$verificationToken->save();\n\t\treturn $verificationToken->token;\n\t}", "public static function createToken($firstname, $lastname, $email, $secretKey)\n {\n $json = sprintf('{\"fn\":\"%s\",\"ln\":\"%s\",\"em\":\"%s\"}', $firstname, $lastname, $email);\n print($json . PHP_EOL);\n return WLTLoginToken::encode($json, $secretKey);\n }", "private function crearToken(){\n \n $headers = Yii::$app->request->headers;\n\n if (preg_match('/^Bearer\\s+(.*?)$/', $headers['authorization'], $matches)) {\n $token = $matches[1];\n } else {\n throw new \\yii\\web\\HttpException(500, 'Token invalido');\n }\n \n return $token;\n }", "public function createCustomToken($uid, array $claims = []);", "function createToken($userAgent, $userId = null);", "protected function create_token() {\n\t\twhile(true) {\n\t\t\t// Create a random token\n\t\t\t$token = str::random('alnum', 32);\n\n\t\t\t// Make sure the token does not already exist\n\t\t\tself::db()->use_master(YES);\n\t\t\tif (self::db()->select('user_token_id')->where('user_token_token', $token)->get($this->table_name)->count() === 0) {\n\t\t\t\t// A unique token has been found\n\t\t\t\treturn $token;\n\t\t\t}\n\t\t}\n\t}", "public static function create($uid)\n {\t\n\t\tif(!isset($uid)) return null;\n if (is_object($uid))\n $uid = $uid->uid;\n $token = new LOneTime;\n $token->token = LilyModule::instance()->generateRandomString();\n $token->uid = $uid;\n $token->created = time();\n if ($token->save()) {\n if (LilyModule::instance()->enableLogging)\n Yii::log(\"LOneTime::create($uid) successfully created new one-time login token tid={$token->tid}\", CLogger::LEVEL_INFO, 'lily');\n return $token;\n } else {\n if (LilyModule::instance()->enableLogging)\n Yii::log(\"LOneTime::create($uid) failed to create new one-time login token\", CLogger::LEVEL_WARNING, 'lily');\n return null;\n }\n }", "public function getCreateAccountToken() {\n $queryData = array();\n $queryData['action'] = 'query';\n $queryData['meta'] = 'tokens';\n $queryData['type'] = 'createaccount';\n $queryData['format'] = 'json';\n\n $url = $this->apiUrl . \"?\" . http_build_query($queryData);\n\n try {\n $this->fetch($url, null, OAUTH_HTTP_METHOD_POST);\n } catch (Exception $e) {\n $msg = 'MediaWikiApiClient error getting createaccount token: ' . $e->getMessage();\n if(Configure::read('debug')) {\n CakeLog::write('error', $msg);\n CakeLog::write('error', 'Query data was ' . print_r($queryData, true));\n CakeLog::write('error', 'URL was ' . print_r($url, true));\n }\n throw new MediaWikiApiClientException($msg, 1, $e);\n }\n\n $responseInfo = $this->getLastResponseInfo();\n\n if ($responseInfo['http_code'] != 200 || !preg_match('/^application\\/json/', $responseInfo['content_type'])) {\n $msg = \"MediaWikiApiClient error getting createaccount token\";\n if(Configure::read('debug')) {\n CakeLog::write('error', $msg);\n CakeLog::write('error', 'MediaWikiApiClient response code was ' . $responseInfo['http_code']);\n CakeLog::write('error', 'MediaWikiApiClient content type was ' . $responseInfo['content_type']);\n }\n throw new MediaWikiApiClientException($msg, 1);\n }\n\n $response = json_decode($this->getLastResponse(), true);\n\n if (!isset($response['query']['tokens']['createaccounttoken'])) {\n $msg = \"MediaWikiApiClient error getting createaccount token\";\n if(Configure::read('debug')) {\n CakeLog::write('error', $msg);\n CakeLog::write('error', 'MediaWikiApiClient response was ' . $print_r($response, true));\n }\n throw new MediaWikiApiClientException($msg, 1);\n }\n\n $createAccountToken = $response['query']['tokens']['createaccounttoken'];\n\n return $createAccountToken;\n }", "public function generateToken()\n {\n if($this->api_token == null)\n $this->api_token = str_random(60);\n $this->save();\n return $this;\n }", "public function getToken()\n\t{\n\t\t$this->setCurlHeaders(false);\n\t\t\n\t\t$request_params = array\n\t\t(\n\t\t\t'client_key' => $this->client_key,\n\t\t\t'client_secret' => $this->client_secret\n\t\t);\n\t\t\n\t\treturn $this->makeCurlRequest($this->public_api_url . \"v1/token/generate\", false, \"POST\", $request_params);\n\t}", "protected function _createNewToken(Eway_Rapid31_Model_Response $response)\n {\n try {\n $customer = $response->getCustomer();\n\n $tokenInfo = array(\n 'Token' => $response->getTokenCustomerID(),\n 'Card' => $customer['CardNumber'] ? substr_replace($customer['CardNumber'], '******', 6, 6) : 'Paypal',\n 'Owner' => $customer['CardName'],\n 'StartMonth' => $customer['CardStartMonth'],\n 'StartYear' => $customer['CardStartYear'],\n 'IssueNumber' => $customer['CardIssueNumber'],\n 'ExpMonth' => $customer['CardExpiryMonth'],\n 'ExpYear' => (strlen($customer['CardExpiryYear']) == 2 ? '20' . $customer['CardExpiryYear'] : $customer['CardExpiryYear']),\n 'Type' => $this->checkCardType($customer['CardNumber']),\n 'Address' => Mage::getModel('ewayrapid/field_customer')->addData($customer),\n );\n\n Mage::helper('ewayrapid/customer')->addToken($tokenInfo);\n return true;\n } catch (Exception $e) {\n return false;\n }\n }", "public function token()\n {\n\n\t\t$this->server->handleTokenRequest(OAuth2\\Request::createFromGlobals())->send();\n }", "public function store(array $data){\n $token = new Token();\n $token\n ->setUserId($data['userId'])\n ->setEmail($data['email'])\n ->setKey($data['key'])\n ->setCreatedAt()\n ;\n\n $this->dm->persist($token);\n $this->dm->flush();\n // dd($token);\n return $token;\n }", "static function generateToken() {\n $token = Cache::get(\"token\", false);\n if ($token) {\n return $token;\n } else {\n $time = floor(time() / 1000);\n $token = md5(bin2hex($time));\n new Cache(\"token\", $token);\n return $token;\n }\n }", "function generate_token()\n\t{\n\t return sha1(base64_encode(openssl_random_pseudo_bytes(30)));\n\t}" ]
[ "0.89746726", "0.8172459", "0.76469284", "0.75894326", "0.7506971", "0.74467134", "0.7422734", "0.7342247", "0.7317933", "0.7258197", "0.7178431", "0.71375215", "0.7089694", "0.70638067", "0.70188123", "0.69843984", "0.69660807", "0.6947548", "0.69245243", "0.6923136", "0.69122976", "0.68968266", "0.6889278", "0.6883099", "0.6860247", "0.68598264", "0.6852122", "0.68455315", "0.684398", "0.6841184", "0.68347454", "0.6819329", "0.6819329", "0.6819329", "0.6819329", "0.6809783", "0.6781402", "0.6760158", "0.67502314", "0.6747822", "0.671966", "0.67166966", "0.67022574", "0.667709", "0.6667911", "0.6643216", "0.66122955", "0.65836495", "0.65765876", "0.6573152", "0.6568694", "0.65656245", "0.656323", "0.656258", "0.65236235", "0.65181005", "0.6509471", "0.6507337", "0.6499702", "0.6493315", "0.64782417", "0.64678264", "0.6457056", "0.64566845", "0.64316714", "0.6427789", "0.64141816", "0.64064115", "0.64063096", "0.64030635", "0.63971597", "0.6380211", "0.6379707", "0.63757724", "0.63709337", "0.63684136", "0.6364324", "0.6361084", "0.63598835", "0.63578355", "0.6352215", "0.63432574", "0.6342759", "0.6342164", "0.63183653", "0.63122225", "0.6276042", "0.62758106", "0.62543786", "0.6246512", "0.62452114", "0.6237822", "0.62308323", "0.62149155", "0.61718243", "0.6164535", "0.615988", "0.6126309", "0.61253774", "0.612345", "0.61209816" ]
0.0
-1
Change the $amount variable
function NewTaxAmount($amount ,$tax=0.06) { $amount += $amount * $tax; echo "Total amount: $amount"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAmount($amount);", "public function setAmount($amount){\n\n $this->amount = $amount;\n\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n }", "public function setAmount()\n {\n $exact = $this->getOriginalPurgeValue('amount_exact');\n $percentage = $this->getOriginalPurgeValue('amount_percentage');\n\n $this->amount = $this->is_percentage\n ? $percentage\n : $exact;\n }", "protected function setAmount()\n {\n if ( ! isset( $_POST['amount'] ) ) {\n $this->error = true;\n $this->data['error']['amount'] = 'Please enter a donation amount.';\n return;\n }\n \n $amount = trim( $_POST['amount'] );\n\n // Remove illegal characters\n $regex = '/[[^0-9.]]/';\n $value = preg_replace( $regex, '', $amount );\n \n \tif ( $value && is_numeric( $value ) && $value > 0 ) {\n $value = floor( $value * 100 ); // Set the amount in cents.\n \t\t$this->data['amount'] = $value;\n \t} else {\n \t\t$this->data['amount'] = 0;\n \t}\n }", "function amount($amount) {\n #print \"Amount: $amount<br>\\n\";\n\n list($integer, $desimal) = explode('.', trim($amount));\n $desimal = str_pad($desimal, 2, 0, STR_PAD_RIGHT);\n\n #print \"integer: $integer, desimal: $desimal<br>\\n\";\n \n #Should have been modules checksum on bank account here. \n $amount = trim($integer.$desimal);\n #print \"Amount adjusted: $amount<br>\\n\";\n return $amount;\n }", "function deposit($amount) {\n $this->balance += $amount;\n }", "public function setAmount($amount)\n {\n $this->amount = Checker::int($amount, self::AMOUNT_MIN, self::AMOUNT_MAX, \"amount\");\n }", "public function setAmount($value)\n\t{\n\t\treturn $this->set('Amount', $value);\n\t}", "function SetAmountSoldOutside ($amount = 0) {\n\t\n}", "public function setAmount($intAmount);", "public function decreaseAmount(): void;", "public function update($amount)\n {\n $currentBalance = auth()->user()->balance->amount;\n $newAmount = $currentBalance + $amount;\n auth()->user()->balance()->update(['amount' => $newAmount]);\n }", "public function setAmount($var)\n {\n GPBUtil::checkString($var, True);\n $this->amount = $var;\n\n return $this;\n }", "protected function amount($amount)\n {\n return $this->setAmount($amount);\n }", "public function setAmount($amount)\n {\n return $this->setData(self::AMOUNT, $amount);\n }", "public function setGiftcardAmount($value);", "function update_money($account,$total_money,$input_money){\n\t\t$total_money -= $input_money;\n\t\tglobal $connection;\n\t\t$query_mn = mysqli_query($connection,\"UPDATE khachhang SET `money`=$total_money WHERE account='$account'\" );\n\t\treturn $total_money;\n\t}", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setCustomGiftcardAmount($value);", "public function deposit($amount)\n {\n $this->balance += $amount;\n $this->save();\n }", "public function Amount($amount) {\n\t\t$this->Param('amount', $amount);\n\n\t\treturn true;\n\t}", "public function Amount($amount) {\n\t\t$this->Param('amount', $amount);\n\n\t\treturn true;\n\t}", "public function setAmount($amount = 0, $wholeAmt) {\n $amt = array(\n 'x_amount'=>$this->cleanAmt($amount, $wholeAmt),\n );\n $this->NVP = array_merge($this->NVP, $amt); \n }", "public function setTransactionAmount($value) \n {\n $this->_fields['TransactionAmount']['FieldValue'] = $value;\n return;\n }", "public function getAmount();", "public function getAmount();", "public function getAmount();", "public function getAmount();", "public function setAmount($value) \n {\n $this->_fields['Amount']['FieldValue'] = $value;\n return $this;\n }", "public function setAmountAttribute($input)\n {\n $this->attributes['amount'] = $input ? $input : null;\n }", "public function setAmount($var)\n {\n GPBUtil::checkInt64($var);\n $this->amount = $var;\n\n return $this;\n }", "public function setBaseAmount($amount) {\r\n $this->baseAmount = NumberDataTypeHelper::truncate(floatval($amount), 2);\r\n }", "public function getamount()\n {\n return $this->amount;\n }", "public function setAmountAttribute($input)\n { \n $this->attributes['amount'] = $input ? $input : null;\n }", "private function sellTrasactionAddsMoney(){\n\n }", "public function setAmountArticle($amountArticle){\n $this->amountArticle = $amountArticle;\n }", "function Give_Gold($amount = 0) {\r\n\t\tglobal $character, $gameinstance;\r\n\t\tif(isset($amount) && is_numeric($amount) && $amount >= 0) \r\n\t\t{\r\n\t\t\tdbn(__FILE__,__LINE__,\"update ${gameinstance}_characters set gold = gold + '$amount' where login_id = '$character[login_id]'\");\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tSystemMessage(CHAR_CANNOT_GIVE_GOLD);\r\n\t\t}\r\n\t}", "public function getAmount(): string\n {\n return $this->amount;\n }", "public function deposit($amount)\n {\n $this->increase($amount);\n \n return;\n }", "public function amount($value) {\n $this->annotations['amount'] = $value;\n return $this;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n\n return $this;\n }", "public function setAmount($amount)\n {\n $this->_amount = (int) $amount;\n return $this;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "function update_user_credits_by_amount($id_user='', $amount=''){\t\n\t\ttry{\n\t\t\t$this->db->set('credits','credits+'.$amount, FALSE);\n\t\t\t$this->db->where('id', $id_user);\n\t\t\t$result = $this->db->update('user');\n\t\t\tif($this->db->affected_rows()>0){\n\t\t\t\treturn TRUE;\n\t\t\t}else{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}catch(Exception $e){\n\t\t\tlog_message('debug','Error en la función update_user_credits_by_amount');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function Take_Gold($amount = 0) {\r\n\t\tglobal $character, $gameinstance;\r\n\t\tif(isset($amount) && is_numeric($amount) && $amount >= 0 && $amount <= $character['gold']) \r\n\t\t{\r\n\t\t\tdbn(__FILE__,__LINE__,\"update ${gameinstance}_characters set gold = gold - '$amount' where login_id = '$character[login_id]'\");\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tSystemMessage(CHAR_NOT_ENOUGH_GOLD);\r\n\t\t}\r\n\t}", "public function editPriceMoney(){\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public function paid()\n {\n $this->paidAmount = $this->price;\n }", "public function setAmount($balance)\n {\n $this->amount = (int) $balance;\n }", "public function getAmount(): float;", "public function getAmount()\r\n {\r\n return $this->amount;\r\n }", "public function getAmount()\r\n {\r\n return $this->amount;\r\n }", "public function getAmount()\r\n {\r\n return $this->amount;\r\n }", "public function getAmount()\r\n {\r\n return $this->amount;\r\n }", "function charge_deposit($acc_number,$sum)\n\t{\n\t $this->db->query(\"UPDATE pamm_summaries SET deposit = deposit+$sum WHERE acc_number=$acc_number\");\n\t}", "public function setAmount(string $amount)\r\n {\r\n $this->amount = $amount;\r\n\r\n return $this;\r\n }", "public function addExpense($amount)\n {\n $account = Account::findOne([\n 'username' => $this->getCurrentUser()->username,\n ]);\n\n $account->balance -= $amount;\n\n $account->update(true, ['balance']);\n }", "public function amount() {\r\n\t\treturn $this->amount;\r\n\t}", "public function increment() {\n\t\t$this->amount++;\n\t}", "public function setBaseSubtotal($amount);", "function setScore($amount = 0)\n\t{\n\t\treturn $this->score += $amount;\n\t}", "public function setAmount($value)\n {\n $this->_fields['Amount']['FieldValue'] = $value;\n return $this;\n }", "public function setBaseGrandTotal($amount);", "function add_money($account,$total_money,$input_money){\n\t\t$total_money += $input_money;\n\t\tglobal $connection;\n\t\t$query_mn = mysqli_query($connection,\"UPDATE khachhang SET `money`=$total_money WHERE account='$account'\" );\n\t\treturn $total_money;\n\t}", "public function setAmount($amount)\n {\n $this->_amount = $amount;\n return $this;\n }", "public function setBaseDiscountAmount($amount);", "public function updated(HoldAmount $holdAmount)\n {\n //\n }", "public function setSubtotal($amount);", "public function setChargesAttribute($amount)\n {\n $this->attributes['charges'] = formatAmount($amount);\n }", "public function getAmount(): string;", "public function getAmount(): int\n {\n return $this->amount;\n }", "public function setFreeAfterAmountAttribute($amount)\n {\n $this->attributes['free_after_amount'] = formatAmount($amount);\n }", "public function update_finance_total( $amount )\n\t{\n\t\t$new_total = $this->finance_total + $amount;\n\t\n\t\t//Insert the new user into the database.\n\t\t$mysqlConnection = new Mysql;\n\t\t\n\t\t$column_headers = array( \"finance_total\" );\n\t\t\n\t\t$values = array( $new_total );\n\t\t\n\t\t$queryDescription = \"Update User finance total\";\n\t\t\n\t\tif( $mysqlConnection->mysql_update( \"user\", $column_headers, $values, \"ID\", $this->get_id(), $queryDescription ) )\n\t\t{\t\t\n\t\t\t//Updated the local finance total\n\t\t\t$this->finance_total = $new_total;\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function setAmount($amount)\r\n {\r\n $this->amount = $amount;\r\n\r\n return $this;\r\n }", "public function setAmountAttribute($input)\n {\n if ($input != '') {\n $this->attributes['amount'] = $input;\n } else {\n $this->attributes['amount'] = null;\n }\n }", "public function setBaseShippingAmount($amount);", "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }" ]
[ "0.7563256", "0.7428859", "0.7342833", "0.7342833", "0.7246978", "0.7155428", "0.71304965", "0.7112567", "0.70537066", "0.68575484", "0.68132454", "0.6685844", "0.6650531", "0.6585632", "0.65802556", "0.6545684", "0.6535467", "0.6507566", "0.64750457", "0.6467707", "0.6467707", "0.6467707", "0.6467707", "0.64676964", "0.6459759", "0.64186174", "0.6411221", "0.6411221", "0.6372727", "0.6355496", "0.6313491", "0.6313491", "0.6313491", "0.6313491", "0.62882626", "0.62876654", "0.6280736", "0.6271028", "0.6269586", "0.6266666", "0.6265544", "0.6261629", "0.6261099", "0.6240654", "0.62309664", "0.62302065", "0.62246627", "0.6219581", "0.61974317", "0.6178392", "0.616866", "0.6149211", "0.6142396", "0.6125625", "0.61251044", "0.61199844", "0.61199844", "0.61199844", "0.61199844", "0.6110174", "0.6106007", "0.6105342", "0.60965383", "0.60929334", "0.6092479", "0.6077947", "0.6057082", "0.60402375", "0.6038652", "0.6029041", "0.60174453", "0.6007816", "0.59968555", "0.5992914", "0.5990318", "0.597064", "0.59609026", "0.5952319", "0.59502685", "0.5921329", "0.5919544", "0.59113085", "0.59113085", "0.59113085", "0.59113085", "0.5908971", "0.5908971", "0.5908971", "0.5908971", "0.5908971", "0.5908971", "0.5908971", "0.5908971", "0.5908971", "0.5908971", "0.5908971", "0.5908971", "0.5908971", "0.5908971", "0.5908971" ]
0.63678396
29
Instantiate a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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->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 $this->createClass('controller');\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\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 }", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "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 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}", "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}", "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 __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "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 }", "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 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 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 }", "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($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}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\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 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 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}", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 __construct()\n {\n $this->controller = new DHTController();\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 }", "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 }", "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 }", "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 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 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 function createController( ezcMvcRequest $request );", "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 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}", "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() {\n if (isset($_GET['rc'])) {\n $this->url = rtrim($_GET['rc'], '/'); // We don't want no empty arg\n $this->args = explode('/', $this->url);\n }\n \n // Load index controller by default, or first arg if specified\n $controller = ($this->url === null) ? 'null' : array_shift($this->args);\n $this->controllerName = ucfirst($controller);\n\n // Create controller and call method\n $this->route();\n // Make the controller display something\n $this->controllerClass->render();\n }", "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 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 __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\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}", "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 }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "public function __construct(){\n\t\t$url = $this->processUrl();\n\n\t\t//this if statement unsets the defaultController so we can use the one that is being talked to.\n\t\tif(file_exists('../app/controllers/'.$url[0].'.php')){\n\t\t\t$this->defaultController = $url[0];\n\t\t\tunset($url[0]);\n\t\t}\n\n\t\trequire_once('../app/controllers/' .$this->defaultController.'.php');\n\n\t\t$this->defaultController = new $this->defaultController;//instantiate and make it an object\n\n\t\tif(isset($url[1])){\n\t\t\tif(method_exists($this->defaultController,$url[1])){\n\t\t\t$this->defaultMethod = $url[1];\n\t\t\tunset($url[1]);\n\t\t\t}\t\n\t\t}\n\n\t\t\n\t\t$this->parameters = $url ? array_values($url):[];\n\t\t// print_r($this->parameters);\n\n\t\tcall_user_func_array([$this->defaultController,$this->defaultMethod],$this->parameters);\n\t}", "protected function initializeController() {}", "private function loadCurrentController() {\r\n\t\t$controller_name = ucfirst($this->url[0]) . CONTROLLER_SUFFIX;\r\n\t\t$controller_path = CONTROLLERS_PATH . $controller_name . '.php';\r\n\t\t\r\n\t\tif (file_exists($controller_path)) {\r\n\t\t\trequire $controller_path;\r\n\t\t} else { //Controller not found.\r\n\t\t\t$this->error(); \r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$this->controller = new $controller_name;\r\n\t\t} catch (Exception $e) { //Any error.\r\n\t\t\t$msg = $e->getMessage();\r\n\t\t\tif ($msg == \"\")\r\n\t\t\t\t$msg = \"An error occuring during execution\";\r\n\t\t\t\r\n\t\t\t$this->error($msg . \" ( \" . $e->getFile() . \": line \" . $e->getLine() . \")\");\r\n\t\t}\r\n\t}", "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 }", "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 }", "public function show()\n {\n new $this->controller();\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 __construct()\n {\n $this->dataController = new DataController;\n }", "public function getController( );", "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 __construct()\n {\n $url = $this->getUrl();\n // Look in controllers folder for first value and ucwords(); will capitalise first letter \n if (isset($url[0]) && file_exists('../app/controllers/' . ucwords($url[0]) . '.php')) {\n $this->currentController = ucwords($url[0]); // Setting the current controllers name to the name capitilised first letter\n unset($url[0]); \n }\n\n // Require the controller\n require_once '../app/controllers/' . $this->currentController . '.php';\n // Taking the current controller and instantiating the controller class \n $this->currentController = new $this->currentController;\n // This is checking for the second part of the URL\n if (isset($url[1])) {\n if (method_exists($this->currentController, $url[1])) { // Checking the seond part of the url which is the corresponding method from the controller class\n $this->currentMethod = $url[1];\n unset($url[1]);\n }\n }\n\n // Get params, if no params, keep it empty\n $this->params = $url ? array_values($url) : []; \n\n // Call a callback with array of params\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "public function __construct()\n {\n $url = $this->getUrl();\n /**Tomamos el primer valor para el Controlador y \n * verificamos si existe el archivo.\n * Ponemos en Mayúscula primer letra de la Palabra\n **/\n \n if (file_exists('../app/controllers/' . ucwords($url[0]) . 'Controller.php')) {\n /**Si existe seteamos el controlador y blanqueamos \n * la primer posición del array $url.\n **/\n $this->currentController = ucwords($url[0]).'Controller';\n unset($url[0]);\n }\n\n /**\n * Requerimos el Controlador y lo Intanciamos.\n */\n require_once '../app/controllers/' . $this->currentController.'.php';\n $this->currentController = new $this->currentController;\n\n /**\n * Verificamos la segunda parte de la url.\n * Para ver si estamos pasando un método.\n */\n if (isset($url[1])) {\n /**Verificamos si el Método existe en la clase.\n * Si existe o Seteamos.\n * Blanqueamos la posición del array url.\n */\n if (method_exists($this->currentController, $url[1])) {\n $this->currentMethod = $url[1];\n unset($url[1]);\n }\n }\n\n /**\n * Verificamos si el array url tiene valores.\n * Si tiene seteamos params, sino lo dejamos vacío.\n */\n $this->params = $url ? array_values($url) : [];\n\n /**\n * Llamamos al método con un array de parámetros.\n */\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "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 }", "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 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 }", "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 __construct() {\n\t\tparent::__construct();\n\t\t$this->view = new ViewController();\t\t\n\t}", "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}", "protected function loadController($class)\n {\n /** @var Controller $controller */\n $controller = new $class($this->config, $this->request);\n\n $controller->init();\n\n return $controller;\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\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 }", "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 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 createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "function &getInstance (&$controller) {\n\n\t\tstatic $instance;\n\t\tif (!isset($instance)) {\n\n\t\t\t$c = __CLASS__;\n\t\t\t$instance = new $c();\n\t\t\t$instance->_controller =& $controller;\n\t\t}\n\t\treturn $instance;\n\t}", "public function _construct($controller,$view){\r\n $this->controller = $controller;\r\n }", "public function __construct() {\n $this->twitterController = new TwitterController;\n\t}", "public function __construct()\n {\n // echo \"application 호출 성공\";\n // application 의 가장 중요한 역활은 url routing 입니다.\n // url을 받으면 다음과 같은 방식으로 URL을 분석하여\n // 배엘에 저장을 하게 됩니다.\n\n $url = \"\";\n\n // 1. url이 있는지 확인 합니다.\n if (isset($_GET['url'])) {\n $url = rtrim($_GET['url'],'/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n }\n\n // 2. URL을 분석합니다.\n $params = explode('/', $url);\n $counts = count($params);\n\n $param['menu'] = (!isset($params[0]) || $params[0] == '') ? \"home\" : $params[0];\n $param['action'] = (!isset($params[1]) || $params[1] == '') ? \"index\" : $params[1];\n $param['catagory'] = (!isset($params[2]) || $params[2] == '') ? \"story\" : $params[2];\n $param['contentNo'] = (!isset($params[3]) || $params[3] == '') ? 1 : $params[3];\n $param['pageNo'] = (!isset($params[4]) || $params[4] == '') ? 1 : $params[4];\n\n // 3. 해당 URL을 기준으로 controller를 호출합니다.\n $controllerName = '\\application\\controllers\\\\'.$param['menu'].'controller';\n new $controllerName($param['action'], $param['catagory'], $param['contentNo'], $param['pageNo']);\n //new \\application\\controllers\\BoardController($param['action'], $param['catagory'], $param['contentNo'], $param['pageNo']);\n }", "public function loadController($controller) {\n\t\t$name = (!preg_match('#Controller$#', $controller)) ? $controller.'Controller' : $controller;\n\t\t$file = __APP_PATH . DS . 'controller' . DS . $name . '.php';\n\t\tif(!file_exists($file)){\n\t\t\tthrow new Exception ('Le controller '.$controller.' n\\'existe pas dans '.$file);\n\t\t}\n\t\trequire $file; \n\t\treturn new $name(); \n\t}", "function Controller()\n\t{\t\t\n\t\t$this->method = \"showView\";\n\t\tif (array_key_exists(\"method\", $_REQUEST))\n\t\t\t$this->method = $_REQUEST[\"method\"];\n\t\t\t\t\n\t\t$this->icfTemplating = new IcfTemplating();\n\t\t$this->tpl =& $this->icfTemplating->getTpl();\n\t\t$this->text =& $this->icfTemplating->getText();\t\t\n\t\t$this->controllerMessageArray = array();\n\t\t$this->pageTitle = \"\";\n\t\t$this->dateFormat = DateFormatFactory::getDateFormat();\n\t\t$this->controllerData =& $this->newControllerData();\n\t}", "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($objController) {\n //Assign Controller for template configuration\n $this->objController = $objController;\n \n //Assign Request Param\n $this->request = $this->objController->getRequest();\n }", "function load_controller($controller) {\n require_once \"{$this->trails_root}/controllers/{$controller}.php\";\n $class = Trails_Inflector::camelize($controller) . 'Controller';\n if (!class_exists($class)) {\n throw new Trails_UnknownController(\"Controller missing: '$class'\");\n }\n return new $class($this);\n }", "public function AController() {\r\n\t}", "static function start()\n {\n $controller_name = 'Main';\n $action_name = 'Index';\n\n $routes = explode('/', $_SERVER['REQUEST_URI']);\n\n // get the name of the controller\n if (!empty($routes[1])) {\n $controller_name = ucfirst($routes[1]);\n }\n\n // get the name of the action\n if (!empty($routes[2])) {\n $action_name = ucfirst($routes[2]);\n }\n\n // add prefixes\n $controller_name = 'Controller' . $controller_name;\n $action_name = 'action' . $action_name;\n\n // take file with controller class\n $controller_file = $controller_name . '.php';\n $controller_path = \"../app/controllers/\" . $controller_file;\n\n try {\n if (!file_exists($controller_path)) {\n throw new \\Exception('Could not find file');\n }\n include \"../app/controllers/\" . $controller_file;\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n // create a controller\n $controller_name = \"App\\\\Controllers\\\\\" . $controller_name;\n $controller = new $controller_name();\n $action = $action_name;\n\n try {\n if (!method_exists($controller, $action)) {\n throw new \\Exception('Could not find method');\n }\n // call the controller action\n $controller->$action();\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n }", "public function testCreateTheControllerClass()\n {\n $controller = new DiceGame();\n $this->assertInstanceOf(\"\\Ampheris\\ampController\\DiceGame\", $controller);\n }", "private function getControllerToRun()\n {\n $routing = $this->getRouting();\n $module = strtolower($this->urlParams[self::PARAM_CONTROLLER]);\n \n $module = strtr($module, '-', '_');\n \n // Check if we have routing to this module\n if (isset($routing[$this->apiType][$module])) {\n $controllerName = $routing[$this->apiType][$module];\n } else {\n // Call default controller\n $controllerName = $routing[$this->apiType][self::DEFAULT_CONTROLLER_ROUTE_NAME];\n }\n \n if (class_exists($controllerName)) {\n return new $controllerName();\n }\n \n self::debug(\"Fatal error: Controller ({$controllerName}) not found\");\n }", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "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 static function get(){ \n if (self::$instance === null) {\n self::$instance = new ArticleController();\n }\n return self::$instance;\n }", "function __construct(Controller $controller)\n {\n $this->con = $controller;\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 function __construct() {\n // filter controller, action and params\n $url = filter_input(INPUT_GET, 'url', FILTER_SANITIZE_URL); // $_GET['url']\n $params = explode('/', trim($url, '/'));\n\n // store first and seccond params, removing them from params list\n $controller_name = ucfirst(array_shift($params)); // uppercase classname\n $action_name = array_shift($params);\n\n require_once APP . 'config.php';\n\n // default controller and action\n if (empty($controller_name)) {\n $controller_name = AppConfig::DEFAULT_CONTROLLER;\n }\n if (empty($action_name)) {\n $action_name = AppConfig::DEFAULT_ACTION;\n }\n\n // load requested controller\n if (file_exists(APP . \"Controller/$controller_name.php\")) {\n require CORE . \"Controller.php\";\n require CORE . \"Model.php\";\n require APP . \"Controller/$controller_name.php\";\n $controller = new $controller_name();\n\n // verify if action is valid\n if (method_exists($controller, $action_name)) {\n call_user_func_array(array($controller, $action_name), $params);\n $controller->render(\"$controller_name/$action_name\"); // skipped if already rendered\n } else {\n // action not found\n $this->notFound();\n }\n } else {\n // controller not found\n $this->notFound();\n }\n }", "function __construct() {\n //con esta linea se hereda el constructor de la clase Controller\n parent::__construct();\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 }", "protected function initDefaultController() {\n\t\tif (!class_exists(\"HomeController\")) return;\n\t\t$this->controller = new HomeController();\n\t}", "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}", "static function invoke_controller()\n\t{\n\t\t// Try to fetch requested controller\n\t\t$controller_path = APPPATH.'controllers/'.self::$directory.self::$controller_name.'.php';\n\t\tif (is_readable($controller_path))\n\t\t{\n\t\t\trequire($controller_path);\n\n\t\t\t// Check if the controller class is defined\n\t\t\tif (!class_exists(self::$controller_name))\n\t\t\t\tSystem::error('controller <code>'.self::$controller_name.'</code> is not defined');\n\n\t\t\t// Check if the method exists in the controller\n\t\t\tif (!method_exists(self::$controller_name, self::$method_name))\n\t\t\t\tSystem::error('controller <code>'.self::$controller_name.'</code> has no method named <code>'.self::$method_name.'</code>');\n\n\t\t\t// Create controller instance and call the method\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$reflection_method = new ReflectionMethod(self::$controller_name, self::$method_name);\n\n\t\t\t\t$argc = count(self::$segments);\n\t\t\t\tif ($reflection_method->getNumberOfRequiredParameters() > $argc)\n\t\t\t\t\tSystem::error('Not enough parameters for calling <code>'.self::$controller_name.'::'.self::$method_name.'()</code>,\n\t\t\t\t\t'.$argc.' provided, expected at least '.$reflection_method->getNumberOfRequiredParameters());\n\n\t\t\t\tif ($reflection_method->getNumberOfParameters() < $argc)\n\t\t\t\t\tSystem::error('Too many parameters for calling <code>'.self::$controller_name.'::'.self::$method_name.'()</code>,\n\t\t\t\t\t'.$argc.' provided, expected '.$reflection_method->getNumberOfParameters());\n\n\t\t\t\t$reflection_method->invokeArgs(new self::$controller_name, self::$segments);\n\t\t\t}\n\t\t\tcatch (ReflectionException $e)\n\t\t\t{\n\t\t\t\tSystem::error($e->getMessage());\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function controller()\n\t{\n\t\n\t}", "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 }", "public function __construct()\n {\n $this->art = new Article();\n $this->img = new Image();\n $this->article = new ArticlesController($this->art);\n $this->image = new ImagesController();\n $this->landing = new ConfigurationsController();\n $this->cover = new CoversController();\n $this->video = new Video();\n }" ]
[ "0.777219", "0.74175864", "0.7365347", "0.7161617", "0.71488875", "0.7053028", "0.7037596", "0.7008145", "0.6914284", "0.6856805", "0.6833574", "0.68020225", "0.6789942", "0.67851764", "0.6763653", "0.67613924", "0.6707612", "0.66816086", "0.666981", "0.6644377", "0.66443557", "0.66331285", "0.6587013", "0.6582449", "0.657619", "0.65642136", "0.65553606", "0.65407467", "0.65269923", "0.65173817", "0.65052104", "0.65044594", "0.64777416", "0.6476944", "0.64733714", "0.64373344", "0.6437315", "0.64220643", "0.6415557", "0.64147025", "0.6410672", "0.64040947", "0.63961077", "0.6391195", "0.63733476", "0.63691664", "0.63681656", "0.63348913", "0.6329357", "0.6315353", "0.62839705", "0.62836254", "0.62825924", "0.6254155", "0.6238797", "0.6227655", "0.6212603", "0.61798495", "0.61636174", "0.61523855", "0.6151999", "0.6150646", "0.614906", "0.6135299", "0.61322194", "0.6126879", "0.6121881", "0.61056924", "0.608979", "0.60860157", "0.60788417", "0.6072328", "0.6069952", "0.6048151", "0.60335344", "0.602988", "0.6026396", "0.60219675", "0.60045177", "0.59973705", "0.59894603", "0.5988566", "0.59721917", "0.5967905", "0.5962622", "0.59620655", "0.59533364", "0.5935861", "0.5934194", "0.5932222", "0.59310645", "0.5928054", "0.5925063", "0.59240454", "0.5922811", "0.59223795", "0.5921198", "0.59209746", "0.5902591", "0.5901534", "0.5900427" ]
0.0
-1
Display a listing of the resource.
public function index() { $deliverers = Deliverer::all(); $columns = Deliverer::getTableColumns(); return view('deliverers.index', ['deliverers'=>$deliverers, 'columns'=>$columns, 'keys'=>Deliverer::getFilterKeys()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('deliverers.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $validator = Validator::make($request->all(), [ 'first_name' => 'required|max:25', 'last_name' => 'required|max:50', 'email' => 'required|email|unique:App\Deliverer,email', 'password' => 'required', ]); if ($validator->fails()) { return back() ->withErrors($validator) ->withInput(); } $request->merge([ 'password' => Hash::make($request->password), 'created_at' => now(), 'updated_at' => now(), ]); Deliverer::create($request->all()); return redirect()->route('deliverers.index') ->withSuccess('Deliverer creado correctamente.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.5718969
68
Show the form for editing the specified resource.
public function edit($id) { return view('deliverers.edit', ['deliverer' => Deliverer::findOrFail($id)]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $validator = Validator::make($request->all(),[ 'first_name' => 'required|max:25', 'last_name' => 'required|max:50', 'email' => 'required|email' ]); if ($validator->fails()) { return back() ->withErrors($validator) ->withInput(); } $deliverer = Deliverer::findOrFail($id); $oldPass = Hash::make($request->old_pass); if ($oldPass == $deliverer->password) { $request->merge([ 'password' => Hash::make($request->password) ]); $deliverer->update($request->except(['old_pass'])); } else { $deliverer->update($request->except(['password', 'old_pass'])); } $deliverer->touch(); return back()->withSuccess('Deliverer actualizado correctamente!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $deliverer = Deliverer::findOrFail($id); $deliverer->delete(); return redirect()->route('deliverers.index') ->withSuccess('Deliverer eliminado correctamente!'); }
{ "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
Funcion para agregar las noticias
public function agregar_noticia_controlador(){ $not_titulo = mainModel::limpiar_cadena($_POST['noticia_titulo']); $not_imagen = mainModel::limpiar_cadena($_FILES['imagen']['name']); $not_drescripcion = mainModel::limpiar_cadena($_POST['descripcion']); $dir = SEVERURL.'assets/imagenes/'; if ($_FILES['imagen']['size'] > 2000000) { $alerta = [ 'Alerta' => 'simple', 'Titulo'=>'Ocurrio un error inesperado', 'Texto'=>'Solo se permiten archivos menores a 2 MB', 'Tipo'=>'error' ]; return mainModel::sweetalert($alerta); } if ($_FILES['imagen']['type'] != 'image/png') { $alerta = [ 'Alerta' => 'simple', 'Titulo'=>'Ocurrio un error inesperado', 'Texto'=>'Solo se permiten archivos de tipo imagen', 'Tipo'=>'error' ]; return mainModel::sweetalert($alerta); } /*if (!move_uploaded_file($_FILES['imagen']['tmp_name'], $dir.$not_imagen)) { $alerta = [ 'Alerta' => 'simple', 'Titulo'=>'Ocurrio un error inesperado', 'Texto'=>'Error al subir archivo', 'Tipo'=>'error' ]; return mainModel::sweetalert($alerta); }*/ $notDatos = [ 'titulo' => $not_titulo, 'imagen' => $not_imagen, 'descripcion' => $not_drescripcion ]; $respuesta = NoticiasModelo::agregar_noticia_modelo($notDatos); if ($respuesta->rowCount() >= 1) { $alerta = [ 'Alerta' => 'limpiar', 'Titulo'=>'Bien hecho!', 'Texto'=>'La noticia se registró exitosamente', 'Tipo'=>'success' ]; }else{ $alerta = [ 'Alerta' => 'simple', 'Titulo'=>'Ocurrio un error inesperado', 'Texto'=>'No se pudo registrar la noticia', 'Tipo'=>'error' ]; } return mainModel::sweetalert($alerta); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function SaveNotasImagenes() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtIdNota) $this->objNotasImagenes->IdNota = $this->txtIdNota->Text;\n\t\t\t\tif ($this->lstIdImagenObject) $this->objNotasImagenes->IdImagen = $this->lstIdImagenObject->SelectedValue;\n\t\t\t\tif ($this->txtPredeterminada) $this->objNotasImagenes->Predeterminada = $this->txtPredeterminada->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the NotasImagenes object\n\t\t\t\t$this->objNotasImagenes->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "private function setNoticia($id_noticia) {\n\n if(isset($_POST[\"comentario\"])) {\n $this -> crearComentario($id_noticia);\n }\n\n /* Recuperación de información */\n $datos = $this->modelo->getValuesBy(\"*\", \"id=$id_noticia\")->fetch(PDO::FETCH_ASSOC);\n $imagenes = $this -> setImgs($id_noticia);\n $etiquetas = $this -> setEtiquetas($id_noticia);\n $comentarios = $this -> setComentarios($id_noticia);\n $parrafos = explode(\"##\", $datos[\"texto\"]);\n\n /* Actualización del contador de visitas */\n $visitas = $datos[\"visitas\"] + 1;\n $this->modelo->updateValues(\"visitas=$visitas\", \"id=$id_noticia\");\n\n /* Construcción de la estructura de datos */\n $temp = array(\n \"id\" => $datos[\"id\"],\n \"titulo\" => $datos[\"titular\"],\n \"autor\" => $datos[\"autor\"],\n \"fecha\" => date('H:i:s -- d-m-Y', strtotime($datos[\"fecha\"])),\n \"visitas\" => $datos[\"visitas\"],\n \"enlace\" => $datos[\"link\"],\n \"texto\" => $parrafos,\n \"imagen\" => 'media/imgs/noticias/' . $imagenes,\n \"etiquetas\" => $etiquetas,\n \"comentarios\" => $comentarios\n );\n\n return array('noticia' => $temp);\n }", "public function add_itens_nota($id_nota) {\n\t\t$controle = $this->notas_model->add_item($id_nota);\n\t\tif ($controle === FALSE) {\n\t\t# Bloco de auditoria\n\t\t\t$auditoria = array(\n\t\t\t\t\t'auditoria' => \"Tentativa de incluir novo item na nota fiscal ID n° $id_nota\",\n\t\t\t\t\t'idmilitar' => $this->session->userdata['id_militar'], #Checar quem está acessando e permissões\n\t\t\t\t\t'idmodulo' => $this->session->userdata['sistema']\n\t\t\t);\n\t\t\t$this->clog_model->audita($auditoria, 'inserir');\n\t\t# .Bloco de auditoria\n\t\t\t$this->session->set_flashdata('mensagem', array('type' => 'alert-danger', 'msg' => 'Erro ao adicionar o item a nota, por favor, verifique se o preenchimento do formulário está correto!'));\n\t\t}\n\t\telse {\n\t\t\t# Bloco de auditoria\n\t\t\t$info_nota = $this->notas_model->dados_notas($id_nota);\n\t\t\t$auditoria = array(\n\t\t\t\t\t'auditoria' => \"Incluiu novo item($controle->modelo) na nota fiscal de n° $info_nota->numero, expedida pela $info_nota->empresa\",\n\t\t\t\t\t'idmilitar' => $this->session->userdata['id_militar'], #Checar quem está acessando e permissões\n\t\t\t\t\t'idmodulo' => $this->session->userdata['sistema']\n\t\t\t);\n\t\t\t$this->clog_model->audita($auditoria, 'inserir');\n\t\t\t# .Bloco de auditoria\n\t\t\t$this->session->set_flashdata('mensagem', array('type' => 'alert-success', 'msg' => 'Item adicionado com sucesso!'));\n\t\t}\n\t\tredirect(\"clog/notas/itens_nota/$id_nota\");\n\t}", "function generarNotaPxp()\n {\n $this->objFunc = $this->create('MODNota');\n $this->res = $this->objFunc->generarNotaPxp($this->objParam);\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "function maquetacioItemsNotHoudini($model, $columna, $nomCaixa, $tipusCaixa, $ordre, $estilCaixa, $estilLlistat, $estilElement, $id_registre, $id_newsletter, $registre, $pathEditora)\n{\n global $CONFIG_URLBASE, $CONFIG_URLUPLOADIM, $CONFIG_estilsElement;\n\n $parametres = '<input type=\"hidden\" name=\"newsletter['.htmlspecialchars($model).']['.htmlspecialchars($columna).']['.htmlspecialchars($nomCaixa).']['.htmlspecialchars($tipusCaixa).'][]['.htmlspecialchars($estilCaixa).']['.htmlspecialchars($estilLlistat).']['.htmlspecialchars($estilElement).']\" value=\"'.htmlspecialchars($id_registre).'\" />';\n\n $imatge = $registre['IMATGE1'] != '' ? '<img src=\"' . $CONFIG_URLUPLOADIM . $registre['IMATGE1'] . '\" style=\"width: 159px;\" class=\"left\"/>' : '';\n return '<li id=\"noth_reg' . $id_registre . '\" class=\"box removable stylable clearfix '.$estilElement.'\">\n\t\t\t'.$parametres.'\n\t\t\t<div class=\"spacer clearfix\">\n\t\t\t\t'. $imatge .'\n\t\t\t\t<h4><a href=\"'.$CONFIG_URLBASE . $pathEditora . '/' . $registre['ID'] . '/' . $registre['URL_TITOL'].'\" rel=\"external\">'.$registre['TITOL'].'</a></h4>\n\t\t\t\t<p>'.$registre['RESUM'].'</p>\n\t\t\t</div>\n\t\t</li>';\n}", "protected function setNoticesExist() {}", "private function setNoticia($noticia){\n $mObject = array();\n if (isset($noticia->titulo))\n $mObject['titulo'] = $noticia->titulo;\n if (isset($noticia->texto)) \n $mObject['texto'] = $noticia->texto;\n if (isset($noticia->data_hora_pub)) \n $mObject['data_hora_pub'] = new MongoDate($noticia->data_hora_pub->getTimestamp());\n if (isset($noticia->data_hora_destaque))\n $mObject['data_hora_destaque'] = new MongoDate($noticia->data_hora_destaque->getTimestamp());\n if (isset($noticia->img_mini))\n $mObject['img_mini'] = $noticia->img_mini;\n else\n $mObject['img_mini'] = NULL;\n if (isset($noticia->img_banner))\n $mObject['img_banner'] = $noticia->img_banner;\n else\n $mObject['img_banner'] = NULL;\n if (isset($noticia->tags) && sizeof($noticia->tags)>0) \n $mObject['tags'] = $noticia->tags;\n if (isset($noticia->fotos) && sizeof($noticia->fotos)>0) \n $mObject['fotos'] = $noticia->fotos;\n if (isset($noticia->anexos) && sizeof($noticia->anexos)>0) \n $mObject['anexos'] = $noticia->anexos;\n return $mObject;\n }", "public function getNoticias()\n {\n return $this->noticias;\n }", "public function setNota($nota){\n $this->nota = $nota;\n }", "private function processarNotificacoes() {\n\n /**\n * Objeto assunto e mensagem padrao\n */\n $oMensageriaLicenca = new MensageriaLicenca();\n\n /**\n * Define o sistema para mensageria, pelo nome do municipio\n * - db_config.munic\n */\n $oInstituicao = new Instituicao();\n $oPrefeitura = @$oInstituicao->getDadosPrefeitura();\n $sSistema = 'e-cidade.' . strtolower($oPrefeitura->getMunicipio());\n\n foreach ($this->aLicencas as $oLicenca) {\n\n $iCodigoLicencaEmpreendimento = $oLicenca->getSequencial();\n\n if ($oLicenca->getParecerTecnico()->getTipoLicenca()->getSequencial() != 3) {\n\n $iCodigoLicencaEmpreendimento = $oLicenca->getParecerTecnico()->getCodigoLicencaAnterior();\n if (is_null($iCodigoLicencaEmpreendimento)) {\n $iCodigoLicencaEmpreendimento = $oLicenca->getSequencial();\n }\n }\n\n $oDataVencimento = new DBDate( $oLicenca->getParecerTecnico()->getDataVencimento() );\n\n $aVariaveisLicenca = array(\n\n '[nome_emp]' => $oLicenca->getParecerTecnico()->getEmpreendimento()->getNome(),\n '[codigo_emp]' => $oLicenca->getParecerTecnico()->getEmpreendimento()->getSequencial(),\n '[numero]' => $iCodigoLicencaEmpreendimento,\n '[tipo]' => $oLicenca->getParecerTecnico()->getTipoLicenca()->getDescricao(),\n '[data]' => $oDataVencimento->getDate( DBDate::DATA_PTBR ),\n '[processo]' => $oLicenca->getParecerTecnico()->getProtProcesso()\n );\n\n\n $sAssuntoLicenca = strtr($oMensageriaLicenca->getAssunto(), $aVariaveisLicenca);\n $sMensagemLicenca = strtr($oMensageriaLicenca->getMensagem(), $aVariaveisLicenca);\n $oDBDateAtual = new DBDate(date('Y-m-d'));\n $iDiasVencimento = DBDate::calculaIntervaloEntreDatas(new DBDate($oLicenca->getParecerTecnico()->getDataVencimento()), $oDBDateAtual, 'd');\n $aDestinatarios = array();\n $aUsuarioNotificado = array();\n\n foreach ($this->aCodigoMensageriaLicencaUsuario as $iCodigoMensageriaLicencaUsuario) {\n\n $oMensageriaLicencaUsuario = MensageriaLicencaUsuarioRepository::getPorCodigo($iCodigoMensageriaLicencaUsuario);\n $oUsuarioSistema = $oMensageriaLicencaUsuario->getUsuario();\n\n /**\n * Dias para vencer maior que os dias configurados\n */\n if ($iDiasVencimento > $oMensageriaLicencaUsuario->getDias() ) {\n continue;\n }\n\n /**\n * Salva acordo como ja notificado para usuario e dia\n * mensagerialicencaprocessados\n */\n $this->salvarLicencaProcessado($iCodigoMensageriaLicencaUsuario, $oLicenca->getSequencial());\n\n /**\n * Usuario ja notificado com dia menor que o atual\n */\n if (in_array($oUsuarioSistema->getCodigo(), $aUsuarioNotificado)) {\n continue;\n }\n\n $aDestinatarios[] = array('sLogin' => $oUsuarioSistema->getLogin(), 'sSistema' => $sSistema);\n $aUsuarioNotificado[] = $oUsuarioSistema->getCodigo();\n }\n\n /**\n * Licenca sem usuarios para notificar\n */\n if (empty($aDestinatarios)) {\n continue;\n }\n\n $sAssunto = str_replace('[dias]', $iDiasVencimento, $sAssuntoLicenca);\n $sMensagem = str_replace('[dias]', $iDiasVencimento, $sMensagemLicenca);\n $this->enviarNotificacao($sAssunto, $sMensagem, $sSistema, $aDestinatarios);\n }\n\n return true;\n }", "public function initNoticias($overrideExisting = true)\n\t{\n\t\tif (null !== $this->collNoticias && !$overrideExisting) {\n\t\t\treturn;\n\t\t}\n\t\t$this->collNoticias = new PropelObjectCollection();\n\t\t$this->collNoticias->setModel('Noticia');\n\t}", "public function TipoNotaEnNotas($tipoNId){\n $origen=TipoNota::with(['notas',\n 'indicadores.materias_has_periodos.materias_has_niveles.niveles_has_anios.alumnos'])\n ->find($tipoNId);\n $alumnos=$origen->indicadores->materias_has_periodos->materias_has_niveles->niveles_has_anios->alumnos;\n $comparado=$origen->notas;\n $res='Se han rellenado Notas con: ';\n foreach ($alumnos as $val) {\n $encontrado=false;\n foreach ($origen->notas as $nota) {\n if ($nota->alumnos_id == $val->id) {\n $encontrado=true;\n }\n }\n if (!$encontrado) {\n $obj=new Notas;\n $obj->alumnos_id=$val->id;\n $obj->tipo_nota_id=$tipoNId;\n $obj->calificacion=0;\n $obj->save();\n $res.='; Notas ID: '.$obj->id.', Alumnos ID: '.$val->id.', TipoNota ID: '.$tipoNId.', Cal: 0';\n // Actualiza el promedio si hay modificaciones\n $alumind=new AlumInd;\n $alumind->addActProm($obj->alumnos_id,$origen->indicadores->id,'NUEVO');\n }\n }\n return $res;\n }", "public function GetNoticias(){\r\n return $this -> __buscar; \r\n \r\n }", "function add_ind_button($buttons) {\n\tarray_push($buttons, 'Indizar');\n\treturn $buttons;\n}", "public function listar(){\n require_once 'models/Nota.php';\n \n //Lógica acción controlador\n $nota = new Nota();\n \n $notas = $nota->conseguirTodos('notas');\n \n //Vista\n require_once 'views/nota/listar.php';\n \n }", "function add_types_for_translation() {\n\t\t$dummy = __(\"added\", \"simple-history\");\n\t\t$dummy = __(\"approved\", \"simple-history\");\n\t\t$dummy = __(\"unapproved\", \"simple-history\");\n\t\t$dummy = __(\"marked as spam\", \"simple-history\");\n\t\t$dummy = __(\"trashed\", \"simple-history\");\n\t\t$dummy = __(\"untrashed\", \"simple-history\");\n\t\t$dummy = __(\"created\", \"simple-history\");\n\t\t$dummy = __(\"deleted\", \"simple-history\");\n\t\t$dummy = __(\"updated\", \"simple-history\");\n\t\t$dummy = __(\"nav_menu_item\", \"simple-history\");\n\t\t$dummy = __(\"attachment\", \"simple-history\");\n\t\t$dummy = __(\"user\", \"simple-history\");\n\t\t$dummy = __(\"settings page\", \"simple-history\");\n\t\t$dummy = __(\"edited\", \"simple-history\");\n\t\t$dummy = __(\"comment\", \"simple-history\");\n\t\t$dummy = __(\"logged in\", \"simple-history\");\n\t\t$dummy = __(\"logged out\", \"simple-history\");\n\t\t$dummy = __(\"added\", \"simple-history\");\n\t\t$dummy = __(\"modified\", \"simple-history\");\n\t\t$dummy = __(\"upgraded it\\'s database\", \"simple-history\");\n\t\t$dummy = __(\"plugin\", \"simple-history\");\n\t}", "private function ListaNoticias(){\r\n \r\n $tabela = '<table id=\"tabela\" class=\"noticia\">\r\n <tr>\r\n \t<th>Data</th>\r\n \t<th>Titulo</th>\r\n <th>Editar</th>\r\n <th>Excluir</th>\r\n </tr>\r\n ';\r\n $a = $this -> __bdnoticia -> GetNoticia();\r\n while ($not = mysql_fetch_array($a)){ \r\n $tabela = $tabela . '\r\n <tr>\r\n <td>'. funcoes::DecorarData(funcoes::ConvertDateBD(substr($not['datahora'],0,10))).'</td>\r\n <td>'.stripslashes(base64_decode($not['titulo'])).'</td>\r\n <td><center><a href=\"#\" class=\"editar\" id=\"'.$not[0].'\"><img src=\"images/edit.png\" alt=\"\" /></a></center></td>\r\n <td><center><a href=\"#\" class=\"excluir\" id=\"'.$not[0].'\"><img src=\"images/excluir.png\" alt=\"\" /></a></center></td>\r\n </tr>';\r\n \r\n }\r\n \r\n $tabela = $tabela .'\r\n </table>';\r\n \r\n \r\n \r\n return $tabela;\r\n \r\n }", "function registrar_artigos()\n\t{\n\t\t$descricao = 'Usado para listar os artigos da Revista';\n\t\t$singular = 'Artigo';\n\t\t$plural = 'Artigos';\n\n\t\t$labels = array(\n\t\t\t'name' => $plural,\n\t\t\t'singular_name' => $singular,\n\t\t\t'view_item' => 'Ver ' . $singular,\n\t\t\t'edit_item' => 'Editar ' . $singular,\n\t\t\t'new_item' => 'Novo ' . $singular,\n\t\t\t'add_new_item' => 'Adicionar novo ' . $singular\n\t\t);\n\n\t\t$supports = array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'thumbnail',\n\t\t\t'custom-fields'\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'description' => $descricao,\n\t\t\t'public' => true,\n\t\t\t'menu_icon' => 'dashicons-admin-home',\n\t\t\t'supports' => $supports,\n 'taxonomies' => array('post_tag')\n\t\t);\n\n\n\t\tregister_post_type('artigo', $args);\n adicionar_status();\n\t}", "function listar_noticias() {\n\t\n\t\t$query = \"SELECT *\n\t\tFROM noticias\n\t\tORDER BY id_noticia desc\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function setNota($nota){\n\t\t$this->nota = $nota;\n\t}", "function notifications_instituerarticle($quoi, $id_article, $options) {\n\t$type = 'article';\n\t// ne devrait jamais se produire\n\tif ($options['statut'] == $options['statut_ancien']) {\n\t\tspip_log(\"statut inchange\",'notifications');\n\t\treturn;\n\t}\n\n\tinclude_spip('inc/texte');\n\n\t$modele = \"\";\n\t$id_secteur = sql_getfetsel('id_secteur','spip_articles','id_article='.intval($id_article));\n\t$diogene = sql_fetsel('*','spip_diogenes','id_secteur='.intval($id_secteur).' AND objet IN (\"article\",\"emballe_media\")');\n\t\n\tif(isset($diogene['id_diogene']) && $diogene['objet'] == 'emballe_media'){\n\t\t$type = 'media';\n\t}\n\tspip_log($type,'test');\n\tif ($options['statut'] == 'publie') {\n\t\tif ($GLOBALS['meta'][\"post_dates\"]=='non'\n\t\t\tAND strtotime($options['date'])>time())\n\t\t\t$modele = \"notifications/\".$type.\"_valide\";\n\t\telse\n\t\t\t$modele = \"notifications/\".$type.\"_publie\";\n\t}\n\tif ($options['statut'] == 'prop' AND $options['statut_ancien'] != 'publie')\n\t\t$modele = \"notifications/\".$type.\"_propose\";\n\tspip_log(test_espace_prive());\n\tspip_log($modele,'test');\n\tif ($modele){\n\t\t$destinataires = array();\n\t\tif ($GLOBALS['meta'][\"suivi_edito\"] == \"oui\")\n\t\t\t$destinataires = explode(',',$GLOBALS['meta'][\"adresse_suivi\"]);\n\n\n\t\t$destinataires = pipeline('notifications_destinataires',\n\t\t\tarray(\n\t\t\t\t'args'=>array('quoi'=>$quoi,'id'=>$id_article,'options'=>$options)\n\t\t\t,\n\t\t\t\t'data'=>$destinataires)\n\t\t);\n\n\t\t$texte = email_notification_objet($id_article, \"article\", $modele);\n\t\tspip_log($texte,'test');\n\t\tnotifications_envoyer_mails($destinataires, $texte);\n\t}\n}", "public function addMetaboxes() {}", "public function newNotifications()\n {\n $notifications = $this->notification->ReminderforUser(Auth::user());\n\n\n foreach($notifications as $key => $notification) \n \n $notifications[$key]['translated'] = __($notification['content'], [\n 'taskName' => $this->{$notification['notifiable_type']}->find($notification['notifiable_id'])->name\n ]);\n\n return response()->json([\n 'notification' => $notifications\n ]);\n }", "public function crearNotaCtr($datos){\n\n $resultado = Modelo::crearNotaMdl($datos, \"notas_2\");\n\n if ($resultado == \"exito\") {\n\n }else{\n\n }\n\n\n\n\n }", "public function getNota(){\n return $this->nota;\n }", "public function Notificaciones()\n {\n $notificaciones = Notificaciones::orderBy('created_at', 'desc')->get();\n $name = auth()->administrador()->nombreDelUsuarioAdministrador;\n $nombre = [];\n $apellido = [];\n $contador=0;\n foreach ($notificaciones as $notificacion) {\n $administrador = Administrador::find($notificacion->idUsuarioAdministrador);\n $nombre[$contador] = $administrador->nombreDelUsuarioAdministrador;\n $apellido[$contador] = $administrador->primerApellidoAdministrador;\n $contador++;\n }\n if (auth()->administrador()->estadoDelUsuarioAdministrador==1) {\n return view('Notificaciones.todasLasNotificaciones',compact('name', 'notificaciones','nombre','apellido'));\n }\n else{\n return view('layouts.seccionesGenerales.accesoDenegado', compact('name'));\n }\n }", "public function notas()\n \t\t{\n \t\t\treturn $this->hasMany(Nota::class);\n \t\t}", "function afficher_noisettes($define, $flux, $ajax=true){\n\t$noisettes = explode(':', $define);\n\tforeach ($noisettes as $_fond) {\n\t\tif (find_in_path($_fond.'.html')) {\n\t\t\t$contexte = $ajax ? array_merge($flux['args'], array('ajax' => true)) : $flux['args'];\n\t\t\t$html = recuperer_fond($_fond, $contexte);\n\t\t\t$flux['data'] .= $html;\n\t\t}\n\t\telse \n\t\t\t$flux['data'] .= '<div class=\"noisette avertissement\" style=\"margin-top: 0; font-size: 0.95em\">' . _T('sarkaspip:msg_fichier_introuvable', array('fichier' => $_fond . '.html')) . '</div>';\n\t}\n\treturn $flux;\n}", "function notifavancees_declarer_tables_interfaces($interface){\n\t$interface['table_des_tables']['notifications_abonnements'] = 'notifications_abonnements';\n\t\n\t// Traitements sur certains champs\n\t// On désarialise d'avance les tableaux\n\t$interface['table_des_traitements']['MODES']['notifications_abonnements'] = 'unserialize(%s)';\n\t$interface['table_des_traitements']['PREFERENCES']['notifications_abonnements'] = 'unserialize(%s)';\n\t\n\treturn $interface;\n}", "function addPOSEntry()\n{\n\n}", "static function add_notes(): void {\r\n\t\tself::add_acf_inner_field(self::divisions, self::notes, [\r\n\t\t\t'label' => 'Notes',\r\n\t\t\t'type' => 'text',\r\n\t\t\t'instructions' => 'Any notes pertinent to the division.',\r\n\t\t\t'required' => 0,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '40',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t]\r\n\t\t]);\r\n\t}", "function maquetacioItemsAgendaHoudini($model, $columna, $nomCaixa, $tipusCaixa, $ordre, $estilCaixa, $estilLlistat, $estilElement, $id_registre, $id_newsletter, $registre, $pathEditora)\n{\n global $CONFIG_URLBASE , $CONFIG_URLUPLOADIM; \n $parametres = '<input type=\"hidden\" name=\"newsletter['.htmlspecialchars($model).']['.htmlspecialchars($columna).']['.htmlspecialchars($nomCaixa).']['.htmlspecialchars($tipusCaixa).'][]['.htmlspecialchars($estilCaixa).']['.htmlspecialchars($estilLlistat).']['.htmlspecialchars($estilElement).']\" value=\"'.htmlspecialchars($id_registre).'\" />';\n \n $registre['ORIGEN'] = '<h4><a href=\"'.$CONFIG_URLBASE . $pathEditora . $registre['ID'] . '/' . $registre['URL_TITOL'] . '\" rel=\"external\" style=\"text-decoration:none;\">'.$registre['TITOL'].'</a></h4>';\n $imatge = $registre['IMATGE1'] != '' ? '<img src=\"' . $CONFIG_URLUPLOADIM . $registre['IMATGE1'] . '\" style=\"width: 159px;\" class=\"left\"/>' : '';\n \n return '<li id=\"ageh_reg' . $id_registre . '\" class=\"box removable stylable '.$estilElement.'\">\n\t\t\t'.$parametres.'\n\t\t\t<div class=\"spacer clearfix\">\n\t\t\t ' . $imatge . '\n\t\t\t\t'.$registre['ORIGEN'].'\n\t\t\t\t'.$registre['RESUM'].'\n\t\t\t</div>\n\t\t</li>';\n}", "function sevenconcepts_pre_insertion($flux){\n if ($flux['args']['table']=='spip_auteurs'){\n include_spip('cextras_pipelines');\n $champs_extras=champs_extras_objet(table_objet_sql('auteur'));\n foreach($champs_extras as $value){\n $flux['data'][$value['options']['nom']]=_request($value['options']['nom']); \n }\n $flux['data']['name']=_request('nom_inscription'); \n }\nreturn $flux;\n}", "function add_noticia($id_usuario,$titulo,$noticia,$estado,$idioma) {\n\t\t$timestamp=time();\n\t\t$fecha=date(\"Y-m-d H:i:s\",$timestamp);\n\t\t\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$ssql = \"INSERT INTO noticias\n\t\t(id_colaborador, titulo, noticia, fecha_insercion, fecha_modificacion, estado, idioma) \n\t\tVALUES ('$id_usuario', '$titulo', '$noticia', '$fecha', '$fecha', '$estado', '$idioma')\";\n\t\t\t\n\t\t\t//lo inserto en la base de datos\n\t\t\tif (mysql_query($ssql,$connection)){\n\t\t\t\t//recibo el último id\n\t\t\t\t$ultimo_id = mysql_insert_id($connection);\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn $ultimo_id;\n\t\t\t}else{\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn false;\n\t\t\t} \t\t\n\t}", "public function getNoticias()\n {\n \tsession_start();\n \t$id_usuario = $_SESSION['idUser'];\n $this->db->select('*');\n $this->db->from(self::noticias); \n $this->db->join(self::usuarios,' on '. \n self::usuarios.'.id_usuario = '.\n self::noticias.'.id_usuario'); \n $this->db->join(self::categoria,' on '. \n self::categoria.'.id_categoria = '.\n self::noticias.'.id_categoria'); \n $this->db->join(self::noticias_config,' on '. \n self::noticias_config.'.id_noticia_config = '.\n self::noticias.'.id_noticia','left');\n $this->db->where(self::usuarios.'.id_usuario',$id_usuario); \n// $this->db->order_by(self::noticias_config.'.importante', \"desc\");\n $this->db->order_by(self::noticias.'.estado_noticia', \"desc\");\n $this->db->order_by(self::noticias.'.fecha_creacion_noticia', \"desc\");\n \n $query = $this->db->get();\n \n if($query->num_rows() > 0 )\n {\n return $query->result();\n }\n }", "public function getNegocio();", "public function setNoticias($noticias)\n {\n if (!is_null($noticias))\n $this->noticias = $noticias;\n }", "function special_notifications_init() {\n \t\n // register extra css\n elgg_extend_view('elgg.css', 'special_notifications/special_notifications.css');\n\n // register hook for checking event which are available this plugin\n $sn = array('profile_location');\n foreach ($sn as $item) {\n elgg_register_plugin_hook_handler('special_notifications:config', 'notify', \"snotify_$item\");\n }\n \n // get available active checking event and register a hook, so they can be triggered\n $special_notifications = elgg_trigger_plugin_hook('special_notifications:config', 'notify', null, []);\n foreach ($special_notifications as $key => $sn) {\n if ($sn['active']) {\n elgg_register_plugin_hook_handler('special_notifications', 'user', \"special_notification_\".$sn['hook']);\n }\n }\n\n}", "private function getNotificaciones ($cantidad, $offset, $unread = false)\n {\n //ALTAS PROPIAS\n $altasPropias = DB::table('alertas')\n ->select(DB::raw('\"altasPropias\" AS type, alertas.updated_at AS orden, null AS author1, null AS author2, null AS author3, alertas.nombre AS content1, alertas.apellido AS content2, alertas.dni AS content3, instituciones.nombre AS content4, alertas.asistido_id AS content5'))\n ->leftJoin('instituciones', 'alertas.institucion_id', '=', 'instituciones.id')\n ->where('alertas.user_id', Auth::user()->id)\n ->whereNotNull('alertas.asistido_id');\n\n $sql = $altasPropias;\n\n //SOLCITUD ACEPTADA A UNA COMUNIDAD - link a la comunidad\n \t$solicitudAceptada = DB::table('comunidad_user')\n ->select(DB::raw('\"solicitudAceptada\" AS type, comunidad_user.created_at AS orden, NULL AS author1, NULL AS author2, NULL AS author3, comunidades.nombre AS content1, null AS content2, null AS content3,NULL AS content4, comunidad_user.comunidad_id AS content5'))\n ->leftJoin('comunidades', 'comunidad_user.comunidad_id', '=', 'comunidades.id')\n ->where('comunidad_user.user_id', '=', Auth::user()->id);\n\n $sql = $sql->union($solicitudAceptada);\n\n //SI ES SAMARITANO O PROFESIONAL O COORDINADOR O POSADERO O ADMINISTRADOR\n if (Auth::user()->tipoUsuario->slug == 'samaritano' || Auth::user()->tipoUsuario->slug == 'profesional' || Auth::user()->tipoUsuario->slug == 'coordinador' || Auth::user()->tipoUsuario->slug == 'posadero' || Auth::user()->tipoUsuario->slug == 'administrador') {\n \n\t //NUEVA ASOSIACION DE ASISTIDO A COMUNIDAD - link a la comunidad\n\t $asistidos = DB::table('asistido_comunidad')\n ->select(DB::raw('\"asistidos\" AS type, asistido_comunidad.created_at AS orden, NULL AS author1, NULL AS author2, NULL AS author3, asistidos.nombre AS content1, asistidos.apellido AS content2, comunidades.nombre AS content3, asistidos.id AS content4, asistido_comunidad.comunidad_id AS content5'))\n ->leftJoin('asistidos', 'asistido_comunidad.asistido_id', '=', 'asistidos.id')\n ->leftJoin('comunidades', 'asistido_comunidad.comunidad_id', '=', 'comunidades.id')\n ->whereRaw('asistido_comunidad.comunidad_id IN (SELECT comunidad_user.comunidad_id FROM comunidad_user WHERE user_id = ?)', [Auth::user()->id]);\n\n $sql = $sql->union($asistidos);\n \t \n \t //NUEVA ALERTA DE LA COMUNIDAD SI NO FUE EL MISMO - link a la comunidad\n \t$alertas = DB::table('alertas')\n ->select(DB::raw('\"alertas\" AS type, alertas.created_at AS orden, users.name AS author1, users.apellido AS author2, tiposUsuarios.nombre AS author3, alertas.nombre AS content1, alertas.apellido AS content2, alertas.observaciones AS content3, comunidades.nombre AS content4, alertas.comunidad_id AS content5'))\n ->leftJoin('users', 'alertas.user_id', '=', 'users.id')\n ->leftJoin('tiposUsuarios', 'users.tipoUsuario_id', '=', 'tiposUsuarios.id')\n\t\t\t->leftJoin('comunidades', 'alertas.comunidad_id', '=', 'comunidades.id') \n ->where('alertas.user_id', '<>', Auth::user()->id)\n ->whereRaw('alertas.comunidad_id IN (SELECT comunidad_user.comunidad_id FROM comunidad_user WHERE user_id = ?)', [Auth::user()->id]);\n\n $sql = $sql->union($alertas);\n\n \t//NUEVO MENSAJE DE LA COMUNIDAD SI NO FUE EL MISMO - link a la comunidad\n \t$mensajes = DB::table('mensajesComunidad')\n ->select(DB::raw('\"mensajes\" AS type, mensajesComunidad.created_at AS orden, users.name AS author1, users.apellido AS author2, tiposUsuarios.nombre AS author3, mensajesComunidad.mensaje AS content1, mensajesComunidad.adjunto AS content2, users.imagen AS content3, comunidades.nombre AS content4, mensajesComunidad.comunidad_id AS content5'))\n ->leftJoin('users', 'mensajesComunidad.created_by', '=', 'users.id')\n ->leftJoin('tiposUsuarios', 'users.tipoUsuario_id', '=', 'tiposUsuarios.id')\n ->leftJoin('comunidades', 'mensajesComunidad.comunidad_id', '=', 'comunidades.id')\n ->where('mensajesComunidad.created_by', '<>', Auth::user()->id)\n ->whereRaw('mensajesComunidad.comunidad_id IN (SELECT comunidad_user.comunidad_id FROM comunidad_user WHERE user_id = ?)', [Auth::user()->id]);\n\n \t$sql = $sql->union($mensajes);\n\n \t//NUEVO MIEMBRO EN LA COMUNIDAD SI NO FUE EL MISMO - link a la comunidad\n \t$miembros = DB::table('comunidad_user')\n ->select(DB::raw('\"miembros\" AS type, comunidad_user.created_at AS orden, NULL AS author1, NULL AS author2, NULL AS author3, users.name AS content1, users.apellido AS content2, users.email AS content3,NULL AS content4, comunidad_user.comunidad_id AS content5'))\n ->leftJoin('users', 'comunidad_user.user_id', '=', 'users.id')\n ->where('comunidad_user.user_id', '<>', Auth::user()->id)\n ->whereRaw('comunidad_user.comunidad_id IN (SELECT comunidad_user.comunidad_id FROM comunidad_user WHERE user_id = ?)', [Auth::user()->id]);\n\n $sql = $sql->union($miembros);\n\n }\n\n //SI ES COORDINADOR O POSADERO\n //NUEVAS SOLICITUDES EN SUS COMUNIDADES (coordinador segun comunidad id, posadero segun todas sus comunidades) - link a la comunidad\n \n\t\t//SI ES COORDINADOR O PROFESIONAL O POSADERO O ADMINISTRADOR\n \t//NUEVA CONSULTA PARA UN ASISTIDO DE LA COMUNDIAD SI NO FUE EL - link al asistido\n //NUEVA FICHA PARA UN ASISTIDO DE LA COMUNIDAD SI NO FUE EL - link al asistido \n \n //PENDIENTES:\n //NUEVA DONACION EN TU POSADERO?\n \t//NUEVA NECESIDAD EN LA COMUNIDAD SI NO FUE EL MISMO?\n\n if ($unread) {\n \t\n \t$resultados = DB::table(DB::raw('('.$sql->toSql().') as t1'))\n\t\t\t ->select('*')\n\t\t\t ->orderBy('orden', 'desc')\n\t\t\t //->where('orden', '>', Auth::user()->readNotif)\n\t\t\t ->whereRaw(\"orden > '\" . Auth::user()->readNotif . \"'\")\n\t\t\t ->mergeBindings($sql)\n\t\t\t ->get();\n\n } else {\n \t\n \t$resultados = DB::table(DB::raw('('.$sql->toSql().') as t1'))\n\t\t\t ->select('*')\n\t\t\t //->where('orden', '>', Auth::user()->created_at)\n\t\t\t ->whereRaw(\"orden > '\" . Auth::user()->created_at . \"'\")\n\t\t\t ->orderBy('orden', 'desc')\n\t\t\t ->offset($offset)\n\t\t\t ->limit($cantidad)\n\t\t\t ->mergeBindings($sql)\n\t\t\t ->get();\n \n }\n\n return $resultados;\n }", "public function getNotificaciones()\n {\n return $this->hasMany(Notificacion::className(), ['user_id' => 'id'])->inverseOf('usuario');\n }", "function consultarNotas(){ \n $cadena_sql=$this->cadena_sql(\"notas\",$this->codProyecto);\n $estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\" );\n return $estudiantes;\n }", "public function marcarComoLeidos()\n {\n //pendiente por extraer el id del usuario logeado\n $notificaciones = Notificaciones::where('visto', false)->get();\n foreach ($notificaciones as $notificacion)\n {\n $notificacion->visto = true;\n $notificacion->save();\n }\n return redirect()\n ->back()\n ->with(\"succes\",\"Notificaciones vistas.\");\n }", "function addNote($tipo, $oficial, $socio, $docto, $texto, $fecha = false){\n\t\t$oficial_de_origen\t= $this->mCodigoDeOficial;\n\t\t$fecha\t\t\t\t= ($fecha == false) ? fechasys() : $fecha;\n\t\t$xT\t\t\t\t\t= new cTipos();\n\t\t$msg\t\t\t\t= \"\";\n\t\t$texto\t\t\t\t= $xT->cChar( trim($texto) );\n\t\t\n\t\t$sqlFR\t\t= \"INSERT INTO usuarios_web_notas( tipo, oficial, oficial_de_origen, socio, documento, fecha, texto)\n \t\t\t\t\tVALUES\n\t\t\t\t\t\t('$tipo', $oficial, $oficial_de_origen, $socio, $docto, '$fecha', '$texto')\";\n\t\t$x \t\t\t= my_query($sqlFR);\n\t\tif($x[SYS_ESTADO] == true){\n\t\t\t$msg\t\t.= \"ERROR\\tAviso al oficial $oficial Agregado con Exito ($tipo|$socio|$docto|$fecha)\\r\\n\";\n\t\t} else {\n\t\t\t$msg\t\t.= \"ERROR\\tAviso al oficial $oficial NO GENERADO ($tipo|$socio|$docto|$fecha)\\r\\n\";\n\t\t}\n\t\treturn $msg;\n\t}", "function listar_noticias_idioma($idioma) {\n\t\n\t\t$query = \"SELECT *\n\t\tFROM noticias\n\t\tWHERE titulo_$idioma != ''\n\t\tORDER BY id_noticia desc\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function list() {\n $this->data = ['noticias_0', 'noticias_1', 'noticias_2'];\n // ejemplo:\n // http://mvc-todo.io/noticias/list\n // muestra:\n // SALIDA GENERAL noticias_1---noticias_2---noticias_3\n\n // EJEMPLOS\n /*\n ModelNoticias::getNoticias();\n ModelNoticias::getNoticias($page=1);\n ModelNoticias::getNoticiasPublicadas();\n\n $noticia = ModelNoticias::getNoticiaById(2);\n $noticia = ModelNoticias::getNoticiaByAuthor('Jorge');\n\n $noticia = new ModelNoticias();\n\n $noticia->setTitle('Lanzamiento de mi MVC.');\n $noticia->setAuthor('Sergio');\n\n $noticia->getContent();\n $noticia->save();\n\n ModelNoticias::deleteNoticiaById(7);\n $noticia->delete();\n */\n }", "function setAgregarUnPais(){\n\t\t$this->comienza_con++;\n\t}", "function cl_bensetiquetaimpressa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"bensetiquetaimpressa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function joueContre($adversaire, $lieu, $date) // trois argument définis pour la première fois\n{\n // contenant les infos de la rencontre\n array_push($this->rencontres, [\"adversaire\" => $adversaire, \n \"lieu\" => $lieu, \n \"date\" => $date\n\n ]); // on range les données dans le tableau rencontres, tableau de niveau 2\n\n}", "public function getNota(){\n\t\treturn $this->nota;\n\t}", "public function setNotificacion(array $datos) {\r\n $consulta = $this->insertar('t_notificaciones', $datos);\r\n return parent::connectDBPrueba()->insert_id();\r\n }", "function RellenarIndice()\r\n {\r\n $this->AddPage();\r\n\r\n $this->Imprimir('2. Revisión y Análisis de las siguientes interrupciones:', 20, 10);\r\n\r\n $cont_causa500 = 1;\r\n $cont_imp = 1;\r\n $cont_pro = 1;\r\n\r\n foreach ($this->eventos as $evento)\r\n {\r\n if (Doctrine_Core::getTable('SAF_EVENTO_CONVOCATORIA')->getEventoConvocatoria($evento, $this->convocatoria)->getStatus() == 'analizado')\r\n {\r\n $this->ImprimirSubtituloIndice($evento, $cont_causa500, $cont_imp, $cont_pro);\r\n\r\n $fecha_evento = strftime(\"%A, %d/%m/%Y\", strtotime($evento->getFHoraIni()));\r\n $text = \"RI. \" . $evento->getCEventoD() . \" - Circuito \" . $evento->getCircuito() . \". \" . $fecha_evento . '. MVAmin: ' . $evento->getMvaMin();\r\n $this->Imprimir($text, 40, 10);\r\n }\r\n }\r\n }", "function expositor_list(){\n return expositor_novo();\n}", "public function initComentarioNoticias($overrideExisting = true)\n\t{\n\t\tif (null !== $this->collComentarioNoticias && !$overrideExisting) {\n\t\t\treturn;\n\t\t}\n\t\t$this->collComentarioNoticias = new PropelObjectCollection();\n\t\t$this->collComentarioNoticias->setModel('ComentarioNoticia');\n\t}", "protected function tipo_licenca()\n {\n return [\n \"code\" => \"NEWTYPE\",\n \"nome\" => \"Novo Tipo\"\n ];\n }", "public function marcarPunto( ) {\n $this->addNumeroIP(\".\");\n\n }", "function inbox_upgrade_20162209() {\n\n\t$setting = elgg_get_plugin_setting('default_message_types', 'hypeInbox');\n\tif ($setting) {\n\t\t$setting = unserialize($setting);\n\t\tunset($setting['__notification']);\n\t\telgg_set_plugin_setting('default_message_types', serialize($setting), 'hypeInbox');\n\t}\n\n\t$messages = new ElggBatch('elgg_get_entities_from_metadata', [\n\t\t'types' => 'object',\n\t\t'subtypes' => 'messages',\n\t\t'metadata_name_value_pairs' => [\n\t\t\t'name' => 'msgType',\n\t\t\t'value' => '__notification',\n\t\t],\n\t\t'limit' => 0,\n\t]);\n\n\t$messages->setIncrementOffset(false);\n\n\tforeach ($messages as $message) {\n\t\t$message->msgType = hypeJunction\\Inbox\\Message::TYPE_PRIVATE;\n\t}\n\n}", "function lancar_notas_aluno($id_federado){\n //pegar movimentos da faixa candidata\n $dados['aluno']= $this->coordenador->get_aluno_faixa($id_federado);\n \n \n $id_faixa = $dados['aluno']['0']['ordem']+1;\n \n $dados['movimentos'] = $this->coordenador->movimentos($id_faixa);\n $dados['ultimo_evento'] = $this->coordenador->get_ultimo_evento($id_federado);\n \n// $this->funcoes->imprimir($dados['movimentos']);\n $this->load->view('header');\n $this->load->view('/coordenador/lancar_notas_aluno',$dados);\n $this->load->view('footer');\n \n //preparar o prontuário com notas do aluno\n //inclui-lo automáticamente no evento de graduação\n \n }", "public function register_notifications();", "function sevenconcepts_formulaire_charger($flux){\n $form=$flux['args']['form'];\n if($form=='inscription'){\n include_spip('cextras_pipelines');\n $champs_extras=champs_extras_objet(table_objet_sql('auteur'));\n foreach($champs_extras as $value){\n $flux['data'][$value['options']['nom']]=''; \n if(isset($value['options']['obligatoire']))$flux['data']['obligatoire'][$value['options']['nom']]='on';\n }\n $flux['data']['nom_inscription']='';\n $flux['data']['mail_inscription']='';\n }\n \n return $flux;\n}", "public function setCodigoItemNota($iCodigoItemNota) {\n \t$this->iCodigoItemNota = $iCodigoItemNota;\n if (!empty($iCodigoItemNota)) {\n $this->aCodigosNotas[] = $iCodigoItemNota;\n }\n }", "public function onNotaAutorizada($nota, $xml, $retorno)\n {\n // TODO: implement\n }", "public function notificaciones_generales(){\n //generales\n $notificaciones = modeloNotificaciones::all(); // todos los datos de notificaciones.\n $catnotificaciones = modeloCategoriasNotificaciones::all(); // todos los datos de categorias de notificaciones.\n //alumnos\n $consultaextraA = modeloNotificaciones::all()->whereBetween('id_categoria',[6,10]);\n $anotificaciones = modeloNotificaciones::all()->whereBetween('id_categoria',[0,4])->union($consultaextraA); // todos los datos de notificaciones.\n $acatnotificaciones = modeloCategoriasNotificaciones::all();\n //profesores \n $pnotificaciones = modeloNotificaciones::all()->whereBetween('id_categoria',[4,10]); // todos los datos de notificaciones.\n $pcatnotificaciones = modeloCategoriasNotificaciones::all();\n return view('notificaciones', compact('notificaciones','catnotificaciones','anotificaciones','acatnotificaciones','pnotificaciones','pcatnotificaciones')); // regresamos los datos a la vista de notificaciones.\n }", "function foool_partner_add_column($columns){\n\n $custom_columns = array();\n foreach($columns as $key => $title) {\n\n if ($key=='title') {\n $custom_columns['thumb'] = 'Visuel';\n $custom_columns[$key] = $title;\n } else { \n $custom_columns[$key] = $title;\n }\n }\n return $custom_columns;\n}", "public function updateNotices()\n {\n // Fetch a list of users whos has not notice about article.\n $ar_unnoticed = User::find()\n ->leftJoin('{{%article_user}}', \n '{{%user}}.id = {{%article_user}}.user_id AND ' .\n sprintf('{{%%article_user}}.article_id = %d', $this->id)\n )\n ->andWhere(['IS', '{{%article_user}}.user_id', (new Expression('NULL'))])\n //->andWhere(['IS NOT', '{{%article_user}}.is_readed', (new Expression('NULL'))])\n ->andWhere(['=', '{{%user}}.is_active', User::STATUS_ACTIVE])\n ->andWhere(['<>','{{%user}}.id', \\Yii::$app->user->getId()])\n ->all();\n\n foreach ($ar_unnoticed as $account) {\n //$this->link('readers', $account, ['is_readed' => 1]);\n $this->link('readers', $account, ['is_readed' => 1]);\n }\n }", "function abonnement_declarer_tables_interfaces($interfaces){\n\t// alias\n\t$interfaces['table_des_tables']['abonnements'] = 'abonnements';\n\t$interfaces['table_des_tables']['contacts_abonnements'] = 'contacts_abonnements';\n\t// champs date\n\t$interfaces['table_date']['contacts_abonnements']='date';\n\treturn $interfaces;\n}", "public function getNotciaSearch($paraula){\n $NoticiaTaula = new NoticiaTaula();\n $UsuariOk = array();\n $select = $this->select();\n $select->where('MATCH(username,Localidad,Tuvida,Aficiones) AGAINST(?)',$paraula);\n $users = $this->fetchAll($select);\n $count=0;\n foreach($users as $user){\n\n $UsuariOk[$count] = new Usuari($user->id_user, $user->nombre, $user->email, $user->username,$user->foto, $user->Localidad, $user->Tuvida,$user->Aficiones, $user->Data_neixament);\n $cantitat = $NoticiaTaula->cantitatUserFora($user->id_user);\n $UsuariOk[$count]->addNoticies($cantitat);\n $count++;\n }\n return $UsuariOk;\n }", "function hook_xml_crawler_xml_types() {\n return ['new' => t('New type')];\n}", "public function contenidoNoticias(Request $request, Response $response, $args) {\n\n\n //lista de menu para noticias de todos los meses del año en curso\n \n //verifica si tiene menu o contenidos internos\n $navBanner = Array();\n $navBanner[]= Contenido::DatosByUrl(Constante::RUTA_NOTICIAS)[\"data\"];\n\n $datin[\"navBanner\"]= $navBanner;\n $datin[\"contenido\"]= Contenido::DatosByUrl(Constante::RUTA_NOTICIAS);\n\n\n if(!empty($args)){\n // echo \"si hay argumentos\";\n $args[\"primera\"] = false;\n\n $menuLater = Contenido::NoticiasByArgs($args); //menu lateral\n\n $contenido = Contenido::NoticiasByMesAnio($args);\n\n $anio= $args[\"anio\"];\n //extraemos la plantilla para el que no tiene menu\n $datin[\"plantillas\"]=Modulos::getPlantillasByModulos(Constante::ID_PLANTILLA_INTERNA_2);\n\n\n }else{\n // echo \"no hay argumentos\";\n $anio=date(\"Y\");\n $ruta = $request->getAttribute('route')->getName();\n //extraer la lista de noticias 2 meses anterior ordenado por fecha\n $mes=date(\"m\");\n $param= [\"anio\"=>$anio, \"mes\"=> $mes, \"primera\"=>true];\n $contenido = Contenido::NoticiasByMesAnio($param);\n }\n\n $menuMeses = Contenido::NoticiasByAnio($anio);\n $menuMesLat = Array();\n if (!empty($menuMeses[\"data\"])) {\n foreach($menuMeses[\"data\"] as $menuMes){\n $nomMes = Acl::nomMes($menuMes[\"mes\"]);\n $menuMesLat[] = [\n \"nombre\" => $nomMes,\n \"valor\" => $menuMes\n ];\n }\n $datin[\"menuMesLat\"]= $menuMesLat;\n }\n\n \n $datin[\"anio\"]=$anio;\n $datin[\"ultimasNoticias\"] = Contenido::NoticiasByMesAnioUltimas();\n\n $twig = \"emmsa/noticias.twig\"; //2 columnas\n $datin[\"plantillas\"]=Modulos::getPlantillasByModulos(Constante::ID_PLANTILLA_INTERNA_1);\n\n $datin[\"noticias\"]=$contenido;\n $datin[\"menuAnios\"]=Contenido::anioNoticias();\n\n $this->view->render($response, $twig, $datin);\n return $response;\n\n}", "function evt__agregar()\n\t{\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "public static function hookData() {\n return array_merge_recursive( array (\n 'userBar' => \n array (\n 0 => \n array (\n 'selector' => '#elUserNav > li.cNotifications.cUserNav_icon',\n 'type' => 'add_before',\n 'content' => '{template=\"inviteSystemGlobalLink\" group=\"global\" location=\"front\" app=\"invite\" params=\"\"}',\n ),\n ),\n), parent::hookData() );\n}", "public function addNews(){\n $this->assign('typeList', $this->get_type_list());\n $this->display();\n }", "function construir_nube_tags($n) {\n\t\t$query = \"SELECT imagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename\n\t\tFROM imagenes\n\t\tWHERE imagenes.tags_imagen IS NOT NULL\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\twhile ($row=mysql_fetch_array($result)) {\n\t\t\n\t\t$tags_palabra.=$row['tags_imagen'];\n\t\t \n\t\t}\n\t\t\n\t\t $tags1=str_replace('}{',',',$tags_palabra);\n\t\t $tags1=str_replace('{','',$tags1);\n\t\t $tags1=str_replace('}','',$tags1);\n\t\t\n\t\t $tags2=explode(',',$tags1);\n \t\t\t\n\t\t\twhile(list($key,$value) = each($tags2)){\n if (isset($value) && $value !='lse' && $value !='lengua de signos') {\n $tags[$value] += 1;\n }\n }\n\t\t\n\t\t// Ordeno el array de mayor a menor\n\t\tarsort($tags);\n\t\t// Selecciono los primeros n valores (los mas altos)\n\t\t$tags=array_slice($tags, 0, $n);\n\n\t\t//Desordenor el array de nuevo\n\t\t$new=array();\n\t\t$c=count($tags);\n\t\t\n\t\t$k=array_keys($tags);\n\t\t$v=array_values($tags);\n\t\t\n\t\t while($c>0) {\n\t\t\t $i=array_rand($k);\n\t\t\t $new[$k[$i]]=$v[$i];\n\t\t\t unset($k[$i]); #exlude selected number from list\n\t\t\t $c--;\n\t\t }\n\t\t\n\t\t// Compongo el código para ser almacenado en el archivo\n\t\t $nube_tags='<?php ';\n\t\t foreach ($new as $tag => $count) {\n\n\t\t\t$nube_tags.='$tags[\\''.$tag.'\\']='.$count.'; ';\n\t\t }\n\t\t $nube_tags.=' ?>';\n\t\t \t\t \n\t\t // Abro el archivo para escritura\n\t\t $fp2 = fopen(\"../../configuration/tags.inc\", 'w');\n\t\t //chmod(\"../../configuration/tags.inc\", 0777);\n\t\t\n\t\t fwrite($fp2, $nube_tags);\n\t\t fclose($fp2);\n\n\t\tmysql_close($connection);\n\t\treturn true;\n\t}", "function _reglas()\n\t{\n\t\t$reglas[] = array('field' => 'titulo', 'label' => 'lang:field_titulo', 'rules' => 'trim|required|max_length[100]');\n\t\t\n\t\t\t$reglas[] = array('field' => 'has_category', 'label' => 'lang:field_has_category', 'rules' => 'callback_has_categorys');\n\t\t\n\t\t\n\t\treturn $reglas;\n\t}", "function obter_todas_noticias_ativas() {\n $this->db->where(array(\"status_noticia\"=>1));\n $this->db->order_by(\"data_noticia\", \"desc\");\n return $this->db->get('noticia');\n }", "public function MostrarNoticias()\n\t{\n\t\t$data_table = $this->data_source->ejecutarConsulta(\"SELECT * FROM noticias WHERE fecha_publicacion != '0000-00-00' order by 1 desc\");\n\n\t\treturn $data_table;\n\t}", "function wpbod_nombres_roles() {\n \n global $wp_roles;\n \n if ( ! isset( $wp_roles ) ) {\n $wp_roles = new WP_Roles();\n }\n \n $wp_roles->roles['contributor']['name'] = 'Profesor';\n $wp_roles->role_names['contributor'] = 'Profesor';\n \n $wp_roles->roles['subscriber']['name'] = 'Cliente';\n\t$wp_roles->role_names['subscriber'] = 'Cliente';\n\t\n\t$wp_roles->roles['customer']['name'] = 'Registro';\n $wp_roles->role_names['customer'] = 'Registro';\n\n \n}", "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 crear_post_type_presentaciones() {\n\t$labels = array(\n\t\t'name' => _x( 'Presentaciones', 'Post Type General Name', 'molino9' ),\n\t\t'singular_name' => _x( 'Presentacion', 'Post Type Singular Name', 'molino9' ),\n\t\t'menu_name' => __( 'Presentaciones', 'molino9' ),\n\t\t'parent_item_colon' => __( 'Presentacion Padre', 'molino9' ),\n\t\t'all_items' => __( 'Todas las Presentaciones', 'molino9' ),\n\t\t'view_item' => __( 'Ver Presentacion', 'molino9' ),\n\t\t'add_new_item' => __( 'Agregar Nuevo Presentacion', 'molino9' ),\n\t\t'add_new' => __( 'Agregar Nuevo Presentacion', 'molino9' ),\n\t\t'edit_item' => __( 'Editar Presentacion', 'molino9' ),\n\t\t'update_item' => __( 'Actualizar Presentacion', 'molino9' ),\n\t\t'search_items' => __( 'Buscar Presentacion', 'molino9' ),\n\t\t'not_found' => __( 'No encontrado', 'molino9' ),\n\t\t'not_found_in_trash' => __( 'No encontrado en la papelera', 'molino9' ),\n\t);\n\n// Otras opciones para el post type\n\n\t$args = array(\n\t\t'label' => __( 'presentaciones', 'molino9' ),\n\t\t'description' => __( 'Presentacion news and reviews', 'molino9' ),\n\t\t'labels' => $labels,\n\t\t// Todo lo que soporta este post type\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions','page-attributes','post-formats'),\n\t\t/* Un Post Type hierarchical es como las paginas y puede tener padres e hijos.\n\t\t* Uno sin hierarchical es como los posts\n\t\t*/\n\t\t'hierarchical' => true, /* Es un comportamiento como las páginas */\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 25,\n\t\t'menu_icon' => 'dashicons-format-video',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\t// Por ultimo registramos el post type\n\tregister_post_type( 'presentaciones', $args );\n\n}", "public function getInstrucoes();", "public function nosotros() {\n\t\t$this->set('title_for_layout', __('Nosotros - You & I | Organizamos y coordinamos tus eventos') );\n\t}", "public function onNotaGerada($nota, $xml)\n {\n // TODO: implement\n }", "function setup_notifelms() {\n\n\tglobal $AccountId, $DefaultNotificationElms, $DB;\n\n\t$ids = array();\n\t$insert_failure = false;\n\tif(!is_numeric($AccountId) || $AccountId < 1) {\n\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\techo \"Invalid account id\\n\";\n\t\t}\n\t\treturn $ids;\n\t}\n\n\tforeach($DefaultNotificationElms as $idx => $elmdata) {\n\t\t$sql = \"INSERT INTO NotificationElm (Id, TypeId, AccId, Name, ElmId, Height, Width, Style, DisplayOrder, InnerHtml, DisplayNotifCount, Active, Del) VALUES\n\t\t\t\t(NULL, (SELECT Id FROM NotificationElmType WHERE Type = '{$elmdata[\"type\"]}'), {$AccountId}, '{$elmdata[\"name\"]}', '{$elmdata[\"id\"]}', '{$elmdata[\"h\"]}',\n\t\t\t\t'{$elmdata[\"w\"]}', NULL, '{$elmdata[\"display\"]}', NULL, '{$elmdata[\"count\"]}', 1, 0)\";\n\t\tif(!$DB->Query($sql)) {\n\t\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\t\techo \"Elm Insert Failure: {$DB->GetLastErrorMsg()}\\n\";\n\t\t\t}\n\t\t\t$insert_failure = true;\n\t\t} else {\n\t\t\t$ids[] = $DB->GetLastInsertedId();\n\t\t}\n\n\t\tif($elmdata[\"attribs\"] === true) {\n\t\t\tif(!add_elm_attributes($DB->GetLastInsertedId())) {\n\t\t\t\techo \"****Failed to add attribs for elm id: {$DB->GetLastInsertedId()}\\n\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif($insert_failure) {\n\t\t$tmp = var_export($ids, true);\n\t\techo \"*****************\\nExperienced Insert Failure!. Data:\\n{$tmp}\\n******************\\n\";\n\t}\n\n\treturn $ids;\n}", "function cptui_register_my_cpts_tilbud()\n {\n\n $labels = [\n \"name\" => __(\"Aktuelle tilbud\", \"indexed\"),\n \"singular_name\" => __(\"Aktuelle tilbud\", \"indexed\"),\n \"menu_name\" => __(\"Aktuelle tilbud\", \"indexed\"),\n \"all_items\" => __(\"All Aktuelle tilbud\", \"indexed\"),\n \"add_new\" => __(\"Add new\", \"indexed\"),\n \"add_new_item\" => __(\"Add new Aktuelle tilbud\", \"indexed\"),\n \"edit_item\" => __(\"Edit Aktuelle tilbud\", \"indexed\"),\n \"new_item\" => __(\"New Aktuelle tilbud\", \"indexed\"),\n \"view_item\" => __(\"View Aktuelle tilbud\", \"indexed\"),\n \"view_items\" => __(\"View Aktuelle tilbud\", \"indexed\"),\n \"search_items\" => __(\"Search Aktuelle tilbud\", \"indexed\"),\n \"not_found\" => __(\"No Aktuelle tilbud found\", \"indexed\"),\n \"not_found_in_trash\" => __(\"No Aktuelle tilbud found in trash\", \"indexed\"),\n \"parent\" => __(\"Parent Aktuelle tilbud:\", \"indexed\"),\n \"featured_image\" => __(\"Featured image for this Aktuelle tilbud\", \"indexed\"),\n \"set_featured_image\" => __(\"Set featured image for this Aktuelle tilbud\", \"indexed\"),\n \"remove_featured_image\" => __(\"Remove featured image for this Aktuelle tilbud\", \"indexed\"),\n \"use_featured_image\" => __(\"Use as featured image for this Aktuelle tilbud\", \"indexed\"),\n \"archives\" => __(\"Aktuelle tilbud archives\", \"indexed\"),\n \"insert_into_item\" => __(\"Insert into Aktuelle tilbud\", \"indexed\"),\n \"uploaded_to_this_item\" => __(\"Upload to this Aktuelle tilbud\", \"indexed\"),\n \"filter_items_list\" => __(\"Filter Aktuelle tilbud list\", \"indexed\"),\n \"items_list_navigation\" => __(\"Aktuelle tilbud list navigation\", \"indexed\"),\n \"items_list\" => __(\"Aktuelle tilbud list\", \"indexed\"),\n \"attributes\" => __(\"Aktuelle tilbud attributes\", \"indexed\"),\n \"name_admin_bar\" => __(\"Aktuelle tilbud\", \"indexed\"),\n \"item_published\" => __(\"Aktuelle tilbud published\", \"indexed\"),\n \"item_published_privately\" => __(\"Aktuelle tilbud published privately.\", \"indexed\"),\n \"item_reverted_to_draft\" => __(\"Aktuelle tilbud reverted to draft.\", \"indexed\"),\n \"item_scheduled\" => __(\"Aktuelle tilbud scheduled\", \"indexed\"),\n \"item_updated\" => __(\"Aktuelle tilbud updated.\", \"indexed\"),\n \"parent_item_colon\" => __(\"Parent Aktuelle tilbud:\", \"indexed\"),\n ];\n\n $args = [\n \"label\" => __(\"Aktuelle tilbud\", \"indexed\"),\n \"labels\" => $labels,\n \"description\" => \"\",\n \"public\" => true,\n \"publicly_queryable\" => true,\n \"show_ui\" => true,\n \"show_in_rest\" => true,\n \"rest_base\" => \"\",\n \"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n \"has_archive\" => false,\n \"show_in_menu\" => true,\n \"show_in_nav_menus\" => true,\n \"delete_with_user\" => false,\n \"exclude_from_search\" => false,\n \"capability_type\" => \"post\",\n \"map_meta_cap\" => true,\n \"hierarchical\" => false,\n \"rewrite\" => [\"slug\" => \"tilbud\", \"with_front\" => true],\n \"query_var\" => true,\n \"supports\" => [\"title\", \"editor\", \"thumbnail\", \"custom-fields\"],\n ];\n\n register_post_type(\"tilbud\", $args);\n }", "function itsec_import_export_register_notification( $notifications ) {\n\n\t$notifications['import-export'] = array(\n\t\t'subject_editable' => true,\n\t\t'message_editable' => true,\n\t\t'recipient' => ITSEC_Notification_Center::R_PER_USE,\n\t\t'schedule' => ITSEC_Notification_Center::S_NONE,\n\t\t'tags' => array( 'date', 'time', 'site_title', 'site_url' ),\n\t\t'module' => 'import-export',\n\t);\n\n\treturn $notifications;\n}", "public function saveNota(){\t\t \r\n\t\t$this->notas_model->saveNotas($_POST);\r\n\t}", "function _Registros($Regs=0){\n\t\t// Creo grid\n\t\t$Grid = new nyiGridDB('NOTICIAS', $Regs, 'base_grid.htm');\n\t\t\n\t\t// Configuro\n\t\t$Grid->setParametros(isset($_GET['PVEZ']), 'titulo');\n\t\t$Grid->setPaginador('base_navegador.htm');\n\t\t$arrCriterios = array(\n\t\t\t'id'=>'Identificador',\n\t\t\t'titulo'=>'T&iacute;tulo', \n\t\t\t\"IF(p.visible, 'Si', 'No')\"=>\"Visible\"\n\t\t);\n\t\t$Grid->setFrmCriterio('base_criterios_buscador.htm', $arrCriterios);\n\t\n\t\t// Si viene con post\n\t\tif ($_SERVER[\"REQUEST_METHOD\"] == \"POST\"){\n\t\t\t$Grid->setCriterio($_POST['ORDEN_CAMPO'], $_POST['ORDEN_TXT'], $_POST['CBPAGINA']);\n\t\t\tunset($_GET['NROPAG']);\n\t\t}\n\t\telse if(isset($_GET['NROPAG'])){\n\t\t\t// Numero de Pagina\n\t\t\t$Grid->setPaginaAct($_GET['NROPAG']);\n\t\t}\n\t\n\t\t$Campos = \"p.id_noticia AS id, p.titulo, pf.nombre_imagen, pf.extension, IF(p.visible, 'Si', 'No') AS visible, p.copete\";\n\t\t$From = \"noticia p LEFT OUTER JOIN noticia_foto pf ON pf.id_noticia = p.id_noticia AND pf.orden = 1\";\n\t\t\n\t\t$Grid->getDatos($this->DB, $Campos, $From);\n\t\t\n\t\t// Devuelvo\n\t\treturn($Grid);\n\t}", "function on_add_extra()\r\n\t{\r\n\t}", "public function ajax_listadodenuncias(){\n \n //Tomo id de denucia\n $iddenuncia = isset( $_POST['iddenuncia'] ) ? sanitize_text_field( wp_unslash( $_POST['iddenuncia']) ) : '';\n\n\t\t\t//Verifico que venga con informacion\n\t\t\tif ( '' === $iddenuncia ) {\n\t\t\t\twp_send_json_error( 'Error en el pedido de informacion.');\t\n\t\t\t\t die();\n\t\t\t}\n\t\t\n //Obtengo taxonomys de estado y tipo de servicio\n $estado = get_the_terms( $iddenuncia, 'estado' ); //array\n $servicios = get_the_terms( $iddenuncia, 'servicios' ); //array\n\n //Tomo la data de la id denuncia y genero un array para enviar\n $datageneral=array();\n $data['id'] = $iddenuncia;\n $data['direccion'] = get_post_meta( $iddenuncia, 'direccion', true );\n $data['barrio'] = get_post_meta( $iddenuncia, 'barrio', true );\n $data['obs'] = get_post_meta( $iddenuncia, 'observacion', true );\n $data['fecha'] = get_the_date( 'd M Y', $iddenuncia );\n array_push( $datageneral , $data ); //array\n\n //Tomo los atachmente de la denuncia y genero una array para el envio de informacion\n $attachedsfilter=array();\n $attacheds = get_attached_media( '' , $iddenuncia );\n foreach ($attacheds as $attached){\n\t\t\t\t$img_src = wp_get_attachment_image_src($attached->ID, 'small');\n\t\t\t\t$attachment_metadata = wp_get_attachment_metadata( $attached->ID );\n $attachedd['ID'] = $attached->ID;\n $attachedd['post_author'] = get_the_author_meta( 'email', $attached->post_author );\n $attachedd['post_date'] = $attached->post_date;\n $attachedd['guid'] \t = $img_src[0];\n $attachedd['attachment_type'] = $attachment_metadata['attachment_type'];\n array_push($attachedsfilter,$attachedd); //array\n } \n\n //Tomo los comentarios de la id den\n $args = array(\n\t\t\t\t'post_id' => $iddenuncia, \n\t\t\t\t'orderby' => 'date',\n\t\t\t\t'order' => 'ASC'\n );\n $comments = get_comments( $args ); //array\n\n\t\t\t//Envio la informacion completa\n echo json_encode(array(\n\t\t\t\t'status' =>'success', \n 'estado' => $estado ,\n 'datageneral' => $datageneral ,\n 'servicios' => $servicios ,\n 'attacheds' => $attachedsfilter ,\n 'comments' => $comments \n ));\n \n die();\n\t\t}", "private function mandarNotificacionSolicitud(string $nombre) {\r\n $datos = array();\r\n $datos['departamento'] = '19';\r\n $datos['tipo'] = '4';\r\n $datos['descripcion'] = $nombre . ' es miembro de SICCOB por lo cual se solicita creación de un su correo corporativo.';\r\n $datos['prioridad'] = '1';\r\n $datos['asunto'] = $nombre . ' es miembro de SICCOB por lo cual se solicita creación de un su correo corporativo.';\r\n\r\n $this->Solicitud->solicitudNueva($datos);\r\n }", "public function GestorReglasNegocios() {\n $this->gestorAccesoDatos = new GestorAccesoDatos();\n }", "function replace_journo() {\n $this->add_journo(TRUE);\n }", "public function setFiltroNotas($fil='') {\n $this->filtroNotas = $this->arreglarFiltro($fil);\n $this->filtrarPersonas();\n }", "protected function add() {\n\t}", "public function setNota($nota)\n {\n $this->nota = $nota;\n\n return $this;\n }", "public function noticia(Request $request, Response $response, $args)\n{\n\n if(isset($args['idContenido'])) $idContenido = $args['idContenido'];\n\n // $dataNoticias = NoticiaControlador::getListadoNoticiasDetalle($idContenido);\n // $datin[\"dataNoticias\"]=$dataNoticias;\n\n $dataNoticia = NoticiaControlador::getVerNoticiaDetalle($idContenido);\n $datin[\"dataNoticia\"]=$dataNoticia;\n\n // $dataPublicidad = NoticiaControlador::getVerPublicidad();\n // $datin[\"dataPublicidad\"]=$dataPublicidad;\n\n $dataMedia = NoticiaControlador::getListadoMediaNoticia($idContenido);\n $datin[\"dataMedia\"]=$dataMedia;\n \n $dataFileNoticia = NoticiaControlador::AllFileContenido($datin[\"dataNoticia\"][\"data\"][\"N_ID_CONTENIDO\"]);\n $datin[\"dataFileNoticia\"]=$dataFileNoticia;\n\n $dataNoticiasAll = NoticiaControlador::getListadoNoticiasAll(4);\n $datin[\"dataNoticiasAll\"]=$dataNoticiasAll;\n\n $datin[\"pathmunlima\"] = Constante::PATHMUNLIMA;\n\n //$datin[\"conten_audio\"]=$conten_audio;\n $datin[\"c_noticia\"]=utf8_encode($dataNoticia[\"data\"][\"C_CONTENIDO\"]);\n\n\n//$datin[\"algo\"]=\"algo\"; \n$this->view->render($response, \"weblima/noticia.twig\", $datin);\n return $response;\n}", "function revisions_annonces($id_annonce, $c=false) {\n\n// ** Champs normaux **\n\tif ($c === false) {\n\t\t// Si $c a sa valeur par defaut, alors on en fait un tableau,\n\t\t// que l'on remplit avec les nouvelles valeurs des differents champs\n\t\t$c = array();\n\t\tforeach (array(\n\t\t\t// Pour chacun de ces champs,\n\t\t\t'titre', 'lien', 'annonceur', 'peremption',\n\t\t\t'type', 'descriptif', 'source_lien', 'source_nom', 'statut'\n\t\t) as $champ)\n\t\t\t// on en recupere la nouvelle valeur (a condition qu'ils ne soient pas vides),\n\t\t\tif (($a = _request($champ)) !== null)\n\t\t\t\t// que l'on met dans le tableau $c\n\t\t\t\t$c[$champ] = $a;\n\t}\n\n\t// Si l'annonce est publiee, invalider les caches et demander sa reindexation\n\t// (indispensable pour mettre a jour l'annonce du cote public)\n\t// $t est le statut actuel de l'objet, que l'on recupere en premier lieu\n\t$t = sql_getfetsel(\"statut\", \"spip_vu_annonces\", \"id_annonce=$id_annonce\");\n\tif ($t == 'publie') {\n\t\t// Si le statut est publie, alors on indique que cette annonce devra etre invalidee\n\t\t$invalideur = \"id='id_annonce/$id_annonce'\";\n\t\t// et on demande une reindexation\n\t\t$indexation = true;\n\t}\n\t// On charge le fichier qui contient la fonction necessaire...\n\tinclude_spip('inc/modifier');\n\t// ... que l'on execute ensuite avec les parametres definis juste au dessus\n\tmodifier_contenu('annonce', $id_annonce,\n\t\tarray(\n\t\t\t'nonvide' => array('titre' => _T('info_sans_titre')),\n\t\t\t'invalideur' => $invalideur,\n\t\t\t'indexation' => $indexation\n\t\t),\n\t\t$c);\n\n\n// ** Un cas special : changer le statut ? **\n\t// On recupere pour commencer le statut actuel de la breve,\n\t$row = sql_fetsel(\"statut\", \"spip_vu_annonces\", \"id_annonce=$id_annonce\");\n\t// pour ensuite le stocker dans deux variables differentes\n\t$statut_ancien = $statut = $row['statut'];\n\t// Si un nouveau statut est demande, ET qu'il est different de l'actuel, \n\t// ?? a rajouter pour la suite : \"ET que nous avons les autorisations pour le changer\"\n\tif (_request('statut', $c) AND _request('statut', $c) != $statut) {\n\t\t// Alors $statut acquiere sa valeur nouvelle (vu au dessus avec $champs)\n\t\t$statut = $champs['statut'] = _request('statut', $c);\n\t}\n\n// ** Rendre effective la revision **\n\t// Si le tableau contenant les nouvelles valeurs est vide (rien a changer),\n\t// alors c'est termine !\n\tif (!$champs) return;\n\n\t// Si l'etape precedente est passee, alors on a des choses a faire.\n\t// On demande simplement une mise a jour de la table avec les nouvelles valeurs ($champs)\n\tsql_updateq('spip_vu_annonces', $champs, \"id_annonce=$id_annonce\");\n\n// ** Post-modifications **\n\t// Invalider les caches\n\tinclude_spip('inc/invalideur');\n\tsuivre_invalideur(\"id='id_annonce/$id_annonce'\");\n\n}", "function setupNewItem()\n {\n $item = array(\n 'id' => null,\n 'pending_id' => null,\n 'content_id' => null,\n 'created' => date( 'Y-m-d H:i:s'),\n 'createdBy' => $_SESSION['isLoggedUID'],\n 'updated' => null,\n 'updatedBy' => null,\n 'status' => 'create',\n 'topic' => null,\n 'subtopic' => null,\n 'heading' => null,\n 'date' => date( 'Y-m-d H:i:s'),\n 'caption' => null,\n 'text' => null,\n 'download_src' => null,\n 'download_name' => null,\n 'images' => array(),\n 'tags' => array(),\n 'terms' => array());\n $_SESSION['cropId'] = null;\n\n return($item);\n }", "function imprimir_data_extenso()\r\n{\r\n\tglobal $semana;\r\n\tglobal $mes;\t\r\n\t$diasemana = date('w');\r\n\t$diames = date('j');\r\n\t$numeromes = date('n');\r\n\t$ano = date('Y');\t\r\n\techo $semana[ $diasemana ] . ', ' .\r\n\t\t $diames . ' de ' . \r\n\t\t $mes[ $numeromes ] . ' de ' . \r\n\t\t $ano;\t\t \r\n}", "public function getCodigosItensNotas() {\n return $this->aCodigosNotas;\n }", "function listar_noticias_limit($inicial,$cantidad) {\n\t\n\t\t$query = \"SELECT noticias.*, colaboradores.*\n\t\tFROM noticias, colaboradores\n\t\tWHERE noticias.id_colaborador=colaboradores.id_colaborador\n\t\tAND noticias.estado=1\n\t\tORDER BY noticias.fecha_insercion desc\n\t\tLIMIT $inicial,$cantidad\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}" ]
[ "0.6033114", "0.60156286", "0.5940086", "0.5805247", "0.5795351", "0.57664204", "0.56942964", "0.5635401", "0.56117785", "0.559246", "0.5580056", "0.555836", "0.55218387", "0.5503921", "0.54720986", "0.54517937", "0.54416853", "0.5439989", "0.5425124", "0.54214156", "0.5391662", "0.5390646", "0.5374341", "0.5343678", "0.533851", "0.5329591", "0.52992207", "0.52964425", "0.5264821", "0.5264266", "0.52106535", "0.52019167", "0.5192411", "0.5189013", "0.5180774", "0.5149619", "0.51455086", "0.51429373", "0.51420164", "0.51192814", "0.5115536", "0.51136327", "0.51132226", "0.51115936", "0.5108438", "0.5100306", "0.50915015", "0.5072047", "0.5069931", "0.506899", "0.506703", "0.50660884", "0.50559586", "0.50542766", "0.50527495", "0.5049818", "0.50362957", "0.5032562", "0.5032109", "0.5024029", "0.5013407", "0.5006114", "0.5000656", "0.49976617", "0.49896044", "0.49856207", "0.4977436", "0.49712953", "0.49684563", "0.49663636", "0.49658665", "0.4965496", "0.49628603", "0.4960135", "0.49555442", "0.4936786", "0.49321878", "0.49267402", "0.4925046", "0.49230355", "0.49163654", "0.49145016", "0.49144837", "0.49127087", "0.49079522", "0.49052474", "0.4900885", "0.4886965", "0.48837793", "0.48726457", "0.48630095", "0.4859718", "0.48562038", "0.485487", "0.48544377", "0.48542407", "0.4852363", "0.48492962", "0.48471057", "0.48457637" ]
0.53645116
23
funcion para paginar noticias
public function paginador_noticias($pagina, $registros){ $pagina = mainModel::limpiar_cadena($pagina); $registros = mainModel::limpiar_cadena($registros); $tabla = ""; $pagina = (isset($pagina) && $pagina > 0) ? (int)$pagina : 1; $inicio = ($pagina > 0) ? (($pagina * $registros) - $registros): 0; $conexio = mainModel::conectar(); $data = $conexio->query(" SELECT SQL_CALC_FOUND_ROWS * FROM noticias ORDER BY titulo ASC LIMIT $inicio , $registros "); $data = $data->fetchAll(); $total = $conexio->query("SELECT FOUND_ROWS()"); $total = (int) $total->fetchColumn(); $nPaginas = ceil($total/$registros); $tabla .= '<div class="panel-body"> <table class="table table-striped table-bordered table-list"> <thead> <tr> <th class="hidden-xs">Título</th> <th>Imagen</th> <th>Descripción</th> <th>Editar</em></th> <th>Eliminar</em></th> </tr> </thead> <tbody>'; if ($total >= 1 && $pagina <= $nPaginas) { $contador = $inicio+1; foreach ($data as $row) { $tabla .=' <tr> <td class="hidden-xs">'.$row['titulo'].'</td> <td>'.$row['imagen'].'</td> <td>'.$row['descripcion'].'</td> <td align="center"> <a class="btn btn-default"><em class="fa fa-pencil"></em></a> </td> <td align="center"> <a class="btn btn-danger"><em class="fa fa-trash"></em></a> </td> </tr> '; } }else{ $tabla .= '<tr> <td colspan="5">No hay registros en el sistema</td> </tr>'; } $tabla .= '</tbody></table></div>'; if ($total >= 1 && $pagina <= $nPaginas) { $tabla .= '<nav class="text-center"><ul class="pagination pagination-sm">'; if ($pagina == 1) { $tabla .= '<li class="disabled"><a><strong>Anterior</strong></a></li>'; } else { $tabla .= '<li class="disabled"><a href="'.SEVERURL.'?c=noticias&pagina='.($pagina - 1).'"><strong>Anterior</strong></a></li>'; } for ($i=1; $i <= $nPaginas; $i++) { if ($pagina == $i) { $tabla .= '<li class="active"><a href="'.SEVERURL.'?c=noticias&pagina='.$i.'" class="btn btn-info"><strong>'.$i.'</strong></a></li>'; } else { $tabla .= '<li><a href="'.SEVERURL.'?c=noticias&pagina='.$i.'" class="btn btn-info"><strong>'.$i.'</strong></a></li>'; } } if ($pagina == $nPaginas) { $tabla .= '<li class="disabled"><a><strong>Siguiente</strong></a></li>'; } else { $tabla .= '<li class="disabled"><a href="'.SEVERURL.'?c=noticias&pagina='.($pagina + 1).'"><strong>Siguiente</strong></a></li>'; } $tabla .= '</ul></nav>'; } return $tabla; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function obter_noticias_pagina_inicial() {\n $this->db->where(array(\"status_noticia\"=>1));\n $this->db->order_by(\"data_noticia\", \"desc\");\n return $this->db->get('noticia',4,0);\n }", "function pagination(){}", "function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Scheda argomento\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}", "public function paginate()\n {\n }", "public function getPaginated();", "function agenda_liste_paginer($id_agenda=0, $annee_choisie=0, $mois_choisi=0, $filtre='-1', $separateur='&nbsp;|&nbsp;', $ancre=NULL, $tri='normal') {\n\tstatic $count_page = 0;\n\n\tif ($id_agenda == 0)\n\t\treturn $count_page;\n\n\t$evenements = agenda_recenser_evenement(0);\n\t$count_evt = count($evenements);\n\n\t$pagination = NULL;\n\tif ($count_evt == 0)\n\t\treturn $pagination;\n\n\tif ($ancre)\n\t\t$pagination .= '<a class=\"ancre\" name=\"pagination_'.$ancre.'\" id=\"pagination_'.$ancre.'\"></a>';\n\t\t\n\t// Determination de l'annee choisie si l'agenda est saisonnier\t\n\t$contexte_aff = agenda_definir_contexte(0);\n\t$debut_saison = $contexte_aff['debut_saison'];\n\tif (intval($debut_saison) != 1) {\n\t\t$annee_choisie = (intval($mois_choisi) < intval($debut_saison)) ? $annee_choisie : strval(intval($annee_choisie)+1);\n\t}\n\n\n\t$annee_courante = 0;\n\t$nouvelle_annee = FALSE;\n\t$count_page = 0;\n\n\tfor ($i=1;$i<=$count_evt;$i++) {\n\t\t$j = ($tri == 'inverse') ? $count_evt - $i + 1 : $i;\n\t\tif (($filtre == '-1') || \n\t\t\t(($filtre == '0') && (!$evenements[$j]['categorie'])) ||\n\t\t\t(($filtre != '-1') && ($filtre != '0') && (preg_match(\"/<$filtre>/\",$evenements[$j]['categorie']) > 0))) {\n\n\n\t\t\t$annee_redac = $evenements[$j]['saison'];\n\t\t\t$annee_evt = $evenements[$j]['annee'];\n\t\t\t$mois_evt = $evenements[$j]['mois'];\n\t\t\tif ($annee_redac != $annee_courante) {\n\t\t\t\t$nouvelle_annee = TRUE;\n\t\t\t\t$count_page += 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$nouvelle_annee = FALSE;\n\t\t\t}\n\n\t\t\tif ($nouvelle_annee) {\n\t\t\t\tif ($annee_courante != 0) {\n\t\t\t\t\t$pagination .= $separateur;\n\t\t\t\t}\n\t\t\t\tif ($annee_redac == $annee_choisie) {\n\t\t\t\t\t$pagination .= '<span class=\"on\">'.$evenements[$j]['lien_page'].'</span>';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$arg_option = NULL;\n\t\t\t\t\tif ($filtre != '-1') $arg_option = '&amp;categorie='.$filtre;\n\t\t\t\t\tif ($ancre) $arg_option .= '#pagination_'.$ancre;\n\t\t\t\t\tif (intval($debut_saison) != 1) $annee_evt = (intval($mois_evt) < intval($debut_saison)) ? strval(intval($annee_evt)-1) : $annee_evt;\n\t\t\t\t\t$pagination .= '<a class=\"ajax\" href=\"spip.php?page=agenda&amp;id_rubrique='.$contexte_aff['id_rubrique'].'&amp;annee='.$annee_evt.'&amp;mois='.$debut_saison.$arg_option.'\">'.$evenements[$j]['lien_page'].'</a>';\n\t\t\t\t}\n\t\t\t$annee_courante = $annee_redac;\n\t\t\t}\n\t\t}\n\t}\n\treturn $pagination;\n}", "abstract public function getPaginate($premiereEntree, $messageTotal, $where);", "public function paginar_get(){\n\n $this->load->helper('paginacion');\n\n $pagina = $cliente_id = $this->uri->segment(3); // parametro #3\n $por_pagina = $cliente_id = $this->uri->segment(4); // parametro #4\n\n $campos = array('id','nombre','telefono1'); // campos de la tabla\n\n $respuesta = paginar_todo( 'clientes', $pagina, $por_pagina, $campos ); // helper\n $this->response( $respuesta ); // imprime el resultado de lo que se obtuvo\n }", "public function GetRecentNewsPaginate() {\n if(isset($_GET['pagPage'])){\n try {\n $paginationPage = $_GET['pagPage'];\n $model = new News(Database::instance());\n $paginationData = $model->GetRecentPostsPagination($paginationPage);\n\n $this->json($paginationData);\n } catch (\\PDOException $ex) {\n $this->errorLog(\"GetRecentNewsPaginate()25\", $ex->getMessage());\n\n }\n } else {\n //u slucaju da nema parametar kroz url dobija vrdnost 0 i ispisuje prvih 5 recent news na home page\n try {\n $paginationPage = 0;\n $model = new News(Database::instance());\n $paginationData = $model->GetRecentPostsPagination($paginationPage);\n\n $this->json($paginationData);\n } catch (\\PDOException $ex) {\n $this->errorLog(\"GetRecentNewsPaginate()37\", $ex->getMessage());\n }\n\n }\n\n }", "function paginador($pagina, $orden = NULL, $nombreOrden = NULL, $consultaGlobal = NULL, $cantidadRegistros = NULL) {\n global $configuracion;\n\n $item = '';\n $respuesta = array();\n $objeto = new FacturaVenta();\n\n $registros = $configuracion['GENERAL']['registrosPorPagina'];\n\n if (!empty($cantidadRegistros)) {\n $registros = (int) $cantidadRegistros;\n }\n\n if (isset($pagina)) {\n $pagina = $pagina;\n } else {\n $pagina = 1;\n }\n\n if (isset($consultaGlobal) && $consultaGlobal != '') {\n\n $data = explode('[', $consultaGlobal);\n $datos = $data[0];\n $palabras = explode(' ', $datos);\n\n if ($data[1] != '') {\n $condicionales = explode('|', $data[1]);\n\n $condicion = '(';\n $tam = sizeof($condicionales) - 1;\n for ($i = 0; $i < $tam; $i++) {\n $condicion .= $condicionales[$i] . ' REGEXP \"(' . implode('|', $palabras) . ')\" ';\n if ($i != $tam - 1) {\n $condicion .= ' OR ';\n }\n }\n $condicion .= ')';\n\n $consultaGlobal = $condicion;\n } else {\n $consultaGlobal = '(p.nombre REGEXP \"(' . implode('|', $palabras) . ')\")';\n }\n } else {\n $consultaGlobal = '';\n }\n\n if (!isset($nombreOrden)) {\n $nombreOrden = $objeto->ordenInicial;\n }\n\n\n if (isset($orden) && $orden == 'ascendente') {//ordenamiento\n $objeto->listaAscendente = true;\n } else {\n $objeto->listaAscendente = false;\n }\n\n if (isset($nombreOrden) && $nombreOrden == 'estado') {//ordenamiento\n $nombreOrden = 'activo';\n }\n\n $registroInicial = ($pagina - 1) * $registros;\n\n\n $arregloItems = $objeto->listar($registroInicial, $registros, array('0'), $consultaGlobal, $nombreOrden);\n\n if ($objeto->registrosConsulta) {//si la consulta trajo registros\n $datosPaginacion = array($objeto->registrosConsulta, $registroInicial, $registros, $pagina);\n $item .= $objeto->generarTabla($arregloItems, $datosPaginacion);\n }\n\n $respuesta['error'] = false;\n $respuesta['accion'] = 'insertar';\n $respuesta['contenido'] = $item;\n $respuesta['idContenedor'] = '#tablaRegistros';\n $respuesta['idDestino'] = '#contenedorTablaRegistros';\n $respuesta['paginarTabla'] = true;\n\n Servidor::enviarJSON($respuesta);\n}", "function getPagosanteriores() {\n $where = \" WHERE 1\";\n $array = \"\";\n\n $columns = \"`Clave_catalogo`, `Nombre`, `Email`, `Cantidad`, `Fecha_pagada`, `Id_pago` \";\n $response = $this->db->select3($columns, 'catalogo_pagos', $where, $array);\n return $response;\n }", "public function getPaginate(){ }", "abstract public function preparePagination();", "protected function buildPagination() {}", "protected function buildPagination() {}", "public function paginate($orderBy = 'nome', $perPage = 10);", "function listarSolicitudObligacionPago()\r\n {\r\n $this->procedimiento = 'tes.ft_solicitud_obligacion_pago_sel';\r\n $this->transaccion = 'TES_SOOBPG_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('tipo_interfaz', 'tipo_interfaz', 'varchar');\r\n $this->setParametro('historico', 'historico', 'varchar');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_obligacion_pago', 'int4');\r\n $this->captura('id_proveedor', 'int4');\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('estado', 'varchar');\r\n $this->captura('tipo_obligacion', 'varchar');\r\n $this->captura('id_moneda', 'int4');\r\n $this->captura('moneda', 'varchar');\r\n $this->captura('obs', 'varchar');\r\n $this->captura('porc_retgar', 'numeric');\r\n $this->captura('id_subsistema', 'int4');\r\n $this->captura('nombre_subsistema', 'varchar');\r\n $this->captura('id_funcionario', 'int4');\r\n $this->captura('desc_funcionario1', 'text');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('porc_anticipo', 'numeric');\r\n $this->captura('id_estado_wf', 'int4');\r\n $this->captura('id_depto', 'int4');\r\n $this->captura('nombre_depto', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('fecha_reg', 'timestamp');\r\n $this->captura('id_usuario_reg', 'int4');\r\n $this->captura('fecha_mod', 'timestamp');\r\n $this->captura('id_usuario_mod', 'int4');\r\n $this->captura('usr_reg', 'varchar');\r\n $this->captura('usr_mod', 'varchar');\r\n $this->captura('fecha', 'date');\r\n $this->captura('numero', 'varchar');\r\n $this->captura('tipo_cambio_conv', 'numeric');\r\n $this->captura('id_gestion', 'integer');\r\n $this->captura('comprometido', 'varchar');\r\n $this->captura('nro_cuota_vigente', 'numeric');\r\n $this->captura('tipo_moneda', 'varchar');\r\n $this->captura('total_pago', 'numeric');\r\n $this->captura('pago_variable', 'varchar');\r\n $this->captura('id_depto_conta', 'integer');\r\n $this->captura('total_nro_cuota', 'integer');\r\n $this->captura('fecha_pp_ini', 'date');\r\n $this->captura('rotacion', 'integer');\r\n $this->captura('id_plantilla', 'integer');\r\n $this->captura('desc_plantilla', 'varchar');\r\n $this->captura('ultima_cuota_pp', 'numeric');\r\n $this->captura('ultimo_estado_pp', 'varchar');\r\n $this->captura('tipo_anticipo', 'varchar');\r\n $this->captura('ajuste_anticipo', 'numeric');\r\n $this->captura('ajuste_aplicado', 'numeric');\r\n $this->captura('monto_estimado_sg', 'numeric');\r\n $this->captura('id_obligacion_pago_extendida', 'integer');\r\n $this->captura('desc_contrato', 'text');\r\n $this->captura('id_contrato', 'integer');\r\n $this->captura('obs_presupuestos', 'varchar');\r\n $this->captura('codigo_poa', 'varchar');\r\n $this->captura('obs_poa', 'varchar');\r\n $this->captura('uo_ex', 'varchar');\r\n //Funcionario responsable de el plan de pagos\r\n $this->captura('id_funcionario_responsable', 'integer');\r\n $this->captura('desc_fun_responsable', 'text');\r\n\r\n $this->captura('id_conformidad', 'int4');\r\n $this->captura('conformidad_final', 'text');\r\n $this->captura('fecha_conformidad_final', 'date');\r\n $this->captura('fecha_inicio', 'date');\r\n $this->captura('fecha_fin', 'date');\r\n $this->captura('observaciones', 'varchar');\r\n $this->captura('fecha_certificacion_pres', 'date');\r\n\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 }", "public static function pageTbhotelCliente($inicio, $pag, $rgtro)\n {\n $str=\"\";\n $str = \"select * from \".self::$tablename;\n if (trim($inicio) <> \"\")\n {\n // ojo cambiar las xxx por campo de busqueda \n $str.= \" Where xxxxx like '%$inicio%'\";\n $str.= \"\t or xxxxx like '%$inicio%'\";\n } \n $str .= \" order by xxxxx desc limit \" . $pag . \",\" . $rgtro;\n $cnx = dbcon();\n $rr = mysqli_query($cnx, $str);\n $array1 = array();\n $cn = 0;\n while ($rx = mysqli_fetch_array($rr))\n { \n $array1[$cn] = new tbhotelClienteData();\n $array1[$cn]->cons = $cn;\n $array1[$cn]->idnitHotel = $rx['idnitHotel'];\n $array1[$cn]->nitHotel = $rx['nitHotel'];\n $array1[$cn]->idCiudad = $rx['idCiudad'];\n $array1[$cn]->nomHotel = $rx['nomHotel'];\n $array1[$cn]->dirHotel = $rx['dirHotel'];\n $array1[$cn]->telHotel1 = $rx['telHotel1'];\n $array1[$cn]->telHotel2 = $rx['telHotel2'];\n $array1[$cn]->correoHotel = $rx['correoHotel'];\n $array1[$cn]->tipoHotel = $rx['tipoHotel'];\n $array1[$cn]->Administrador = $rx['Administrador'];\n $array1[$cn]->idRedes = $rx['idRedes'];\n $array1[$cn]->aforo = $rx['aforo'];\n $array1[$cn]->tipoHabitaciones = $rx['tipoHabitaciones'];\n $array1[$cn]->status = $rx['status'];\n $cn++;\n } // fin del Ciclo\n return $array1;\n }", "public static function paginado_usuario(){\n\t\t $page = 1; //inicializamos la variable $page a 1 por default\n\t\t if(array_key_exists('pg', $_GET)){\n\t\t $page = $_GET['pg']; //si el valor pg existe en nuestra url, significa que estamos en una pagina en especifico.\n\t\t }\n\t\t //ahora que tenemos en que pagina estamos obtengamos los resultados:\n\t\t // a) el numero de registros en la tabla\n\t\t $mysqli = new mysqli(\"localhost\",\"root\",\"slam2018\",\"corgran\");\n\t\t if ($mysqli->connect_errno) {\n\t\t\t\tprintf(\"Connect failed: %s\\n\", $mysqli->connect_error);\n\t\t\t\texit();\n\t\t\t}\n\n\n\t\t $conteo_query = $mysqli->query(\"SELECT COUNT(*) as conteo FROM usuarios\");\n\t\t $conteo = \"\";\n\t\t if($conteo_query){\n\t\t \twhile($obj = $conteo_query->fetch_object()){ \n\t\t \t \t$conteo =$obj->conteo; \n\t\t \t}\n\t\t }\n\t\t $conteo_query->close(); \n\t\t unset($obj); \n \t\t\n\t\t //ahora dividimos el conteo por el numero de registros que queremos por pagina.\n\t\t $max_num_paginas = intval($conteo/10); //en esto caso 10\n\t\t\t\n\t\t // ahora obtenemos el segmento paginado que corresponde a esta pagina\n\t\t $segmento = $mysqli->query(\"SELECT * FROM usuarios LIMIT \".(($page-1)*10).\", 10 \");\n $resultado=[];\n\t\t //ya tenemos el segmento, ahora le damos output.\n\t\t if($segmento){\n\t\t\t // echo '<table>';\n\t\t\t while($obj2 = $segmento->fetch_object())\n\t\t\t {\n\t\t\t \t$obj_usu = new usuario($obj2->id_usuario,$obj2->tipo_usu,$obj2->nombre,$obj2->clave);\n $resultado[]=$obj_usu;\n\t\t\t /* echo '<tr>\n\t\t\t <td>'.$obj2->id_usuario.'</td>\n\t\t\t <td>'.$obj2->tipo_usu.'</td>\n\t\t\t <td>'.$obj2->nombre.'</td>\n\t\t\t </tr>'; \n\t\t\t */ }\n\t\t\t // echo '</table><br/><br/>';\n\t\t\t}\n\t\n\t\t //ahora viene la parte importante, que es el paginado\n\t\t //recordemos que $max_num_paginas fue previamente calculado.\n\t\t for($i=0; $i<$max_num_paginas;$i++){\n\n\t\t echo '<a href=\"index.php?pg='.($i+1).'\">'.($i+1).'</a> | ';\n\t\t \n\t\t } \n\t\t echo '<div>-------------------------- PAginacion------------------------------------------------</div>'; \n return $resultado; \n \n }", "public function Carregar_Pagina() : void\n {\n $view = $this->Retornar_Pagina();\n \n $view->set_peca_id($this->obj_contato_anunciante->get_obj_peca()->get_id());\n \n $view->Executar();\n }", "public function do_paging()\n {\n }", "function ListaCuentasxpagarInactivas() {\n\n\t$sql = \"SELECT a.id, a.descripcion, a.fecha, a.total, b.descripcion AS nombre_proveedor\n\t\t\tFROM cuentaxpagar a\n\t\t\tINNER JOIN proveedor b ON a.proveedor_id = b.id\n\t\t\tWHERE a.estado = 'PAGADO'\";\n\n\t$db = new conexion();\n\t$result = $db->consulta($sql);\n\t$num = $db->encontradas($result);\n\n\t$respuesta->datos = [];\n\t$respuesta->mensaje = \"\";\n\t$respuesta->codigo = \"\";\n\n\tif ($num != 0) {\n\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t}\n\n\t\t$respuesta->mensaje = \"Ok\";\n\t\t$respuesta->codigo = 1;\n\t} else {\n\t\t$respuesta->mensaje = \"No existen registros de cuentas por pagar!\";\n\t\t$respuesta->codigo = 0;\n\t}\n\n\treturn json_encode($respuesta);\n}", "function newsItem_PageLimit_Terkomentari_All_Publik( $tbl_news, $tanggalhariini, $dataPerPage ){\n\t\t$sql = mysql_query(\"\n\t\tSELECT * FROM $tbl_news WHERE \n\t\t\t\n\t\t\ttgltampil <= '$tanggalhariini' AND\n\t\t\tstatustampil='1' AND\n\t\t\tdikomentari = '1'\n\t\t\t\n\t\tORDER BY urutan DESC LIMIT $dataPerPage\");\n\t\treturn $sql;\n}", "function listarObligacionPagoCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_OBPGCOT_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\t\t\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_obligacion_pago','int4');\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function newsItem_PageLimit_Populer_All_Publik( $tbl_news, $tanggalhariini, $dataPerPage ){\n\t\t$sql = mysql_query(\"\n\t\tSELECT * FROM $tbl_news WHERE \n\t\t\t\n\t\t\ttgltampil <= '$tanggalhariini' AND\n\t\t\tstatustampil='1' AND\n\t\t\tdilihat >= '5'\n\t\t\t\n\t\tORDER BY urutan DESC LIMIT $dataPerPage\");\n\t\treturn $sql;\n}", "function newsItem_PageLimit_Pilihan_All_Publik( $tbl_news, $tanggalhariini, $dataPerPage ){\n\t\t$sql = mysql_query(\"\n\t\tSELECT * FROM $tbl_news WHERE \n\t\t\t\n\t\t\ttgltampil <= '$tanggalhariini' AND\n\t\t\tstatustampil='1' AND\n\t\t\tpilihan = '1'\n\t\t\t\n\t\tORDER BY urutan DESC LIMIT $dataPerPage\");\n\t\treturn $sql;\n}", "public function index()\n {\n $preguntas = Pregunta::with([\"mujeres\"=>function($query){\n $query->get();\n }])->paginate(10);\n return view('admin.preguntas.index', compact('preguntas'))\n ->with('i',(request()->input('page', 1) - 1) * 5);\n }", "public function pagar($id)\n {\n\n $com = Comisiones::where('id','=',$id)->first();\n\n $last = Comisiones::select('recibo')->where('estatus','=',2)->orderby('recibo', 'desc')->max('recibo');\n if ($last != NULL) {\n $last1 = $last;\n //$last = array_pop($last);\n } else {\n $last1 = 0;\n }\n\n $recibo = $last1 + 1;\n\n\n $a = Atenciones::where('id','=',$com->id_atencion)->first();\n $a->pagado =2;\n $resa = $a->update();\n \n\n $p = Comisiones::find($id);\n $p->estatus =2;\n $p->recibo = $recibo;\n $p->fecha_pago = date('Y-m-d');\n $res = $p->update();\n \n return back();\n\n //\n }", "public function pagos(Request $request){\n /* Creating a query to the database, but not executing it. */\n $pagos = PensionFondoPago::where('fondo_id','=',$this->id);\n if($request->fechaIni != '')\n /* Adding a filter to the query. */\n $pagos = $pagos->whereBetween('fecha_movimiento', [$request->fechaIni, $request->fechaFin]);\n /* Adding a filter to the query, and then executing it. */\n $pagos = $pagos->orderBy('fecha_movimiento','desc')->paginate(10);\n return $pagos;\n }", "public function index(Request $request)\n {\n //\n\n /*\n * $preguntas = Pregunta::paginate(5);+\n $preguntas = Pregunta::orderBy('id','DESC')->paginate(5);\n */\n\n\n\n $titulo = $request->get('titulo');\n $tema_id = $request->get('tema_id');\n\n $preguntas = Pregunta::orderBy('id', 'DESC')\n ->titulo($titulo)\n ->tema_id($tema_id)\n ->paginate(10);\n/*\n $preguntas= DB::table('preguntas')\n ->join('temas','preguntas.tema_id','=','temas.id')\n ->select('preguntas.titulo','preguntas.descripcion','preguntas.puntuacionPregu','preguntas.user_id','preguntas.tema_id','temas.nombreTema')\n ->get();*/\n\n\n\n\n return view('index',['preguntas' => $preguntas]);\n }", "function obtener_post($post_por_pagina, $conexion) {\n $inicio = (pagina_actual() > 1) ? pagina_actual() * $post_por_pagina - $post_por_pagina : 0;\n $sentencia = $conexion->prepare(\"SELECT * FROM imagenes ORDER BY idImg DESC LIMIT $inicio, $post_por_pagina\");\n $sentencia->execute();\n return $sentencia->fetchAll();\n}", "function paginacion($fields,$fielsView,$pagina=0,$totalNumbersView=10)\n{\n\tif($fields>$fielsView)\n\t{\n\t\techo \"<div class='paginacion'>\";\n\t\t\t# Mostramos anterior y inicio\n\t\t\tif($pagina>1)\n\t\t\t{\n\t\t\t\techo \"<a href='\".$_SERVER[\"PHP_SELF\"].\"?pagina=1' class='pageOk'>Inicio</a>\";\n\t\t\t\techo \"<a href='\".$_SERVER[\"PHP_SELF\"].\"?pagina=\".($pagina-1).\"' class='pageOk'>Anterior</a>\";\n\t\t\t}else{\n\t\t\t\techo \"<span class='pageKo'>Inicio</span><span class='pageKo'>Anterior</span>\";\n\t\t\t}\n\t\t\t\n\t\t\t# Mostramos los valores intermedios\n\t\t\t$totalPage=ceil($fields/$fielsView);\n\t\t\t$pageStart=1;\n\t\t\t$pageEnd=$totalPage;\n\t\t\tif($totalPage>$totalNumbersView)\n\t\t\t{\n\t\t\t\t# Si estamos en una posicion superior a la pagina 10...\n\t\t\t\tif($page>($totalNumbersView/2))\n\t\t\t\t\t$pageStart=$page-($totalNumbersView/2);\n\t\t\t\t# Si la pagina actual + 10 es inferior al total...\n\t\t\t\tif($page+($totalNumbersView/2)<$totalPage)\n\t\t\t\t\t$pageEnd=$page+($totalNumbersView/2);\n\t\t\t}\n\t\t\tif($pageEnd-$pageStart<$totalNumbersView && $totalPage>$totalNumbersView)\n\t\t\t{\n\t\t\t\tif($pageStart==1)\n\t\t\t\t\t$pageEnd=$page+($totalNumbersView/2)+(($totalNumbersView/2)-$page)+1;\n\t\t\t\tif($pageEnd==$totalPage)\n\t\t\t\t\t$pageStart=$page-($totalNumbersView/2)-(($page-$totalPage)+($totalNumbersView/2));\n\t\t\t}\n\n\t\t\t# Mostramos los numeros de de paginas\n\t\t\tfor($i=$pageStart;$i<=$pageEnd;$i++)\n\t\t\t{\n\t\t\t\tif ($i==$pagina)\n\t\t\t\t\techo \"<span class='pageSelect'> \".$i.\" </span>\";\n\t\t\t\telse{\n\t\t\t\t\techo \"<a href='\".$_SERVER[\"PHP_SELF\"].\"?pagina=\".$i.\"' class='pageOk'>\".$i.\"</a>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t# Mostramos siguiente y fin\n\t\t\tif($pagina<$totalPage)\n\t\t\t{\n\t\t\t\techo \"<a href='\".$_SERVER[\"PHP_SELF\"].\"?pagina=\".($pagina+1).\"' class='pageOk'>Siguiente</a>\";\n\t\t\t\techo \"<a href='\".$_SERVER[\"PHP_SELF\"].\"?pagina=\".$totalPage.\"' class='pageOk'>Final</a>\";\n\t\t\t}else{\n\t\t\t\techo \"<span class='pageKo'>Siguiente</span><span class='pageKo'>Final</span>\";\n\t\t\t}\n\t\techo \"</div>\";\n\t}\n}", "function paginatePending($page, $per_page) {\n return IncomingMails::paginate(array(\n 'conditions' => array('state > 0'),\n ), $page, $per_page);\n }", "public function get_pagenum()\n {\n }", "public function generar_link_pago()\n {\n\n $items = array();\n $ids = '';\n if (Input::get('id'))\n {\n $pago = Pago::find(Input::get('id'));\n $item = array(\n \"title\" => $pago->nombre,\n \"description\" => $pago->descripcion,\n \"quantity\" => 1,\n \"currency_id\" => \"MEX\",\n \"unit_price\" => doubleval($pago->monto)\n );\n $ids = $pago->id;\n array_push($items, $item);\n }\n else\n {\n $pagos = Auth::user()->userable->pagos->filter(function($pago) {\n return $pago->pagado == false;\n });\n\n foreach ($pagos as $pago) {\n\n $item = array(\n \"title\" => $pago->nombre,\n \"description\" => $pago->descripcion,\n \"quantity\" => 1,\n \"currency_id\" => \"MEX\",\n \"unit_price\" => doubleval($pago->monto)\n );\n $ids = $ids . $pago->id . \"-\";\n array_push($items, $item);\n }\n }\n\n if (Config::get('params.prueba_pago'))\n {\n $referer = Url::route('obtener_pago_prueba');\n }\n else\n {\n $referer = Request::header('referer');\n }\n\n $preference_data = array(\n \"items\" => $items,\n \"payer\" => array(\n \"name\" => Auth::user()->userable->nombre,\n \"email\" => Auth::user()->email,\n ),\n \"back_urls\" => array(\n \"success\" => $referer,\n \"failure\" => $referer,\n \"pending\" => $referer,\n ),\n \"external_reference\" => $ids,\n );\n\n $preference = $this->checkout->generar_preferencia($preference_data);\n if (isset($preference))\n {\n $link = $preference['response'][Config::get('payment.init_point')];\n return Redirect::away($link);\n }\n else\n {\n Session::flash('error', 'Ocurrio un error al tratar de generar el pago.');\n return Redirect::back();\n }\n }", "public function paginate(Request $request);", "function getCuentaMovimiento (Request $request, $Cuenta_id) {\n $page = $request->input('page');\n if ($page) {\n $cuenta_pagos = cuenta_pagos::where('cuenta_id','=', $Cuenta_id)\n ->orderBy('fecha_pago','desc')\n ->paginate(8);\n } else {\n $cuenta_pagos = cuenta_pagos::where('cuenta_id','=', $Cuenta_id)\n ->orderBy('fecha_pago','desc')\n ->get();\n }\n return $cuenta_pagos;\n }", "public function getPaginas($OficialiaDto, $param, $estado) {\n $inicia = false;\n $orden = \" \";\n $campos = \" a.cveAdscripcion, a.desAdscripcion, o.cveOficialia, o.desOficilia, o.cveDistrito, d.desDistrito, o.cveMunicipio, m.desMunicipio, e.cveEstado, e.desEstado \";\n $orden .= \" o inner join tbladscripciones a on a.cveAdscripcion = o.cveAdscripcion \";\n $orden .= \" left join tblmunicipios m on m.cveMunicipio = o.cveMunicipio \";\n $orden .= \" left join tbldistritos d on d.cveDistrito = o.cveDistrito \";\n $orden .= \" left join tblestados e on e.cveEstado = d.cveEstado AND e.cveEstado = m.cveMunicipio \";\n $orden .= \" where a.activo = 'S' \";\n $orden .= \" AND o.activo = 'S' \";\n if ($estado != \"\")\n $orden .= \" AND e.cveEstado = \" . $estado . \" \";\n if ($OficialiaDto->getCveMunicipio() != \"\")\n $orden .= \" AND o.cveMunicipio = \" . $OficialiaDto->getCveMunicipio() . \" \";\n if ($OficialiaDto->getCveDistrito() != \"\")\n $orden .= \" AND o.cveDistrito = \" . $OficialiaDto->getCveDistrito() . \" \";\n if ($OficialiaDto->getDesOficilia() != \"\")\n $orden .= \" AND o.desOficilia like '%\" . $OficialiaDto->getDesOficilia() . \"%' \";\n $OficialiaDao = new OficialiaDAO();\n $param[\"paginacion\"] = false;\n $oficialia = new OficialiaDTO();\n $numTot = $OficialiaDao->selectOficialia($oficialia, $orden, null, null, \" count(o.cveOficialia) as totalCount \");\n $Pages = (int) $numTot[0]['totalCount'] / $param[\"cantxPag\"];\n $restoPages = $numTot[0]['totalCount'] % $param[\"cantxPag\"];\n $totPages = $Pages + (($restoPages > 0) ? 1 : 0);\n\n $json = \"\";\n $json .= '{\"type\":\"OK\",';\n $json .= '\"totalCount\":\"' . $numTot[0]['totalCount'] . '\",';\n $json .= '\"data\":[';\n $x = 1;\n\n if ($totPages >= 1) {\n for ($index = 1; $index <= $totPages; $index++) {\n\n $json .= \"{\";\n $json .= '\"pagina\":' . json_encode(utf8_encode($index)) . \"\";\n $json .= \"}\";\n $x++;\n if ($x <= ($totPages )) {\n $json .= \",\";\n }\n }\n $json .= \"],\";\n $json .= '\"pagina\":{\"total\":\"\"},';\n $json .= '\"total\":\"' . ($index - 1) . '\"';\n $json .= \"}\";\n } else {\n $json .= \"]}\";\n }\n return $json;\n }", "public function page($pagination_link, $values,$other_url){\n $total_values = count($values);\n $pageno = (int)(isset($_GET[$pagination_link])) ? $_GET[$pagination_link] : $pageno = 1;\n $counts = ceil($total_values/$this->limit);\n $param1 = ($pageno - 1) * $this->limit;\n $this->data = array_slice($values, $param1,$this->limit); \n \n \n if ($pageno > $this->total_pages) {\n $pageno = $this->total_pages;\n } elseif ($pageno < 1) {\n $pageno = 1;\n }\n if ($pageno > 1) {\n $prevpage = $pageno -1;\n $this->firstBack = array($this->functions->base_url_without_other_route().\"/$other_url/1\", \n $this->functions->base_url_without_other_route().\"/$other_url/$prevpage\");\n // $this->functions->base_url_without_other_route()./1\n // $this->firstBack = \"<div class='first-back'><a href='blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/1'>\n // <i class='fa fa-arrow-circle-o-left' aria-hidden='true'></i>&nbsp;First\n // </a> \n // <a href='blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/$prevpage'>\n // <i class='fa fa-arrow-circle-o-left' aria-hidden='true'></i>&nbsp;\n // prev\n // </a></div>\";\n }\n\n // $this->where = \"<div class='page-count'>(Page $pageno of $this->total_pages)</div>\";\n $this->where = \"page $pageno of $this->total_pages\";\n if ($pageno < $this->total_pages) {\n $nextpage = $pageno + 1;\n $this->nextLast = array($this->functions->base_url_without_other_route().\"/$other_url/$nextpage\",\n $this->functions->base_url_without_other_route().\"/$other_url/$this->total_pages\");\n // $this->nextLast = \"blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/$nextpage'>Next&nbsp;\n // <i class='fa fa-arrow-circle-o-right' aria-hidden='true'></i></a> \n // <a href='blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/$this->total_pages'>Last&nbsp;\n // <i class='fa fa-arrow-circle-o-right' aria-hidden='true'></i>\n // </a></div>\";\n }\n\n return $pageno;\n }", "public function pagina( $pagina = 1 )\n\t{\n\t\tfunction paginator_botao($label = null, $position = 1 ){\n\t\t\t$ini = \"\n\t\t\t\t\t<li class='page-item'>\n\t\t\t\t\t\t<a class='page-link' href=$position>\"; \n\t\t\t\t\t\t\n\t\t\t$final = \" </a>\n\t\t\t </li>\";\n\t\t\t$botao = $ini . $label . $final;\n\t\t\t\n\t\t\t//var_dump($botao);\n\t\t\t//exit;\n\n\t\t\treturn $botao;\n\t\t}\n\n\t\t// para limitar\n\t\t$pagina = isset($pagina) ? (int) $pagina : 1;\n\t\tif($pagina <= 1) $pagina = 1;\n\n\t\t$reg_por_pag = 14;\n\t\t$bot_por_pag = 5;\n\n\t\t# define se o primeiro botao está ou nao desativado\n\t\tif( $pagina == 1 ){\n\t\t\t$data['btnA'] = 'disable';\n\t\t} else {\n\t\t\t$data['btnA'] = '';\n\t\t}\n\t\t# Carrega o Model Pessoa\n\t\t$this->load->model('pessoa_model', 'pessoa');\n\t\t$qtd_reg = $this->pessoa->get_qtde_teste(); // nao precisa fazer outro select para contar total\n\t\t$qtde_paginas = (int) ceil($qtd_reg / $reg_por_pag);\n\n\t\tif($pagina > $qtde_paginas) $pagina = 1;\n\n\t\t// INICIO DA PAGINA SERVIRA PARA APONTAR PARA O REGISTRO A SER EXIBIDO\n\t\t$inicio_pagina = ($pagina - 1) * $reg_por_pag;\n\n\t\t$this->load->model('pessoa_model', 'pessoa');\n\t\t$data['pessoas'] = $this->pessoa->get_people_pag($inicio_pagina, $reg_por_pag);\n\n\n\t\tif( $pagina == $qtde_paginas ) {\n\t\t\t$data['btnP'] = 'disable';\n\t\t} else {\n\t\t\t$data['btnP'] = '';\n\t\t}\n\t\t\n\t\t// Conteudo = \"<input id='btnOculta_\" + lin + \"' type='button' value='novo' class='btn btn-default' onclick='Ocultar(this, \\\"OcultaNovoMedicamento_1\\\")' style='float:left' />\";\n\t\t$btnA = \"\";\n\t\t$hrefBtnA = \"<?php echo base_url(\" . \"pessoas/pagina/)\" ;\n\t\t$pagina_anterior = '';\n\t\t// paginator já ira pronto para o HTML, não haverá a necessidade de <?php echo > dentro \n\t\n\t\t$botao_primeiro = \"\n\t\t\t\t\t<li class='page-item'>\n\t\t\t\t\t\t<a class='page-link' \n\t\t href= '1' >\t\t\t\t\t\t\n\t\t Primeiro\n\t\t </a>\n\t\t </li>\n\t\t\"; \n\n\t\t$botao_ultimo = paginator_botao( 'Ultimo', $qtde_paginas);\n\n\t\t//$botao = array();\n\t\t// estava dando um erro aqui 22/07/2020 de offset\n\t\t\n\n\t\tfor($i = 1; $i<= $qtde_paginas; $i ++){\n\t\t\t$botao[$i] = paginator_botao( \"$i\" , $i );\n\t\t}\n\n\t\t$botao_prev = paginator_botao( '&#10218', ($pagina - 1) );\n\t\t$botao_next = paginator_botao( '&#10219', ($pagina + 1) );\n\t\t\n\n\t\t$paginatorInicio = \"\n\t\t <nav aria-label='...'>\n\t\t\t\t<ul class='pagination justify-content-center'>\n\t\t\"; \n\t\t$paginatorFinal = \"\n\t\t </ul>\n\t\t </nav>\t\n\t\t\"; \n\t\t$paginator = $paginatorInicio . $paginatorFinal;\n\n\t\t$ord = $pagina;\n\t\t//echo $ord;\n\t\t//exit;\n\n\t\t\n\t\t$botoes = '';\n\n\t\tif($pagina > 1 ){\n\t\t\t if ($pagina < $qtde_paginas-$bot_por_pag){\n\t\t\t\tfor ( $i=$pagina ; $i <= ($pagina + $bot_por_pag); $i++ ){\n\t\t\t\t\t$botoes .= $botao[$i];\n\t\t\t\t\t//echo $botoes . '<br>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$paginator = $paginatorInicio . \n\t\t\t\t$botao_primeiro .\n\t\t\t\t$botao_prev .\n\t\t\t\t$botoes . \n\t\t\t\t$botao_next .\n\t\t\t\t$botao_ultimo .\n\t\t\t\t$paginatorFinal;\n\t\t\t }\telse {\n\t\t\t\t$pagina = $qtde_paginas-$bot_por_pag + 1;\n\t\t\t }\n\t\t}\n\n\t\tif($pagina === 1){\n\t\t\tfor ( $i=1 ; $i <= $bot_por_pag; $i++ ){\n\t\t\t\t$botoes .= $botao[$i];\n\t\t\t}\n\t\t\t$paginator = $paginatorInicio . \n\t\t\t $botoes . \n\t\t\t\t\t\t $botao_next .\n\t\t\t\t\t\t $botao_ultimo .\n\t\t\t\t\t\t $paginatorFinal;\n\t\t}\n\n\t\tif(($pagina === $qtde_paginas) or ($pagina === $qtde_paginas-$bot_por_pag+1) ){\n\t\t\tfor ( $i=$qtde_paginas-$bot_por_pag ; $i <= $qtde_paginas; $i++ ){\n\t\t\t\tif($pagina < $qtde_paginas){\n\t\t\t\t\t$botoes .= $botao[$i];\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$paginator = $paginatorInicio . \n\t\t\t\t\t\t $botao_primeiro .\n\t\t\t\t\t\t $botao_prev .\n\t\t\t\t\t\t $botoes . \n\t\t\t\t\t\t $paginatorFinal;\n\t\t}\n\n\n\t\t$data['paginator'] = $paginator;\n\t\t$data['qtde_botoes'] = $bot_por_pag;\n\t\t$data['qtde_paginas']= $qtde_paginas;\n\t\t$data['pagina'] = $pagina;\n\t\t$data['qtd_reg'] = $qtd_reg;\n\n\n\n\t\t//Carregamos a view listarpessoa e passamos como parametro a array pessoa que guarda todos os pessoa da db pessoa\n\t\t$this->load->view('/template/cabecalho');\n\t\t#$this->load->view('barra_usuario');\n\t\t$this->load->view('listar_pessoas', $data);\n\t\t$this->load->view('/template/rodape');\n\t}", "function createPagingCustom($table,$cond=\"\",$nik=\"\") {\n\n\t\tglobal $db, $start, $num, $pageFrom, $pageNum, $query, $field;\n\n\t\tif (strlen($cond)) $condString= \"WHERE \".$cond;\n\n\t\t$strSQL\t\t= \"SELECT * from $table $condString \";\n\t\t$result\t\t= $db->Execute($strSQL);\n\t\tif (!$result) print $db->ErrorMsg();\n\t\t$totalData\t= $result->RecordCount();\n\n\t\t$totalPage\t= ceil($totalData/$num);\n\t\t$sisa\t\t= $totalPage - $pageFrom;\n\n\t\tif ( $sisa < $pageNum ) $pageTo = $pageFrom + $sisa; else $pageTo = $pageFrom + $pageNum;\n\n\t\tif ( ($pageFrom - $pageNum) < 0 ) $pageBefore = 0; else $pageBefore = $pageFrom - $pageNum;\n\t\tif ( ($pageFrom + $pageNum) > ($totalPage - $pageNum) ) $pageNext = $totalPage - $pageNum; else $pageNext = $pageFrom + $pageNum;\n\t\tif ( $pageNext < 0 ) $pageNext = 0;\n\n\t\tif ( ($totalPage-$pageNum)<0 ) $pageLast = 0; else $pageLast = $totalPage-$pageNum;\n\n\t\tfor ($i=$pageFrom; $i<$pageTo; ++$i) {\n\t\t\t$page_i = $i + 1;\n\t\t\t$next_i = $i * $num;\n\t\t\tif ($next_i == $start) {\n\t\t\t\t$page .= \" <a href=$PHP_SELF?act=list&start=$next_i&num=$num&pageFrom=$pageFrom&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field><b>$page_i</b></a> \";\n\t\t\t} else {\n\t\t\t\t$page .= \" <a href=$PHP_SELF?act=list&start=$next_i&num=$num&pageFrom=$pageFrom&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field>$page_i</a> \";\n\t\t\t}\n\t\t}\n\n\t\t$final =\t\"<a \t\thref=$PHP_SELF?act=list&start=0&num=$num&pageFrom=0&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field>awal</a>\".\n\t\t\" | <a href=$PHP_SELF?act=list&start=\".($pageBefore*$num).\"&num=$num&pageFrom=$pageBefore&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field><<</a> \".\n\t\t$page.\n\t\t\" <a href=$PHP_SELF?act=list&start=\".($pageNext*$num).\"&num=$num&pageFrom=$pageNext&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field>>></a> | \".\n\t\t\"<a href=$PHP_SELF?act=list&start=\".(($totalPage-1)*$num).\"&num=$num&pageFrom=\".$pageLast.\"&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field>akhir</a>\";\n\n\t\treturn $final;\n\t}", "function pagarcredito($idempleado,$money,$idencargado, $caja){\r\n\t$iduser = substr($idempleado, 1);\r\n\t$onoma=$caja->nameUser($iduser);\r\n\t$idMov=$caja->insert_movimiento(\"entrada\",$money,\"Cobrado Credito \".$onoma,9,$idencargado);\r\n\t$caja->insert_mov_credito($idMov,-$money,$iduser,1,\"HR\");\r\n\t//$response = loadtickets($caja,$iduser);\t\r\n\t$response = loadmovimientos($caja,$iduser);\t\r\n\t$totalTickets=$caja->total_cuenta($iduser);\r\n\t$response[\"TotalTickets\"]=$totalTickets;\r\n\treturn $response;\t\r\n}", "public function enlacesPaginas(){\n if ( isset($_GET[\"action\"])) {\n $enlaces = $_GET[\"action\"];\n }else {\n $enlaces = \"index\";\n }\n\n\n $respuesta = ClsRoutes::routes($enlaces);\n include $respuesta;\n }", "function newPaging($data) {\n $batas = $data['setPage'];\n $halaman = $data['halaman'];\n if (empty($halaman)) {\n $posisi = 0;\n $halaman = 1;\n } else {\n $posisi = ($halaman - 1) * $batas;\n }\n\n //Langkah 2: Sesuaikan perintah SQL\n $tampil = \"SELECT * FROM anggota LIMIT $posisi,$batas\";\n //print_r($tampil);\n $hasil = mysql_query($tampil);\n\n $no = $posisi + 1;\n while ($r = mysql_fetch_array($hasil)) {\n echo \"<tr><td>$no</td><td>$r[nama]</td><td>$r[alamat]</td></tr>\";\n $no++;\n }\n echo \"</table><br>\";\n\n //Langkah 3: Hitung total data dan halaman \n $tampil2 = mysql_query(\"SELECT * FROM anggota\");\n $jmldata = mysql_num_rows($tampil2);\n $jmlhal = ceil($jmldata / $batas);\n\n echo \"<div class=paging>\";\n // Link ke halaman sebelumnya (previous)\n if ($halaman > 1) {\n $prev = $halaman - 1;\n echo \"<span class=prevnext><a href=$_SERVER[PHP_SELF]?halaman=$prev>« Prev</a></span> \";\n } else {\n echo \"<span class=disabled>« Prev</span> \";\n }\n\n // Tampilkan link halaman 1,2,3 ...\n for ($i = 1; $i <= $jmlhal; $i++)\n if ($i != $halaman) {\n if (isset($_GET['setPage'])) {\n $setPage = $_GET['setPage'];\n echo \" <a href=$_SERVER[PHP_SELF]?halaman=$i&setPage=$setPage>$i</a> \";\n } else {\n echo \" <a href=$_SERVER[PHP_SELF]?halaman=$i>$i</a> \";\n }\n } else {\n echo \" <span class=current>$i</span> \";\n }\n\n // Link kehalaman berikutnya (Next)\n if ($halaman < $jmlhal) {\n $next = $halaman + 1;\n echo \"<span class=prevnext><a href=$_SERVER[PHP_SELF]?halaman=$next>Next »</a></span>\";\n } else {\n echo \"<span class=disabled>Next »</span>\";\n }\n echo \"</div>\";\n}", "public function action_listar() {\r\n $auth = Auth::instance();\r\n if ($auth->logged_in()) {\r\n $oNuri = New Model_Asignados();\r\n $count = $oNuri->count($auth->get_user());\r\n //$count2= $oNuri->count2($auth->get_user()); \r\n if ($count) {\r\n // echo $oNuri->count2($auth->get_user());\r\n $pagination = Pagination::factory(array(\r\n 'total_items' => $count,\r\n 'current_page' => array('source' => 'query_string', 'key' => 'page'),\r\n 'items_per_page' => 40,\r\n 'view' => 'pagination/floating',\r\n ));\r\n $result = $oNuri->nuris($auth->get_user(), $pagination->offset, $pagination->items_per_page);\r\n $page_links = $pagination->render();\r\n $this->template->title = 'Hojas de Seguimiento';\r\n $this->template->styles = array('media/css/tablas.css' => 'screen');\r\n $this->template->content = View::factory('nur/listar')\r\n ->bind('result', $result)\r\n ->bind('page_links', $page_links);\r\n } else {\r\n $this->template->content = View::factory('errors/general');\r\n }\r\n } else {\r\n $this->request->redirect('login');\r\n }\r\n }", "public function pagination($numRegistros,$numFilas){\n if(!empty($_GET[\"p\"])){\n $pagina = $_GET[\"p\"];\n }\n else{\n $pagina = 1;\n }\n $inicio = ($pagina - 1) * $numRegistros; // Calcula de donde va a comenzar cada registros\n $totalPagina = ceil($numFilas / $numRegistros); // Calcula cuantos numero de pagina a ver\n $datosPagination = array(\"inicio\" => $inicio, \"totalPagina\" => $totalPagina); // Coloca los datos calculados en un array\n return $datosPagination; // Retorna los datos de la paginancion\n }", "public function list_limit($var,$page){\n if($page>1){\n $page=$page*6-6;\n }else{\n $page=0;\n }\n $sql=\"SELECT a.identificador, a.nombre_inmueble ,e.nombre_t_inmueble ,d.nombre_distrito ,a.direccion ,a.numero ,a.superficie ,\n a.habitaciones ,a.baño ,a.cochera ,a.descripcion ,a.precio ,a.from_url ,a.fecha ,a.tipo ,b.id_operacion ,b.id_people ,\n c.nombre_t_operacion,f.id_contrato,f.identificador as id_contrato,g.tiempo ,f.contrato \n from inmueble as a inner join operacion as b on a.id_inmuebe=b.id_inmueble \n inner join tipo_operacion as c on b.tipo_operacion=c.id_t_operacion inner join distrito as d on a.id_distrito =d.id_distrito\n inner join tipo_inmueble as e on a.tipo_inmueble=e.id_tipo_inmueble inner join contrato as f on b.id_operacion=f.id_operacion\n inner join tipo_contrato as g on f.id_t_contrato=g.id_t_contrato where a.tipo =? limit $page,6\";\n $rs=$this->con->prepare($sql);\n $rs->execute(array($var));\n return $rs->fetchAll(PDO::FETCH_OBJ);\n\t\t}", "public function index()\n {\n //\n $noticias = Noticia::latest()->paginate(10);\n return view('noticias.index',compact('noticias'))\n ->with('i', (request()->input('page',1)-1)*5);\n }", "function paging($condtion='1')\r\n {\r\n /*\r\n $url = '';\r\n \t if(isset($_GET[\"brand\"])){\r\n \t \t$value = trim($_GET['brand']);\r\n \t \tif($value != \"\"){\r\n\t \t \t$condtion = sprintf(\"brand='%s'\",$value);\r\n\t \t \t$url = '&brand='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"module\"])){\r\n \t \t$value = trim($_GET['module']);\r\n \t \tif($value != \"\"){\r\n\t \t \t$module = sprintf(\"series='%s'\",$value);\r\n\t \t \t$condtion = $condtion.' and '.$module;\r\n\t \t \t$url = $url.'&module='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"part\"])){\r\n \t \t$value = trim($_GET['part']);\r\n \t \tif($value != \"\"){ \t \t\r\n\t \t \t$part = sprintf(\"module='%s'\",$value);\r\n\t \t \t$condtion = $condtion.' and '.$part;\r\n\t \t \t$url = $url.'&part='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"key\"])){\r\n \t \t$value = trim($_GET[\"key\"]);\r\n \t \tif($value != \"\"){\r\n\t \t \t$condtion = $this->key_query($value,$url);\r\n\t \t \techo \"++++++++++\".$condtion;\r\n\t \t \t//$url = $url.'&part='.$value; \t \t\r\n \t \t}\r\n \t }\r\n \t */\r\n // get current page index\r\n $page = 1;\r\n \t if(isset($_GET[\"page\"])){\r\n \t \t$page = $_GET['page'];\r\n \t }\r\n \t \r\n \t // set paging parameters\r\n $number = 6; \r\n $total = $this->total;\r\n $url = $this->pget;\r\n $condtion = $this->cond;\r\n //$total = $this->getTotal($condtion);\r\n \r\n $url = '?page={page}'.$url; \r\n $pager = new Paging($total,$number,$page,$url);\r\n \t \r\n \t // get publish records\r\n\t $db = GLOBALDB();\r\n $sql = \"SELECT * FROM publish WHERE \".$condtion.\" order by id desc LIMIT \".$pager->limit.\",\".$pager->size;\r\n $result = $db->query($sql); \r\n $this->display($result);\r\n \r\n // show paging bar\r\n //echo $sql;\r\n\t $pager->show();\r\n }", "function getPagelist($sql = '', $fields = array(), $mod = array())\n{\n $count = count(db(sql));\n $totalNum = ceil($count / PAGE_NUM);\n $path = $request_url['path'];\n\n $page = (isset($_GET['page']) && $_GET['page'] != '') ? $_GET['page'];\n// 组装limit语句\n $limit = 'LIMIT' . ($page - 1) * PAGE_NUM . ',' . PAGE_NUM;\n $datas = db($sql, $limit);\n $html = getTable($datas, $fields, $mod);\n $start = ($page - PAGE_OFFSET) > 0 ? $page - PAGE_OFFSET : 1;//获取左侧位置的偏移\n $end = ($page + PAGE_OFFSET) < $totalNum ? $page + PAGE_OFFSET : $totalNum;\n $html .= '<div class=\"page\">';\n if ($page > 1) {\n $html .= '<a href=\"' . $path . '?page=' . ($page - 1) . '\">上一页</a>';\n $html .= '<a href=\"' . $path . '?page=1\">首页</a>';\n }\n for($i = $start;$i<=$end;$i++)\n {\n $class = ($i==$page)?'class=\"on\"':'';\n $html .='<a href =\"'.$path.'?page='.$i.'\"'.$class.'>'.$i.'</a>';\n\n\n }\n if ($page < $totalNum) {\n ;\n $html .= '<a href=\"' . $path . '?page='.$totalNum.'\">尾页</a>';\n $html .= '<a href=\"' . $path . '?page='.($page+1).'\">下一页</a>';\n }\n $html .='共'.$totalNum.'页';\n $html .='</div>';\n return $html;\n}", "function produitLoadResumePagination($db,$begin,$nbperpage=10){\n $begin = (int) $begin;\n $nbperpage = (int) $nbperpage;\n $req = \"SELECT P.idproduit, P.modele, LEFT(P.descriptif,300) AS modele, C.genre, I.legend, GROUP_CONCAT(I.legend SEPARATOR '|||') AS theimages_titre, GROUP_CONCAT(C.genre SEPARATOR '|||') AS genre\nFROM produits P \n LEFT JOIN produits_has_categorie PHC \n ON PHC.produits_id = P.idproduit\n LEFT JOIN images I \n ON I.idmage = produits_idproduit\nGROUP BY P.idproduit\nORDER BY P.prix DESC \nLIMIT $begin, $nbperpage;\";\n $recup = mysqli_query($db,$req);\n // si au moins 1 résultat\n if(@mysqli_num_rows($recup)){\n // on utilise le fetch all car il peut y avoir plus d'un résultat\n return mysqli_fetch_all($recup,MYSQLI_ASSOC);\n }\n // no result\n return false;\n}", "public function index(){\n //crea un arreglo y pone como dato lo que se va a mostrar en la vista \n $noticias = $this->noticia_modelo->traerParte(0,15);\n $datos = [\n 'titulo' => 'NotiFalso',\n 'noticias' => $noticias\n ];\n //inicia la vista \n $this->vista('paginas/inicio',$datos);\n }", "function pagocobrobancossaldos($periodo,$ejer,$moneda,$cuenta,$opc){\n\t\tswitch($opc){\n\t\t\tcase 1://cargo\n\t\t\t\t$mov=\"Cargo M.E.\";\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$mov=\"Abono M.E\";\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$mov=\"Abono\";\n\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$mov=\"Cargo\";\n\t\t\tbreak;\n\t\t}\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,sum(m.Importe) importe,m.TipoMovto,c.description,p.relacionExt,p.concepto,p.idperiodo,c.manual_code\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=\".$moneda.\" and c.`main_father`=conf.CuentaBancos and m.TipoMovto='\".$mov.\"'\n\t\t\tand m.IdPoliza=p.id and p.activo=1 and m.Activo=1 and p.idperiodo<=\".$periodo.\" and m.Cuenta=\".$cuenta.\"\n\t\t\tand p.id not in(select id from cont_polizas where concepto='POLIZA DE AJUSTE POR DIFERENCIA CAMBIARIA' and idperiodo=\".$periodo.\")\n\t\t\tgroup by m.Cuenta,p.idperiodo,m.TipoMovto\");\n\t\t\treturn $sql;\n\t\t}", "function paginateWithExtra($size = 15);", "function listarObligacionPagoSol()\n {\n $this->objParam->defecto('ordenacion', 'id_obligacion_pago');\n $this->objParam->defecto('dir_ordenacion', 'asc');\n\n $this->objParam->addParametro('id_funcionario_usu', $_SESSION[\"ss_id_funcionario\"]);\n\n\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoUnico') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion = ''pago_unico''\");\n }\n\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoSol') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''pago_directo'',''rrhh'')\");\n }\n\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoAdq') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion = ''adquisiciones''\");\n }\n\n if ($this->objParam->getParametro('id_obligacion_pago') != '') {\n $this->objParam->addFiltro(\"obpg.id_obligacion_pago = \" . $this->objParam->getParametro('id_obligacion_pago'));\n }\n\n if ($this->objParam->getParametro('filtro_campo') != '') {\n $this->objParam->addFiltro($this->objParam->getParametro('filtro_campo') . \" = \" . $this->objParam->getParametro('filtro_valor'));\n }\n if ($this->objParam->getParametro('id_gestion') != '') {\n $this->objParam->addFiltro(\"obpg.id_gestion = \" . $this->objParam->getParametro('id_gestion') . \" \");\n\n }\n\n //(may)para internacionales SP, SPD, SPI\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoS') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''sp'')\");\n }\n if ($this->objParam->getParametro('tipo_interfaz') == 'solicitudObligacionPagoUnico') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''spd'')\");\n }\n\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoInterS') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''spi'')\");\n }\n\n //03/12/2020 (may) para pagos POC\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoPOC') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''pago_poc'')\");\n }\n\n //filtro breydi.vasquez 07/01/2020 \n $this->objParam->getParametro('tramite_sin_presupuesto_centro_c') != '' && $this->objParam->addFiltro(\"obpg.presupuesto_aprobado = ''sin_presupuesto_cc'' \");\n //\n \n if($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\n $this->objReporte = new Reporte($this->objParam,$this);\n $this->res = $this->objReporte->generarReporteListado('MODObligacionPago','listarObligacionPagoSol');\n } else{\n $this->objFunc=$this->create('MODObligacionPago');\n \n $this->res=$this->objFunc->listarObligacionPagoSol($this->objParam);\n }\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function getPages();", "function listar_noticias_limit($inicial,$cantidad) {\n\t\n\t\t$query = \"SELECT noticias.*, colaboradores.*\n\t\tFROM noticias, colaboradores\n\t\tWHERE noticias.id_colaborador=colaboradores.id_colaborador\n\t\tAND noticias.estado=1\n\t\tORDER BY noticias.fecha_insercion desc\n\t\tLIMIT $inicial,$cantidad\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function getPerPage();", "function pagination_siswa($id){\n\t\t$post = $this->input->post();\t\t\t\t\t\t\n\t\t$post['id_to'] =$id;\n\n\t\t$jumlah_data = $this->msiswa->get_siswa_blm_ikutan_to_pagination_number($post);\n\n\t\t$pagination = '<li class=\"hide\" id=\"page-prev\"><a href=\"javascript:void(0)\" onclick=\"prevPage()\" aria-label=\"Previous\">\n\t\t<span aria-hidden=\"true\">&laquo;</span>\n\t</a></li>';\n\t$pagePagination=1;\n\n\t$sumPagination=($jumlah_data/$post['records_per_page']);\n\tfor ($i=0; $i < $sumPagination; $i++) { \n\t\tif ($pagePagination<=7) {\n\t\t\t$pagination.='<li ><a href=\"javascript:void(0)\" onclick=\"selectPage('.$i.')\" id=\"page-'.$pagePagination.'\">'.$pagePagination.'</a></li>';\n\t\t}else{\n\t\t\t$pagination.='<li class=\"hide\" id=\"page-'.$pagePagination.'\"><a href=\"javascript:void(0)\" onclick=\"selectPage('.$i.')\" >'.$pagePagination.'</a></li>';\n\t\t}\n\t\t$pagePagination++;\n\t}\n\tif ($pagePagination>7) {\n\t\t$pagination.='<li class=\"\" id=\"page-next\">\n\t\t<a href=\"javascript:void(0)\" onclick=\"nextPage()\" aria-label=\"Next\">\n\t\t\t<span aria-hidden=\"true\">&raquo;</span>\n\t\t</a>\n\t</li>';\n}\n// cek jika halaman pagination hanya satu set pagination menjadi null\nif ($sumPagination<=1) {\n\t$pagination='';\n}\necho json_encode($pagination);\n\n}", "public function paginate($no = 10, $columns = ['*']);", "public function getPages() {}", "public function page_news($offset)//每頁顯示的新聞列表\r\n {\r\n $query = $this->db->order_by('date_time','DESC')->get_where('news',array('state' => '0'),11,$offset);\r\n return $query->result_array();\r\n }", "function requestAllDadosProduto($page, $itensPorPagina)\n {\n\n $conn = new db_conect();\n $query = 'SELECT \n produto.codigo AS codigo,\n produto.nome AS produto, \n produto.preco, \n qntd_disponivel,\n qntd_min_vendida,\n categoria,\n tipo_venda,\n data_producao,\n data_validade,\n cliente.cpf AS vendedor_fk, \n cliente.nome AS vendedor, \n produto.data_cadastro AS data_anuncio, \n produto.avaliacao AS avaliacao_produto, \n produto.num_vendas AS num_vendas_produto, \n produto.num_visualizacao AS visualizacoes, \n caminho_foto AS foto \n FROM produto \n INNER JOIN cliente ON cliente.CPF = produto.produtor_fk \n INNER JOIN img_produto ON img_produto.produto_fk = produto.codigo \n WHERE \n produtor_fk = \"' . base64_decode($_SESSION['log_id']) . '\" \n AND \n caminho_foto = (SELECT caminho_foto FROM img_produto WHERE produto_fk = produto.codigo LIMIT 1) \n ORDER BY data_anuncio ASC LIMIT ' . $page . ', ' . $itensPorPagina . ';';\n\n\n $result = $conn->selectCustom($query);\n return $result;\n }", "function getPagos() {\n $where = \" WHERE 1\";\n $array = \"\";\n $columns = \"`Id_pago`, `Nombre`, `Email`, `Fecha_anterior`, `Pago`, `Proxima_fecha`, `Estatus`, `Id_cliente`\";\n $response = $this->db->select3($columns, 'pagos', $where, $array);\n return $response;\n }", "public function printPagination(){\n\t\tif ($_GET['id'] > 1) { \n\t\t\t$this->returnPagination .= \"<a class='page-link' href='\".ROOT_URL. \"\" .$this->tablePagination.\"/1'> Prva </a>\";\n\t\t\t $this->returnPagination .= \"<a class='page-link' href='\".ROOT_URL. \"\" .$this->tablePagination.\"/\".($this->pageid-1).\"'> < </a>\";\n\t\t\t if ($_GET['id'] > 4) { \n\t\t\t $this->returnPagination .= \"<a class='page-link'> ... </a>\";}\n\t\t}\n\n\t\tif ($_GET['id']>3) {\n\t\t\tif ($_GET['id']>($this->brredova-3)){\n\t\t\t\t$start = $_GET['id'] - 3;\n\t\t \t\t$end = $this->brredova;\n\t\t\t} else {\n\t\t\t\t$start = $_GET['id'] - 3;\n\t\t \t\t$end = $_GET['id'] + 3;\n\t\t\t}\t\n\t\t } else {\n\t\t \t$start = 1;\n\t\t \t$end = 7;\n\t\t }\n\n\t\tfor ( $this->pageid = $start; $this->pageid<=$end; $this->pageid++) {\n\n\n\t\t\tif ($_GET['id'] == $this->pageid) {\n\t\t\t\t$this->returnPagination .= \"<a class='page-link' style='color: red;' href='\".ROOT_URL. \"\" .$this->tablePagination.\"/\".$this->pageid.\"'>\" . $this->pageid . \"</a>\";\n\t\t\t}else{\n\t\t\t\t $this->returnPagination .= \"<a class='page-link' href='\".ROOT_URL. \"\" .$this->tablePagination.\"/\".$this->pageid.\"'>\" . $this->pageid . \"</a>\";\n\t\t\t}\n\t\t \n\t\t}\n\n\t\tif ($_GET['id'] < $this->brredova) { \n\t\t\t if ($_GET['id'] < $this->brredova - 3) { $this->returnPagination .= \"<a class='page-link'> ... </a>\";}\n\t\t\t $this->returnPagination .= \"<a class='page-link' title='Next' href='\".ROOT_URL. \"\" .$this->tablePagination.\"/\".($_GET['id']+1).\"'> > </a>\";\n\t\t\t $this->returnPagination .= \"<a class='page-link' href='\".ROOT_URL. \"\" .$this->tablePagination.\"/\".$this->brredova.\"'> Poslednja <span class='badge badge-primary'>\". $this->brredova .\"</span></a>\";\n\t\t}\n\n\t\treturn $this->returnPagination;\n\t}", "public function PaginacionVideos()\n\t{\n\t\t$items_per_page = Input::get('can');\n\t\t$ordenar_items = Input::get('orde');\n\t\t$forma_orden = Input::get('por');\n\t\t$campos = array('id', 'title', 'videourl','rate','times_viewed','thumburl');\n $config = ConfigApp::First()->get();\n \n $items = Video::where('published', '=', 1)->where('memberid', '=', $config[0][\"UserJoomla\"])->where('filepath', '!=', 'File')->orderBy($ordenar_items, $forma_orden)->select($campos)->paginate($items_per_page);\n if ($items->isEmpty()) {\n\t\t echo '<div class=\"box-content\"><legend id=\"uniq\" class=\"alert alert-info\">No hay videos para visualizar</legend></div>';\n\t\t exit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$view = View::make('pages.video.items')->with('items', $items);\n\t\t echo $view;\n\t\t exit;\n\t\t}\n\t}", "public function paginate()\n {\n return paginate(SystemLog::latest()->oldest('seen_at'));\n }", "function listarSolicitudObligacionPagoSol()\r\n {\r\n $this->procedimiento = 'tes.ft_solicitud_obligacion_pago_sel';\r\n $this->transaccion = 'TES_SOOBPGSOL_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('tipo_interfaz', 'tipo_interfaz', 'varchar');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_obligacion_pago', 'int4');\r\n $this->captura('id_proveedor', 'int4');\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('estado', 'varchar');\r\n $this->captura('tipo_obligacion', 'varchar');\r\n $this->captura('id_moneda', 'int4');\r\n $this->captura('moneda', 'varchar');\r\n $this->captura('obs', 'varchar');\r\n $this->captura('porc_retgar', 'numeric');\r\n $this->captura('id_subsistema', 'int4');\r\n $this->captura('nombre_subsistema', 'varchar');\r\n $this->captura('id_funcionario', 'int4');\r\n $this->captura('desc_funcionario1', 'text');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('porc_anticipo', 'numeric');\r\n $this->captura('id_estado_wf', 'int4');\r\n $this->captura('id_depto', 'int4');\r\n $this->captura('nombre_depto', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('fecha_reg', 'timestamp');\r\n $this->captura('id_usuario_reg', 'int4');\r\n $this->captura('fecha_mod', 'timestamp');\r\n $this->captura('id_usuario_mod', 'int4');\r\n $this->captura('usr_reg', 'varchar');\r\n $this->captura('usr_mod', 'varchar');\r\n $this->captura('fecha', 'date');\r\n $this->captura('numero', 'varchar');\r\n $this->captura('tipo_cambio_conv', 'numeric');\r\n $this->captura('id_gestion', 'integer');\r\n $this->captura('comprometido', 'varchar');\r\n $this->captura('nro_cuota_vigente', 'numeric');\r\n $this->captura('tipo_moneda', 'varchar');\r\n $this->captura('total_pago', 'numeric');\r\n $this->captura('pago_variable', 'varchar');\r\n $this->captura('id_depto_conta', 'integer');\r\n $this->captura('total_nro_cuota', 'integer');\r\n $this->captura('fecha_pp_ini', 'date');\r\n $this->captura('rotacion', 'integer');\r\n $this->captura('id_plantilla', 'integer');\r\n $this->captura('desc_plantilla', 'varchar');\r\n $this->captura('desc_funcionario', 'text');\r\n $this->captura('ultima_cuota_pp', 'numeric');\r\n $this->captura('ultimo_estado_pp', 'varchar');\r\n $this->captura('tipo_anticipo', 'varchar');\r\n $this->captura('ajuste_anticipo', 'numeric');\r\n $this->captura('ajuste_aplicado', 'numeric');\r\n $this->captura('monto_estimado_sg', 'numeric');\r\n $this->captura('id_obligacion_pago_extendida', 'integer');\r\n $this->captura('desc_contrato', 'text');\r\n $this->captura('id_contrato', 'integer');\r\n $this->captura('obs_presupuestos', 'varchar');\r\n $this->captura('uo_ex', 'varchar');\r\n\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 newskomentar_searchdata_all_bypage( $tbl_newskomentar, $cari, $offset, $dataperPage ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_newskomentar WHERE \n\t\t\tjudul LIKE '$cari' OR\n\t\t\tpesan LIKE '$cari' \n\t\t\t\tORDER BY id ASC LIMIT $offset, $dataperPage\n\t\t\"); \n \t\treturn $sql;\n}", "public function index() {\n $anuncio = new anuncios();\n //$usuario = new usuario();\n \n // $pag = \"inicial\";\n // $result = \"\";\n // if (isset($_GET['pag']) && !empty($_GET['pag'])){\n // $pag=$_GET['pag'];\n // }\n // if (isset($_GET['result']) && !empty($_GET['result'])){\n // $result=$_GET['result'];\n // }\n \n $refat = 1;\n $qtdPag = 2;\n if (isset($_GET['refat']) && !empty($_GET['refat'])){\n $refat = $_GET['refat'];\n }\n \n if (isset($_GET['filtros'])){\n $filtros = $this->iniciarFiltros($_GET['filtros']);\n if (!empty($filtros['categoria'])){\n $anuncio->setIDCategoria($filtros['categoria']);\n }\n if (!empty($filtros['preco'])){\n $preco = explode(\"-\", $filtros['preco']);\n //print_r($preco);\n $anuncio->setValor($preco);\n }\n if (!empty($filtros['estado'])){\n $anuncio->setEstado($filtros['estado']);\n }\n } else {\n $filtros = $this->iniciarFiltros();\n }\n \n //$filtros = array(\n // 'categoria' => '',\n // 'preco' => '',\n // 'estado' => ''\n //);\n \n //if (isset($_GET['filtros'])){\n // $filtros = $_GET['filtros'];\n // if (!empty($filtros['categoria'])){\n // $anuncio->setIDCategoria($filtros['categoria']);\n // }\n // if (!empty($filtros['preco'])){\n // $preco = explode(\"-\", $filtros['preco']);\n // //print_r($preco);\n // $anuncio->setValor($preco);\n // }\n // if (!empty($filtros['estado'])){\n // $anuncio->setEstado($filtros['estado']);\n // }\n //}\n \n $result = $anuncio->selecionarALLAnuncios($refat, $qtdPag);\n if ($anuncio->numRows() == 1){\n $result = array();\n $result[] = $anuncio->result();\n }\n \n $resultQTD = $anuncio->getQTDAnuncios();\n $totAnuncios = $resultQTD['qtd'];\n \n //$categorias = $cat->selecionarAllCategorias();\n //if ($cat->numRows() == 1){\n // $categorias = array();\n // $categorias[] = $cat->result();\n //}\n \n //$usuario->selecionarALLUser();\n //$totUsuarios = $usuario->numRows();\n \n //$totalPag = ceil($totAnuncios / $qtdPag);\n \n $dados = $this->getTemplateDados();\n $dados[\"refat\"] = $refat;\n $dados[\"filtros\"] = $filtros;\n $dados[\"result\"] = $result;\n //$dados[\"categorias\"] = $categorias;\n $dados[\"totAnuncios\"] = $totAnuncios;\n //$dados[\"totUsuarios\"] = $totUsuarios;\n $dados[\"totalPag\"] = ceil($totAnuncios / $qtdPag);\n \n $this->loadTemplate(\"inicial\", $dados);\n }", "public function index()\n {\n $perpage = isset($_GET['perpage'])?$_GET['perpage']:5;\n $pertanyaan = Pertanyaan::orderBy('created_at', 'desc')->paginate($perpage);\n // $get = Pertanyaan::status();\n return view('pertanyaan.timeline', compact('pertanyaan','perpage'));\n }", "public static function get_pgnnav( $rtbl = 0, $mtd_to_inc_view = '/i/home/', $uriq, $rblk = 5 ) //paginator\n{\n $qs = QS;\n $total_pages = ceil($rtbl / $rblk);\n\n\n // ~ 1. P A G I N A T I O N V A R I A B L E S ~\n\n if (isset($uriq->p)) {\n $_SESSION['filter_tbl']['pgordno_from_url'] = $uriq->p ;\n } else {$_SESSION['filter_tbl']['pgordno_from_url'] = 1 ;}\n $pgordno_from_url = $_SESSION['filter_tbl']['pgordno_from_url'] ;\n\n //$show_all_r = isset($u riq->pgn) and $u riq->pgn == 'ALL' ? '1' : '' ;\n //if($show_all_r){ $first_rinblock = 0; } else\n if($pgordno_from_url < 2){ $first_rinblock = 1; } \n else{$first_rinblock = ($pgordno_from_url * $rblk) - $rblk + 1; }\n\n //if($show_all_r){ $last_rinblock = $rtbl ; } else\n $last_rinblock = $first_rinblock + $rblk - 1 ;\n if ($last_rinblock > $rtbl) $last_rinblock = $rtbl ;\n\n\n\n // ~ 2. N A V B A R P G N L I N K S ~\n // eg $req_uri is /zbig/04knjige/...paginator_navbar_no_rows.php?p/15/i/home\n // $_SERVER[\"PHP_SELF\"] is $req_uri without ?p/15/i/home\n\n // Link to first page 11111\n //$n avbar = \"<center><div id='pagination'>\"\n $navbar = \"<div>\"\n .\" <a class='button' href='{$qs}p/1$mtd_to_inc_view'>&lt;&lt;</a>\";\n \n // Link to prev page -11111\n $navbar .= \n \" <a class='button' \n href='{$qs}p/'\n \"\n . ( ($pgordno_from_url > 1) ? $pgordno_from_url-1 : $pgordno_from_url).$mtd_to_inc_view\n . \"'>&nbsp;&lt;&nbsp;</a>\";\n\n // Link to pages between first and last page\n for ($pg=1; $pg<=$total_pages; $pg++) { // 11111...l a s t\n\n $fmt_tmp1=''; $fmt_tmp2='';\n // currpg is italic\n if ($pg==$pgordno_from_url) {$fmt_tmp1='<b><i>*'; $fmt_tmp2='</i></b>';}\n\n $navbar .= \n \" <a class='button'\n href='{$qs}p/{$pg}{$mtd_to_inc_view}'\n \" .'>';\n $navbar .= $fmt_tmp1.str_pad((string)($pg), 3, '0', STR_PAD_LEFT).$fmt_tmp2 ;\n $navbar .= '</a>';\n }\n\n\n // Link to next page +11111\n $navbar .= \" <a class='button' href='{$qs}p/\"\n . ( ($pgordno_from_url < $total_pages) ? $pgordno_from_url+1 : $pgordno_from_url) . $mtd_to_inc_view\n . \"'>&nbsp;&gt;&nbsp;</a>\";\n \n // Link to last page .l a s t\n$navbar .= \" <a class='button' \n href='{$qs}p/{$total_pages}{$mtd_to_inc_view}'>&gt;&gt;</a>\"\n .\" &nbsp;&nbsp; \n <a class='button' \n title='Rows {$first_rinblock} - {$last_rinblock}'\n \" . '</a>'\n .' Total count '.$rtbl .' (eg 25 on page)'\n //.\"href='{$qs}p/1/pgn/all$mtd_to_inc_view'>ALL\"\n //title='No pagination (f or c t r l + F)'\n //.' Tot.pages '.$total_pages\n;\n\n //$navbar .= '</center></div>' ;\n $navbar .= '</div>' ;\n\n\n\n return [\n 'navbar'=>$navbar //'<h2>'.'aaaaaaaa'.'</h2>';\n , 'pgordno_from_url'=>$pgordno_from_url\n , 'first_rinblock'=>$first_rinblock\n , 'last_rinblock'=>$last_rinblock\n ]; \n\n}", "public function index()\n {\n $itempromo= ProdukPromo::orderBy('id','desc')->paginate(20);\n $data = array('title'=>'produk promo','itempromo'=>$itempromo);\n return view('promo.index',$data)->with('no',($request->input('page',1) -1)*20);\n }", "function getListaPags() {\n\t\t\t\n\t\t$arrPaginas = array();\n\t\t\t\n\t\t$inf = NULL;\n\t\t$sup = NULL;\n\t\t\t\n\t\t$tmp01 = floor($this->listap/2);\n\t\t\t\n\t\t// se o highlight estiver no meio da seleção\n\t\tif ($this->pagina - $tmp01 >= 1 && $this->pagina + $tmp01 <= $this->totalp){\n\t\t\t$inf = $this->pagina-$tmp01;\n\t\t\t$sup = $this->pagina+$tmp01;\n\t\t}\n\t\telse {\n\t\t\t// se estiver no lado esquerdo\n\t\t\tif ($this->pagina - $tmp01 < 1) {\n\t\t\t\t$inf = 1;\n\t\t\t\t$sup = ($this->totalp < $this->listap) ? $this->totalp : $this->listap ;\n\t\t\t}\n\t\t\t// se estiver no lado direito\n\t\t\telse if ($this->pagina + $tmp01 > $this->totalp) {\n\t\t\t\t$inf = ($this->totalp < $this->listap) ? 1 : $this->totalp-($this->listap-1) ;\n\t\t\t\t$sup = $this->totalp;\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\t\n\t\tfor ($x=$inf,$y=0;$x<=$sup;$x++,$y++) {\n\t\t\t$arrPaginas[$y] = $x;\n\t\t}\n\t\t\n\t\treturn $arrPaginas;\n\t\t\t\t\n\t\t// ALGORITMO LISTA DE PAGINAS - FIM\n\t}", "public function get_page_permastruct()\n {\n }", "function paginate($page=1,$limit=16)\n{\n $limit = $limit ? : 16;\n $skip = ($page ? $page-1 :0) * $limit;\n return [$limit,$skip];\n}", "function MyMod_Paging_Page_No_2_Item_Nos()\n {\n if ($this->NumberOfItems>$this->NItemsPerPage)\n {\n if ($this->MyMod_Paging_Active_ID && $this->MyMod_Paging_Active_ID>0)\n {\n $this->FirstItemNo=0;\n foreach ($items as $id => $item)\n {\n if ($item[ \"ID\" ]==$this->MyMod_Paging_Active_ID)\n {\n $this->FirstItemNo=$id;\n $this->OffSet=$this->NumberOfItems;\n }\n }\n }\n else\n {\n if ($this->MyMod_Paging_No==0)\n {\n $this->FirstItemNo=0;\n $this->OffSet=$this->NumberOfItems;\n }\n elseif\n (\n preg_match('/\\d+/',$this->MyMod_Paging_No)\n &&\n $this->MyMod_Paging_No>0\n )\n {\n $res=$this->NItemsPerPage % $this->NumberOfItems;\n\n $this->FirstItemNo=($this->MyMod_Paging_No-1)*$this->NItemsPerPage;\n $this->OffSet=$res;\n }\n else\n {\n $this->FirstItemNo=0;\n $this->OffSet=0;\n }\n }\n }\n else\n {\n $this->FirstItemNo=0;\n $this->OffSet=$this->NumberOfItems;\n }\n\n $this->LastItemNo=$this->FirstItemNo+$this->OffSet;\n }", "private function corrigirPlanosPagto()\n\t{\n\t\t$this->dbcrosier->trans_start();\n\n\t\t$query = $this->dbcrosier->query(\"SELECT * FROM ekt_venda WHERE cond_pag = '0.99'\") or $this->exit_db_error();\n\t\t$result = $query->result_array();\n\n\t\t// Pega todos os produtos da ekt_produto para o $mesano\n\t\t$i = 0;\n\t\tforeach ($result as $r) {\n\t\t\ttry {\n\t\t\t\t$query = $this->dbcrosier->query('SELECT * FROM ven_venda WHERE pv = ? AND json_data.\"$->>mesano\" = ?', array(\n\t\t\t\t\t$r['NUMERO'],\n\t\t\t\t\t$r['mesano']\n\t\t\t\t)) or $this->exit_db_error();\n\t\t\t\t$naVenVenda = $query->result_array();\n\t\t\t\tif (count($naVenVenda) == 0) {\n\t\t\t\t\t$this->logger->info(\"Não encontrado para pv = '\" . $r['NUMERO'] . \"' e mesano = '\" . $r['mesano'] . \"'\");\n\t\t\t\t} else if (count($naVenVenda) == 1) {\n\t\t\t\t\tif ($naVenVenda[0]['plano_pagto_id'] == 2) {\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t$this->logger->info(\"Atualizando o pv = '\" . $r['NUMERO'] . \"' e mesano = '\" . $r['mesano'] . \"'\");\n\t\t\t\t\t\t$this->dbcrosier->query(\"UPDATE ven_venda SET plano_pagto_id = 158 WHERE id = ?\", $naVenVenda[0]['id']) or $this->exit_db_error();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->logger->info(\"Mais de um encontrado para pv = '\" . $r['NUMERO'] . \"' e mesano = '\" . $r['mesano'] . \"'\");\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\tprint_r($e->getMessage());\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\t\t$this->logger->info(PHP_EOL . PHP_EOL . \"TOTAL ATUALIZADO: \" . $i);\n\n\t\t$this->dbcrosier->trans_complete();\n\t}", "public function paginationToken()\n\t{\n\t\t$masaAktif=$this->input->post('masaAktif');\n\t\t$status=$this->input->post('status');\n\t\t$records_per_page=$this->input->post('records_per_page');\n\t\t$keySearch=$this->input->post('keySearch');\n\t\tif ($keySearch != '' && $keySearch !=' ') {\n\t\t\tif ($status==1) {\n\t\t\t\t$jumlah_data =$this->token_model->sum_cari_pengguna_token($masaAktif,$status,$keySearch);\n\t\t\t} else {\n\t\t\t\t$jumlah_data =$this->token_model->sum_cari_data_token($masaAktif,$status,$keySearch);\n\t\t\t}\n\t\t}else{\n\t\t\t$jumlah_data = $this->token_model->jumlah_data_token($masaAktif,$status); \n\t\t}\n\t\t$pagination='<li class=\"hide\" id=\"page-prev\"><a href=\"javascript:void(0)\" onclick=\"prevPage()\" aria-label=\"Previous\">\n\t\t<span aria-hidden=\"true\">&laquo;</span>\n\t</a></li>';\n\t$pagePagination=1;\n\n\t$sumPagination=($jumlah_data/$records_per_page);\n\tfor ($i=0; $i < $sumPagination; $i++) { \n\t\tif ($pagePagination<=7) {\n\t\t\t$pagination.='<li ><a href=\"javascript:void(0)\" onclick=\"selectPage('.$i.')\" id=\"page-'.$pagePagination.'\">'.$pagePagination.'</a></li>';\n\t\t}else{\n\t\t\t$pagination.='<li class=\"hide\" id=\"page-'.$pagePagination.'\"><a href=\"javascript:void(0)\" onclick=\"selectPage('.$i.')\" >'.$pagePagination.'</a></li>';\n\t\t}\n\n\t\t$pagePagination++;\n\t}\n\tif ($pagePagination>7) {\n\t\t$pagination.='<li class=\"\" id=\"page-next\">\n\t\t<a href=\"javascript:void(0)\" onclick=\"nextPage()\" aria-label=\"Next\">\n\t\t\t<span aria-hidden=\"true\">&raquo;</span>\n\t\t</a>\n\t</li>';\n}\n \t // cek jika halaman pagination hanya satu set pagination menjadi null\nif ($sumPagination<=1) {\n\t$pagination='';\n}\n\necho json_encode ($pagination);\n}", "public function getPerPage(): int;", "private function getAllNotifHistoryByPage() {\n $this->user_panel->checkAuthAdmin();\n $this->notif_history->findAllByPage();\n }", "public function enlazarPagina()\n\t\t{\n\t\t\t//Se obtiene la accion por medio de paso de variable y entonces se incluye la vista segun sea la accion\n\t\t\tif(isset($_GET['action']))\n\t\t\t{\n\t\t\t\t$enlace = $_GET['action'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$enlace = 'inicio';\n\t\t\t}\n\n\t\t\t$respuesta = Informacion::enlazador($enlace);\n\t\t\tinclude($respuesta);\n\t\t}", "function listadoProyectos(){\n $class=\"\";\n $this->arrayEstatusVisibles = array();\n if($this->session['rol'] == 1)\n $this->arrayEstatusVisibles = array(0,1,2,3,4,5,6,7,8,9,10);\n if ($this->session ['rol'] == 2)\n $this->arrayEstatusVisibles = array (0,1,2,3,4,5,6,7,8,9,10);\n \n if($this->session['rol'] == 3)\n $this->arrayEstatusVisibles = array(5,6,7,8,9,10);\n if($this->session['rol'] == 4)\n $this->arrayEstatusVisibles = array(1,2,3,4,5,6,7,8,9,10);\n \n $no_registros = $this->consultaNoProyectosAvances();\n $this->arrayNotificaciones = $this->notificaciones();\n $arrayDisabled = $this->recuperaPermisos(0,0);\n $trimestreId = $this->obtenTrimestre($arrayDisabled);\n $noTri = $trimestreId;\n if($trimestreId == 1)\n $noTri =\"\";\n \n if($no_registros){\n $this->pages = new Paginador();\n $this->pages->items_total = $no_registros;\n $this->pages->mid_range = 25;\n $this->pages->paginate();\n $resultados = $this->consultaProyectosAvances();\n $this->bufferExcel = $this->generaProyectosExcel();\n }\n $col=6;\n $this->buffer=\"\n <input type='hidden' name='trimestreId' id='trimestreId' value='\".$trimestreId.\"'>\n <div class='panel panel-danger spancing'>\n <div class='panel-heading'><span class='titulosBlanco'>\".str_replace(\"#\",$trimestreId,REPORTETRIMESTRAL).\"</span></div>\n <div class='panel-body'><center><span id='res'></span></center>\".$this->divFiltrosProyectos(1,0,\"\",\"\").\"\n <center>\".$this->regresaLetras().\"</center><br>\";\n if(count($resultados) > 0){\n $arrayAreas = $this->catalogoAreas();\n $arrayOpera = $this->catalogoUnidadesOperativas();\n $this->buffer.=\"\n <table width='95%' class='table tablesorter table-condensed' align='center' id='MyTableActividades'>\n <thead><tr>\n <td class='tdcenter fondotable' width='2%' >\".NO.\"</td>\n <td class='tdcenter fondotable' width='10%' >\".AREA.\"</td>\n <td class='tdcenter fondotable' width='36%' >\".PROYECTOS.\"</td>\n <td class='tdcenter fondotable' width='10%' >\".METASREPORTE.\"</td> \n <td class='tdcenter fondotable' width='10%' >\".FECHAALTA.\"</td>\n <td class='tdcenter fondotable' width='12%' >\".ESTATUSVALIDACION.\" Trimestre \".$trimestreId.\"</td> \n <td clasS='tdcenter fondotable' width='12%' >\".ENVIARCOORDINADOR.\"</td>\";\n if($this->session['rol']>=3 ){\n $this->buffer.=\"<td clasS='tdcenter fondotable' width='10%'>\".MARCAVALIDAR.\"</td>\";\n $col++;\n }\n $this->buffer.=\"</tr></thead><tbody>\";\n $contador=1;\n $varTemporal=\"\";\n if($this->session['page']<=1)\n $contadorRen= 1;\n else\n $contadorRen=$this->session['page']+1; \n \n foreach($resultados as $id => $resul){\n $rand = rand(1,99999999999999);\n $class=\"\";\n if($contador % 2 == 0)\n $class=\"active\";\n $campo = \"estatus_avance_entrega\".$noTri;\n $idEstatus=$resul[$campo]; \n $varTemporal = $resul['id'];\n if($idEstatus == 0){\n $this->arrayNotificaciones[0]['act'] = 1;\n }\n $this->buffer.=\"\n <tr class=' $class alturaComponentesA'> \n <td class='tdcenter'>\".$contador.\"</td>\n <td class='tdcenter'>\n <a class='negro' href='#'\n data-toggle='tooltip' data-placement='bottom'\n title='\".$arrayAreas[$resul['unidadResponsable_id']].\". - Unidad Operativa: \".$arrayOpera[$resul['unidadOperativaId']].\"'>\n &nbsp;\" . $resul['unidadResponsable_id']. \"</a>\n </td> \n <td class='tdleft'>\".$resul['proyecto'].\"</td>\n <td class='tdcenter'>\";\n if($resul['noAcciones'] > 0)\n {\n $this->buffer.=\"\n <a class='negro' href='\".$this->path.\"aplicacion.php?aplicacion=\".$this->session ['aplicacion'].\"&apli_com=\".$this->session ['apli_com'].\"&opc=9&folio=\".$varTemporal.\"'\n data-toggle='tooltip' data-placement='bottom' title='\".TOOLTIPMETAREP.\"' id='\".$varTemporal.\"'>\".$resul['noAcciones'].\"</a>\";\n }\n $this->buffer.=\"</td> \n <td class='tdcenter'>\".substr($resul['fecha_alta'],0,10).\"</td>\n <td class='tdcenter' style='background-color:\".$this->arrayNotificaciones[$idEstatus]['color'].\";color:#000000;'>\";\n if($idEstatus > 2){\n $this->buffer.=\"<a class='negro visualizaComentarios' href='#' onclick='return false;' id='\".$varTemporal.\"'\n data-toggle='tooltip' data-placement='bottom' title='\".TOOLTIPMUESTRACOMENTARIOS.\"'>\n &nbsp;\".$this->arrayNotificaciones[$idEstatus]['nom'].\"\n </a>\";\n }\n else{\n $this->buffer.=$this->arrayNotificaciones[$idEstatus]['nom'];\n }\n $this->buffer.=\"</td><td class='tdcenter'>\";\n //mostramos el checkbox rol 1\n if(($this->session['rol'] == 1 || $this->session['rol'] == 2) && $idEstatus>0 && $idEstatus < 4){\n //if( ($this->arrayNotificaciones[$idEstatus]['act'] == 1) && ($resul['userId'] == $this->session['userId']) ){\n if( ($this->arrayNotificaciones[$idEstatus]['act'] == 1) ){\n if($resul['noAcciones']>0)\n $this->buffer.=\"<input data-toggle='tooltip' data-placement='bottom' title='\".DESMARCAVALIDAR.\"' type='checkbox' name='enviaId' id='\".$varTemporal.\"' class='enviaIdAvance' value='\".$resul['id'].\"'>\";\n }\n }\n //mostramos el checkbox rol 2\n if($this->session['rol'] == 2 && $idEstatus >= 4 && $idEstatus < 7 && $idEstatus != 5){\n if($resul['noAcciones']>0)\n $this->buffer.=\"<input data-toggle='tooltip' data-placement='bottom' title='\".DESMARCAVALIDAR.\"' type='checkbox' name='enviaId' id='\".$varTemporal.\"' class='enviaIdAvance' value='\".$resul['id'].\"'>\";\n }\n //mostramos el checkbox rol 3\n if($this->session['rol'] == 3 && $idEstatus >= 5 && $idEstatus < 10 && $idEstatus != 6 && $idEstatus != 8){\n if($resul['noAcciones']>0)\n if($idEstatus == 5)\n $this->buffer.=$this->pintaComentarioAvance($idEstatus,$resul['id'],$trimestreId);\n else\n $this->buffer.=\"<input data-toggle='tooltip' data-placement='bottom' title='\".DESMARCAVALIDAR.\"' type='checkbox' name='enviaId' id='\".$varTemporal.\"' class='enviaIdAvance' value='\".$resul['id'].\"'>\";\n }\n //mostramos el checkbox rol 4\n if($this->session['rol'] == 4 && $idEstatus >= 6 && $idEstatus <= 10 && $idEstatus != 7){\n if($resul['noAcciones']>0)\n if($idEstatus == 8)\n $this->buffer.=$this->pintaComentarioAvance($idEstatus,$resul['id'],$trimestreId);\n }\n $this->buffer.=\"</td>\";\n \n if ($this->session['rol'] == 3){\n $this->buffer.=\"<td class='tdcenter'>\";\n if($idEstatus == 6 ){\n $this->buffer.=\"<a class='negro enviaEnlacePlaneacion' id='c-\".$varTemporal.\"-0' href='#' data-toggle='tooltip' data-placement='bottom' title='\".TOOLTIPREGRESAPROYECTOPLANEACION.\"'><span class='glyphicon glyphicon-thumbs-down'></span>&nbsp;</a>\";\n }\n $this->buffer.=\"</td>\";\n }\n if ($this->session['rol'] >= 4){\n $this->buffer.=\"<td class='tdcenter'>\";\n if($idEstatus == 9 ){\n $this->buffer.=\"<a class='negro enviaCoordinador' id='p-\".$varTemporal.\"-0' href='#' data-toggle='tooltip' data-placement='bottom' title='\".TOOLTIPREGRESAPROYECTOCOORDINADOR.\"'><span class='glyphicon glyphicon-thumbs-down'></span>&nbsp;</a>\";\n }else{\n if($idEstatus <10 )\n $this->buffer .= \"<input data-toggle='tooltip' data-placement='bottom' title='\" . DESMARCAVALIDAR . \"' type='checkbox' name='enviaId' id='\" . $varTemporal . \"' class='enviaIdAvance' value='\" . $resul ['id'] . \"'>\";\n }\n $this->buffer.=\"</td>\";\n }\n \n $this->buffer.=\"</tr>\";\n $contador++;\n } \n $this->buffer.=\"<tbody><thead><tr>\n <td colspan='\".($col-1).\"' class='tdcenter'>&nbsp;</td>\n <td colspan='2' class='tdcenter'>\".$this->Genera_Archivo($this->bufferExcel,$this->path_sis).\"</td>\n </tr></thead></table>\n <table width='100%'><tr><td class='tdcenter'>\".$this->pages->display_jump_menu().\"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\".$this->pages->display_items_per_page($this->session ['regs']).\"</td></tr></table>\"; \n }\n else{\n $this->buffer.=\"<table class='table table-condensed'><tr><td class='tdcenter'>\".SINREGISTROS.\"</td></tr></table>\";\n }\n $this->buffer.=\"</div></div>\";\n }", "public function get_paginate(Request $request)\n {\n }", "public function getPageItems()\n {\n }", "public function paginatedListAction() {\n $logger = $this->get('logger');\n if (!$this->get('request')->isXmlHttpRequest()) { // Is the request an ajax one?\n return new Response(\"<b>Not an ajax call!!!\" . \"</b>\");\n }\n try {\n //Get parameters\n $request = $this->get('request');\n $limit = $request->get('limit');\n $offset = $request->get('offset');\n $order = $request->get('order');\n $search = $request->get('search');\n $sort = $request->get('sort');\n $em = $this->getDoctrine()->getManager();\n $usr= $this->get('security.context')->getToken()->getUser();\n $paginator = $em->getRepository('TecnotekAsiloBundle:User')\n ->getListWithFilter($offset, $limit, $search, $sort, $order, $usr->getId());\n\n $results = array();\n foreach($paginator as $user){\n array_push($results, array('id' => $user->getId(),\n 'name' => $user->getName(),\n 'lastname' => $user->getLastname(),\n 'username' => $user->getUsername(),\n 'email' => $user->getEmail(),\n 'cellPhone' => $user->getCellPhone(),\n 'isActive' => $user->isActive(),\n 'username' => $user->getUsername()));\n }\n return new Response(json_encode(array('total' => count($paginator),\n 'rows' => $results)));\n } catch (Exception $e) {\n $info = toString($e);\n $logger->err('User::paginatedListAction [' . $info . \"]\");\n return new Response(json_encode(array('error' => true, 'message' => $info)));\n }\n }", "public function show($id)\n {\n $mob = Mobiliarios::find($id);\n //Pagos\n $montoTotal = Pagos::where('mobiliario_id',$id)->sum('monto');\n $interTotal = Pagos::where('mobiliario_id',$id)->sum('interes');\n $moraTotal = Pagos::where('mobiliario_id',$id)->sum('mora');\n $cuotas = Pagos::where('mobiliario_id',$id)->count();\n $cuotasc = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->count();\n $cuotasb = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->count();\n $pagoss = Pagos::where('mobiliario_id',$id)->orderBy('created_at','asc')->get();\n $listac = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->orderBy('created_at','asc')->paginate(8);\n $listab = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->orderBy('created_at','asc')->paginate(8);\n $cc = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->sum('monto');\n $cb = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->sum('monto');\n $ic = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->sum('interes');\n $ib = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->sum('interes');\n $mc = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->sum('mora');\n $mb = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->sum('mora');\n //Reparaciones\n $totalreparacion = Reparaciones::where('mobiliario_id',$id)->count();\n $reparar = Reparaciones::where('mobiliario_id',$id)->orderBy('fecha_deposito','asc')->paginate(8);\n $totreparc = Reparaciones::where('mobiliario_id',$id)->where('credito',true)->count();\n $valreparc = Reparaciones::where('mobiliario_id',$id)->where('credito',true)->sum('precio');\n $totreparn = Reparaciones::where('mobiliario_id',$id)->where('credito',false)->count();\n $valreparn = Reparaciones::where('mobiliario_id',$id)->where('credito',false)->sum('precio');\n $ivatotal = Reparaciones::where('mobiliario_id',$id)->sum('iva');\n\n $totpagorep = Reparaciones::join('pagoreparaciones','reparaciones.id','=','pagoreparaciones.reparacion_id')->where('mobiliario_id', $id)->count();\n $prereptot = Reparaciones::join('pagoreparaciones','reparaciones.id','=','pagoreparaciones.reparacion_id')->where('mobiliario_id', $id)->sum('monto');\n $pagosp = Reparaciones::join('pagoreparaciones','reparaciones.id','=','pagoreparaciones.reparacion_id')->where('mobiliario_id', $id)->get();\n $totalc = $cc + $ic + $mc;\n $totalb = $cb + $ib + $mb;\n $valtotal = $valreparn + $valreparc;\n $hoy = Carbon::now();\n return view('Mobiliarios.show',\n compact(\n 'mob',\n 'montoTotal',\n 'interTotal',\n 'cuotas',\n 'moraTotal',\n 'pagoss',\n 'cuotasc',\n 'cuotasb',\n 'listac',\n 'listab',\n 'totalc',\n 'totalb',\n 'cc',\n 'cb',\n 'ic',\n 'ib',\n 'mc',\n 'mb',\n 'totalreparacion',\n 'reparar',\n 'totreparn',\n 'totreparc',\n 'valreparc',\n 'valreparn',\n 'valtotal',\n 'totpagorep',\n 'prereptot',\n 'ivatotal',\n 'pagosp',\n 'hoy'\n ));\n }", "private function pagProbleem()\n\t{\n\t\t$pageOutput = $this->menu();\n\t\t$pageOutput.= $this->div('open', 'id=\"inhoud\"');\n\t\t$pageOutput.= $this->h1('full', '', 'Er is iets misgelopen!');\n\t\t$pageOutput.= $this->div('close');\n\t\treturn $pageOutput;\n\t}", "function numero_paginas($post_por_pagina, $conexion, $count) {\n $numero_paginas = ceil($count / $post_por_pagina);\n return $numero_paginas;\n}", "function AddPagination($RPP, $num, $pageNum, $onclick){\t\n if($num > 0) {\n //Determine the maxpage and the offset for the query\n $maxPage = ceil($num/$RPP);\n $offset = ($pageNum - 1) * $RPP;\n //Initiate the navigation bar\n $nav = '';\n //get low end\n $page = $pageNum - 3;\n //get upperbound\n $upper =$pageNum + 3;\n if($page <= 0){\n $page = 1;\n }\n if($upper > $maxPage){\n $upper = $maxPage;\n }\n\n //Make sure there are 7 numbers (3 before, 3 after and current\n if($upper-$page < 6){\n\n //We know that one of the page has maxed out\n //check which one it is\n //echo \"$upper >=$maxPage<br>\";\n if($upper >= $maxPage){\n //the upper end has maxed, put more on the front end\n //echo \"to begining<br>\";\n $dif = $maxPage - $page;\n //echo \"$dif<br>\";\n if($dif == 3){\n $page = $page - 3;\n }elseif ($dif == 4){\n $page = $page - 2;\n }elseif ($dif == 5){\n $page = $page - 1;\n }\n \n }elseif ($page <= 1){\n //its the low end, add to upper end\n //echo \"to upper<br>\";\n $dif = $upper-1;\n\n if ($dif == 3){\n $upper = $upper + 3;\n }elseif ($dif == 4){\n $upper = $upper + 2;\n }elseif ($dif == 5){\n $upper = $upper + 1;\n }\n }\n }\n\n if($page <= 0) {\n $page = 1;\n }\n\n if($upper > $maxPage) {\n $upper = $maxPage;\n }\n\n //These are the numbered links\n for($page; $page <= $upper; $page++) {\n\n if($page == $pageNum){\n //If this is the current page then disable the link\n $nav .= \"<li class='active'><a href='#'>$page</a></li>\";\n }else{\n //If this is a different page then link to it\n $nav .= \"<li onclick='return \".$onclick.\"(\".$page.\")'><a href='#'>$page</a></li> \";\n }\n }\n\n\n //These are the button links for first/previous enabled/disabled\n if($pageNum > 1){\n $page = $pageNum - 1;\n $prev = \"<li onclick='return \".$onclick.\"(\".$page.\")'><a href='#'><span class='glyphicon glyphicon-chevron-left'></span></a></li>\";\n $first = \"<li onclick='return \".$onclick.\"(1)'><a href='#'><span class='glyphicon glyphicon-backward'></span></a></li>\";\n }else{\n $prev = \"<li><a href='#'><span class='glyphicon glyphicon-chevron-left'></span></a></li>\";\n $first = \"<li><a href='#'><span class='glyphicon glyphicon-backward'></span></a></li>\";\n }\n\n //These are the button links for next/last enabled/disabled\n if($pageNum < $maxPage AND $upper <= $maxPage) {\n $page = $pageNum + 1;\n $next = \"<li onclick='return \".$onclick.\"(\".$page.\")'><a href='#'><span class='glyphicon glyphicon-chevron-right'></span></a></li>\";\n $last = \"<li onclick='return \".$onclick.\"(\".$maxPage.\")'><a href='#'><span class='glyphicon glyphicon-forward'></span></a></li>\";\n }else{\n $next = \"<li><a href='#'><span class='glyphicon glyphicon-chevron-right'></span></a></li>\";\n $last = \"<li><a href='#'><span class='glyphicon glyphicon-forward'></span></a></li>\";\n }\n\n if($maxPage >= 1){\n // print the navigation link\n return $first . $prev . $nav . $next . $last;\n }\n }\n}", "function alaya_pagenavi(){\n global $wp_query;\n\n\t$big = 999999999; // need an unlikely integer\n\t$return_html='';\n\t$return_html.='<div class=\"alaya_pagenavi\">';\n\t$return_html.= paginate_links( array(\n\t\t'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),\n\t\t'format' => '?paged=%#%',\n\t\t'current' => max( 1, get_query_var('paged') ),\n\t\t'total' => $wp_query->max_num_pages,\n\t\t'prev_text' => '&lt;',\n\t 'next_text' => '&gt;'\n\t) );\n\t$return_html.='</div>';\n\t\n\treturn $return_html;\n}", "function paginationLinks($page = 1, $page_count, $query = \"\")\n{\n // base page url\n $url = \"collection\";\n\n // first page link, which doesn't have a page data in url (no page=1)\n $first_page = $url . $query;\n\n // checking if other variables exist in query and adding needed characters\n $query .= (strpos($query, \"=\") !== FALSE) ? \"&\" : \"?\";\n $query .= \"page=\";\n\n // last page is always a max = page_count\n $last_page = $url . $query . $page_count;\n\n // pages before and after current page\n $previous = $url . $query . ($page-1);\n $next = $url . $query . ($page+1);\n\n // setting the three buttons values, middle one is current\n $first = $previous;\n $second = $url . $query . $page;\n $third = $next;\n\n // changing page links in special circumstances\n if($page == 1){\n $first = $first_page;\n $second = $next;\n $third = $url . $query . ($page+2);\n }elseif($page == 2){\n $first = $first_page;\n $previous = $first_page;\n }elseif($page == $page_count){\n $first = $url . $query . ($page_count-2);\n $second = $url . $query . ($page_count-1);\n $third = $last_page;\n }\n\n return [\n 'first_page' => $first_page,\n 'last_page' => $last_page,\n 'previous' => $previous,\n 'next' => $next, \n 'first' => $first,\n 'second' => $second,\n 'third' => $third\n ];\n}", "function results_are_paged()\n {\n }", "public function getNotifications($data, $limit){\n $page = $data['page'];\n $userLoggedIn = $this->user_obj->getUserName();\n $str = \"\";\n \n if($page == 1){\n // Start at the first post\n $start = 0;\n } else {\n // Starts where the last loaded posts were\n $start = ($page - 1) * $limit;\n }\n \n //Set viewed to yes for all notifications for that user.\n $set_viewed = $this->con->query(\"UPDATE notifications SET viewed='yes' WHERE user_to='$userLoggedIn'\");\n $data = $this->con->query(\"SELECT * FROM notifications WHERE user_to='$userLoggedIn' ORDER BY id DESC\");\n \n // If there are no notifications\n if($data->num_rows == 0){\n echo \"You don't have any notifications to load.\";\n\t\t\t return;\n }\n \n // The number of results checked\n $num_iterations = 0;\n \n // The number of results posted\n $count = 1;\n \n while($row = $data->fetch_array(MYSQLI_ASSOC)){\n // If the start position from last loads has not been reached yet\n if($num_iterations++ < $start)\n continue;\n \n // Once 5 notifications have been loaded, stop\n if($count > $limit){\n break;\n } else {\n $count++;\n }\n \n $user_from = $row['user_from'];\n\n \t\t\t$query = $this->con->query(\"SELECT * FROM users WHERE username='$user_from'\");\n \t\t\t$userData = $query->fetch_array(MYSQLI_ASSOC);\n \t\t\t\n \t\t\t// Calculate how long ago the notification was received\n \t\t\t$date_time_now = date(\"Y-m-d H:i:s\");\n $start_date = new DateTime($row['datetime']);\n $end_date = new DateTime($date_time_now);\n $interval = $start_date->diff($end_date);\n \n if($interval->y >= 1){\n if($interval->y == 1){\n $time_message = $interval->y.\" year ago\";\n } else {\n $time_message = $interval->y.\" years ago\";\n }\n } elseif($interval->m >= 1){\n if($interval->d == 0){\n $days = \" ago\";\n } else if($interval->d == 1){\n $days = $interval->d.\" day ago\";\n } else {\n $days = $interval->d.\" day ago\";\n }\n \n if($interval->m == 1){\n $time_message = $interval->m.\" month \".$days;\n } else {\n $time_message = $interval->m.\" months \".$days;\n }\n } else if($interval->d >= 1){\n if($interval->d == 1){\n $time_message = \"Yesterday\";\n } else{\n $time_message = $interval->d.\" days ago\"; \n }\n } else if($interval->h >= 1){\n if($interval->h == 1){\n $time_message = $interval->h.\" hour ago\";\n } else{\n $time_message = $interval->h.\" hours ago\";\n }\n } else if($interval->i >= 1){\n if($interval->i == 1){\n $time_message = $interval->i.\" minute ago\";\n } else {\n $time_message = $interval->i.\" minutes ago\";\n }\n } else {\n if($interval->s < 30){\n $time_message = \"Just now\";\n } else {\n $time_message = $interval->s.\" seconds ago\";\n }\n } \n \n // If this is yes, then this notification has been clicked on before.\n $opened = $row['opened'];\n \n // If the message is unopened, change background color slightly\n $style = ($opened == 'no') ? \"background-color: #DDEDFF;\" : \"\";\n \n $str .= \"<a href='\".$row['link'].\"'>\n <div class='resultDisplay resultDisplayNotification' style='\".$style.\"'>\n <div class='notificationsProfilePic'>\n <img src='\".$userData['profile_pic'].\"'>\n </div>\n <p class='timestamp_smaller' id='grey'>\".$time_message.\"</p>\".$row['message'].\" \n </div>\n </a>\";\n \n } // End of the while loop\n \n // If posts were loaded\n if($count > $limit){\n // Holds value of next page, it must stay hidden\n $str.=\"<input type='hidden' class='nextpageDropdownData' value='\".($page + 1).\n \"'><input type='hidden' class='noMoreDropdownData' value='false'>\";\n } else {\n // No more Notifications to load. Show 'Finished' message\n\t \t$str .= \"<input type='hidden' class='noMoreDropdownData' value='true'>\n\t \t<p style='text-align: center;'>No more notifications to load!</p>\";\n }\n \n echo $str;\n }", "public function pagar()\n\t{\n\t\tif ( ! $this->Auth->user() )\n\t\t{\n\t\t\t$this->Session->write('Flujo.loginPending', array('controller' => 'reservas', 'action' => 'add'));\n\t\t\t$this->redirect(array('controller' => 'usuarios', 'action' => 'login'));\n\t\t}\n\n\t\t/**\n\t\t * Comprueba que existan productos en el carro\n\t\t */\n\t\t$productos\t\t\t= $this->Carro->productos('reserva');\n\t\tif ( empty($productos['reserva']) )\n\t\t{\n\t\t\t$this->redirect(array('action' => 'add'));\n\t\t}\n\n\t\t/**\n\t\t * Comprueba si existe una compra en proceso\n\t\t */\n\t\tif ( ( $id = $this->Session->read('Flujo.Reserva.compra_id') ) && $this->Reserva->DetalleCompra->Compra->pendiente($id) )\n\t\t{\n\t\t\t$this->Reserva->DetalleCompra->Compra->id\t\t\t= $id;\n\t\t}\n\n\t\t/**\n\t\t * Guarda la compra en estado pendiente\n\t\t */\n\t\t$compra\t\t\t\t= $this->Reserva->DetalleCompra->Compra->registrarCarro($productos, null, 0, true);\n\t\t$this->Session->write('Flujo.Reserva.compra_id', $compra['Compra']['id']);\n\n\t\t/**\n\t\t * Si existe error al guardar la compra, devuelve al usuario a la pagina de resumen\n\t\t * para reintentar la operacion\n\t\t */\n\t\tif ( ! $compra )\n\t\t{\n\t\t\t$this->redirect(array('action' => 'resumen'));\n\t\t}\n\n\t\t/**\n\t\t * Verifica si es necesario pasar por webpay\n\t\t */\n\t\tif ( $compra['Compra']['total'] )\n\t\t{\n\t\t\t/**\n\t\t\t * Datos necesarios para comenzar el flujo con webpay\n\t\t\t */\n\t\t\t$webpay\t\t\t= array(\n\t\t\t\t'gateway'\t\t\t=> Router::url($this->Transbank->cgiPath['pago'], true),\n\t\t\t\t'oc'\t\t\t\t=> $compra['Compra']['id'],\n\t\t\t\t'monto'\t\t\t\t=> sprintf('%d00', $compra['Compra']['total']),\n\t\t\t\t'exito'\t\t\t\t=> Router::url(array('controller' => 'reservas', 'action' => 'exito'), true),\n\t\t\t\t'fracaso'\t\t\t=> Router::url(array('controller' => 'reservas', 'action' => 'fracaso'), true)\n\t\t\t);\n\n\t\t\t$this->layout\t\t= 'ajax';\n\t\t\t$this->set(compact('webpay'));\n\t\t}\n\n\t\t/**\n\t\t * Si la reserva no tiene seleccion de productos, pasa al detalle de reserva\n\t\t */\n\t\telse\n\t\t{\n\t\t\t$this->Reserva->DetalleCompra->Compra->cambiarEstado($compra['Compra']['id'], 'PAGADO', null, true, false);\n\t\t\t$this->redirect(array('action' => 'exito', $compra['Compra']['id']));\n\t\t}\n\t}", "function set_pagination(){\n\t\tif ($this->rpp>0)\n\t\t{\n\t\t\t$compensation= ($this->num_rowset % $this->rpp)>0 ? 1 : 0;\n\t\t\t$num_pages = (int)($this->num_rowset / $this->rpp) + $compensation;\n\t\t} else {\n\t\t\t$compensation = 0;\n\t\t\t$num_pages = 1;\n\t\t}\n\n\t\tif ($num_pages>1){\n\t\t\t$this->tpl->add(\"pagination\", \"SHOW\", \"TRUE\");\n\n\t\t\tfor ($i=0; $i<$num_pages; $i++){\n\t\t\t\t$this->tpl->add(\"page\", array(\n\t\t\t\t\t\"CLASS\"\t=> \"\",\n\t\t\t\t\t\"VALUE\"\t=> \"\",\n\t\t\t\t));\n\t\t\t\t$this->tpl->parse(\"page\", true);\n\t\t\t}\n\t\t}\n/*\n\t\t\t<patTemplate:tmpl name=\"pagination\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t<div class=\"pagination\">\n\t\t\t\t<ul>\t\n\t\t\t\t\t<patTemplate:tmpl name=\"prev_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li class=\"disablepage\"><a href=\"javascript: return false;\">« Предишна</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t\t<patTemplate:tmpl name=\"page\">\n\t\t\t\t\t<li {CLASS}>{VALUE}</li>\n\t\t\t\t\t</patTemplate:tmpl>\n<!--\n\t\t\t\t\t<li class=\"currentpage\">1</li>\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">2</a></li>\n\t\t\t\t\t<li><a href=\"?page=2&sort=date&type=desc\">3</a></li>\n//-->\n\t\t\t\t\t<patTemplate:tmpl name=\"next_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">Следваща »</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t</patTemplate:tmpl>\n*/\n\t}", "function getAllPaginated($page=1,$perPage=-1) { \r\n if ($perPage == -1)\r\n $perPage = \tNewsletterSchedulePeer::getRowsPerPage();\r\n if (empty($page))\r\n $page = 1;\r\n //require_once(\"propel/util/PropelPager.php\");\r\n $cond = new Criteria(); \r\n $pager = new PropelPager($cond,\"NewsletterSchedulePeer\", \"doSelect\",$page,$perPage);\r\n return $pager;\r\n }", "function itstar_pagination(){\n global $wp_query;\n\n if($wp_query->max_num_pages > 1){\n $big = 999999999; \n echo /*__('Page : ','itstar').*/paginate_links( array(\n 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),\n 'format' => '?paged=%#%',\n 'current' => max( 1, get_query_var('paged') ),\n 'total' => $wp_query->max_num_pages,\n 'prev_text' => __('<i class=\"fa fa-angle-double-left\"></i>','itstar'),\n 'next_text' => __('<i class=\"fa fa-angle-double-right\"></i>','itstar')\n ) );\n }\n}", "public function paginated_list(Request $request){\n $max_per_paginate = 8;\n\n if($request->filter_mode == true || $request->filter_mode == 'true'){\n $filter = $request->filter;\n $data = Event::orderByDesc('started_date')->where('type', '1')->where('name', 'like', \"%$filter%\");\n } else {\n $data = Event::orderByDesc('started_date')->where('type', '1');\n }\n \n $count = $data->count();\n $paginate_count = ceil( $count / $max_per_paginate );\n\n $res = $data->skip( ($request->paginate_position-1)*$max_per_paginate )->take( $max_per_paginate )->get();\n\n return response()->json(['data' => $res, 'paginate_count' => $paginate_count]);\n }", "public function index()\n {\n $notas = Exposicion::where('tipo', '=', 'nota')\n ->paginate(8);\n /*->get();*/\n\n foreach ($notas as $nota) {\n\n $dt = new \\DateTime($nota->created_at); // <== instance from another API\n $carbon = \\Carbon\\Carbon::instance($dt); // 'Carbon\\Carbon'\n $nota->created_at = $carbon->toDateTimeString();\n\n }\n\n return view('admin.notas.index')->with('notas', $notas);\n }" ]
[ "0.7187341", "0.7010076", "0.6848742", "0.6742519", "0.67421794", "0.65352845", "0.6486609", "0.64750284", "0.6443387", "0.64362645", "0.64076835", "0.6387622", "0.6317406", "0.6309541", "0.6309541", "0.6267337", "0.6225608", "0.62105095", "0.61721444", "0.6170822", "0.6141897", "0.61405855", "0.6124676", "0.61227137", "0.6106778", "0.6095806", "0.6091066", "0.6082773", "0.60793173", "0.60638136", "0.6061122", "0.6056018", "0.60479593", "0.6044492", "0.60305023", "0.60275394", "0.6014698", "0.59897226", "0.5985223", "0.5976443", "0.5950878", "0.5950227", "0.5945799", "0.59384507", "0.59370655", "0.5932835", "0.5931553", "0.5930433", "0.5909067", "0.58954763", "0.5887973", "0.58876026", "0.58776516", "0.5873746", "0.58725226", "0.58688766", "0.5865248", "0.585616", "0.58559126", "0.5850154", "0.584857", "0.58481044", "0.5838638", "0.58330584", "0.58149356", "0.5813108", "0.5810459", "0.5809191", "0.5803584", "0.58013874", "0.5797287", "0.5789994", "0.57854486", "0.57846946", "0.5783989", "0.5776123", "0.5772561", "0.57724816", "0.57723707", "0.57690006", "0.5768554", "0.57640827", "0.5762748", "0.57622546", "0.57615244", "0.5759372", "0.5751252", "0.57503474", "0.57501686", "0.574461", "0.57346356", "0.5734171", "0.5728904", "0.5715871", "0.5711289", "0.5710217", "0.5709021", "0.5705195", "0.57025015", "0.5701418" ]
0.6406814
11
Drop resources from view
protected function purge() { $this->view->dropResources(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function view_cleanup(){\n $url = sprintf(\"%s/%s\", $this->getUrl(), self::$_urls[\"view_cleanup\"]);\n return CouchNet::POST($url);\n }", "function drop() {}", "function drop() {}", "public function dropAllViews()\n {\n $this->connection->statement($this->grammar->compileDropAllViews());\n }", "public function dropAllViews()\n {\n $views = [];\n\n foreach ($this->getAllViews() as $row) {\n $row = (array) $row;\n\n $views[] = reset($row);\n }\n\n if (empty($views)) {\n return;\n }\n\n $this->connection->statement(\n $this->grammar->compileDropAllViews($views)\n );\n }", "public function dropAllViews()\n {\n $views = [];\n\n foreach ($this->getAllViews() as $row) {\n $row = (array) $row;\n\n $views[] = reset($row);\n }\n\n if (empty($views)) {\n return;\n }\n\n $this->connection->statement(\n $this->grammar->compileDropAllViews($views)\n );\n }", "public function dropAllViews()\n {\n $views = [];\n\n foreach ($this->getAllViews() as $row) {\n $row = (array)$row;\n\n $views[] = reset($row);\n }\n\n if (empty($views)) {\n return;\n }\n\n $this->getConnection()->statement(\n $this->grammar->compileDropAllViews($views)\n );\n }", "public function drop($view)\n {\n $blueprint = new Blueprint($view, $this->getConnection());\n\n $blueprint->drop();\n\n $this->build($blueprint);\n }", "private static function _dropTables()\n\t{\n\t\tMySQL::query(\"\n\t\t\tSET FOREIGN_KEY_CHECKS = 0;\n\t\t\tSET GROUP_CONCAT_MAX_LEN=32768;\n\t\t\tSET @views = NULL;\n\t\t\tSELECT GROUP_CONCAT('`', TABLE_NAME, '`') INTO @views\n\t\t\t FROM information_schema.views\n\t\t\t WHERE table_schema = (SELECT DATABASE());\n\t\t\tSELECT IFNULL(@views,'dummy') INTO @views;\n\n\t\t\tSET @views = CONCAT('DROP VIEW IF EXISTS ', @views);\n\t\t\tPREPARE stmt FROM @views;\n\t\t\tEXECUTE stmt;\n\t\t\tDEALLOCATE PREPARE stmt;\n\t\t\tSET FOREIGN_KEY_CHECKS = 1;\n\t\t\");\n\t}", "public function dropView($model)\n {\n\t$modelName= is_object($model) ? $model->getTableName() : $model;\n\t$hash= $this->fetchSingle('select hash from [views] where [name] = %s ',\n\t $modelName);\n\t$sql= array();\n\t$sql[] = $this->sql('delete from [views] where [name] = %s;', $modelName );\n\n\t$this->queue(\n\t PerfORMStorage::VIEW_DROP,\n\t $modelName,\n\t $sql,\n\t array(\n\t\t'model' => $model)\n\t );\n\n\n\t$key= $hash;\n\tif ( key_exists($key, $this->renamedViews))\n\t{\n\t $array= $this->renamedViews[$key];\n\t $array->counter++;\n\t $array->from= $modelName;\n\t}\n\telse\n\t{\n\t $this->renamedViews[$key]= (object) array(\n\t 'counter' => 1,\n\t 'from' => $modelName,\n\t );\n\t}\n }", "public function drop(): void;", "public function dropView($viewName, $schemaName, $ifExists=null){ }", "public function drop()\r\n {\r\n\r\n }", "function wppb_remove_rf_view_link( $actions ){\r\n\tglobal $post;\r\n\t\r\n\tif ( $post->post_type == 'wppb-rf-cpt' ){\r\n\t\tunset( $actions['view'] );\r\n\t\t\r\n\t\tif ( wppb_get_post_number ( $post->post_type, 'singular_action' ) )\r\n\t\t\tunset( $actions['trash'] );\r\n\t}\r\n\r\n\treturn $actions;\r\n}", "public function removeDesignFiles()\n {\n $this->designFiles()->detach();\n if ('scheduled' == $this->status) {\n $this->update([\n 'status' => 'incomplete'\n ]);\n }\n }", "function deletableResources(){\n\n return $this->resourcesByPermission('delete');\n }", "public function drop()\n {\n }", "public function htmleditorAction()\r\n {\r\n $this->_view->unsetMain();\r\n }", "public function tear_down(): void {\n\t\tremove_action( 'wp_body_open', [ $this->instance, 'embed_web_stories' ] );\n\n\t\tremove_theme_support( 'web-stories' );\n\n\t\tdelete_option( Customizer::STORY_OPTION );\n\t\tupdate_option( 'stylesheet', $this->stylesheet );\n\n\t\tparent::tear_down();\n\t}", "public static function cleanResources()\n {\n File::deleteDirectory(resource_path('sass'));\n File::delete(resource_path('js/app.js'));\n File::delete(resource_path('js/bootstrap.js'));\n }", "public function dropCollections()\n {\n $collections = $this->dbo->listCollections();\n foreach ($collections as $collection) {\n $collection->drop();\n }\n }", "public function doUnpublish() {\n\t\tif($this->Fields()) {\n\t\t\tforeach($this->Fields() as $field) {\n\t\t\t\t$field->doDeleteFromStage('Live');\n\t\t\t}\n\t\t}\n\t\t\n\t\tparent::doUnpublish();\n\t}", "public static function removeDefaultViews()\n {\n File::delete(resource_path('/views/home.blade.php'));\n File::delete(resource_path('/views/welcome.blade.php'));\n }", "public function remove() {\n\t\t$this->DispositionManager->remove();\n\t\t$this->autoRender = false;\n\t\t$this->redirect($this->refererStack(SYSTEM_CONSUME_REFERER));\n\t}", "public function Remove()\n {\n $file = __DIR__ . \\Extensions\\PHPImageWorkshop\\ImageWorkshop::UPLOAD_PATH . \"/banners/\" . $this->getSrc();\n if (file_exists($file)) {\n unlink($file);\n }\n parent::Remove();\n }", "public function cleanImagesAction()\n {\n parent::cleanImagesAction();\n $this->clearRespizrImageCache();\n }", "protected function tear_down()\n {\n unset($this->_object, $this->_view);\n }", "public function clearResources()\n {\n AM_Tools::clearContent($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n AM_Tools::clearResizerCache($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n }", "public function action_delete()\n\t{\n\t\t$view = View::factory('story/incomplete');\n\t\t$this->response->body($view);\n\t}", "public function drop ()\n {\n //delete the records of the lookup value\n $records = LookupValue::where('lookup_type_id', 1)->get();\n foreach ( $records as $record )\n $record->forceDelete();\n\n //delete the lookup definition itself\n $record = LookupType::find(1);\n $record->forceDelete();\n }", "public function actionDrop()\n {\n $dbName = Yii::$app->db->createCommand('SELECT DATABASE()')->queryScalar();\n if ($this->confirm('This will drop all tables of current database [' . $dbName . '].')) {\n Yii::$app->db->createCommand(\"SET foreign_key_checks = 0\")->execute();\n $tables = Yii::$app->db->schema->getTableNames();\n foreach ($tables as $table) {\n $this->stdout('Dropping table ' . $table . PHP_EOL, Console::FG_RED);\n Yii::$app->db->createCommand()->dropTable($table)->execute();\n }\n Yii::$app->db->createCommand(\"SET foreign_key_checks = 1\")->execute();\n }\n }", "public function deleteUnusedFiles(){\n \n }", "public function removeAction()\n {\n Zend_Controller_Action_HelperBroker::removeHelper('Layout');\n $this->view->id = $this->_getParam(\"id\");\n }", "protected function removeFiles() {}", "public function onAfterDelete()\n {\n if (!$this->hasAssets()) {\n return;\n }\n\n // Prepare blank manipulation\n $manipulations = new AssetManipulationList();\n\n // Add all assets for deletion\n $this->addAssetsFromRecord($manipulations, $this->owner, AssetManipulationList::STATE_DELETED);\n\n // Whitelist assets that exist in other stages\n $this->addAssetsFromOtherStages($manipulations);\n\n // Apply visibility rules based on the final manipulation\n $this->processManipulation($manipulations);\n }", "public function imageconfiguratorAction()\r\n {\r\n $this->_view->unsetMain();\r\n }", "public function removeAction() {\r\n //DELETE SLIDE DURING THE UPLOAD\r\n $is_ajax = (int) $this->_getParam('is_ajax');\r\n if (!empty($is_ajax)) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n }\r\n\r\n //GET SLIDESHOW ID AND IT'S OBJECT\r\n $advancedslideshow_id = (int) $this->_getParam('advancedslideshow_id');\r\n $this->view->advancedslideshow = $advancedslideshow = Engine_Api::_()->getItem('advancedslideshow', $advancedslideshow_id);\r\n\r\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('confirm') == true) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n if (empty($image)) {\r\n return;\r\n }\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n\r\n //GET TOTAL SLIDES COUNT\r\n $total_images = Engine_Api::_()->getDbTable('images', 'advancedslideshow')->getTotalSlides($advancedslideshow_id);\r\n\r\n $start_index = $advancedslideshow->start_index;\r\n\r\n if ($start_index > $total_images - 1) {\r\n if ($total_images != 0) {\r\n $advancedslideshow->start_index = $total_images - 1;\r\n $advancedslideshow->save();\r\n } else {\r\n $advancedslideshow->start_index = 0;\r\n $advancedslideshow->save();\r\n }\r\n }\r\n\r\n $parentRedirect = 'admin/advancedslideshow/slides/manage/advancedslideshow_id/' . $advancedslideshow_id;\r\n $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => 10,\r\n 'parentRedirect' => $parentRedirect,\r\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted the slide.')\r\n ));\r\n }\r\n }", "public function tear_down() {\n\t\tremove_filter( 'wp_image_editors', array( $this, 'setEngine' ), 10, 2 );\n\t\tparent::tear_down();\n\t}", "protected function _postDelete()\n {\n $this->getResource()->delete();\n\n $this->getIssue()->compileHorizontalPdfs();\n }", "public function destroyAllUnused(): RedirectResponse\n {\n /** @var Model $imaginators */\n $imaginators = Imaginator::get();\n\n foreach ($imaginators as $imaginator) {\n if (!$imaginator->isUsed()) {\n $imaginator->delete();\n }\n }\n\n push_success('Nepoužité Imaginátory úspešne smazány');\n return redirect()->back();\n }", "public function handleViews(&$view) {\n if ($this->oAccessCheckService->viewContainsNode($view) === TRUE) {\n $this->oAccessCheckService->removeForbiddenNodesFromView($view);\n }\n }", "protected function RetDropView() {\n\n if (!isset($this->\n tables[0])) {\n\n throw new \\Exception(\"Error: View not properly provided in QueryHelper.\");\n }\n\n $exists = isset($this->\n addArgs['exists']) && $this->\n addArgs['exists'] ? \" IF EXISTS\" : \"\";\n\n return \"DROP TABLE{$exists} `{$this->\n tables[0]}`;\";\n }", "protected function _postDelete()\n {\n $this->clearResources();\n }", "public function destroy(Request $request)\n {\n // ini_set( 'memory_limit', '512M' );\n // set_time_limit( 1800 );\n\n $id = $request->file_id;\n\n // delete data\n $file = File::findOrFail($id);\n DB::table($file->table_name)->where('file_id', $id)->delete();\n\n // delete file data\n $file->delete();\n\n // update page\n $data = $this->searchFiles();\n $datasources = Datasource::get(['id', 'datasource_name']);\n\n return view('uploaded_file.index', ['data' => $data, 'datasources' => $datasources]);\n }", "public function discard() {\n\t\t$this->DispositionManager->discard();\n\t\t$this->autoRender = false;\n\t\t$this->redirect($this->refererStack(SYSTEM_CONSUME_REFERER));\n\t}", "function cache_actions_action_clear_views_cache($view) {\n views_include_handlers();\n require_once('./' . drupal_get_path('module', 'views') . \"/plugins/views_plugin_cache.inc\");\n $view = views_get_view($view);\n\n // We use the cache plugin to clear the cache, since that's probably the best idea.\n $cache_plugin = new views_plugin_cache();\n \n // The cache plugin does not care which display we are using when it clears the cache,\n // it will clear all caches related to this view anyway, so we can safely use any display.\n $cache_plugin->init($view, $view->display[0]);\n $cache_plugin->cache_flush();\n}", "public function clear_preview() {}", "public function detachFiles() {\r\n\t\t$this->_attachedFiles = null;\r\n\t}", "public function clearRootAssetMappings();", "function delete()\n\t{\n\tglobal $db, $config_vars;\n\n// \t\t$result = new phreak_error();\n// \t$result->set_object_id($this->id);\n// \t$result->set_operation('delete');\n\n\n\t\t//check if the object is in the database\n\t\tif (isset($this->id))\n\t\t{\n\n\t\t\tif ($this->check_perm('delete')) //Authorisation is okay\n\t\t\t{\n\n\t\t\t\t//remove views for this picture\n\t\t\t\t$sql = 'DELETE FROM ' . $config_vars['table_prefix'] . \"views WHERE content_id = \" . $this->id;\n\t\t\t\tif (!$result = $db->sql_query($sql))\n\t\t\t\t{\n\t\t\t\t\t$error = new phreak_error(E_WARNING,SQL_ERROR,__LINE__,__FILE__,'delete',$this->id,0,0,$sql);\n\t\t\t\t\t$error->commit();\n//\t\t\t\t\terror_report(SQL_ERROR, 'delete' , __LINE__, __FILE__,$sql);\n\t\t\t\t}\n\n\n\n\n\t\t\t\t// remove from content table\n\t\t\t\t$sql = \"DELETE FROM \" . $config_vars['table_prefix'] . \"content WHERE id = \" . $this->id;\n\t\t\t\tif (!$result = $db->sql_query($sql))\n\t\t\t\t{\n\t\t\t\t\t$error = new phreak_error(E_WARNING,SQL_ERROR,__LINE__,__FILE__,'delete',$this->id,0,0,$sql);\n\t\t\t\t\t$error->commit();\n//\t\t\t\t\terror_report(SQL_ERROR, 'delete' , __LINE__, __FILE__,$sql);\n\t\t\t\t}\n\n\t\t\t\t$this->clear_content_in_cat();\n\n\t\t\t\tif (is_file($this->file))\n\t\t\t\t{\n\t\t\t\t\tif (!unlink($this->file))\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = new phreak_error(E_WARNING,FILE_ERROR,__LINE__,__FILE__,'delete');\n\t\t\t\t\t\t$error->commit();\n//\t\t\t\t\t\terror_report(FILE_ERROR, 'delete' , __LINE__, __FILE__);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif (is_file($this->get_thumbfile()))\n\t\t\t\t{\n\t\t\t\t\tif (!unlink($this->get_thumbfile()))\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = new phreak_error(E_WARNING,FILE_ERROR,__LINE__,__FILE__,'delete');\n\t\t\t\t\t\t$error->commit();\n//\t\t\t\t\t\terror_report(FILE_ERROR, 'delete' , __LINE__, __FILE__);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tunset($this->id);\n\n\t\t\t\t// decrase content amount\n\t\t\t\tforeach ($this->cat_ids as $id)\n\t\t\t\t{\n\t\t\t\t\t$this->remove_from_cat = new categorie;\n\t\t\t\t\t$this->remove_from_cat->generate_from_id($id);\n\t\t\t\t\t$this->remove_from_cat->set_content_amount($this->remove_from_cat->get_content_amount()-1);\n\t\t\t\t\t$this->remove_from_cat->commit();\n\t\t\t\t}\n\n\n\t\t\t\t// remove from content_in_cat table\n\n\n\t\t\t\tunset($this->file);\n\t\t\t\tunset($this->cat_ids);\n\t\t\t\tunset($this->place_in_cat);\n\n\n\n\n\t\t\t\treturn OP_SUCCESSFUL;\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn OP_NP_MISSING_DELETE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn OP_NOT_IN_DB;\n\t\t}\n\n\t}", "public function delete() {\n global $DB;\n\n if ($this->id) {\n $fs = get_file_storage();\n $contextid = $this->df->context->id;\n foreach ($this::get_file_areas() as $filearea) {\n $fs->delete_area_files($contextid, $this->component, $filearea, $this->id);\n }\n\n $DB->delete_records('dataform_views', array('id' => $this->id));\n\n // Trigger an event for deleting this view.\n $event = \\mod_dataform\\event\\view_deleted::create($this->default_event_params);\n $event->add_record_snapshot('dataform_views', $this->data);\n $event->trigger();\n }\n\n return true;\n }", "public function delete(){\n\t $this->model->clear()->filter(array('preview_master_id' => WaxUrl::get(\"id\")))->delete();\n\t parent::delete();\n\t}", "public function clean() {\n $this->requires = array();\n $this->getResource()->clear();\n }", "public function undoRestore ()\n {\n if (file_exists ( $this->_previewFilename ))\n {\n unlink($this->_previewFilename);\n }\n }", "private function cleanupFiles() {\n\t\t$this -> loadModel('Archivo');\n\t\t$items = $this -> Archivo -> find('all');\n\t\t$db_files = array();\n\t\tforeach ($items as $key => $item) {\n\t\t\t$db_files[] = $item['Archivo']['ruta'];\n\t\t}\n\t\t$dir_files = array();\n\t\t$dir_path = APP . 'webroot/files/uploads/solicitudesTitulacion';\n\t\tif ($handle = opendir($dir_path)) {\n\t\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\t\tif ($entry != 'empty' && is_file($dir_path . DS . $entry))\n\t\t\t\t\t$dir_files[] = 'files/uploads/solicitudesTitulacion/' . $entry;\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\tforeach ($dir_files as $file) {\n\t\t\tif (!in_array($file, $db_files)) {\n\t\t\t\t$file = explode('/', $file);\n\t\t\t\t$file = $file[count($file) - 1];\n\t\t\t\t$tmp_file_path = $dir_path . DS . $file;\n\t\t\t\tunlink($tmp_file_path);\n\t\t\t}\n\t\t}\n\t}", "public function cleanup() {\n $this->object->removeLock();\n $this->clearCache();\n\n $returnArray = $this->object->get(array_diff(array_keys($this->object->_fields), array('content','ta','introtext','description','link_attributes','pagetitle','longtitle','menutitle','articles_container_settings','properties')));\n foreach ($returnArray as $k => $v) {\n if (strpos($k,'tv') === 0) {\n unset($returnArray[$k]);\n }\n if (strpos($k,'setting_') === 0) {\n unset($returnArray[$k]);\n }\n }\n $returnArray['class_key'] = $this->object->get('class_key');\n $this->workingContext->prepare(true);\n $returnArray['preview_url'] = $this->modx->makeUrl($this->object->get('id'), $this->object->get('context_key'), '', 'full');\n return $this->success('',$returnArray);\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 removeAssets()\n {\n // Base implementation does only know about log file.\n if ($this->logFile) {\n if (file_exists($this->logFile)) {\n unlink($this->logFile);\n }\n $this->logFile = null;\n $this->file->remove('log');\n }\n }", "public function discardPreviewColumns();", "public function resetView()\n {\n $this->view = null;\n }", "public function dropAllViews()\n {\n throw new LogicException('This database driver does not support dropping all views.');\n }", "final public function clearViewsCache() {\n\t\t$this->allViews = null;\n\t}", "public function drop()\n {\n return $this->addCommand('drop');\n }", "public function close()\n {\n $this->view_file = null;\n $this->view_data = [];\n }", "protected function removeFilesAndDirectories()\n {\n parent::removeFilesAndDirectories();\n $this->laravel['files']->delete(base_path('routes/admin.php'));\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 dropAction() {\n $id = $this->getRequest()->getParam('id', null);\n if(!is_null($id)) {\n $data = array(\n 'company_id' => $id,\n 'company_active' => 0\n );\n\n $company = Default_Model_Company::update($data);\n\n }\n\n $this->_redirect($this->view->actions['index']);\n }", "public function clearExports()\n {\n $location = \"application/export/files/*.*\";\n $files = glob($location); \n foreach($files as $file){\n unlink($file); \n }\n return;\n }", "function removeads() //\n\t{\n\t\tif ($model = $this->getModel('editads'))\n\t\t{\n\t\t\t//Push the model into the view (as default)\n\t\t\t//Second parameter indicates that it is the default model for the view\n\t\t\t$model->removeads();\n\t\t}\n\t}", "private function doCleanup($unchecked)\n {\n $tracker = $this->tracker;\n /* @var \\PhpGuard\\Listen\\Resource\\TrackedObject $tracked */\n foreach($unchecked as $id=>$tracked){\n $origin = $tracked->getResource();\n if(!$origin->isExists()){\n $tracker->addChangeSet($tracked,FilesystemEvent::DELETE);\n $tracker->remove($tracked);\n }\n unset($unchecked[$id]);\n }\n }", "public function deleteAllResources() {\n\t\t$this->resources = array();\n\t}", "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "protected function cleanup() {\n\t\tif(isset($this->data['attachment'])) {\n\t\t\tunlink($this->data['attachment']);\n\t\t}\n\t\tparent::cleanup();\n\t}", "public function __destruct () {\r\n\t\tif(!empty($this->req_key)) {\r\n\t\t\t$this->loadView();\r\n\t\t}else {\r\n\t\t\t$this->log->write(\"AdminController > no view\");\r\n\t\t}\r\n\t\t$this->log->write(\"AdminController > destroyed\");\r\n\t}", "public function pruneCommand() {\n\t\t$count = $this->removeAllImages();\n\t\t$this->outputLine('%d record(s) purged.', [$count]);\n\t}", "public function remove_image() {\n\t\t$this->join_name = \"images\";\n\t\t$this->use_layout=false;\n\t\t$this->page = new $this->model_class(Request::get('id'));\n\t\t$image = new WildfireFile($this->param(\"image\"));\n\t\t$this->page->images->unlink($image);\n\t}", "public function destroy(ViewUnits $viewUnits)\n {\n //\n }", "public function removeProfileVisuals($username){\n File::deleteDirectory(public_path().'/uploads/covers/'.$username);\n File::deleteDirectory(public_path().'/uploads/profile/'.$username);\n }", "private static function deleteAssets() {\n // Fail due to invalid asset deletors \n assert(isset(self::$assetDeletors));\n\n // Remove assets \n foreach (self::$assetDeletors as $deletor) {\n $deletor->delete();\n }\n\n // Clear AssetDeletors cache\n self::$assetDeletors = array();\n }", "public function delete() { // Page::destroy($this->pages()->select('id')->get());\n $this->pages()->detach();\n parent::delete();\n }", "public function reclaim();", "public function galeriasExcluir_action()\n\t{\n\t\t$bd = new GaleriasImagens_Model();\n\t\t$id = abs((int) $this->getParam(2));\n\t\t$resultado = $bd->read(\"id={$id} AND usuario={$this->_usuario}\");\n\t\tunlink('uploads/img_'.$resultado[0]['imagem']);\n\t\tunlink('uploads/tb_'.$resultado[0]['imagem']);\n\t\tunlink('uploads/destaque_'.$resultado[0]['imagem']);\n\t\t$bd->delete(\"id={$id} AND usuario={$this->_usuario}\");\n\t\tHTML::certo('Imagem exclu&iacute;da.');\n\t\t//POG Temporário\n\t\tHTML::Imprime('<script>Abrir(\"#abreImagemGaleria\",\"#imagens\");</script>');\n\t}", "public function cleanup() {\r\n\t\t$this->resource->cleanup();\r\n\t}", "function clearPreviewCache () {\n files::deleteFile($this->previewDir . $this->file);\n }", "public function afterDelete()\n {\n if ($this->image) $this->image->delete();\n if ($this->reindex) Slide::reindex();\n }", "public function actionUnpublishItems()\n {\n $civ = CatalogItemVariant::find()\n ->where(['published' => 0])\n ->asArray()\n ->all();\n\n if (!empty($civ)) {\n foreach ($civ as $ci) {\n $oCi = CatalogItem::findOne(['id' => $ci['product_id'], 'published' => 1]);\n if (!empty($oCi)) {\n $oCi->published = 0;\n $oCi->save();\n echo 'Unpublished catalog item id: ' . $ci['product_id'] . PHP_EOL;\n }\n }\n \n }\n }", "abstract public function Drop();", "public function drop()\n\t\t{\n\t\t\tif ($this->exists()) {\n\t\t\t\tself::remove($this->get_path());\n\t\t\t\treturn $this;\n\t\t\t} else throw new \\System\\Error\\File('Cannot remove file. It does not exist on the filesystem.');\n\t\t}", "public function destroy()\n {\n $accessory = Accessories::find(request('id'));\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n\n $accessory->destroy(request('id'));\n return response()->json([\"data\" => $accessory], 204);\n }", "public function deleteContentAndCopyLivePage() {}", "public function removable()\n {\n $this->rightTools()->append(\n '<a data-toggle=\"remove\"><i class=\"zmdi zmdi-close\"></i></a>'\n );\n\n static::$scripts[0] = <<<EOF\n $('.portlet [data-toggle=\"remove\"]').click(function (e) {\n $(this).parent().parent().parent().parent().parent().toggle(100)\n })\nEOF;\n return $this;\n }", "function removeUnusedFiles( )\r\n{\r\n // select all files that aren't referenced anymore\r\n $sql = \"SELECT DISTINCT f.id, f.filename\r\n\t\t\tFROM \" . dropbox_cnf(\"tbl_file\") . \" f\r\n\t\t\tLEFT JOIN \" . dropbox_cnf(\"tbl_person\") . \" p ON f.id = p.file_id\r\n\t\t\tWHERE p.user_id IS NULL\";\r\n $result = api_sql_query($sql,__FILE__,__LINE__);\r\n while ( $res = mysql_fetch_array( $result))\r\n {\r\n\t\t//delete the selected files from the post and file tables\r\n $sql = \"DELETE FROM \" . dropbox_cnf(\"tbl_post\") . \" WHERE file_id='\" . $res['id'] . \"'\";\r\n $result1 = api_sql_query($sql,__FILE__,__LINE__);\r\n $sql = \"DELETE FROM \" . dropbox_cnf(\"tbl_file\") . \" WHERE id='\" . $res['id'] . \"'\";\r\n $result1 = api_sql_query($sql,__FILE__,__LINE__);\r\n\r\n\t\t//delete file from server\r\n @unlink( dropbox_cnf(\"sysPath\") . \"/\" . $res[\"filename\"]);\r\n }\r\n}", "public function deleteOrphansAction()\n {\n //usuwanie plików tmp\n return 'Temporary files deleted: ' . \\Cms\\Model\\File::deleteOrphans();\n }", "public function deleteUnusedImages()\n {\n $names = app(ExportHelpCenterImages::class)->execute();\n\n $files = Storage::disk('public')->files('article-images');\n $toDelete = array_diff($files, $names->toArray());\n\n return Storage::disk('public')->delete($toDelete);\n }", "public function deleteContentAndCopyDraftPage() {}", "public function actionDelete()\n {\n if (Yii::$app->user->can('imagedelete')) {\n if (Yii::$app->request->isAjax) {\n $system = new Filesystem();\n $param = Yii::$app->request->post();\n $model = $this->findModel($param['id']);\n $system->remove($this->original . $model->unique_name);\n $system->remove($this->thumb_145x145 . $model->unique_name);\n $system->remove($this->thumb_original . $model->unique_name);\n $system->remove($this->thumb_191x128 . $model->unique_name);\n $model->delete();\n }\n } else {\n throw new HttpException(403, 'You are not allowed to access this page', 0);\n }\n }", "protected function dropSchemas()\n {\n }", "public function undeleteAction(){\n\t}", "function wppb_remove_trash_bulk_option_rf( $actions ){\r\n\tglobal $post;\r\n\tif( !empty( $post ) ){\r\n if ( $post->post_type == 'wppb-rf-cpt' ){\r\n unset( $actions['view'] );\r\n\r\n if ( wppb_get_post_number ( $post->post_type, 'bulk_action' ) )\r\n unset( $actions['trash'] );\r\n }\r\n }\r\n\r\n\treturn $actions;\r\n}", "public function destroy($id)\n {\n $action=Action::find($id);\n $existingInPivot=Action::with('getResources')->where('id',$action->id)->get();\n foreach ($existingInPivot as $e) {\n $existingResources=[];\n foreach ($e->getResources as $existingResource) {\n $existingResources[]=$existingResource->id;\n }\n }\n\n try {\n DB::transaction(function () use ($action,$existingResources) {\n $action->delete();\n for ($i=0; $i <count($existingResources) ; $i++) { \n $action->getResources()->detach($existingResources[$i]);\n }\n });\n } catch (Exception $exc) {\n session()->flash('message.type', 'danger');\n session()->flash('message.content', 'Erreur lors de la suppression');\n// echo $exc->getTraceAsString();\n }\n session()->flash('message.type', 'success');\n session()->flash('message.content', 'Action supprimer avec succès!');\n return redirect()->route('actions.index');\n}" ]
[ "0.6106336", "0.5998302", "0.5998302", "0.5991642", "0.5807204", "0.5807204", "0.57931006", "0.5791971", "0.5757705", "0.5757012", "0.5712941", "0.570279", "0.5692462", "0.5556355", "0.5530578", "0.5501476", "0.54968584", "0.54851407", "0.54494286", "0.5393713", "0.53646934", "0.534992", "0.5344422", "0.5337445", "0.5329194", "0.53104115", "0.53049976", "0.52987415", "0.5296103", "0.5286987", "0.5282806", "0.5274458", "0.5270861", "0.52582395", "0.52241343", "0.5223403", "0.5222547", "0.52213776", "0.52077156", "0.5198493", "0.51946187", "0.5181377", "0.5176961", "0.51743937", "0.5171831", "0.51496965", "0.5143582", "0.5119409", "0.51111645", "0.51073945", "0.5101071", "0.5099274", "0.5094056", "0.5090694", "0.5088335", "0.5080142", "0.5072661", "0.5071733", "0.50578445", "0.50511724", "0.5050615", "0.50500154", "0.50497437", "0.5044245", "0.50418717", "0.5036537", "0.5035282", "0.50218177", "0.50116897", "0.50110245", "0.5003049", "0.5001512", "0.498923", "0.49873227", "0.49833924", "0.4977022", "0.49723268", "0.497178", "0.49663097", "0.49622324", "0.49605447", "0.4951724", "0.49339122", "0.49294955", "0.492365", "0.4920379", "0.4918097", "0.49162626", "0.49137804", "0.49128008", "0.49121818", "0.4906353", "0.4900191", "0.48966515", "0.48779616", "0.48756847", "0.48749447", "0.4870505", "0.4865151", "0.4860773" ]
0.69780487
0
Create new resource and append to view
protected function createResource( string $id = null, $attributes, $meta = null ) { $resource = new Resource($this->type, $id); $resource ->setAttributes($attributes) ->fillMeta($meta) ; $this->view->addResource($resource); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n return view(self::$folder . 'add')->withTitle(self::$mainTitle)->with('link', self::$link);\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n {\n return $this->_viewHelper->getCreateView(\n array_merge($this->_defaultData, [ 'fields' => $this->_loadResourceFields()])\n );\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create()\n {\n // Not needed cause this is coming from the item listing\n }", "public function create()\n\t{\n\t\t// handled by backbone routes\n\t}", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function create()\n {\n //\n return view(\"Admin.Abs.add\");\n }", "public function createNew() {\n\t\t$data['session'] = $this->getSession();\n\t\t$this -> load -> view('private/createNew', $data);\n\t}", "public function create()\n {\n return view('/add');\n \n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n return view('rests.create');\n }", "protected function createResource()\n {\n $this->call('make:resource', array_filter([\n 'name' => $this->getNameInput().'Resource',\n ]));\n }", "public function create()\n {\n // I skip using this create function because I use a modal form for inserting data using modal in index view via index function.\n }", "public function create() {\r\n require $this->views_folder . 'create.php';\r\n }", "public function create()\n {\n $this->set_datas([]);\n $this->blade->view($this->get_view_page(), $this->get_datas());\n }", "public function createAction()\n {\n if ($this->getRequest()->isPost())\t\t\t//avoids direct access without having an ID pass\n {\n $this->view->title = ' - Thema';\n\n $this->view->topicID = $_POST[\"topicID\"];\t\t//sends topicID to view\n $this->view->topicName = $_POST[\"topicName\"];\t//sends topicName to view\n }\n else\n {\n $this->_redirect('/');\t\t\t\t//goes to mainpage\n }\n }", "public function create()\n {\n $obj = new Obj();\n $this->authorize('create', $obj);\n\n return view('appl.'.$this->app.'.'.$this->module.'.createedit')\n ->with('stub','Create')\n ->with('obj',$obj)\n ->with('editor',true)\n ->with('datetimepicker',true)\n ->with('app',$this);\n }", "public function createAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new CreateForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Create a item\",\n ]);\n }", "public function create()\n {\n $data = array();\n $data['formObj'] = $this->modelObj;\n $data['page_title'] = \"Add \".$this->module;\n $data['action_url'] = $this->moduleRouteText.\".store\";\n $data['action_params'] = 0;\n $data['buttonText'] = \"Save\";\n $data[\"method\"] = \"POST\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function action_create()\n {\n $this->action_edit(FALSE);\n }", "public function actionCreate()\n {\n $this->isCreateView = true;\n $modelClass = $this->_getModelClass();\n $model = new $modelClass;\n return $this->_renderView($model);\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n {\n $this->loadLayout();\n $this->renderLayout();\n }", "public function create()\n {\n //\n return view('object.create');\n }", "function create () {\n\tinclude 'request-create-view.php';\n}", "protected function createResource()\n {\n $resourceOptions = [\n 'resource' => $this->info['resource'],\n '--module' => $this->moduleName,\n ];\n\n $options = $this->setOptions([\n 'parent',\n 'assets'=>'uploads',\n 'data'\n ]);\n\n $this->call('engez:resource', array_merge($resourceOptions, $options));\n }", "public function newAction()\n {\n\t\tTag::appendTitle('Create Article');\n }", "public function addNewAction()\n {\n // echo 'Hello from the addNew action in the Books controller!';\n View::renderTemplate('Books/addBook.html');\n }", "abstract protected function getNewResource();", "public function create()\n {\n return view('crud/add'); }", "public function create()\n {\n return $this->response->view($this->getViewName('create'));\n }", "abstract protected function createResource();", "public function create() {\n\t\t$model = new $this->model_class;\n\t\t$model->status = 3;\n\t\t$model->author_id = Session::get('wildfire_user_cookie');\n\t\t$model->url = time();\n\t\tif(Request::get(\"title\")) $model->title = Request::get(\"title\");\n\t\telse $model->title = \"Enter Your Title Here\";\n\t\t$this->redirect_to(\"/admin/content/edit/\".$model->save()->id.\"/\");\n\t}", "public function create()\n {\n return response()\n ->view( 'pages.esp.esp-add' , ['formType' => 'add' ] );\n }", "public function create()\n {\n $common = $this->common;\n return view($common.'.addEdit',compact('common'));\n }", "public function create()\n {\n $data['url'] = route($this->route . '.store');\n $data['title'] = 'Add ' . $this->viewName;\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n $data['route'] = $this->route;\n\n return view('admin.general.create')->with($data);\n }", "public function create()\n {\n $data['url'] = route($this->route . '.store');\n $data['title'] = 'Add ' . $this->viewName;\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n $data['route'] = $this->route;\n\n return view('admin.general.create')->with($data);\n }", "public function newAction()\n {\n $reflection = new FormReflectionManager($this->flash);\n\n $url = new Url;\n $url->id = $reflection->get('id');\n $url->address = $reflection->get('address');\n \n $this->view->url = $url;\n \n #$this->view->disable(); \n }", "public function create()\n {\n return view(parent::commonData($this->view_path.'.create'));\n }", "public function createAction()\r\n\t{\r\n\t\treturn $this->_crud();\r\n\t}", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create()\n {\n $this->view_data['language'] = Language::translatable()->get(); \n return view($this->base_view_path.'add', $this->view_data);\n }", "public function create()\n {\n return view('document.add');\n }", "public function actionCreate() {\n $this->actionUpdate();\n }", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n //\n return view('target.create');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function actionCreate() {}", "public function actionCreate() {}", "public function create()\n {\n return view('admin.data.restos.create');\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function createAction()\n {\n $this->createEditParameters = $this->createEditParameters + $this->_createExtraParameters;\n\n parent::createAction();\n }", "public function actionCreate()\n\t{\n $this->actionUpdate();\n\t}", "public function actionCreate()\n {\n $this->setModelByConditions();\n\n if (Yii::$app->request->isPost &&\n $this->model->load(Yii::$app->request->post()) &&\n $this->setAdditionAttributes() &&\n $this->model->save()) {\n\n if ($this->viewCreated) {\n $redirectParams = [\n $this->urlPrefix.'view',\n 'id' => $this->model->getId(),\n ];\n } else {\n $redirectParams = [\n $this->urlPrefix.'index',\n ];\n }\n\n return $this->redirect($redirectParams);\n }\n\n return $this->render('create',\n ArrayHelper::merge(\n [\n 'model' => $this->model,\n ],\n $this->getAdditionFields()\n )\n );\n }", "public function createAction()\n {\n $data = $this->getRequest()->getBody();\n $model = $this->getBinding()->create($data);\n $responseClass = $this->container->getParameter('response.class');\n $response = new $responseClass($model, 201);\n\n return $response;\n }", "public function add_new_resource() {\n // @codingStandardsIgnoreLine\n $add_resource_name = wc_clean( $_POST['add_resource_name'] );\n\n if ( empty( $add_resource_name ) ) {\n wp_send_json_error();\n }\n\n $resource = array(\n 'post_title' => $add_resource_name,\n 'post_content' => '',\n 'post_status' => 'publish',\n 'post_author' => dokan_get_current_user_id(),\n 'post_type' => 'bookable_resource',\n );\n $resource_id = wp_insert_post( $resource );\n $edit_url = dokan_get_navigation_url( 'booking' ) . 'resources/edit/?id=' . $resource_id;\n ob_start();\n ?>\n <tr>\n <td><a href=\"<?php echo $edit_url; ?>\"><?php echo $add_resource_name; ?></a></td>\n <td><?php esc_attr_e( 'N/A', 'dokan' ); ?></td>\n <td>\n <a class=\"dokan-btn dokan-btn-sm dokan-btn-theme\" href =\"<?php echo $edit_url; ?>\"><?php esc_attr_e( 'Edit', 'dokan' ); ?></a>\n <button class=\"dokan-btn dokan-btn-theme dokan-btn-sm btn-remove\" data-id=\"<?php echo $resource_id; ?>\"><?php esc_attr_e( 'Remove', 'dokan' ); ?></button>\n </td>\n </tr>\n\n <?php\n $output = ob_get_clean();\n wp_send_json_success( $output );\n }", "public function create()\n\t{\n\t\t$this->layout->content = View::make('pns.create');\n\t}", "function create()\n\t{\n\t\tif ($_GET[\"obj_id\"] != \"\")\n\t\t{\n\t\t\t$this->setTabs();\n\t\t}\n\t\tparent::create();\n\t}", "public function create()\n {\n return view('add');\n }", "public function create()\n {\n return view('add');\n }", "public function create()\n {\n return view('add');\n }", "public function create()\n {\n return view('add');\n }", "public function create()\n {\n $this->authorize('create', Product::class);\n return view(static::$resource::uriKey() . '.create');\n }", "public function create()\n {\n return view('myactivity.add_myactivity');\n }", "public function create()\n {\n return view('app.room.add'); //\n }", "public function create()\n {\n //\n return view('cores.addItem');\n }", "public function create()\n {\n return view(\"api.insert\");\n }", "public function addAction()\n {\n $form = $this->getForm('create');\n $entity = new Entity\\CourtClosing();\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n $view = new ViewModel();\n $view->form = $form;\n\n return $view;\n }", "public function create ()\n {\n $role = $this->repository->makeModel ();\n $_method = 'POST';\n\n return view ('admin.' . $this->module_name . '.add', compact ('role', '_method'));\n }", "public function create()\n {\n $showURL = url()->current();\n $flagShow = strpos($showURL, 'edit');\n $authors = Author::all();\n $tags = Tag::all();\n\n return view('backoffice.create', compact('authors', 'tags', 'flagShow'));\n }", "public function create()\n\t{\n\t\treturn View::make('apis.create');\n\t}", "public function create()\n {\n //加载模板\n return view('Admin.Req.add');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n if(no_permission('createLink')){\n return view(config('program.no_permission_to_view'));\n }\n return view('admin.link.add');\n }", "public function createAction() : object\n {\n $title = \"Skapa nytt innehåll\";\n\n // Check if not logged in, redirect to login page\n if (!$this->app->session->get('user')) {\n return $this->app->response->redirect(\"content/login\");\n }\n\n if (hasKeyPost(\"doSave\")) {\n $title = getPost(\"contentTitle\");\n\n $sql = \"INSERT INTO content (title) VALUES (?);\";\n $this->app->db->execute($sql, [$title]);\n\n return $this->app->response->redirect(\"content\");\n }\n\n // Add and render page to add content\n $this->app->page->add(\"content/create\");\n return $this->app->page->render([\"title\" => $title,]);\n }", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n //Not Used because using API Route\n }", "public function create()\n {\n $title = self::TITLE;\n $route = self::ROUTE;\n $action = \"Create\";\n return view(self::FOLDER . \".create\", compact(\"title\", \"route\", 'action'));\n }", "public function create()\n {\n $title = self::TITLE;\n $route = self::ROUTE;\n $action = \"Create\";\n return view(self::FOLDER . \".create\", compact(\"title\", \"route\", 'action'));\n }", "public function create()\n {\n\t\treturn view('item.create');\n }", "public function create()\n {\n //新增页面\n return view('admin.nine_patch.create');\n }", "public function create()\n\t{\n\t\treturn Response::make( View::make('admin.bachelor_create', $this->data), 200 );\n\t}", "public function create()\n {\n $this->load->view('theme/header');\n $this->load->view('itemCRUD/create');\n $this->load->view('theme/footer'); \n }", "public function create()\r\n\t{\r\n // load the create form (app/views/children/create.blade.php)\r\n\t\treturn View::make('relatives.create')->with('id',0);\r\n\t}", "public function createAction()\n {\n $tiles = array();\n // the old way: this renders the content in the same request.\n // $tiles[] = $this->editRegionAction();\n\n // here we clone the request for the region.\n $tiles[] = $createRegion = Region::create( $this->getCreateRegionPath(), array_merge($_REQUEST, [ \n '_form_controls' => true,\n ]));\n return $this->render($this->findTemplatePath('page.html') , [\n 'tiles' => $tiles,\n 'createRegion' => $createRegion,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n //\n return view('backend.item.new');\n }", "public function newAction()\n {\n sleep(2);\n \n $entity = new Reserva();\n $dia = new ReservaDia();\n// $hora = new ReservaHora();\n// \n// $dia->getHoras()->add($hora);\n \n $entity->getDias()->add($dia);\n\n $form = $this->createCreateForm($entity);\n \n return $this->render('CosacoGesenBundle:Horario:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function create()\n\t{\n\t\t//\n\t\treturn \\View::make('new');\n\t}", "public function create()\n {\n return view($this->mainRedirect . 'create');\n }", "public function create()\n {\n $this->view->load('tacgias/create');\n }", "public function createAction(){\n $action = \"new\";\n $actionText = \"Create Book\";\n // create empty book...\n $book = new Book();\n require_once('views/bookForm.php');\n }", "public function create()\n\t{\n\n\t\treturn View::make('Thirdparty.newThirdparty')->with(array('title' => 'Add Third Party'));\n\t}", "function create(){\n // data create start\n return view('admin.landview.create');\n }", "public function postAddResource()\n {\n\n $errors = validateAddResources();\n\n if(!($errors === true)) {\n\n $this->_f3->set('errors', $errors);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n } else {\n $this->_f3->reroute('/Admin');\n }\n\n }", "public function create()\n {\n return view('libary.create');\n }", "public function add()\n\t{\n\t\t$this->template('crud/add');\t\n\t}" ]
[ "0.7216293", "0.6716679", "0.67016697", "0.66875005", "0.660034", "0.65478814", "0.6481987", "0.64424586", "0.6439754", "0.6406788", "0.639807", "0.63784313", "0.6371882", "0.63589597", "0.63376856", "0.63373363", "0.63029593", "0.6301037", "0.62982607", "0.62796044", "0.62712896", "0.62690866", "0.6269038", "0.62675273", "0.6266085", "0.6264488", "0.6261058", "0.6254235", "0.6240735", "0.62370354", "0.62368506", "0.62360424", "0.6228633", "0.62247115", "0.6211445", "0.6210885", "0.6199495", "0.6190138", "0.6190138", "0.61864585", "0.6175268", "0.617064", "0.61679804", "0.6167035", "0.61499673", "0.61432934", "0.61406684", "0.6135826", "0.6128665", "0.6127789", "0.6126967", "0.6126967", "0.612386", "0.61220163", "0.61153865", "0.61152405", "0.61128145", "0.6112196", "0.61082816", "0.6107051", "0.6094958", "0.6091033", "0.6091033", "0.6091033", "0.6091033", "0.6086366", "0.60859895", "0.6075313", "0.6072599", "0.60722905", "0.6068891", "0.6067145", "0.60562664", "0.6054254", "0.60518694", "0.6051635", "0.6051635", "0.60449475", "0.6043574", "0.60419923", "0.6038148", "0.6035585", "0.6035585", "0.60328835", "0.60317713", "0.60317564", "0.60308", "0.6029824", "0.6029791", "0.602686", "0.6022271", "0.60201204", "0.6012584", "0.60103524", "0.60097516", "0.6009269", "0.6007953", "0.60020596", "0.60006714", "0.5997606", "0.59961927" ]
0.0
-1
Append resource object to view
protected function addResource(Resource $resource) { $this->view->addResource($resource); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function viewAddResources()\n {\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function add($request){\r\n return $this->view();\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function add($data, Resource $resource);", "public function addAction()\n {\n $this->templatelang->load($this->_controller.'.'.$this->_action);\n\n // Rendering view page\n $this->_view();\n }", "public function add_resources()\n\t{\n\t\t\n\t}", "private function _addResource()\n {\n //Add Resource\n $this->assets->collection('css_header')\n ->addCss('/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css');\n\n $this->assets->collection('js_footer')\n ->addJs('/plugins/nestable/jquery.nestable.js')\n ->addJs('/plugins/nestable/ui-nestable.js')\n ->addJs('/plugins/bootstrap-modal/js/bootstrap-modal.js')\n ->addJs('/plugins/bootstrap-modal/js/bootstrap-modalmanager.js')\n ->addJs('/templates/backend/default/js/ui-modals.js');\n }", "public function addResource($type, $object = null, ?\\SetaPDF_Core_Document $document = null) {}", "public function addAction() {\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "public function postAddResource()\n {\n\n $errors = validateAddResources();\n\n if(!($errors === true)) {\n\n $this->_f3->set('errors', $errors);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n } else {\n $this->_f3->reroute('/Admin');\n }\n\n }", "public function create()\n {\n return view('restful.add');\n }", "public function add() {\r\n if(isset($this->data) && isset($this->data['Product'])) {\r\n $product = $this->Product->save($this->data);\r\n $this->set('response', array('Products' => $this->Product->findByProductid($product['Product']['ProductID'])));\r\n $this->Links['self'] = Router::url(array('controller' => $this->name, 'action' => 'view', $product['Product']['ProductID']), true);\r\n } else {\r\n $this->Links['self'] = Router::url(array('controller' => $this->name, 'action' => 'index'), true);\r\n }\r\n }", "public function actionAdd() {\n $this->setView('edit');\n }", "public function add()\n {\n //renderView('add');\n }", "public function create()\n {\n return $this->_viewHelper->getCreateView(\n array_merge($this->_defaultData, [ 'fields' => $this->_loadResourceFields()])\n );\n }", "public function resourcecontentAction() {\n\t$resource_type = $this->_getParam('resource_type');\n\t$resource_id = $this->_getParam('resource_id');\n\t$is_spocerdStory = $this->_getParam('is_spocerdStory', null);\n\n\t$is_document = 0;\n\tif ($resource_type == 'document') {\n\t $is_document = 1;\n\t}\n \n if( strstr($resource_type, \"sitereview\") ) {\n // $resource_type = \"sitereview\";\n\n $sitereviewExplode = explode(\"_\", $resource_type);\n $tempAdModId = $sitereviewExplode[1];\n $module_info = Engine_Api::_()->getItem(\"communityad_module\", $tempAdModId);\n $tempModName = strtolower($module_info->module_title);\n $tempModName = ucfirst($module_info->module_title);\n \n $content_table = \"sitereview_listing\";\n $sub_title = \"View\" . \" \" . $tempModName;\n $content_data = Engine_Api::_()->getItem($content_table, $resource_id);\n }else {\n $field_info = Engine_Api::_()->getDbTable('modules', 'communityad')->getModuleInfo($resource_type);\n\n if (!empty($field_info)) {\n $content_data = Engine_Api::_()->getItem($field_info['table_name'], $resource_id);\n }\n }\n\n $base_url = Zend_Controller_Front::getInstance()->getBaseUrl();\n if( empty($sub_title) ) {\n $sub_title = Engine_Api::_()->communityad()->viewType($resource_type);\n }\n\t$photo_id_filepath = 0;\n\n\tif (empty($is_document)) {\n\t $photo_id_filepath = $content_data->getPhotoUrl('thumb.normal');\n\t} else {\n\t $photo_id_filepath = $content_data->thumbnail;\n\t}\n\n\tif (strstr($photo_id_filepath, '?')) {\n\t $explode_array = explode(\"?\", $photo_id_filepath);\n\t $photo_id_filepath = $explode_array[0];\n\t}\n\n\t$isCDN = Engine_Api::_()->seaocore()->isCdn();\n\n\tif (empty($isCDN)) {\n\t if (!empty($base_url)) {\n\t\t$photo_id_filepath = str_replace($base_url . '/', '', $photo_id_filepath);\n\t } else {\n\t\t$arrqay = explode('/', $photo_id_filepath);\n\t\tunset($arrqay[0]);\n\t\t$photo_id_filepath = implode('/', $arrqay);\n\t }\n\t}\n\n\tif (!empty($photo_id_filepath)) {\n\t if (strstr($photo_id_filepath, 'application/')) {\n\t\t$photo_id_filepath = 0;\n\t } else {\n\t\t$content_photo = $this->upload($photo_id_filepath, $is_document, $isCDN);\n\t }\n\t}\n\t// Set \"Title width\" acording to the module.\n\t$getStoryContentTitle = $title = $content_data->getTitle();\n\t$title_lenght = strlen($title);\n\t$tmpTitle = strip_tags($content_data->getTitle());\n\t$titleTruncationLimit = $title_truncation_limit = Engine_Api::_()->getApi('settings', 'core')->getSetting('ad.char.title', 25);\n\tif ($title_lenght > $title_truncation_limit) {\n\t $title_truncation_limit = $title_truncation_limit - 2;\n\t $title = Engine_String::strlen($tmpTitle) > $title_truncation_limit ? Engine_String::substr($tmpTitle, 0, $title_truncation_limit) : $tmpTitle;\n\t $title = $title . '..';\n\t}\n\n\t// Set \"Body width\" acording to the module.\n\t$body = $content_data->getDescription();\n\t$body_lenght = strlen($body);\n\t$tmpBody = strip_tags($content_data->getDescription());\n\t$body_truncation_limit = Engine_Api::_()->getApi('settings', 'core')->getSetting('ad.char.body', 135);\n\tif ($body_lenght > $body_truncation_limit) {\n\t $body_truncation_limit = $body_truncation_limit - 2;\n\t $body = Engine_String::strlen($tmpBody) > $body_truncation_limit ? Engine_String::substr($tmpBody, 0, $body_truncation_limit) : $tmpBody;\n\t $body = $body . '..';\n\t}\n\n\n\n\n\t$preview_title = $title . '<div class=\"cmaddis_adinfo\"><a href=\"javascript:void(0);\">' . $sub_title . '</a></div>';\n \t//$preview_title = $title . '<div class=\"cmaddis_adinfo cmad_show_tooltip_wrapper\" style=\"clear:none;\"><a href=\"javascript:void(0);\">' . $sub_title . '</a><div class=\"cmad_show_tooltip\"> <img src=\"./application/modules/Communityad/externals/images/tooltip_arrow.png\" />Viewers will be able to like this ad and its content. They will also be able to see how many people like this ad, and which friends like this ad.</div></div>';\n\n\t$remaning_body_limit = $body_truncation_limit - strlen($body);\n\tif ($remaning_body_limit < 0) {\n\t $remaning_body_limit = 0;\n\t}\n\t$remaning_title_limit = $title_truncation_limit - strlen($title);\n\tif ($remaning_title_limit < 0) {\n\t $remaning_title_limit = 0;\n\t}\n\n\t// Set the default image if no image selected.\n\tif (empty($content_photo)) {\n\t if (empty($is_spocerdStory)) {\n\t\t$path = $this->view->layout()->staticBaseUrl . '/application/modules/Communityad/externals/images/blankImage.png';\n\t\t$content_photo = '<img src=\"' . $path . '\" alt=\" \" />';\n\t } else {\n\t $content_photo = $this->view->itemPhoto($content_data, 'thumb.profile');\n\t if( in_array('music', array('music')) && in_array('blog', array('blog')) ) {\n\t $content_photo = $this->view->itemPhoto($content_data, 'thumb.icon');\n\t }\n\t }\n\t}\n\t$viewerTruncatedTitle = Engine_Api::_()->communityad()->truncation($this->_viewer->getTitle(), $titleTruncationLimit);\n\t\n\tif ($is_spocerdStory == 1) {\n\t $storyTrunLimit = Engine_Api::_()->getApi('settings', 'core')->getSetting('story.char.title', 35);\n\t $getStoryContentTitle = Engine_Api::_()->communityad()->truncation($getStoryContentTitle, $storyTrunLimit);\n\t $getTooltipTitle = $this->view->translate(\"_sponsored_viewer_title_tooltip\");\n\t $getContentTooltipTitle = $this->view->translate(\"_sponsored_content_title_tooltip\");\n\t $viewerTruncatedTitle = '<span class=\"cmad_show_tooltip_wrapper\"><b><a href=\"javascript:void(0);\">' . $viewerTruncatedTitle . '</a></b><div class=\"cmad_show_tooltip\"><img src=\"./application/modules/Communityad/externals/images/tooltip_arrow.png\" style=\"width:13px;height:9px;\" />'.$getTooltipTitle.'</div></span>';\n\t $main_div_title = $this->view->translate('%s likes <a href=\"javascript:void(0);\">%s.</a>', $viewerTruncatedTitle, $getStoryContentTitle);\n\t $footer_comment = '';\n\n$content_photo = '<a href=\"javascript:void(0);\">' . $content_photo . '</a><div class=\"cmad_show_tooltip\">\n\t\t\t\t\t\t\t<img src=\"./application/modules/Communityad/externals/images/tooltip_arrow.png\" />\n\t\t\t\t\t\t\t'. $this->view->translate(\"_sponsored_content_photo_tooltip\") .'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>';\n\t}else {\n\t $title = Engine_Api::_()->communityad()->truncation($title, $titleTruncationLimit);\n\t}\n\n\tif (empty($is_spocerdStory)) {\n\t $this->view->id = $content_data->getIdentity();\n\t $this->view->title = $title;\n\t $this->view->resource_type = $resource_type;\n\t $this->view->des = $body;\n\t $this->view->page_url = $content_data->getHref();\n\t $this->view->photo = $content_photo;\n\t $this->view->preview_title = $preview_title;\n\t $this->view->remaning_body_text = $remaning_body_limit;\n\t $this->view->remaning_title_text = $remaning_title_limit;\n\t $this->view->photo_id_filepath = $photo_id_filepath;\n\t} else {\n\t $this->view->main_div_title = $main_div_title;\n\t $this->view->photo = $content_photo;\n\t $this->view->temp_pre_title = $getStoryContentTitle; \n\t $getStoryContentTitle = str_replace(' ', '&nbsp;', $getStoryContentTitle);\n\t $this->view->preview_title = $getStoryContentTitle; \n\t $this->view->footer_comment = $footer_comment;\n\t $this->view->remaning_title_text = $remaning_title_limit;\n\t $this->view->modTitle = $field_info['module_title'];\n\t}\n }", "public function addAction() {\n\t\t$this->_forward('edit', null, null, array('id' => 0, 'model' => $this->_getParam('model')));\n\t}", "public function get_add()\n { \n // Render the page\n View::make($this->bundle . '::product.add')->render();\n }", "public function add() {\n parent::add();\n \n if(!$this->request->is('restful')) {\n $this->set('title_for_layout', _txt('op.add-a', array($this->viewVars['vv_authenticator']['Authenticator']['description'])));\n }\n }", "public function add_new_resource() {\n // @codingStandardsIgnoreLine\n $add_resource_name = wc_clean( $_POST['add_resource_name'] );\n\n if ( empty( $add_resource_name ) ) {\n wp_send_json_error();\n }\n\n $resource = array(\n 'post_title' => $add_resource_name,\n 'post_content' => '',\n 'post_status' => 'publish',\n 'post_author' => dokan_get_current_user_id(),\n 'post_type' => 'bookable_resource',\n );\n $resource_id = wp_insert_post( $resource );\n $edit_url = dokan_get_navigation_url( 'booking' ) . 'resources/edit/?id=' . $resource_id;\n ob_start();\n ?>\n <tr>\n <td><a href=\"<?php echo $edit_url; ?>\"><?php echo $add_resource_name; ?></a></td>\n <td><?php esc_attr_e( 'N/A', 'dokan' ); ?></td>\n <td>\n <a class=\"dokan-btn dokan-btn-sm dokan-btn-theme\" href =\"<?php echo $edit_url; ?>\"><?php esc_attr_e( 'Edit', 'dokan' ); ?></a>\n <button class=\"dokan-btn dokan-btn-theme dokan-btn-sm btn-remove\" data-id=\"<?php echo $resource_id; ?>\"><?php esc_attr_e( 'Remove', 'dokan' ); ?></button>\n </td>\n </tr>\n\n <?php\n $output = ob_get_clean();\n wp_send_json_success( $output );\n }", "function add() \n {\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n \n // Render the action with template\n $this->renderWithTemplate('users/add', 'AdminPageBaseTemplate');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function addAction()\r\n {\r\n $form = $this->getEditItemForm();\r\n $response = $this->getResponse();\r\n $content = $this->renderViewModel('dots-nav-block/item-add', array('form' => $form));\r\n $response->setContent($content);\r\n return $response;\r\n }", "public function addAction(){\n\t\t$this->assign('roots', $this->roots);\n\t\t$this->assign('parents', $this->parents);\n\t}", "public function add_record()\n {\n $data['main_content'] = $this->type.'/'.$this->viewname.'/add';\n\t $this->load->view($this->type.'/assets/template',$data);\n }", "public function addAction()\n {\n $form = $this->getForm('create');\n $entity = new Entity\\CourtClosing();\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n $view = new ViewModel();\n $view->form = $form;\n\n return $view;\n }", "public function refresh()\n {\n // Several refresh() calls might happen during one request. If that is the case, the Resource Manager can't know\n // that the first created resource object doesn't have to be persisted / published anymore. Thus we need to\n // delete the resource manually in order to avoid orphaned resource objects:\n if ($this->resource !== null) {\n $this->resourceManager->deleteResource($this->resource);\n }\n\n parent::refresh();\n $this->renderResource();\n }", "public function add()\n\t{\n\t\t$this->template('crud/add');\t\n\t}", "public function getAdd($setId) \n\t{\n\t\t$data[\"setId\"] = $setId;\n\n\t\treturn View::make('object.add',$data);\n\t}", "protected function add(){\n\t\tif(!isset($_SESSION['is_logged_in'])){\n\t\t\theader('Location: '.ROOT_URL. 'pages/1');\n\t\t}\n\t\t$viewmodel = new ShareModel();\n\n\t\t$this->returnView($viewmodel->add(), true);\n\t}", "public function addView()\n {\n return $this->render('Add');\n }", "function add_resource($resource, $id) {\n\t//Create the HTML content for the resource page\n\t$content = '';\n\tif (isset($resource['description']))\n\t\t$content .= '<p>' . esc_attr($resource['description']) . '</p>';\n\t\n\t$content .= '<p><b>URL:</b> <a href=\"' . $resource['url'] . '\" target=\"_blank\">' . $resource['url'] . '</a><br/>';\n\tif (isset($resource['about'])) \n\t\t$content .= '<b>Keywords:</b> ' . join(\", \", $resource['about']) . '<br/>';\n\tif (isset($resource['author'])) \n\t\t$content .= '<b>Author:</b> ' . $resource['author'] . '<br/>';\n\tif (isset($resource['publisher'])) \n\t\t$content .= '<b>Publisher:</b> ' . $resource['publisher'] . '<br/>';\n\tif (isset($resource['dateCreated'])) \n\t\t$content .= '<b>Date created:</b> ' . $resource['dateCreated'] . '<br/>';\n\tif (isset($resource['language'])) \n\t\t$content .= '<b>Language:</b> ' . $resource['language'] . '<br/>';\n\tif (isset($resource['timeRequired'])) \n\t\t$content .= '<b>Time required:</b> ' . $resource['timeRequired'] . '<br/>';\n\tif (isset($resource['educationalUse'])) {\n\t\tcheck_term($resource['educationalUse'], \"asn_educational_use\");\n\t\t$content .= '<b>Educational use: </b><a href=\"'. get_term_link($resource['educationalUse'], \"asn_educational_use\") . '\">' . $resource['educationalUse'] . '</a><br/>';\n\t}\n\tif (isset($resource['educationalAudience'])) {\n\t\tcheck_term($resource['educationalAudience'], \"asn_educational_audience\");\n\t\t$content .= '<b>Educational audience: </b><a href=\"'. get_term_link($resource['educationalAudience'], \"asn_educational_audience\") . '\">' . $resource['educationalAudience'] . '</a><br/>';\n\t}\n\tif (isset($resource['interactivityType'])) {\n\t\tcheck_term($resource['interactivityType'], \"asn_interactivity_type\");\n\t\t$content .= '<b>Interactivity type: </b><a href=\"'. get_term_link($resource['interactivityType'], \"asn_interactivity_type\") . '\">' . $resource['interactivityType'] . '</a><br/>';\n\t}\n\tif (isset($resource['proficiencyLevel'])) {\n\t\tcheck_term($resource['proficiencyLevel'], \"asn_proficiency_level\");\n\t\t$content .= '<b>Proficiency level: </b><a href=\"'. get_term_link($resource['proficiencyLevel'], \"asn_proficiency_level\") . '\">' . $resource['proficiencyLevel'] . '</a><br/>';\n\t}\n\t\n\t$content .= '</p>';\n\t//Prepare the post attributes\t\n\t$post = array(\n\t 'post_content' => $content,\n\t 'post_name' => sanitize_title(str_replace('-', ' ',$resource['title'])),\n\t 'post_title' => esc_attr($resource['title']),\n\t 'post_status' => 'publish',\n\t 'post_type' => 'learning_resource'\n\t);\n\t\n\n\t//Update existing post if appropriate\n\tif ($id >= 0) {\n\t\t$post['ID'] = $id;\n\t\twp_update_post($post);\n\t\twp_set_post_terms( $id, $resource['competencies'], \"asn_index\" );\n\t\twp_set_post_terms( $id, $resource['topics'], \"asn_topic_index\" );\n\t\tif (isset($resource['interactivityType'])) \n\t\t\twp_set_post_terms($id, $resource['interactivityType'], \"asn_interactivity_type\");\n\t\tif (isset($resource['educationalAudience'])) \n\t\t\twp_set_post_terms($id, $resource['educationalAudience'], \"asn_educational_audience\");\n\t\tif (isset($resource['educationalUse'])) \n\t\t\twp_set_post_terms($id, $resource['educationalUse'], \"asn_educational_use\");\n\t\tif (isset($resource['proficiencyLevel'])) \n\t\t\twp_set_post_terms($id, $resource['proficiencyLevel'], \"asn_proficiency_level\");\n\t\t//$content .= '<b>Interactivity type:</b> ' . $resource['interactivityType'];\n\t\tif(get_post_meta($id, 'resource_uri', true)==\"\") {\n\t\t\tadd_post_meta($id, 'resource_uri', rawurlencode($resource['url']), true);\n\t\t}\n\t}\n\t//Create new post if appropriate\n\telse {\n\t\t$post_id = wp_insert_post( $post);\n\t\twp_set_post_terms( $post_id, $resource['competencies'], \"asn_index\" );\n\t\twp_set_post_terms( $post_id, $resource['topics'], \"asn_topic_index\" );\n\t\tif (isset($resource['interactivityType'])) \n\t\t\twp_set_post_terms($post_id, $resource['interactivityType'], \"asn_interactivity_type\");\n\t\tif (isset($resource['educationalAudience'])) \n\t\t\twp_set_post_terms($post_id, $resource['educationalAudience'], \"asn_educational_audience\");\n\t\tif (isset($resource['educationalUse'])) \n\t\t\twp_set_post_terms($post_id, $resource['educationalUse'], \"asn_educational_use\");\n\t\tif (isset($resource['proficiencyLevel'])) \n\t\t\twp_set_post_terms($post_id, $resource['proficiencyLevel'], \"asn_proficiency_level\");\n\t\tadd_post_meta($post_id, 'resource_uri', rawurlencode($resource['url']), true);\n\t}\n\t\n}", "public function show(Resource $resource)\n {\n //\n }", "public function create()\n {\n return view(self::$folder . 'add')->withTitle(self::$mainTitle)->with('link', self::$link);\n }", "public function actionAdd()\n\t{\n\t\t$this->render('add');\n\t}", "private function loadResourceForDetailPage()\n {\n $this->data['css'][] = asset('/assets/css/Dss/Priority/detail.css');\n $this->data['js'][] = asset('/assets/js/Dss/Priority/detail.js');\n }", "public function add()\n\t{\n\n\t\t$this->data['_pageview'] = $this->data[\"_directory\"] . \"edit\";\n\t\t$this->data['option'] \t\t= \"add\";\n\n\t\treturn view($this->constants[\"ADMINCMS_TEMPLATE_VIEW\"], $this->data);\n\t}", "function _setResourceMenu() {\n\t\t$this->loadModel('Content');\n\t\t$resources = $this->Content->find('all', array('conditions' => array('ctid' => 3), 'limit' => 10));\n\t\t$this->set('resource_list', $resources);\n\t}", "public function addAction()\n {\n \t$form = MediaForm::create($this->get('form.context'), 'media');\n\n \treturn $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => new Media()));\n }", "public function addAction()\n {\n $manager = $this->getDI()->get('core_category_manager');\n $this->view->form = $manager->getForm();\n }", "protected function createResource()\n {\n $resourceOptions = [\n 'resource' => $this->info['resource'],\n '--module' => $this->moduleName,\n ];\n\n $options = $this->setOptions([\n 'parent',\n 'assets'=>'uploads',\n 'data'\n ]);\n\n $this->call('engez:resource', array_merge($resourceOptions, $options));\n }", "public function append(\\View $view) {\n $this->appendViews[] = $view;\n return $this;\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "public function add()\n {\n $this->view->state = $this->request->has('id') ? 'Edit Row' : 'Add Row';\n return $this->view('add');\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "protected function addFormObjectToViewHelperVariableContainer() {}", "public function attachUrl(ResourceEntry $resource);", "public function addRessources()\n {\n // $this->context->controller->addCss(($this->_path . '/views/css/tab.css'), 'all');\n // $this->context->controller->addJquery();\n // $this->context->controller->addJS(($this->_path . '/views/js/script.js'));\n // $this->context->controller->addJS(($this->_path . '/views/js/configuration.js'));\n }", "function studentResources(){\n // show the student resources page\n echo Template::instance()->render('views/studentResources.php');\n}", "abstract protected function getNewResource();", "public function getAdd()\n\t{\n\t $form = \\FormBuilder::create($this->form, [\n 'method' => 'POST',\n 'model' => $this->getModelInstance(),\n 'url' => ($this->url_prefix.'/add')\n ]);\n return view($this->tpl_prefix.'add',array('catalog'=>$this), compact('form'));\n\t}", "public function postEditResources()\n {\n $id = $this->_params['id'];\n\n $errors = validateEditResource($id);\n\n if(!($errors === true)) {\n $database = new Database();\n\n $resource = $database->getResourceById($id);\n /*construct($resourceID = \"0\", $resourceName = \"Resource\", $description = \"Info\",\n $contactName =\"\",$contactEmail = \"\",$contactPhone = \"\",$link = \"\", $active = \"1\" )*/\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['Active']);\n $this->_f3->set('Resource', $availableResource);\n $this->_f3->set('errors', $errors);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n } else {\n // fixme add routing\n $this->_f3->reroute('/Admin');\n }\n\n }", "public function addAction()\n {\n $isSubmitted = $this->params()->fromPost('submitted', \n null);\n $model = new \\Application\\Model\\BlogPost();\n if($isSubmitted){\n $date = $this->params()->fromPost(\"date\");\n $date = new \\DateTime($date);\n $date = $date->format('Y-m-d');\n //add a new blog entry\n $model ->setBody($this->params()->fromPost('body'))\n ->setCreatedBy(\"Alana Thomas\")\n ->setDate($date)\n ->setTitle($this->params()->fromPost('title'))\n ->setTags($this->params()->fromPost('tags'));\n $model = $this->getServiceLocator()->get(\"Application\\Service\\BlogPost\")->insert($model);\n //redirect the user here\n return $this->redirect()->toRoute('blog-post');\n }\n $view = $this->acceptableViewModelSelector($this->acceptCriteria);\n $view->setVariables(array(\n 'model' => $model\n ));\n return $view;\n }", "public function render(): void\n {\n $this->prepare_items();\n $this->handleFormAction();\n $this->loadAssets();\n\n $action = $_REQUEST['action'] ?? null;\n $primaryKey = $this->model->getPrimaryColumn();\n $resourceId = $_REQUEST[$this->singular]\n ?? $this->model->{$primaryKey}\n ?? null;\n\n echo $action && in_array($action, ['edit', 'create'])\n ? $this->getFormView($resourceId)\n : $this->getDefaultView();\n\n do_action('print_resource_page_assets');\n }", "public function add()\n {\n $data = [\n 'property' => [\n 'template' => 'extracurricular_add',\n 'title' => 'Tambah Ekstrakurikuler',\n 'menu' => $this->menu->read(),\n ],\n 'data' => [],\n ];\n\n $this->load->view('template', $data);\n }", "public function addAction()\n {\n return $this->render('OCPlatformBundle:Default:index.html.twig', ['value' => 0]);\n }", "public function increaseViews()\n {\n $this->auth->hasPermission(['write']);\n\n if (!($validation = IO::required($this->data, ['id']))['valid']) {\n throw new InvalidParameterException($validation['message']);\n }\n\n $resource = new Resource($this->data);\n\n // Insert resource item\n $sql = \"UPDATE `resource` \n SET `views` = `views` + 1\n WHERE `id` = :id\";\n\n $stmt = $this->pdo->prepare($sql);\n\n $stmt->execute([\n 'id' => $resource->getId()\n ]);\n\n return $this->responseArr;\n }", "public function getAdd()\n {\n return view(\"Policy::add-edit\");\n }", "public function viewAction()\n {\n $id = $this->_getPrimaryId();\n $row = $this->_getRow($id);\n\n $this->view->row = $row;\n }", "public function add_author_resault()\n\t{\n\t\t$this->add_author_model->addAuthor();\n\t\t$this->load->view('add_author_resault');\n\t}", "public function create()\n {\n //\n return view('object.create');\n }", "public function objectAction()\n\t{\n\t$term = $this->_getParam('term');\n\t$objects = new ObjectTerms();\n\t$this->view->objectdata = $objects->getObjectTermDetail($term);\n\t}", "public function oldviewAction() {\n\t\t$id = (int)$this->_request->getParam('id');\n\t\tPageTitle::setTitle($this->view, $this->_request, array($id));\n\t\t$debugdate = $this->_request->getParam('debugdate');\n\t\t$layout = trim($this->_request->getParam('layout',''));\n\t\t\n\t\t$taFinder = new TeachingActivities();\n\t\t$ta = $taFinder->getTa($id);\n\t\t\n\t\tif ($ta->isReleased() != true) {\n\t\t\tthrow new Exception(\"Teaching activity $id is not released yet.\");\n\t\t}\n\t\t\n\t\t$this->view->ta = $ta;\n\n\t\t$resourceError = false;\n\t\ttry {\n\t\t\t$resourceService = new MediabankResourceService();\n\t\t\t$resources = $resourceService->getResources($id, 'ta');\n\t\t\t$allowAddResources = $resourceService->allowAdd();\n\t\t} catch (Exception $ex) {\n\t\t\t$resourceError = true;\n\t\t\t$resources = array();\n\t\t\t$allowAddResources = false;\n\t\t}\n\t\t$this->view->allowAddResources = $allowAddResources;\n\t\t$this->view->resourceError = $resourceError;\n\t\t$this->view->resources = $resources;\n\t\t\n\t\t//Check if user is a staff\n\t\t$this->view->isStaffOrAbove = UserAcl::isStaffOrAbove();\n //Store ACL for each resource action which can be accessed by the current user\n //And allow/disallow those actions. \n\t\t$this->view->resourceAcl = ResourceAcl::accessAll(array('type'=>'ta','auto_id'=>$id));\n\n\t\t$this->view->revisions = $taFinder->getTaRevisions($ta->taid);\n\t\t$this->view->released_los = $ta->getLinkedLearningObjectiveWithStatus(Status::$RELEASED);\n\t\t$this->view->title = 'Teaching Activity - '.$ta->auto_id;\n\t\t\n\t\t$studentEvaluateService = new StudentEvaluateService();\n\t\t$this->view->taEvaluations = $studentEvaluateService->getEvaluationForTaId($id);\n\n\t\t$this->view->isMyTa = Utilities::isMyTa($ta);\n\t\t$this->view->debugdate = $debugdate;\n\n if(!empty($layout)) {\n switch($layout) {\n case 'pblview': \n $this->view->pblTaTypePrev = $this->_request->getParam('pblTaTypePrev','');\n $this->view->pblTaTypeNext = $this->_request->getParam('pblTaTypeNext','');\n $this->render('pblview');\n break;\n }\n }\n\t}", "public function addResource($value) {\n return $this->add('resources', func_get_args());\n }", "public function setToResource()\n {\n $this->type = \"resource\";\n }", "public function addAction() {\n $this->form = new \\Application\\Form\\AddParentStudyForm($this->serviceLocator);\n $this->studyDataSave();\n return array('form' => $this->form, 'id' => 0, 'associateCompanyIds' => array(), 'submittedTo' => array());\n }", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show(Resource $resource)\n {\n // not available for now\n }", "public function addAction()\n {\n $entity = new Feed();\n // \\Doctrine\\Common\\Util\\Debug::dump($entity);\n $form = $this->createCreateForm($entity);\n\n return $this->render('APiszczekDemoBundle:Feeds:add.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function add() {\r\n\t\t$model = $this->getModel('languages');\r\n\t\t$model->add();\r\n\t\t\r\n\t\t$this->view = $this->getView(\"languages\");\r\n\t\t$this->view->setModel($model, true);\r\n\t\t$this->view->display();\r\n\t}", "public function addResource(RestResource $resource)\n {\n $this->resources->contains($resource) ?: $this->resources->push($resource);\n }", "public function create()\n {\n //\n return view(\"Admin.Abs.add\");\n }", "public function addAction()\n {\n// $m = $this->baseView('view',['lside','passportAdmin'],['lside'=>['list' => $this->names,'base' => ''],'cont' => ['fsd']]);\n// $p = $cr->render($m,[]);\n $p = $this->add($this->model);\n return $this->baseView('view',['admin/lside','passport/admin/add'],['lside'=>['list' => $this->names,'base' => ''],'cont' => $p]);\n }", "public function addResourcePage($title, $body, $group) {\n\n $resource = new ResourcePage;\n $resource->title = $title;\n $resource->body = $body;\n $resource->save();\n\n $ra = new ResourceAccess;\n $ra->resource_id = $resource->id;\n $ra->group = $group;\n\n $ra->save();\n\n return true;\n }", "function action_view()\n {\n $this->addStatusFields();\n return parent::action_view();\n }", "public function setResource($resource);", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function provideAction(){\n if($this->request->hasArgument('post')){\n $post = $this->postRepository->findByUid($this->request->getArgument('post'));\n if($post){\n $array['uid'] = $this->request->getArgument('post');\n $array['content'] = $post->getContent();\n $array['crdate'] = $post->getCrdate();\n $array['owner'] = $post->getOwner();\n $this->view->assign('dataJson',json_encode($array));\n }\n else{\n $this->view->assign('dataJson',json_encode(['content' => '<div class=\"alert alert-warning\">Post ('.$this->request->getArgument('post').') is not accessible or could not be loaded!</div>']));\n }\n }\n else{\n $this->view->assign('dataJson',json_encode(['content' => '<div class=\"alert alert-danger\">No post ID given!</div>']));\n }\n }", "function rest_get_queried_resource_route()\n {\n }", "public function xadd() {\n\t\t$args = $this->getAllArguments ();\n\t\tif ($args ['view'] == 'forms') {\n\t\t\t$this->_redirect ( '_newForm' );\n\t\t} elseif ($args ['view'] == 'fields') {\n\t\t\t$this->_redirect ( '_newField' );\n\t\t} elseif ($args ['view'] == 'actions') {\n\t\t\t$this->_redirect ( '_newAction' );\n\t\t} else {\n\t\t\tparent::xadd ();\n\t\t}\n\t}", "public function addRevision()\n {\n $this->check_sess($this->session->user_logged);\n\t\t$this->load->view('head');\n\t\t$this->load->view('sclerk_sidebar');\n\n\t\t$this->load->view('search_officer', $this->response);\n\t\t$this->load->view('footer');\n }", "abstract protected function createResource();", "function offer_link($resource)\n{\n return Button::success()->withIcon(Icon::check())->withAttributes(['title' => 'ofertar', 'data-toggle' => 'tooltip'])\n ->asLinkTo(route('bids.offer.create', ['bid' => $resource]));\n}", "abstract public function resource();", "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 }", "public function add(){\n $this->edit();\n }", "public static function appendJs($resource)\n {\n self::append('js', $resource);\n }", "public function addAction() {\r\n\t\t$this->assign('channels', $this->channels);\r\n\t}", "public function add ($obj) {\n\t\treturn $this->append($obj);\t\n\t}", "public function newAction()\n {\n $reflection = new FormReflectionManager($this->flash);\n\n $url = new Url;\n $url->id = $reflection->get('id');\n $url->address = $reflection->get('address');\n \n $this->view->url = $url;\n \n #$this->view->disable(); \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 addView()\n {\n return view('admin.modules.target.target_add');\n }", "public function create()\n {\n $obj = new Obj();\n $this->authorize('create', $obj);\n\n return view('appl.'.$this->app.'.'.$this->module.'.createedit')\n ->with('stub','Create')\n ->with('obj',$obj)\n ->with('editor',true)\n ->with('datetimepicker',true)\n ->with('app',$this);\n }", "public function add(){\n $outData['script']= CONTROLLER_NAME.\"/add\";\n $this->assign('output',$outData);\n $this->display();\n }", "public function addPage() {\n $colors = Colors::find();\n $this->putItem(\"colors\", $colors->toArray());\n return parent::addPage();\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function getAction()\n {\n \t$id = $this->getRequest()->getParam('id');\n\t\t$this->_objectMapper->find($id, $this->_object);\n $this->view->question = $this->_object;\n\t\t$this->view->isMarked = $this->_objectMapper->isMarked($id);\n }" ]
[ "0.6190671", "0.5907594", "0.5898498", "0.58954614", "0.5794102", "0.57846975", "0.5708292", "0.5700842", "0.56308055", "0.5605061", "0.5599683", "0.55966836", "0.5530102", "0.5522637", "0.5499434", "0.54967964", "0.54694647", "0.54599434", "0.5446067", "0.5438202", "0.54322845", "0.5420131", "0.5387026", "0.5384342", "0.5353666", "0.5343772", "0.53366905", "0.53285056", "0.5324493", "0.5321859", "0.53108793", "0.5284788", "0.52783453", "0.52777445", "0.52484334", "0.52412117", "0.52335274", "0.52297527", "0.52231145", "0.5219621", "0.5213485", "0.52027535", "0.5199149", "0.5195427", "0.51943487", "0.51826787", "0.5177906", "0.5177837", "0.517277", "0.51452696", "0.5139938", "0.51121056", "0.5093184", "0.50847554", "0.5078968", "0.507591", "0.50679785", "0.5061055", "0.5057076", "0.50555265", "0.5054738", "0.5032253", "0.50320363", "0.50302494", "0.50296956", "0.50178254", "0.5014324", "0.5005809", "0.50039715", "0.50009143", "0.49856415", "0.49853468", "0.49832782", "0.4970147", "0.49685746", "0.4965395", "0.4964667", "0.49615693", "0.49604368", "0.49585298", "0.49583143", "0.49565348", "0.49464887", "0.49449006", "0.49426794", "0.49391013", "0.493443", "0.49341166", "0.49316636", "0.49287087", "0.4928423", "0.4926063", "0.4924838", "0.49224535", "0.4922177", "0.4910035", "0.49084556", "0.4907442", "0.49043205", "0.49033242" ]
0.66808176
0
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Show the application dashboard.
public function index() { $merchantid = 3; $typeslist=Types::orderBy('type_name')->get(['id','type_name']); $brandlist=Brand::where('merchantid',1)->orderBy('brand_name')->get(['id','brand_name']); $categorylist=Category::orderBy('category_name')->get(['id','category_name']); $productlist= DB::table('products AS a') ->leftJoin('types AS b','b.id','=','a.type_id') ->leftJoin('category AS c','c.id','=','a.category_id') ->leftJoin('subcategory AS d','d.id','=','a.subcategory_id') ->leftJoin('brands AS e','e.id','=','a.brand_id') ->select('a.id','a.product_name','a.product_detail','a.subcategory_id','a.category_id','a.type_id','a.size','a.brand_id','a.color','a.unite','a.customerprice','a.maxcommission','a.priceshift','a.reviewscore','a.points','a.productdetails','a.picturemain','a.picturelinks','a.active','a.priority','b.type_name','c.category_name','d.subcat_anme','e.brand_name')->where('a.merchantid',$merchantid)->orderBy('a.product_name', 'desc')->paginate(15); return view('welcome',['types'=>$typeslist,'brands'=>$brandlist,'products'=>$productlist, 'category' => $categorylist]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
Email address validation works with php 5.2+
function is_email_valid($email) { return filter_var($email, FILTER_VALIDATE_EMAIL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_valid_email($address) {\n $fields = preg_split(\"/@/\", $address, 2);\n if ((!preg_match(\"/^[0-9a-z]([-_.]?[0-9a-z])*$/i\", $fields[0])) || (!isset($fields[1]) || $fields[1] == '' || !is_valid_hostname_fqdn($fields[1], 0))) {\n return false;\n }\n return true;\n}", "function validate_email ($address) {\n return preg_match('/^[a-z0-9!#$%&\\'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\\'*+\\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i', $address);\n }", "private function _legacy_email_is_valid($email) {\n\t\t$valid_address = true;\n\n\t\t$mail_pat = '^(.+)@(.+)$';\n\t\t$valid_chars = \"[^] \\(\\)<>@,;:\\.\\\\\\\"\\[]\";\n\t\t$atom = \"$valid_chars+\";\n\t\t$quoted_user='(\\\"[^\\\"]*\\\")';\n\t\t$word = \"($atom|$quoted_user)\";\n\t\t$user_pat = \"^$word(\\.$word)*$\";\n\t\t$ip_domain_pat='^\\[([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\]$';\n\t\t$domain_pat = \"^$atom(\\.$atom)*$\";\n\n\t\tif (preg_match(\"/$mail_pat/\", $email, $components)) {\n\t\t\t$user = $components[1];\n\t\t\t$domain = $components[2];\n\t\t\t// validate user\n\t\t\tif (preg_match(\"/$user_pat/\", $user)) {\n\t\t\t\t// validate domain\n\t\t\t\tif (preg_match(\"/$ip_domain_pat/\", $domain, $ip_components)) {\n\t\t\t\t\t// this is an IP address\n\t\t\t\t\tfor ($i=1;$i<=4;$i++) {\n\t\t\t\t\t\tif ($ip_components[$i] > 255) {\n\t\t\t\t\t\t\t$valid_address = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Domain is a name, not an IP\n\t\t\t\t\tif (preg_match(\"/$domain_pat/\", $domain)) {\n\t\t\t\t\t\t/* domain name seems valid, but now make sure that it ends in a valid TLD or ccTLD\n\t\t\t\t\t\tand that there's a hostname preceding the domain or country. */\n\t\t\t\t\t\t$domain_components = explode(\".\", $domain);\n\t\t\t\t\t\t// Make sure there's a host name preceding the domain.\n\t\t\t\t\t\tif (sizeof($domain_components) < 2) {\n\t\t\t\t\t\t\t$valid_address = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$top_level_domain = strtolower($domain_components[sizeof($domain_components)-1]);\n\t\t\t\t\t\t\t// Allow all 2-letter TLDs (ccTLDs)\n\t\t\t\t\t\t\tif (preg_match('/^[a-z][a-z]$/', $top_level_domain) != 1) {\n\t\t\t\t\t\t\t\t$tld_pattern = '';\n\t\t\t\t\t\t\t\t// Get authorized TLDs from text file\n\t\t\t\t\t\t\t\t$tlds = file(DIR_WS_INCLUDES.'tld.txt');\n\t\t\t\t\t\t\t\tforeach($tlds as $line) {\n\t\t\t\t\t\t\t\t\t// Get rid of comments\n\t\t\t\t\t\t\t\t\t$words = explode('#', $line);\n\t\t\t\t\t\t\t\t\t$tld = trim($words[0]);\n\t\t\t\t\t\t\t\t\t// TLDs should be 3 letters or more\n\t\t\t\t\t\t\t\t\tif (preg_match('/^[a-z]{3,}$/', $tld) == 1) {\n\t\t\t\t\t\t\t\t\t\t$tld_pattern .= '^'.$tld.'$|';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Remove last '|'\n\t\t\t\t\t\t\t\t$tld_pattern = substr($tld_pattern, 0, -1);\n\t\t\t\t\t\t\t\tif (preg_match(\"/$tld_pattern/\", $top_level_domain) == 0) {\n\t\t\t\t\t\t\t\t\t$valid_address = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$valid_address = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$valid_address = false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$valid_address = false;\n\t\t}\n\t\tif ($valid_address && ENTRY_EMAIL_ADDRESS_CHECK == 'true') {\n\t\t\tif (!checkdnsrr($domain, \"MX\") && !checkdnsrr($domain, \"A\")) {\n\t\t\t\t$valid_address = false;\n\t\t\t}\n\t\t}\n\t\treturn $valid_address;\n\t}", "function check_email_address($email) \n{\n // First, we check that there's one @ symbol, and that the lengths are right\n if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) \n {\n // Email invalid because wrong number of characters in one section, or wrong number of @ symbols.\n return false;\n }\n // Split it into sections to make life easier\n $email_array = explode(\"@\", $email);\n $local_array = explode(\".\", $email_array[0]);\n for ($i = 0; $i < sizeof($local_array); $i++) \n {\n if (!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\", $local_array[$i])) \n {\n return false;\n }\n }\n if (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) \n { // Check if domain is IP. If not, it should be valid domain name\n $domain_array = explode(\".\", $email_array[1]);\n if (sizeof($domain_array) < 2) \n {\n return false; // Not enough parts to domain\n }\n for ($i = 0; $i < sizeof($domain_array); $i++) \n {\n if (!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$\", $domain_array[$i])) \n {\n return false;\n }\n }\n }\n return true;\n}", "function email_validation($str)\n{\n return preg_match(\"/.+@.+/\", $str);\n}", "function check_email ($email)\n{\n return (preg_match ('/^[-!#$%&\\'*+\\\\.\\/0-9=?A-Z^_{|}~]+' . '@' . '([-0-9A-Z]+\\.)+' . '([0-9A-Z]){2,4}$/i', trim($email)));\n}", "function is_email($value)\r\n{\r\n\treturn preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i', $value);\r\n}", "public function validate_email($email){\n $pattern = '/^(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){255,})(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){65,}@)(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22))(?:\\.(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-[a-z0-9]+)*\\.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-[a-z0-9]+)*)|(?:\\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\\]))$/iD';\n if(preg_match($pattern, $email)){\n return true;\n }\n else{\n return false;\n }\n }", "function validate_email($input) {\n if (!filter_var($input, FILTER_VALIDATE_EMAIL)) {\n return false;\n }\n \n return true;\n}", "function is_email($addr)\n{\n $addr = strtolower(trim($addr));\n $addr = str_replace(\"&#064;\",\"@\",$addr);\n if ( (strstr($addr, \"..\")) || (strstr($addr, \".@\")) || (strstr($addr, \"@.\")) || (!preg_match(\"/^[[:alnum:]][a-z0-9_.-]*@[a-z0-9][a-z0-9.-]{0,61}[a-z0-9]\\.[a-z]{2,6}\\$/\", stripslashes(trim($addr)))) ) {\n $emailvalidity = 0;\n } else {\n $emailvalidity = 1;\n }\n return $emailvalidity;\n}", "function emailOk ($email) {\r\n return filter_var($email, FILTER_VALIDATE_EMAIL);\r\n }", "function IsValidEmail($input) {\r\n $regex = '/^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.([a-zA-Z]{2,4})$/';\r\n\r\n if (preg_match($regex, $input)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "function email_is_valid($email) {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n }", "function valid_email_address($mail) {\n $user = '[a-zA-Z0-9_\\-\\.\\+\\^!#\\$%&*+\\/\\=\\?\\`\\|\\{\\}~\\']+';\n $domain = '(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.?)+';\n $ipv4 = '[0-9]{1,3}(\\.[0-9]{1,3}){3}';\n $ipv6 = '[0-9a-fA-F]{1,4}(\\:[0-9a-fA-F]{1,4}){7}';\n\n return preg_match(\"/^$user@($domain|(\\[($ipv4|$ipv6)\\]))$/\", $mail);\n}", "function check_email_address($email) {\n # Check @ symbol and lengths\n if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n return false;\n }\n\n # Split Email Address into Sections\n $email_array = explode(\"@\", $email);\n $local_array = explode(\".\", $email_array[0]);\n\n # Validate Local Section of the Email Address\n for ($i = 0; $i < sizeof($local_array); $i++) {\n if (!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\", $local_array[$i])) {\n return false;\n }\n }\n\n # Validate Domain Section of the Email Address\n if (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\n $domain_array = explode(\".\", $email_array[1]);\n\n # Check the number of domain elements\n if (sizeof($domain_array) < 2) {\n return false;\n }\n\n # Sanity Check All Email Components\n for ($i = 0; $i < sizeof($domain_array); $i++) {\n if (!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$\", $domain_array[$i])) {\n return false;\n }\n }\n }\n\n # If All Validation Checks have Passed then Return True\n return true;\n }", "function check_email($email) {\r\n\r\n if (filter_var($email, FILTER_VALIDATE_EMAIL)) {\r\n return true;\r\n }\r\n return false;\r\n}", "function isValidEmail($email) {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n}", "function validateEmail($value) {\n\tif(ereg(\"^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$\", $value, $regs)) {\n\t\techo \"true\";\n\t} else {\n\t\techo \"false\";\n\t}\n}", "function validate_email($email){\n return filter_var($email, FILTER_VALIDATE_EMAIL) ? true : false;\n}", "function email_is_valid($email) {\r\n return preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i',$email);\r\n }", "function isValidEmail($email){\n return filter_var($email, FILTER_VALIDATE_EMAIL) !== false;\n}", "function oos_validate_is_email($sEmail) {\n $bValidAddress = true;\n\n $mail_pat = '^(.+)@(.+)$';\n $valid_chars = \"[^] \\(\\)<>@,;:\\.\\\\\\\"\\[]\";\n $atom = \"$valid_chars+\";\n $quoted_user='(\\\"[^\\\"]*\\\")';\n $word = \"($atom|$quoted_user)\";\n $user_pat = \"^$word(\\.$word)*$\";\n $ip_domain_pat='^\\[([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\]$';\n $domain_pat = \"^$atom(\\.$atom)*$\";\n\n if (eregi($mail_pat, $sEmail, $components)) {\n $user = $components[1];\n $domain = $components[2];\n // validate user\n if (eregi($user_pat, $user)) {\n // validate domain\n if (eregi($ip_domain_pat, $domain, $ip_components)) {\n // this is an IP address\n \t for ($i=1;$i<=4;$i++) {\n \t if ($ip_components[$i] > 255) {\n \t $bValidAddress = false;\n \t break;\n \t }\n }\n } else {\n // Domain is a name, not an IP\n if (eregi($domain_pat, $domain)) {\n /* domain name seems valid, but now make sure that it ends in a valid TLD or ccTLD\n and that there's a hostname preceding the domain or country. */\n $domain_components = explode(\".\", $domain);\n // Make sure there's a host name preceding the domain.\n if (count($domain_components) < 2) {\n $bValidAddress = false;\n } else {\n $top_level_domain = strtolower($domain_components[count($domain_components)-1]);\n // Allow all 2-letter TLDs (ccTLDs)\n if (eregi('^[a-z][a-z]$', $top_level_domain) != 1) {\n $sTld = get_all_top_level_domains();\n if (eregi(\"$sTld\", $top_level_domain) == 0) {\n $bValidAddress = false;\n }\n }\n }\n } else {\n \t $bValidAddress = false;\n \t }\n \t}\n } else {\n $bValidAddress = false;\n }\n } else {\n $bValidAddress = false;\n }\n if ($bValidAddress && ENTRY_EMAIL_ADDRESS_CHECK == '1') {\n if (!checkdnsrr($domain, \"MX\") && !checkdnsrr($domain, \"A\")) {\n $bValidAddress = false;\n }\n }\n return $bValidAddress;\n }", "function is_email($emailadres)\r\n{\r\n // Eerst een snelle controle uitvoeren: \r\n // een e-mailadres moet uit minimaal 7 tekens bestaan:\r\n if (strlen($emailadres) < 7) \r\n {\r\n return false;\r\n }\r\n // Daarna een controle met een reguliere expressie uitvoeren:\r\n if( ! ereg(\"^[_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\\.)+([a-zA-Z]{2,4})$\", $emailadres) ) \r\n {\r\n return false;\r\n } \r\n\r\n return true; \r\n}", "function check_email ($email) {\n\t\n if (preg_match ('/^[-!#$%&\\'*+\\\\.\\/0-9=?A-Z^_{|}~]+' . '@' . '([-0-9A-Z]+\\.)+' . '([0-9A-Z]){2,4}$/i', trim ($email))) {\n \n return true;\n \n } else {\n \n return false;\n \n }\n}", "function is_email($email)\n{\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n}", "function smcf_validate_email($email) {\r\n\t$at = strrpos($email, \"@\");\r\n\r\n\t// Make sure the at (@) sybmol exists and \r\n\t// it is not the first or last character\r\n\tif ($at && ($at < 1 || ($at + 1) == strlen($email)))\r\n\t\treturn false;\r\n\r\n\t// Make sure there aren't multiple periods together\r\n\tif (preg_match(\"/(\\.{2,})/\", $email))\r\n\t\treturn false;\r\n\r\n\t// Break up the local and domain portions\r\n\t$local = substr($email, 0, $at);\r\n\t$domain = substr($email, $at + 1);\r\n\r\n\r\n\t// Check lengths\r\n\t$locLen = strlen($local);\r\n\t$domLen = strlen($domain);\r\n\tif ($locLen < 1 || $locLen > 64 || $domLen < 4 || $domLen > 255)\r\n\t\treturn false;\r\n\r\n\t// Make sure local and domain don't start with or end with a period\r\n\tif (preg_match(\"/(^\\.|\\.$)/\", $local) || preg_match(\"/(^\\.|\\.$)/\", $domain))\r\n\t\treturn false;\r\n\r\n\t// Check for quoted-string addresses\r\n\t// Since almost anything is allowed in a quoted-string address,\r\n\t// we're just going to let them go through\r\n\tif (!preg_match('/^\"(.+)\"$/', $local)) {\r\n\t\t// It's a dot-string address...check for valid characters\r\n\t\tif (!preg_match('/^[-a-zA-Z0-9!#$%*\\/?|^{}`~&\\'+=_\\.]*$/', $local))\r\n\t\t\treturn false;\r\n\t}\r\n\r\n\t// Make sure domain contains only valid characters and at least one period\r\n\tif (!preg_match(\"/^[-a-zA-Z0-9\\.]*$/\", $domain) || !strpos($domain, \".\"))\r\n\t\treturn false;\t\r\n\r\n\treturn true;\r\n}", "function is_valid_email ($mail)\n{\n return filter_var($mail, FILTER_VALIDATE_EMAIL) && (! preg_match('/@\\[[^\\]]++\\]\\z/', $mail));\n}", "function mycheck_email($str)\n{\n $str = strtolower($str);\n return preg_match('/^[^\\@]+@.*\\.[a-z]{2,6}$/i', $str);\n}", "function check_email($email) {\n if (strlen($email) == 0) return false;\n if (eregi(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$\", $email)) return true;\n return false;\n}", "function validarEmail($email){\r\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)){\r\n return false;\r\n }\r\n return true;\r\n}", "function s2_is_valid_email($email)\n{\n $return = ($hook = s2_hook('fn_is_valid_email_start')) ? eval($hook) : null;\n if ($return != null)\n return $return;\n\n if (strlen($email) > 80)\n return false;\n\n return preg_match('/^(([^<>()[\\]\\\\.,;:\\s@\"\\']+(\\.[^<>()[\\]\\\\.,;:\\s@\"\\']+)*)|(\"[^\"\\']+\"))@((\\[\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\])|(([a-zA-Z\\d\\-]+\\.)+[a-zA-Z]{2,}))$/', $email);\n}", "function is_email($email){\n return (filter_var($email, FILTER_VALIDATE_EMAIL) !== false);\n}", "function isValidEmailAddress($emailAddress)\n{\n return filter_var($emailAddress, FILTER_VALIDATE_EMAIL) !== false;\n}", "function validateEmail($input){\n\t\t//REGEX string courtsey of http://www.white-hat-web-design.co.uk/articles/js-validation.php, others were produced by Robert Chisholm\n\t\t$inputReg = \"#^([A-Za-z0-9_\\-\\.])+\\@([A-Za-z0-9_\\-\\.])+\\.([A-Za-z]{2,4})$#\";\n\t\treturn preg_match($inputReg, $input);\n\t}", "function validateEmail($email) {\n\n\treturn preg_match(\"/^(((([^]<>()[\\.,;:@\\\" ]|(\\\\\\[\\\\x00-\\\\x7F]))\\\\.?)+)|(\\\"((\\\\\\[\\\\x00-\\\\x7F])|[^\\\\x0D\\\\x0A\\\"\\\\\\])+\\\"))@((([[:alnum:]]([[:alnum:]]|-)*[[:alnum:]]))(\\\\.([[:alnum:]]([[:alnum:]]|-)*[[:alnum:]]))*|(#[[:digit:]]+)|(\\\\[([[:digit:]]{1,3}(\\\\.[[:digit:]]{1,3}){3})]))$/\", $email);\n\n}", "function validEmail($value)\n {\n return filter_var($value, FILTER_VALIDATE_EMAIL);\n }", "function check_email($emaildddress)\n{\n\t$goodchars = '^[A-Za-z0-9\\._-]+@([A-Za-z][A-Za-z0-9-]{1,62})(\\.[A-Za-z][A-Za-z0-9-]{1,62})+$';\n\n\t$isvalid = true;\n\tif(!ereg($goodchars,$emaildddress))\n\t{\n\t\t$isvalid = false;\n\t}\n\treturn $isvalid;\n}", "function isEmail($input){\n return preg_match('/[a-z0-9]@[a-z]{3,}\\.[a-z]{3}$/',$input);\n }", "function ValidEmail( $address, $leMail )\r\n\t\t{\r\n\t\tif( ereg( \".*<(.+)>\", $address, $regs ) )\r\n\t\t\t$address = $regs[1];\r\n\r\n\t\tif( !ereg( \"^[^@ ]+@([a-zA-Z0-9\\-]+\\.)+([a-zA-Z0-9\\-]{2}|net|com|gov|mil|org|edu|int)\\$\",$address) )\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t\t}", "function is_valid_email($email)\n{\n if (is_null($email) || strlen($email) < 6)\n {\n return false;\n }\n $pattern = \"/^[_a-z0-9\\-]+(\\.[_a-z0-9\\-]+)*@[a-z0-9\\-]+(\\.[a-z0-9\\-]+)*(\\.[a-z]{2,4})$/\";\n return (preg_match($pattern, $email) == 1);\n}", "function isEmail($email)\n{\n return filter_var($email, FILTER_VALIDATE_EMAIL) !== false;\n}", "function isValidEmail($email)\n{\n if (! filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return false;\n }\n return true;\n}", "function check_email_address($email) {\n\t$isValid = true;\n\t$atIndex = strrpos($email, \"@\");\n\tif (is_bool($atIndex) && !$atIndex) {\n\t\t$isValid = false;\n\t}\n\telse {\n\t\t$domain = substr($email, $atIndex+1);\n\t\t$local = substr($email, 0, $atIndex);\n\t\t$localLen = strlen($local);\n\t\t$domainLen = strlen($domain);\n\t\tif ($localLen < 1 || $localLen > 64) {\n\t\t\t// local part length exceeded\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if ($domainLen < 1 || $domainLen > 255) {\n\t\t\t// domain part length exceeded\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if ($local[0] == '.' || $local[$localLen-1] == '.') {\n\t\t\t// local part starts or ends with '.'\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if (preg_match('/\\\\.\\\\./', $local)) {\n\t\t\t// local part has two consecutive dots\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\n\t\t\t// character not valid in domain part\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if (preg_match('/\\\\.\\\\./', $domain)) {\n\t\t\t// domain part has two consecutive dots\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n\t\tstr_replace(\"\\\\\\\\\",\"\",$local)))\n\t\t{\n\t\t // character not valid in local part unless \n\t\t // local part is quoted\n\t\t if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\n\t\t\t$isValid = false;\n\t\t }\n\t\t}\n\t\tif ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\n\t\t\t// domain not found in DNS\n\t\t\t$isValid = false;\n\t\t}\n\t}\n\treturn $isValid;\n}", "function isValidEmail(String &$val)\n\t{\n\n\t\tif(isSizedString($val) && strpos($val, '@') !== false && filter_var($val, FILTER_VALIDATE_EMAIL)) return true;\n\t\telse return false;\n\n\t}", "function validaremail($email){ \n if (!ereg(\"^([a-zA-Z0-9._]+)@([a-zA-Z0-9.-]+).([a-zA-Z]{2,4})$\",$email)){ \n return FALSE; \n } else { \n return TRUE; \n } \n}", "function valid_email($name){\r\n if(strpos($name, '@') !== false)\r\n return true;\r\n else\r\n return false;\r\n }", "function emailValidation($email)\n\t{\n\t\tif (!filter_var($email, FILTER_VALIDATE_EMAIL))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n \t}", "function validate_email($email, $check_domain = \\true)\n {\n }", "function ValidateEmail($email)\n{\n // $pattern = \"/[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/g\";\n return (bool) filter_var($email, FILTER_VALIDATE_EMAIL);\n}", "function vEmail( $email )\r\n\t\t{\r\n\t\t return filter_var( $email, FILTER_VALIDATE_EMAIL );\r\n\t\t \r\n\t\t}", "function EmailValidation($email)\n{ \n $email = htmlspecialchars(stripslashes(strip_tags($email)));\n if(preg_match(\"/^([a-zA-Z0-9])+([a-zA-Z0-9\\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\\._-]+)+$/\",$email))\n {\n /*$domain = explode('@', $email);\n $domain = $domain[1];\n if(!checkdnsrr($domain,'MX'))\n {\n //return false;\n return true;\n }*/\n return true;\n }\n else\n {\n return false;\n }\n}", "function isValidEmail($email) {\r\n\treturn preg_match(\"/^[a-zA-Z]\\w+(\\.\\w+)*\\@\\w+(\\.[0-9a-zA-Z]+)*\\.[a-zA-Z]{2,4}$/\", $email);\r\n}", "function isValidEmail($name){ \n\t$regexp = \"/^[^0-9][A-z0-9_]+([.][A-z0-9_]+)*[@][A-z0-9_]+([.][A-z0-9_]+)*[.][A-z]{2,4}$/\";\n\n\tif(preg_match($regexp, $name)) {\n\t return TRUE;\n\t}else{\n\t\treturn FALSE;\n\t}\n}", "function validateEmail($email){\n if(strlen($email) == 0){\n return false;\n }\n\n // SI escrito, NO VALIDO email\n if(!filter_var($email, FILTER_SANITIZE_EMAIL)){\n return false;\n }\n\n // SI rellenado, SI email valido\n return true;\n}", "function isEmail($var)\n{\n return filter_var($var, FILTER_VALIDATE_EMAIL);\n}", "function validaemail($emailForm){\n if (!ereg('^([a-zA-Z0-9.-])*([@])([a-z0-9]).([a-z]{2,3})',$emailForm)){\n $mensagem='E-mail Inv&aacute;lido!';\n return $mensagem;\n }\n else{\n //Valida o dominio\n $dominio=explode('@',$emailForm);\n if(!checkdnsrr($dominio[1],'A')){\n $mensagem='E-mail Inv&aacute;lido!';\n return $mensagem;\n }\n else{return true;} // Retorno true para indicar que o e-mail é valido\n }\n }", "function validate_email($string)\r\n\t{\r\n\t\t//We use the built in filter_var function to validate the email.\r\n\t\t//filter_var returns either the filtered data or false, which means we\r\n\t\t//can simply return the answer of the function! simple!\r\n\t\treturn filter_var($string, FILTER_VALIDATE_EMAIL);\r\n\t}", "function validate_email($field_input, array &$field): bool\n{\n $pattern = '/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,})$/i';\n if (!preg_match_all($pattern, $field_input)) {\n $field['error'] = 'Such email address is not valid';\n return false;\n }\n return true;\n}", "function email_check($email)\n{\n $regExp = \"^[_a-zA-Z0-9-öäüÖÄÜ]+(.[_a-zA-Z0-9-öäüÖÄÜ]+)*@([a-zA-Z0-9-öäüÖÄÜ]+.)+([a-zA-Z]{2,4})$\";\n if (!(preg_match($regExp, $email)))\n return false;\n else\n return true;\n}", "function check_email($email) \r\n{ \r\n\t$emailArray = preg_split('//', $email); \r\n $atSign = false; \r\n $dotSign = false; \r\n $badCharacter = false; \r\n $validEmail = true; \r\n\tif (in_array (\"@\", $emailArray)) \r\n\t{ \r\n \t$atSign = true; \r\n } \r\n if (in_array (\".\", $emailArray)) \r\n\t{ \r\n \t$dotSign = true; \r\n } \r\n\t$badCharactersArray = array('#', '$', '%', '(', ')', '&', '!'); // Add your own bad \r\n\tfor ($i = 0; $i < sizeof($badCharactersArray); $i++) \r\n\t{ \r\n\t\tif (in_array ($badCharactersArray[$i], $emailArray)) \r\n \t{ \r\n \t\t$badCharacter = true; \r\n \t} \r\n\t} \r\n\tif ((!$atSign) or (!$dotSign) or ($badCharacter)) \r\n \t$validEmail = false; \r\n}", "function check_email($email) \n{\n if (strlen($email)== 0) \n\t\treturn false;\n if (eregi(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$\", $email)) \n\t\treturn true;\n return false;\n}", "function validate_email($email)\n{\n\treturn preg_match(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,6})$^\", $email);\n}", "function bwm_validate_email($email) {\r\n\t$isValid = true;\r\n\t$atIndex = strrpos($email, \"@\");\r\n\tif (is_bool($atIndex) && !$atIndex) {\r\n\t $isValid = false;\r\n\t} else {\r\n $domain = substr($email, $atIndex+1);\r\n $local = substr($email, 0, $atIndex);\r\n $localLen = strlen($local);\r\n $domainLen = strlen($domain);\r\n if ($localLen < 1 || $localLen > 64) {\r\n // local part length exceeded\r\n $isValid = false;\r\n } else if ($domainLen < 1 || $domainLen > 255) {\r\n // domain part length exceeded\r\n $isValid = false;\r\n } else if ($local[0] == '.' || $local[$localLen-1] == '.') {\r\n // local part starts or ends with '.'\r\n $isValid = false;\r\n } else if (preg_match('/\\\\.\\\\./', $local)) {\r\n // local part has two consecutive dots\r\n $isValid = false;\r\n } else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\r\n // character not valid in domain part\r\n $isValid = false;\r\n } else if (preg_match('/\\\\.\\\\./', $domain)) {\r\n // domain part has two consecutive dots\r\n $isValid = false;\r\n } else if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n // character not valid in local part unless \r\n // local part is quoted\r\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n $isValid = false;\r\n }\r\n }\r\n if ($isValid && function_exists('checkdnsrr') && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\r\n // domain not found in DNS\r\n $isValid = false;\r\n }\r\n\t}\r\n\treturn $isValid;\r\n}", "function isValidMailAddress($address) {\n // enhancement made in 3.6x based on code by Quandary.\n if (preg_match('/^(?!\\\\.)(?:\\\\.?[-a-zA-Z0-9!#$%&\\'*+\\\\/=?^_`{|}~]+)+@(?!\\\\.)(?:\\\\.?(?!-)[-a-zA-Z0-9]+(?<!-)){2,}$/', $address)) {\n return 1;\n } else {\n return 0;\n }\n}", "function isValidEmail($email) {\n if (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return true;\n } else {\n return false;\n }\n}", "public function testEmail() {\n $this->assertEquals('[email protected]', Sanitize::email('em<a>[email protected]'));\n $this->assertEquals('[email protected]', Sanitize::email('email+t(a)[email protected]'));\n $this->assertEquals('[email protected]', Sanitize::email('em\"ail+t(a)[email protected]'));\n }", "function ValidateEmail( $email ) {\n // Check if address is valid\n if( ! filter_var( $email, FILTER_VALIDATE_EMAIL ) )\n return false;\n\n // Break up into parts\n $parts = explode( '@', $email );\n $user = $parts[0];\n $domain = $parts[1];\n\n // Check if domain resolves\n if( ! checkdnsrr( $domain, 'MX' ) && ( ! checkdnsrr( $domain, 'A' ) || ! checkdnsrr( $domain, 'AAAA' ) ) )\n return false;\n\n return true;\n}", "protected function _validateEmailFormat($email) {\n\t\t\t$email = strtolower(trim($email));\n\t\t\t$emailSplitCharacters = explode('@', $email);\n\t\t\t$validAlphaNumericCharacters = 'abcdefghijklmnopqrstuvwxyz1234567890';\n\t\t\t$validLocalCharacters = '.!#$%&\\'*+-/=?^_`{|}~' . $validAlphaNumericCharacters;\n\t\t\t$validLocalSpecialCharacters = ' (),:;<>@[]';\n\t\t\t$validDomainCharacters = '-.' . $validAlphaNumericCharacters;\n\n\t\t\tif (count($emailSplitCharacters) !== 2) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$localString = $emailSplitCharacters[0];\n\t\t\t$localStringCharacters = str_split($localString);\n\t\t\t$domainString = $emailSplitCharacters[1];\n\t\t\t$domainStringCharacters = str_split($domainString);\n\t\t\t$domainStringSplitCharacters = explode('.', $domainString);\n\n\t\t\tif (\n\t\t\t\tcount($domainStringSplitCharacters) < 2 ||\n\t\t\t\tstrlen(end($domainStringSplitCharacters)) < 2 ||\n\t\t\t\tstrstr(' .-', $lastLocalStringCharacter = end($localStringCharacters)) !== false ||\n\t\t\t\tstrstr(' .-', $firstLocalStringCharacter = reset($localStringCharacters)) !== false ||\n\t\t\t\tstrstr(' .-', $lastDomainStringCharacter = end($domainStringCharacters)) !== false ||\n\t\t\t\tstrstr(' .-', $firstDomainStringCharacter = reset($domainStringCharacters)) !== false ||\n\t\t\t\tstrpos($domainString, '-.') !== false ||\n\t\t\t\tstrpos($domainString, '.-') !== false ||\n\t\t\t\t$lastDomainStringCharacter == '-'\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t$lastLocalStringCharacter == '\"' &&\n\t\t\t\t$firstLocalStringCharacter == '\"'\n\t\t\t) {\n\t\t\t\t$validLocalCharacters .= $validLocalSpecialCharacters;\n\t\t\t\tarray_shift($localStringCharacters);\n\t\t\t\tarray_pop($localStringCharacters);\n\t\t\t\t$localString = implode('', $localStringCharacters);\n\t\t\t\t$localString = str_replace('\\\\' . '\\\\', ' \\\\' . '\\\\ ', $localString);\n\t\t\t\t$localString = str_replace('\\\"', ' \\\" ', $localString);\n\t\t\t\t$localStringCharacters = array();\n\t\t\t\t$localStringSplitCharacters = explode(' ', $localString);\n\n\t\t\t\tforeach ($localStringSplitCharacters as $key => $localStringSplitCharacter) {\n\t\t\t\t\t$localStringCharacters = array_filter(array_merge($localStringCharacters, !in_array($localStringSplitCharacter, array('\\\\' . '\\\\', '\\\"')) ? str_split($localStringSplitCharacter) : array()));\n\t\t\t\t}\n\t\t\t} elseif (\n\t\t\t\t(strpos($domainString, '..') !== false) ||\n\t\t\t\t(strpos($localString, '..') !== false) ||\n\t\t\t\t$localString[0] === '.' ||\n\t\t\t\t$localString[strlen($localString) - 1] === '.'\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t$invalidLocalCharacters = array_diff($localStringCharacters, str_split($validLocalCharacters)) ||\n\t\t\t\t$invalidDomainCharacters = array_diff($domainStringCharacters, str_split($validDomainCharacters))\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$response = $email;\n\t\t\treturn $response;\n\t\t}", "function isEMailValid($mail)\n{\n return (filter_var($mail, FILTER_VALIDATE_EMAIL) !== false);\n}", "function isEmail($input) {\n // Matches Email addresses. (Found out how to break up a RedEx so that it can be nicly commited.)\n return (preg_match(\n \"~(^ ## Match starts at the beginning of the string.\n (?>[[:alnum:]._-])+ ## Matches any alpha numaric character plus the '.', '_', and '-'\n ## For the name part of an address. \n (?>@) ## Matches the at sign.\n (?>[[:alnum:]])+ ## Matches any alpha numaric character\n ## For the Place part of the address.\n \n (?> ## To match things like 'uk.com 'or just '.com'\n (?:\\.[[:alpha:]]{2,3}\\.[[:alpha:]]{2,3}) ## Matches a '.' then 2-3 alphabet characters\n ## then another '.' and 2-3 alphabet characters.\n | ## Or Matches\n (?:\\.[[:alpha:]]{2,3}) ## a single '.' then 2-3 alphabet characters.\n )\n $ ## Match to the end of the string.\n )~x\", $input));\n }", "function validEmail($email) {\n\t $isValid = true;\n\t $atIndex = strrpos($email, \"@\");\n\t\tif (is_bool($atIndex) && !$atIndex) {\n\t\t $isValid = false; \n\t\t} else {\n\t\t $domain = substr($email, $atIndex+1);\n\t\t $local = substr($email, 0, $atIndex);\n\t\t $localLen = strlen($local);\n\t\t $domainLen = strlen($domain);\n\t\t if ($localLen < 1 || $localLen > 64)\n\t\t {\n\t\t\t // local part length exceeded\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if ($domainLen < 1 || $domainLen > 255)\n\t\t {\n\t\t\t // domain part length exceeded\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if ($local[0] == '.' || $local[$localLen-1] == '.')\n\t\t {\n\t\t\t // local part starts or ends with '.'\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if (preg_match('/\\\\.\\\\./', $local))\n\t\t {\n\t\t\t // local part has two consecutive dots\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\n\t\t {\n\t\t\t // character not valid in domain part\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if (preg_match('/\\\\.\\\\./', $domain))\n\t\t {\n\t\t\t // domain part has two consecutive dots\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n\t\t\t\t\t str_replace(\"\\\\\\\\\",\"\",$local)))\n\t\t {\n\t\t\t // character not valid in local part unless \n\t\t\t // local part is quoted\n\t\t\t if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\n\t\t\t\t str_replace(\"\\\\\\\\\",\"\",$local)))\n\t\t\t {\n\t\t\t\t$isValid = false;\n\t\t\t }\n\t\t }\n\t\t if ($isValid && !(checkdnsrr($domain,\"MX\"))) {\n\t\t\t // domain not found in DNS\n\t\t\t $isValid = false;\n\t\t }\n\t\t}\n\t return $isValid;\n\t}", "function is_email_address_unsafe($user_email)\n {\n }", "static function validEmail($text){\r\n\t\t$pattern = \"/^[a-z0-9_.-]*@[a-z]+.[a-z]{2,3}$/i\";\r\n\t\t//$pattern = \"^[a-zA-Z0-9._-]+@[a-zA-Z]+\\.[a-zA-Z]{2,3}$\";\r\n\t\tif (preg_match($pattern, $text)) \r\n\t return true;\r\n\t\treturn false; \r\n\t}", "function validEmail($email)\n{\n $isValid = true;\n $atIndex = strrpos($email, \"@\");\n if (is_bool($atIndex) && !$atIndex) {\n $isValid = false;\n }\n else {\n $domain = substr($email, $atIndex+1);\n $local = substr($email, 0, $atIndex);\n $localLen = strlen($local);\n $domainLen = strlen($domain);\n if ($localLen < 1 || $localLen > 64) {\n // local part length exceeded\n $isValid = false;\n } else if ($domainLen < 1 || $domainLen > 255) {\n // domain part length exceeded\n $isValid = false;\n } else if ($local[0] == '.' || $local[$localLen-1] == '.') {\n // local part starts or ends with '.'\n $isValid = false;\n } else if (preg_match('/\\\\.\\\\./', $local)) {\n // local part has two consecutive dots\n $isValid = false;\n } else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\n // character not valid in domain part\n $isValid = false;\n } else if (preg_match('/\\\\.\\\\./', $domain)) {\n // domain part has two consecutive dots\n $isValid = false;\n } else if(!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n str_replace(\"\\\\\\\\\",\"\",$local))) {\n // character not valid in local part unless \n // local part is quoted\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\n str_replace(\"\\\\\\\\\",\"\",$local))) {\n $isValid = false;\n }\n } if ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\n // domain not found in DNS\n $isValid = false;\n }\n }\n return $isValid;\n}", "static function checkEmailAddress($input)\r\n {\r\n if (filter_var($input, FILTER_VALIDATE_EMAIL)) {\r\n return true;\r\n } else {\r\n echo PageBuilder::printError(\"Username or Password is Incorrect!\");\r\n return false;\r\n }\r\n }", "public static function is_email($value) {\r\n\t\t$parts = explode('@', $value, 2);\r\n\t\t$local_part = array_shift($parts);\r\n\t\t$domain = array_shift($parts);\r\n\t\t\r\n\t\t$ret = self::is_domain($domain);\r\n\t\t// local part may be up to 64 characters \r\n\t\t$ret = $ret && (strlen($local_part) <= 64);\r\n\t\t// dot is not allowed at the end or beginning\r\n\t\t// There is also a rule that 2 or more dots are illegal like in '[email protected]'\r\n\t\t// Unfortunately: my neighbor's address IS [email protected]! And I can't lock my neighbor \r\n\t\t// out of the services I program, can I? \r\n\t\t$ret = $ret && (substr($local_part, 0, 1) !== '.');\r\n\t\t$ret = $ret && (substr($local_part, -1) !== '.');\r\n\t\t// Only a-z, A-Z, 0-9 and !#$%&'*+-/=?^_`{|}~ and . are allowed\r\n\t\t// (There is quoting and escaping, but we do not hear, we do not hear, we do not hear...)\r\n\t\t$pattern = \"@^[a-zA-Z0-9!#$%&'*+\\-/=?^_`{|}~.]+$@s\";\r\n\t\t$ret = $ret && preg_match($pattern, strtr($local_part, \"\\r\\n\", ' '));\r\n\t\t\r\n\t\treturn $ret;\r\n\t}", "function validEmail($email)\n{\n $isValid = true;\n $atIndex = strrpos($email, \"@\");\n if (is_bool($atIndex) && !$atIndex)\n {\n $isValid = false;\n }\n else\n {\n $domain = substr($email, $atIndex+1);\n $local = substr($email, 0, $atIndex);\n $localLen = strlen($local);\n $domainLen = strlen($domain);\n if ($localLen < 1 || $localLen > 64)\n {\n // local part length exceeded\n $isValid = false;\n }\n else if ($domainLen < 1 || $domainLen > 255)\n {\n // domain part length exceeded\n $isValid = false;\n }\n else if ($local[0] == '.' || $local[$localLen-1] == '.')\n {\n // local part starts or ends with '.'\n $isValid = false;\n }\n else if (preg_match('/\\\\.\\\\./', $local))\n {\n // local part has two consecutive dots\n $isValid = false;\n }\n else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\n {\n // character not valid in domain part\n $isValid = false;\n }\n else if (preg_match('/\\\\.\\\\./', $domain))\n {\n // domain part has two consecutive dots\n $isValid = false;\n }\n else if\n(!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n str_replace(\"\\\\\\\\\",\"\",$local)))\n {\n // character not valid in local part unless \n // local part is quoted\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\n str_replace(\"\\\\\\\\\",\"\",$local)))\n {\n $isValid = false;\n }\n }\n if ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\")))\n {\n // domain not found in DNS\n $isValid = false;\n }\n }\n return $isValid;\n}", "public static function validate_email($email) {\n\t\t// First, we check that there's one @ symbol, \n\t\t// and that the lengths are right.\n\t\tif (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n\t\t\t// Email invalid because wrong number of characters \n\t\t\t// in one section or wrong number of @ symbols.\n\t\t\treturn false;\n\t\t}\n\t\t// Split it into sections to make life easier\n\t\t$email_array = explode(\"@\", $email);\n\t\t$local_array = explode(\".\", $email_array[0]);\n\t\tfor ($i = 0; $i < sizeof($local_array); $i++) {\n\t\t\tif(!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&\n\t\t\t?'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\",\n\t\t\t$local_array[$i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Check if domain is IP. If not, \n\t\t// it should be valid domain name\n\t\tif (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\n\t\t\t$domain_array = explode(\".\", $email_array[1]);\n\t\t\tif (sizeof($domain_array) < 2) {\n\t\t\t\treturn false; // Not enough parts to domain\n\t\t\t}\n\t\t\tfor ($i = 0; $i < sizeof($domain_array); $i++) {\n\t\t\t\tif(!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|\n\t\t\t\t\t?([A-Za-z0-9]+))$\",\n\t\t\t\t$domain_array[$i])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "function validEmail($email)\r\n{\r\n$isValid = true;\r\n$atIndex = strrpos($email, \"@\");\r\nif (is_bool($atIndex) && !$atIndex)\r\n{\r\n$isValid = false;\r\n}\r\nelse\r\n{\r\n$domain = substr($email, $atIndex+1);\r\n$local = substr($email, 0, $atIndex);\r\n$localLen = strlen($local);\r\n$domainLen = strlen($domain);\r\nif ($localLen < 1 || $localLen > 64)\r\n{\r\n// local part length exceeded\r\n$isValid = false;\r\n}\r\nelse if ($domainLen < 1 || $domainLen > 255)\r\n{\r\n// domain part length exceeded\r\n$isValid = false;\r\n}\r\nelse if ($local[0] == '.' || $local[$localLen-1] == '.')\r\n{\r\n// local part starts or ends with '.'\r\n$isValid = false;\r\n}\r\nelse if (preg_match('/\\\\.\\\\./', $local))\r\n{\r\n// local part has two consecutive dots\r\n$isValid = false;\r\n}\r\nelse if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\r\n{\r\n// character not valid in domain part\r\n$isValid = false;\r\n}\r\nelse if (preg_match('/\\\\.\\\\./', $domain))\r\n{\r\n// domain part has two consecutive dots\r\n$isValid = false;\r\n}\r\nelse if\r\n(!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\r\nstr_replace(\"\\\\\\\\\",\"\",$local)))\r\n{\r\n// character not valid in local part unless\r\n// local part is quoted\r\nif (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\r\nstr_replace(\"\\\\\\\\\",\"\",$local)))\r\n{\r\n$isValid = false;\r\n}\r\n}\r\nif ($isValid && !(checkdnsrr($domain,\"MX\") ||\r\n↪checkdnsrr($domain,\"A\")))\r\n{\r\n// domain not found in DNS\r\n$isValid = false;\r\n}\r\n}\r\nreturn $isValid;\r\n}", "function comprobar_email($email) {\n return (filter_var($email, FILTER_VALIDATE_EMAIL)) ? 1 : 0;\n}", "function validEmail($email)\r\n{\r\n\t$isValid = true;\r\n\t$atIndex = strrpos($email, \"@\");\r\n\tif (is_bool($atIndex) && !$atIndex)\r\n\t{\r\n\t\t$isValid = false;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$domain = substr($email, $atIndex+1);\r\n\t\t$local = substr($email, 0, $atIndex);\r\n\t\t$localLen = strlen($local);\r\n\t\t$domainLen = strlen($domain);\r\n\t\tif ($localLen < 1 || $localLen > 64)\r\n\t\t{\r\n\t\t\t// local part length exceeded\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if ($domainLen < 1 || $domainLen > 255)\r\n\t\t{\r\n\t\t\t// domain part length exceeded\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if ($local[0] == '.' || $local[$localLen-1] == '.')\r\n\t\t{\r\n\t\t\t// local part starts or ends with '.'\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if (preg_match('/\\\\.\\\\./', $local))\r\n\t\t{\r\n\t\t\t// local part has two consecutive dots\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\r\n\t\t{\r\n\t\t\t// character not valid in domain part\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if (preg_match('/\\\\.\\\\./', $domain))\r\n\t\t{\r\n\t\t\t// domain part has two consecutive dots\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if\r\n\t\t(!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\r\n\t\t\t\tstr_replace(\"\\\\\\\\\",\"\",$local)))\r\n\t\t{\r\n\t\t\t// character not valid in local part unless\r\n\t\t\t// local part is quoted\r\n\t\t\tif (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\r\n\t\t\t\t\tstr_replace(\"\\\\\\\\\",\"\",$local)))\r\n\t\t\t{\r\n\t\t\t\t$isValid = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) \r\n\t\t{\r\n\t\t\t// domain not found in DNS\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t}\r\n\treturn $isValid;\r\n}", "public static function ValidaEmailValido($email) {\n // if (!preg_match('/^([a-zA-Z0-9.-])*([@])([a-z0-9]).([a-z]{2,3})/', $email)) {\n // return false;\n // } else {\n //Valida o dominio\n \n $dominio = explode('@', $email);\nerror_reporting(0);\nini_set('display_errors', FALSE);\n try {\n if (!checkdnsrr($dominio[1], 'A')) {\n return false;\n } else {\n return true;\n } // Retorno true para indicar que o e-mail é valido\n } catch (Exception $ex) {\n return false;\n }\n \n // }\n }", "private function isEmailValid($email)\n {\n //We could handle email format validation here\n }", "function cjpopups_is_email_valid($email){\n\treturn preg_match(\"/^[_a-z0-9-]+(\\.[_a-z0-9+-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,})$/i\", $email);\n}", "function invalidEmail($email) {\n $result;\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $result = true;\n } else {\n $result = false;\n }\n return $result;\n }", "function virustotalscan_valid_email($email) \r\n{\r\n\tif (function_exists(\"filter_var\") && !filter_var($email, FILTER_VALIDATE_EMAIL)) {\r\n return false;\r\n }\r\n else {\r\n // daca functia exista atunci se returneaza true\r\n if (function_exists(\"filter_var\")) return true;\r\n else {\r\n // altfel inseamna ca functia nu exista si trebuie sa utilizam o alta metoda\r\n return eregi(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$\", $email);\r\n }\r\n }\r\n}", "function isValidEmail($email) // used in admin_configuration.php, contact-submit.php, user-forgot-password.php, user-register.php, user-resend-activation.php\r\n\r\n{\r\n\r\n\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) {\r\n\r\n\t\treturn true;\r\n\r\n\t}\r\n\r\n\telse {\r\n\r\n\t\treturn false;\r\n\r\n\t}\r\n\r\n}", "function isEmail($email) {\nreturn(preg_match(\"/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i\",$email));\n}", "function verifyEmail ($testString) {\n\treturn filter_var($testString, FILTER_VALIDATE_EMAIL);\n}", "function mme_checkemail( $email ) {\n\t$match = preg_match( '/^[A-z0-9_\\-.]+[@][A-z0-9_\\-]+([.][A-z0-9_\\-]+)+[A-z.]{2,4}$/', $email );\n\tif(!$match){\n\t\t$error_msg = 'Invalid E-mail address';\n\t\tmme_error_notice( $error_msg );\n\t\treturn false;\n\t\t}\n\treturn true;\n}", "function isEmail($verify_email) {\n\t\n\t\treturn(preg_match(\"/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i\",$verify_email));\n\t\n\t}", "public function validaEmail()\n {\n $regex = '/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$/';\n\n if (!strlen(trim($this->email)) || !preg_match($regex, $this->email)) {\n return 'E-mail inválido! <br>';\n }\n\n return '';\n }", "public static function email($email)\n {\n $pattern = '/^(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){255,})(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){65,}@)(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22))(?:\\.(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-[a-z0-9]+)*\\.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-[a-z0-9]+)*)|(?:\\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\\]))$/iD';\n if ((mb_strlen($email) > 254) || !preg_match($pattern, $email)) {\n return false;\n }\n return true;\n }", "function isValidEmail($email)\r\n{\r\n\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) {\r\n\t\treturn true;\r\n\t}\r\n\telse {\r\n\t\treturn false;\r\n\t}\r\n}", "protected function validate_email( $p_value ) {\n\t\t$email = trim($p_value);\n\n\t\t$isValid = true;\n\t\t$atIndex = strrpos($email, \"@\");\n\t\tif ( is_bool($atIndex) && !$atIndex ) {\n\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address missing a @\",null);\n\t\t} else {\n\t\t\t// get domain and local string\n\t\t\t$domain = substr($email, $atIndex + 1);\n\t\t\t$local = substr($email, 0, $atIndex);\n\t\t\t// get length of domain and local string\n\t\t\t$localLen = strlen($local);\n\t\t\t$domainLen = strlen($domain);\n\t\t\tif ( $localLen < 1 ) {\n\t\t\t\t// local part length exceeded\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ is missing\",null);\n\t\t\t} else if ( $localLen > 64 ) {\n\t\t\t\t// local part length exceeded\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ is more than 64 chars\",null);\n\t\t\t} else if ( $domainLen < 1 ) {\n\t\t\t\t// domain part length exceeded\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain missing\",null);\n\t\t\t} else if ( $domainLen > 255 ) {\n\t\t\t\t// domain part length exceeded\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain is more than 255 chars\",null);\n\t\t\t} else if ( $local[0] == '.' ) {\n\t\t\t\t// local part starts or ends with '.'\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address starts with '.'\",null);\n\t\t\t} else if ( $local[$localLen - 1] == '.' ) {\n\t\t\t\t// local part starts or ends with '.'\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ ends with '.'\",null);\n\t\t\t} else if ( preg_match('/\\\\.\\\\./', $local) ) {\n\t\t\t\t// local part has two consecutive dots\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ contains '..'\",null);\n\t\t\t} else if ( !preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain) ) {\n\t\t\t\t// character not valid in domain part\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain contains invalid character\",null);\n\t\t\t} else if ( preg_match('/\\\\.\\\\./', $domain) ) {\n\t\t\t\t// domain part has two consecutive dots\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain contains '..'\",null);\n\t\t\t} else if ( !preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$local)) ) {\n\t\t\t\t// character not valid in local part unless\n\t\t\t\t// local part is quoted\n\t\t\t\tif (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\n\t\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ must be quoted due to special character\",null);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\")) ) {\n\t\t\t\t// domain not found in DNS\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain not found in DNS\",null);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->return_handler->results(200,\"\",null);\n\t}", "function isValidEmail($var) {\n //Returns error message for an invalid email\n\n //Check for unsafe characters\n $msg = isSantizeString($var);\n if ($msg != \"\") {\n return $msg;\n }\n\n if (filter_var($var, FILTER_VALIDATE_EMAIL)) {\n return \"\";\n } else {\n return \"Invalid Email\";\n }\n}", "function validateEMAIL($EMAIL) {\n $v = '/^(?!(?:(?:\\\\x22?\\\\x5C[\\\\x00-\\\\x7E]\\\\x22?)|(?:\\\\x22?[^\\\\x5C\\\\x22]\\\\x22?)){255,})(?!(?:(?:\\\\x22?\\\\x5C[\\\\x00-\\\\x7E]\\\\x22?)|(?:\\\\x22?[^\\\\x5C\\\\x22]\\\\x22?)){65,}@)(?:(?:[\\\\x21\\\\x23-\\\\x27\\\\x2A\\\\x2B\\\\x2D\\\\x2F-\\\\x39\\\\x3D\\\\x3F\\\\x5E-\\\\x7E]+)|(?:\\\\x22(?:[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7F]|(?:\\\\x5C[\\\\x00-\\\\x7F]))*\\\\x22))(?:\\\\.(?:(?:[\\\\x21\\\\x23-\\\\x27\\\\x2A\\\\x2B\\\\x2D\\\\x2F-\\\\x39\\\\x3D\\\\x3F\\\\x5E-\\\\x7E]+)|(?:\\\\x22(?:[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7F]|(?:\\\\x5C[\\\\x00-\\\\x7F]))*\\\\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-+[a-z0-9]+)*\\\\.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-+[a-z0-9]+)*)|(?:\\\\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\\\\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\\\\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\\\\]))$/iD';\n\n return (bool)preg_match($v, $EMAIL);\n}", "function validate_email($email)\n\t{\n\t\t$regexp = \"^([_a-z0-9-]+)(\\.[_a-z0-9-]+)*@([a-z0-9-]+)(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$\";\n\t\t// Presume that the email is invalid\n\t\t$valid = false;\n\t\t// Validate the syntax\n\t\tif (eregi($regexp, $email)) {\n\t\t\tlist($username, $domaintld) = split(\"@\", $email);\n\t\t\t$OS = $this->os_type();\n\t\t\tif ($OS == 'Linux') {\n\t\t\t\tif (checkdnsrr($domaintld, \"MX\")) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn $valid;\n\t}", "public static function validate_email($email) {\n\t // First, we check that there's one @ symbol, \n\t // and that the lengths are right.\n\t if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n\t // Email invalid because wrong number of characters \n\t // in one section or wrong number of @ symbols.\n\t return false;\n\t }\n\t // Split it into sections to make life easier\n\t $email_array = explode(\"@\", $email);\n\t $local_array = explode(\".\", $email_array[0]);\n\t for ($i = 0; $i < sizeof($local_array); $i++) {\n\t if\n\t(!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&\n\t↪'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\",\n\t$local_array[$i])) {\n\t return false;\n\t }\n\t }\n\t // Check if domain is IP. If not, \n\t // it should be valid domain name\n\t if (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\n\t $domain_array = explode(\".\", $email_array[1]);\n\t if (sizeof($domain_array) < 2) {\n\t return false; // Not enough parts to domain\n\t }\n\t for ($i = 0; $i < sizeof($domain_array); $i++) {\n\t if\n\t(!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|\n\t↪([A-Za-z0-9]+))$\",\n\t$domain_array[$i])) {\n\t return false;\n\t }\n\t }\n\t }\n\t return true;\n\t}", "function invalidEmail($email) {\n $result;\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $result = true;\n }\n else {\n $result = false;\n }\n return $result;\n}" ]
[ "0.81262594", "0.79957974", "0.793651", "0.78650516", "0.7846325", "0.78333706", "0.7828788", "0.78151613", "0.77792597", "0.7766017", "0.77620345", "0.7756448", "0.7735569", "0.7732938", "0.7729329", "0.7723228", "0.7703286", "0.7680101", "0.7671354", "0.7666694", "0.7663911", "0.7654209", "0.76495326", "0.7641749", "0.76417446", "0.7630782", "0.7622634", "0.76112705", "0.7598737", "0.75900376", "0.7588105", "0.7587754", "0.75865185", "0.758378", "0.75779855", "0.7569474", "0.7567346", "0.75543624", "0.7554073", "0.7547042", "0.75382", "0.7534443", "0.7534319", "0.7533899", "0.7532952", "0.753242", "0.75269336", "0.75253206", "0.7522358", "0.7507084", "0.7503809", "0.7498632", "0.7493463", "0.74769604", "0.74724257", "0.74635357", "0.7463489", "0.74587053", "0.74581826", "0.74438393", "0.7438808", "0.74286276", "0.74265015", "0.74240625", "0.74195755", "0.7409224", "0.7404558", "0.73966205", "0.7396013", "0.739161", "0.73904085", "0.73649997", "0.735188", "0.73440534", "0.73330027", "0.73285687", "0.7327707", "0.73269415", "0.732625", "0.7325951", "0.7323209", "0.73231673", "0.7322331", "0.7321181", "0.73210526", "0.73146677", "0.730539", "0.730142", "0.73003715", "0.72959286", "0.7295548", "0.7290424", "0.72878206", "0.72817165", "0.7277903", "0.72766006", "0.7275413", "0.727421", "0.72680056", "0.7267563" ]
0.74075896
66
Display a listing of the Provs
public function index(Provider $model) { $providers = Provider::paginate(25); return view('providers.index', compact('providers')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $profs=Prof::paginate(2);\n return view('profs.index', compact('profs'));\n }", "public function produits()\n {\n $data[\"list\"]= $this->produit->list();\n $this->template_admin->displayad('liste_Produits');\n }", "public function index()\n {\n return Profesion::all();\n }", "public function index ()\n {\n $membres = Member::get();\n $golds = Partner::where('category', 'Gold')->paginate(6);\n $silvers = Partner::where('category', 'Silver')->paginate(6);\n $platinums = Partner::where('category', 'Platinum')->paginate(6);\n\n return view('boukarian::frontend.a_propos', compact('membres', 'golds', 'silvers', 'platinums'));\n }", "public function show(Pro $pro)\n {\n //\n }", "public function actionIndex()\n {\n $searchModel = new Proses1Search();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n //recuperer la liste de tous produits\n $produits = Produit::all();\n\n \n $produits = Produit::orderByDesc('id')->paginate(15);\n\n //recuperer un nb definit de produit(afficher les produits par lot de 15)\n\n $produits = Produit::paginate(15);\n\n return view('front-office/produits/index', compact('produits'));\n }", "public function index()\n {\n $produits = Produit::all();\n return view('prodtuis.index', compact('produits'));\n }", "public function index()\n {\n $profiles = Profiles::Latest()->paginate(20);\n return $profiles;\n }", "public function actionIndex()\n {\n $searchModel = new ProdutoSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $prodis = Prodi::get();\n return view('prodi.index',['prodis'=>$prodis]);\n }", "public function listarPS(){\n $profesores = User::orderBy('id','ASC')->where('category', 'profesor')->where('colegio_id', Auth::user()->colegios->id )->paginate(10);\n return view('Secretario.views.profesores')->with('profesores',$profesores);\n }", "public function allAction()\n {\n $repository = $this->getDoctrine()->getRepository('GfctBundle:Profesores');\n // find *all* pro\n $pro = $repository->findAll();\n return $this->render('GfctBundle:Profesores:all.html.twig',array(\"profesores\"=>$pro));\n }", "public function index()\n {\n return ProdutoResource::collection(Produto::paginate(25));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $proeflessens = $em->getRepository('AppBundle:Proeflessen')->findAll();\n\n return $this->render('proeflessen/index.html.twig', array(\n 'proeflessens' => $proeflessens,\n ));\n }", "public function indexProfil()\n {\n $profils = Profil::all();\n return view('profils/showProfil', ['profils' => $profils]);\n }", "public function index()\n {\n Log::info(\"Produtos listados\");\n $produtos = Produto::paginate(10);\n return ProdutoResource::collection($produtos);\n\n }", "public function show(ProData $proData)\n {\n //\n }", "public function index()\n {\n return view('admin.prospects.index', ['prospects' => Prospect::latest()->paginate(20)]);\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('VentesBundle:DetailsProduits')->findAll();\n\n return $this->render('VentesBundle:DetailsProduits:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function index()\n {\n $prodi = Prodi::all();\n\n return view('prodi.index', compact('prodi'));\n }", "public function products()\n {\n $this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');\n\n $repository = $this->getDoctrine()\n ->getRepository(Produit::class);\n\n $produits = $repository->findBy([],['nom' => 'ASC']);\n\n return $this->render('front/produits.html.twig', [\n 'produits' => $produits]);\n }", "public function actionIndex(): string {\n\t\t$searchModel = new ProvisionSearch();\n\t\t$dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\t\tUrl::remember();\n\t\treturn $this->render('index', [\n\t\t\t'searchModel' => $searchModel,\n\t\t\t'dataProvider' => $dataProvider,\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new ProdutosSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $items = Prodi::with(['fakultas','dosen'])->get();\n \n return view('pages.prodi.index')->with([\n 'items' => $items\n ]);\n }", "public function index()\n {\n $profiles = Profile::simplePaginate(10);\n return(view('profiles.index',['profiles' => $profiles]));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $pcvPus = $em->getRepository('PMMLaboBundle:PcvPu')->findAll();\n\n return $this->render('pcvpu/index.html.twig', array(\n 'pcvPus' => $pcvPus,\n ));\n }", "public function listProById()\n {\n\n // obtener el perfil por id\n $id = 3985390143818633;\n print_r($this->getProfile($id)); \n\n }", "public function index()\n {\n $prods = Product::paginate(15);\n return view('product', compact('prods'));\n }", "public function show()\n {\n $produtos = Produto::all();\n return veiw(\"admin\",compact(\"produtos\"));\n }", "public function list_prizes(){\n //echo $this->sql;\n $cart_result = @mysqli_query($this->dbc, 'SELECT * FROM prizes') or die(\"Error with prizes list :( \" . mysqli_error($this->dbc));\n $this->num_rows = mysqli_num_rows($cart_result);\n while ($row = mysqli_fetch_assoc($cart_result)) {\n\n $this->list .= \"<b>\".$row['title'].\" </b>\n <br> \". ucfirst($row['description']).\" \".$row['donated_by'].\" <br><br>\";\n\n }// end while\n mysqli_close($this->dbc);\n }", "public function index(){\n $this->Paginator->settings = $this->paginate;\n\t\t$this->Produccion->recursive=0;\n\t\t$this->set('produccions',$this->Paginator->paginate());\n\t}", "public function indexAction()\n {\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $listesProduits = $em->getRepository('KountacBundle:Produits_1')->findAll();\n\n $images = $em->getRepository('KountacBundle:Media_motif')->findAll(); \n $mannequins = $em->getRepository('KountacBundle:Mannequin')->findAll(); \n \n $produits = $this->get('knp_paginator')->paginate($listesProduits,$this->get('request')->query->get('page', 1),10);\n //var_dump($produits[0]->getProduit2());\n return $this->render('produits/index.html.twig', array(\n 'produits' => $produits,\n 'images' => $images,\n 'mannequins' => $mannequins,\n 'user' => $user\n ));\n }", "public function index()\n\t{\n\t\t$profiles = Profile::paginate(10);\n\n\t\treturn view('admin.profiles.index', compact('profiles'));\n\t}", "public function index()\n {\n $provinsi = $this->provinsi->all();\n return view('admin.provinsi.index', compact('provinsi'));\n // $provinsi = Provinsi::all();\n }", "public function actionIndex()\n {\n $searchModel = new VersiProdukSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $prod = Produto::all();\n return view('pedidos', compact('prod'));\n }", "public function index()\n { /** to get all table */\n $products = Produit::all();\n return view('product_list')->with('products',$products);\n }", "public function index()\n {\n return $this->proponente->paginate($this->limit);\n }", "public function all_produk()\n {\n $produk = Produk::get();\n $kategori = Kategori::get();\n return view('list_produk')\n ->with('produk', $produk)\n ->with('kategori', $kategori);\n }", "public function index()\n {\n $profiles = Profile::all();\n return $this->showAll($profiles);\n }", "public function index()\n {\n $pro = $this->tableJson();\n $cat = Category::all();\n return view('admin.page.product', ['cat' => $cat, 'pro'=>$pro]);\n }", "public function index()\n {\n $professores = Professor::all();\n return view('professores.list', ['professores' => $professores]);\n }", "public function index()\n {\n $proses = Prosessurat::get();\n // dd($proses);\n return view('admin.proses.index', [\n 'title' => 'Status Layanan',\n 'proses' => $proses,\n ]);\n }", "public function index()\n {\n $data['prospectos'] = Prospectos::all();\n return view('prospectos.index',$data);\n }", "public function indexAction()\n {\n $page = (int) $this->getParam('page', 1);\n $pageSize = (int) $this->getParam('size', 25);\n\n $profileRepoFactory = new Application_Factory_ProfileRepository();\n $profileRepo = $profileRepoFactory->createService();\n\n $this->view->profiles = $profileRepo->paginator($page, $pageSize);\n }", "public function listarP(){\n $profesores = User::orderBy('id','ASC')->where('category', 'profesor')->where('colegio_id', Auth::user()->colegios->id )->paginate(10);\n return view('Rector.views.profesores')->with('profesores',$profesores);\n }", "public function index()\n {\n $produk = Produk::paginate(10);\n // $produk = Produk::all();\n \n // dd($produk, $produk2);\n return view('backend.produk.index', compact('produk'));\n }", "public function index()\n {\n $data = $this->Produit->get_by_client(auth()->user()->id);\n return $this->sendResponse($data, 'Produit list');\n }", "public function index()\n {\n $professores = $this->repository->paginate(10);\n return view('admin.professores.index',compact('professores'));\n }", "public function index()\n {\n $produtos = $this->produto->paginate($this->totalPage);\n\n foreach ($produtos as $valor) {\n $valor->users_id = $this->usuario->get_nomeUsuario($valor->users_id);\n }\n\n $titulo = 'Produtos | Sistema de Gerenciamento de Produtos';\n\n return view('produtos.lista_produtos', compact('produtos', 'titulo'));\n }", "public function index()\n {\n $title = 'Listagem de Produtos';\n\n $products = $this->product->paginate($this->totalPage);\n\n return view('painel.products.index', compact('products', 'title'));\n }", "public function index()\n {\n $productos=Producto::paginate();\n return view('productos.listaproduct', compact('productos'));\n }", "public function index()\n {\n $products = ProductType::paginate();\n return view('webshop.productList', compact('products'));\n }", "public function data_pros()\n {\n $data = [ 'aktif' => 'pros',\n 'prospektus' => $this->M_prospektus->get_data_prospektus()\n ];\n\n $this->template->load('template', 'prospektus/V_data_pros', $data);\n }", "public function listsProphylaxisget()\r\n {\r\n $response = Prophylaxis::all();\r\n return response()->json($response,200);\r\n }", "public function index()\n {\n $pensionSystem = PensionSystem::pagination(15);\n }", "public function index()\n {\n return Professor::with(['gradebook','user'])->get();\n }", "public function index() {\n\t\t$propertydata = Property::with('Propertystate','Propertycity')->get();\n\t\t$title = $this->generaltitle;\n\t\t//dd($propertydata);\n\t\treturn view('admin.property.propertylisting')->with(compact('propertydata','title',''));\n }", "public function index()\n {\n //checa se o usuário está cadastrado\n if( Auth::check() ){ \n //retorna somente as Produtos cadastrados pelo usuário cadastrado\n $listarProdutos = Produtos::where('user_id', Auth::id() )->get(); \n }else{\n //retorna todos os Produtos\n $listarProdutos = Produtos::all();\n }\n \n $listarProdutos = Produtos::paginate(10);\n\n\n return view('produtos.list',['produtos' => $listarProdutos]);\n }", "public function index() {\n $properties = Property::orderBy('created_at','desc')->orderBy('priority','asc')->where('published', 0)->paginate(9);\n return view('app.properties.index',compact('properties'));\n }", "public function index()\n {\n $prods = ProdutosGarra::all();\n return view('produtos/produtos', compact('prods'));\n }", "public function indexAction()\n {\n $propietario = new Propietario();\n\n $formPropietario = $this->createCreateForm($propietario);\n\n return $this->render(\n 'BookingBundle:Propietario:index.html.twig',\n array(\n 'formPropietario' => $formPropietario->createView(),\n )\n );\n }", "public function show(Prosiding $prosiding)\n {\n //\n }", "public function index()\n\t{\n\t\t$proyectos = Proyectos::all();\n\t\treturn view('backend.proyectos.proyectos', ['proyectos' => $proyectos]);//\n\t}", "public function index()\n {\n $prosStudents = ProspectiveStudent::simplePaginate(5);\n return view('admin.prosStudent.index', compact('prosStudents'));\n }", "public function index()\n {\n // retourne les derniers produits\n $products = Product::orderBy('id', 'desc')->paginate(15);\n\n return view('back.product.index', ['products' => $products]);\n }", "public function index() {\n\n $produto = Produto::all();\n return view('site.produtos', ['produto' => $produto]);\n }", "public function index()\n {\n $prosidings = Prosiding::where('nidn','=',auth()->user()->username)->get();\n $lektors = Lektor::where('nama','=',auth()->user()->name)->get();\n return view('prosidi.index',['prosidings'=>$prosidings],['lektors'=>$lektors]);\n }", "public function index()\n {\n $views = Protfolio::all();\n return view('backend.protfolio.view-protfolio', compact('views'));\n }", "public function showProfil()\n {\n $profils = Profil::all();\n return view('profils/showProfil', ['profils' => $profils]);\n }", "public function List2Pro(){\n $listproduct = ListProduct::all();\n $modulepro = ModProduct::all();\n return view('computer.admin.product.listproduct',['listproduct'=>$listproduct,'modulepro'=>$modulepro]);\n }", "public function index()\n {\n $id = Auth::user()->id;\n $profissionais = $this->repository->findWhere([\n 'user_id'=>$id\n ]);\n return view('profissionais.index', compact('profissionais'));\n }", "public function index()\n {\n //\n $cap_Plazas = copPlazas::where('tipo','=','CAP')\n ->paginate(20);\n //$users = User::where('votes', '>', 100)->paginate(15);\n\n return view('copPlazas-mgmt/index', ['capPlazas' => $cap_Plazas]);\n\n }", "public function actionIndex()\n {\n $searchModel = new ProvComprasSerach();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $this->layout=\"main\";\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function ProjetAction()\n {\n $em = $this->getDoctrine()->getManager();\n $id= $this->getUser()->getProfil();\n $projets = $em->getRepository('ExiaCoreBundle:Projet')->findByProfil($id);\n return $this->render('ExiaCoreBundle:Core:liste-projet.html.twig', array('projets' => $projets));\n }", "public function list(): Response\n {\n /* Récupération des produits */\n // Récupération du repository\n $repository = $this->getDoctrine()->getRepository(Product::class);\n // Récupération des enregistrements\n $products = $repository->findAll();\n\n // Envoi des produits à la vue\n return $this->render(\"products/list.html.twig\", compact('products'));\n /*\n * Forme équivalente\n return $this->render(\"products/list.html.twig\", [\n \"products\" => $products\n ]);\n */\n }", "public function index()\n {\n $provedores = Providers::orderBy('id', 'DESC')->get();\n return view('provedores.index', compact('provedores'));\n }", "public function index()\n {\n $prix_produits = Prix_produits::all();\n\n return view('prix_produit.index', compact('prix_produits'));\n }", "public function list()\n {\n $proposals = Proposal::own()->orderBy('id', 'DESC')\n ->paginate(self::RECORD_PER_PAGE);\n\n return view('widget.proposals.index');\n }", "public function index()\n {\n $data = Produk::all();\n return view('dashboard.produk.index', compact('data'));\n }", "public function index()\r\n {\r\n \r\n $profesor=profesor::orderBy('id')->paginate();\r\n return view('profesorindex',compact('profesor')); \r\n }", "public function listar_proveedor(){\n $lugares=DB::select(\"SELECT nombre_lugar,id_lugar FROM lugar WHERE tipo_lugar='pa' order by nombre_lugar;\");\n $proveedores=DB::select(\"SELECT * FROM proveedor\");\n return view('portal/airucab-proveedores',compact('lugares'),compact('proveedores'));\n }", "public function listes()\n { \n /*! Requete pour charger le model */\n $this->load->helper('url');\n $this->load->model('produits_model');\n $aListe = $this->produits_model->listes();\n \n $aView[\"listes\"] = $aListe;\n $this->load->view('listes', $aView);\n \n // suite de la fontion sans le model\n /* $resultats = $this->db->query(\"select * from produits\");\n $aListe = $resultats->result();\n $aView['liste_produits'] = $aListe;\n $this->load->view(\"listes\", $aView);*/\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $phpposPeoples = $em->getRepository('principalBundle:PhpposPeople')->findAll();\n\n return $this->render('phppospeople/index.html.twig', array(\n 'phpposPeoples' => $phpposPeoples,\n ));\n }", "public function index()\n {\n $professors = professor::all();\n return view('professor', compact('professors'));\n }", "public function index()\n {\n $produtos = Produto::all();\n\n return view('produtos.produtos', ['produtos' => $produtos]);\n }", "public function viewProyek(){\n $idProyek = Assignment::select('assignments.proyek_id')->where('pengguna_id',\\Auth::user()->id)->get();\n $listProyek = Proyek::select('proyeks.*')->whereIn('id',$idProyek)->get(); \n return view('listProyek', compact('listProyek'));\n }", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function index(){\n\t\t$catalogos = array(\n\t\t\t\t'clasificacion_proyectos'=>ClasificacionProyecto::all(),\n\t\t\t\t'origenes_financiamiento' => OrigenFinanciamiento::all()\n\t\t\t);\n\t\treturn parent::loadIndex('EXP','PROYECTOS',$catalogos);\n\t}", "public function index()\n {\n return Procliente::all();\n }", "public function index(Request $request)\n {\n $produkter = Produkter::all();\n\n\t\treturn view('admin.produkter.index', compact('produkter'));\n\t}", "public function index()\n {\n if (! Gate::allows('procedure_access')) {\n return abort(401);\n }\n\n\n $procedures = Procedure::all();\n\n return view('admin.procedures.index', compact('procedures'));\n }", "public function index()\n {\n $produk = Produk::orderBy('id', 'desc')\n ->get();\n \n return view('admin.produk.main_produk',['produk'=>$produk]);\n }", "public function index()\n {\n $products = Product::orderBy('created_at', 'asc')->get();\n return view('products.index')->with('prods', $products);\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function index()\n {\n // if user is admin then return all proposals\n if (Auth::user()->role_id == 2) {\n $proposals = Proposal::latest()->paginate(5);\n\n } else {\n $proposals = Proposal::where('user_id', '=', Auth::id())->orderBy('id', 'DESC')->paginate(5);\n\n }\n return view('proposal.index', compact('proposals'));\n }", "public function index()\n\t{\n\t\t$produtos = Produto::paginate(15);\n\t\t// $produtos = Produto::select('*')\n\t\t// \t->withTrashed()\n\t\t// \t->get();\n\t\treturn view('produto.index')->with(['produtos' => $produtos]);\n\t}", "public function index()\n {\n $products=Productvariation::where(['deleted'=>0])->paginate(5);\n return view('productvariations',compact('products'))->with('no', 1);\n }", "public function getVerProfesionales()\n {\n $data['profesionales'] = Profesional::orderBy('apellido', 'desc')->get();\n $data['title'] = \"Profesionales\";\n return view('profesional.verProfesionales',$data);\n }" ]
[ "0.73746717", "0.7277092", "0.72343993", "0.7095946", "0.7020667", "0.68617135", "0.68514746", "0.67611027", "0.6760567", "0.6757849", "0.67447174", "0.67380446", "0.6736146", "0.6722273", "0.67085326", "0.66884416", "0.66841906", "0.6667295", "0.66554683", "0.66300255", "0.6628192", "0.65981764", "0.65909517", "0.65888995", "0.65831286", "0.6542181", "0.6531834", "0.65312076", "0.6529698", "0.65186995", "0.6504845", "0.64898866", "0.6482749", "0.64813644", "0.6475492", "0.64680797", "0.6463052", "0.64587593", "0.64549714", "0.6445", "0.6443769", "0.6443517", "0.6434452", "0.6430807", "0.6420512", "0.6420335", "0.64194787", "0.64091665", "0.63926494", "0.6388863", "0.6375162", "0.6372002", "0.63647723", "0.6361349", "0.63561004", "0.63414437", "0.6325561", "0.63226354", "0.6319412", "0.63178515", "0.63122517", "0.6308534", "0.63071746", "0.630594", "0.6305565", "0.62964684", "0.62935287", "0.629315", "0.6277615", "0.62757003", "0.6275198", "0.62721974", "0.6272142", "0.62684464", "0.62538767", "0.6243296", "0.62425745", "0.623286", "0.6224556", "0.62238866", "0.6218371", "0.62165034", "0.6215541", "0.6215439", "0.62112004", "0.6210462", "0.6208493", "0.620337", "0.61915964", "0.61814725", "0.6179267", "0.6174791", "0.6169623", "0.6168293", "0.61661243", "0.61639804", "0.61632836", "0.61630416", "0.6161686", "0.6156081", "0.614807" ]
0.0
-1
Show the form for creating a new Prov
public function create() { return view('providers.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newAction()\n {\n $entity = new Propietario();\n $form = $this->createCreateForm($entity);\n\n return $this->render(\n 'BookingBundle:Propietario:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "public function create()\n {\n return view('prodi.addProdi');\n }", "public function actionCreate()\n {\n $model = new ProvCompras();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n $this->layout=\"main\";\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n $misProfesores = Profesor::getId();\n return view('asignaturas.create', compact('misProfesores'));\n }", "public function create()\n {\n $professores = Professor::all();\n return view('curso.create_curso',compact('professores'));\n }", "public function create()\n {\n return view('dashboard.produk.add');\n }", "public function actionCreate()\n {\n $model = new Produksi();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n return view('admin.provinsi.create');\n }", "public function create()\n {\n return view('ordini_prodottis.create');\n }", "public function create()\n {\n //\n return view('backend.profession.addnew');\n }", "public function create()\n {\n return view('admin.professores.create');\n }", "public function create()\n\t{\n\t \n\t \n\t return view('admin.produkter.create');\n\t}", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n return view('backend.produk.create'); \n }", "public function create()\n {\n $model = new Produto;\n return view('produto.create', compact('model'));\n }", "public function create()\n {\n return view('prospectos.create');\n }", "public function create()\n {\n return view('adm.propiedad.create');\n }", "public function create()\n {\n return view('tukang.produk.add');\n }", "public function create()\n {\n return view('produits.create');\n }", "public function create()\n\t{\n\t\treturn view('backend.proyectos.create');\n\n\t}", "public function create()\n {\n return view('proposal.create');\n }", "public function create()\n {\n return view('provedores.create');\n }", "public function create()\n {\n return view('admin.profesores.create');\n }", "public function create()\n {\n return view('backend.protfolio.add-protfolio');\n }", "public function create()\n {\n return view('produk.create');\n }", "public function newAction() {\n $entity = new DetailsProduits();\n $form = $this->createCreateForm($entity);\n\n return $this->render('VentesBundle:DetailsProduits:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('admin.nsrProduk.create');\n }", "public function create()\n {\n //\n return view('profesor.create');\n }", "public function create()\n {\n return view('produto.form_produto');\n }", "public function actionCreate() {\n\t\t$model = new Proyecto;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t$this -> performAjaxValidation($model);\n\n\t\tif (isset($_POST['Proyecto'])) {\n\t\t\t$model -> attributes = $_POST['Proyecto'];\n\t\t\t$model -> Usuario_id = Yii::app() -> user -> id;\n\t\t\tif ($model -> save())\n\t\t\t\t$this -> redirect(array('view', 'id' => $model -> id));\n\t\t}\n\n\t\t$this -> render('create', array('model' => $model, ));\n\t}", "public function 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 create()\n {\n //\n return view('profesores.create');\n }", "public function create()\n {\n //\n return view('profesores.create');\n }", "public function create($id)\n {\n $data = Proposta::find($id);\n \n //dd($data);\n\n return view('dashboard.proposta.form')->with(['data'=>$data, 'action'=>\"criar\"]);\n }", "public function create()\n {\n return view('prodi.create');\n }", "public function create()\n {\n //\n return view('profesores/create');\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $prodi = $this\n ->prodiMasterRepo\n ->getAllData();\n\n return view('dasbor.pengguna.prodi.form_tambah', compact('prodi'));\n }", "public function create()\n {\n return view('admin.prospects.create');\n }", "public function create() {\n\t\t$professions = $this->profesion->all();\n\n\t\t$vars = [\n\t\t\t'professions'\n\t\t];\n\n return view('admin.areas-profesiones.create', compact($vars));\n\t}", "public function create()\n {\n $prodis = Prodi::all();\n return view('mahasiswa.addMaha',['prodis'=>$prodis]);\n }", "public function create()\n {\n return view('propietarios.create');\n }", "public function create()\n {\n return view ('proyecto.create');\n }", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function create()\n {\n return view('cat_medida_proteccions.create');\n }", "public function create()\n {\n return view(\"createProduto\");\n }", "public function create()\n {\n return view('profesores.crear');\n }", "public function createProfil()\n {\n $profils = Profil::all();\n return view('profils.addProfil', ['profils' => $profils]);\n }", "public function addform()\n {\n \n //$this->session_manager->validateFashion(__METHOD__);\n \n $data['cate'] = $this->promo->promoSliderOptionCuisine($by_id=null,$platform=1);\n $data['promo_duration'] = $this->promo->promoDurationOption();\n $data['admin_info'] = $this->promo->adminInfo();\n \n $data['title_type']= 'New Promo Form';\n $data ['content_file']= 'promo_new';\n $data['pageheader'] = \"Add Promo\";\n $data['breadCrumbs'] = '<li class=\"breadcrumb-item\"><a href=\"'.site_url(\"jollofadmin/promos\").'\">Promos</a></li> <li class=\"breadcrumb-item active\">Add Promo</li>';\n $data['mainmenu'] = \"promos\";\n $this->load->view('jollof_admin/layout', $data);\n }", "public function create()\n {\n return view('profiles.dataprofileForm');\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view(\"produto.create\");\n }", "public function create()\n {\n $modalidades = Modalidade::all();\n return view('professores.new', ['modalidades' => $modalidades]);\n }", "public function actionCreate()\n {\n $model = new InmueblePorcentajePropietario();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index' ,'id' => $model->inmueble_id]);\n } else {\n $model->inmueble_id=Yii::$app->request->get('id');\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view('ppc.bf.prod.create');\n }", "public function create()\n {\n $data['proceso'] = 'crea';\n $data['var'] = $this->var;\n $data['documentosCompra'] = PurchaseDocument::crsdocumentocom2($this->ventana);\n $data['sucursal'] = Subsidiaries::findOrFail(1);\n $data['transaccion'] = TransactionType::findOrFail(1);\n $data['currency'] = Currency::findOrFail(1);\n $data['condicion'] = PaymentCondition::findOrFail(1);\n $data['paymentmethods'] = PaymentMethod::all();\n $data['mediopagos'] = PaymentType::all();\n $data['period'] = Period::where('descripcion', Session::get('period'))->first();\n $data['terceros'] = Customer::all();\n $data['view'] = link_view('Tesoreria', 'Transacción', 'Generación de Documentos por Pagar', '');\n $data['header'] = headeroptions($this->var, 'crea', '', '');\n\n return view('otherprovisions.create', $data);\n }", "public function create()\n {\n return view('produtos.form');\n }", "public function create()\n {\n $data['action'] = 'promo.store';\n return view('promo.form', $data);\n }", "public function create()\n {\n $prov = Provinsi::lists('nama_provinsi','id_provinsi');\n\n return view('kabupaten.create',compact('prov'));\n }", "public function create()\n {\n $cmp_id = Session::get('cmp_id');\n $gro_id = Session::get('gro_id');\n $tipos = Productype::getTipoProductos($gro_id);\n if ($gro_id ==1) {\n return view('product.gasolineras.form_create',compact('tipos'));\n }\n if ($gro_id ==2) {\n return view('product.farmacias.form_create',compact('tipos'));\n }\n }", "public function create()\n {\n return view('tipoproducto.create');\n }", "public function create()\n {\n //\n return view('admin.nom.prefcontrtypes.create');\n }", "public function create()\n {\n //recuperer la liste des categories et affecter a select\n $categories = Category::all();\n $produit = new Produit(); \n return view('front-office.produits.create', compact('categories', 'produit'));\n }", "public function create()\n {\n return view('admin.portftype.addportfoliotype');\n }", "public function create()\n {\n return view('admin.prosStudent.create');\n }", "public function create()\n {\n return view ('proveedor.crear-proveedor');\n }", "public function create()\n {\n return view('promotions/add');\n }", "public function create()\n {\n return view('promos.create');\n }", "public function create()\n {\n //\n return view('promos.create');\n }", "public function create()\n {\n return view('ptpn.create');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('admin.propositosgenerales.create');\n }", "public function actionCreateForm()\n\t{\n\t\t$model=new TProducto;\n\t\t$modelInventario=new TInventario;\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['TProducto']))\n\t\t{\n\t\t\t$model->attributes=$_POST['TProducto'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id_almacen));\n\t\t}\n\t\tYii::app()->theme = 'admin';\n\t\t$this->layout ='//layouts/portalAdmin';\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,'modelInventario'=>$modelInventario\n\t\t));\n\t}", "public function create()\n {\n return view('promocoes.create');\n }", "public function create()\n {\n return view('partecipants.create');\n }", "public function create()\n\t{\n\t\t$authuser = Auth::user();\n\t\t$listaTiposDeProveedores = array('NA' => 'Elige un tipo de proveedor')+ProveedorTipo::lists('tipo','id');\n\t\treturn View::make('vistausuario.pages.proveedores.nuevo')->with(array('listaTiposDeProveedores'=>$listaTiposDeProveedores, 'usuarioimg'=>$authuser->imagen, 'usuarionombre'=>$authuser->nombre, 'usuarioid'=>$authuser->id));\n\t}", "public function create()\n\t{\n\t\treturn View::make('admin.posiciones.create');\n\t}", "public function create()\n {\n return view('admin.projetos.create');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('proveedores/create');\n }", "public function create()\n {\n return view(\"admin.proveedores.agregar\");\n }", "public function create()\n\t{\n\t\t/*Add select options*/\n\t\t$estados_options \t= $this->estadosRepository->optionList();\n\t\t$clientes_options \t= $this->clientesRepository->optionList();\n\t\t\n\t\t//dd([$this->maquina_options,$this->metodo_options]);\n\t\t\n\t\treturn view('proyectos.create')\n\t\t->with('estado_options', $estados_options)\n\t\t->with('cliente_options', $clientes_options)\n\t\t->with('maquina_options', $this->maquina_options)\n\t\t->with('metodo_options', $this->metodo_options);\n\t}", "public function create()\n\t{\n return view('productos.create');\n\t}", "public function actionCreate()\n {\n $model = new Peticiones();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\r\n {\r\n return view('backEnd.productos.create');\r\n }", "public function create()\n {\n return view('admin/tipoproductoCreate');\n }", "public function create()\n {\n return view('produto.create');\n }", "public function actionCreate()\n {\n $model = new Penulis();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n return view('projeto.create');\n }", "public function actionCreate()\n {\n $model = new PopulacPreferences();\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()\r\n {\r\n $proveedores = proveedor::all();\r\n return view ('insumo.crear', compact('proveedores'));\r\n }", "public function create()\n {\n return view('proyek.create');\n }", "public function create()\n {\n return view('compte_epargnes.create');\n }", "public function newAssocForm()\n {\n $assocs = $this->assocManager->getAssocs();\n require_once 'vue/new.assoc.view.php';\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function createproppresen() {\n /* Get all supervisor names acording to the supervisor id */\n $supervisaornames = DB::select(\"SELECT name,id \n\t\t FROM panelmembers\n\t\t WHERE id = any (SELECT supervisorId \n\t\t FROM projects\n\t\t WHERE status = 'Approved')\");\n\n /* Get all group ids */\n $groupids = DB::select(\"SELECT groupID \n\t\t FROM research_groups\");\n\n /* Get all student actual id acording to the auto generated id */\n $studentid = DB::select(\"SELECT id,regId \n\t\t FROM students\n\t\t WHERE id = any (SELECT studentId \n\t\t FROM projects\n\t\t WHERE status = 'Approved')\");\n\n /* filtering projects according to the groups */\n $students = DB::select(\"SELECT id,title,studentId,supervisorId \n\t\t FROM projects\n\t\t WHERE status = 'Approved' and groupID = any (SELECT groupID \n\t\t FROM research_groups)\");\n\n /*get all collumn's values in the settings table*/\n $los = DB::table('settings')->first();\n\n return view('supevaluation.propevaluation', compact('students',\n 'supervisaornames', 'studentid', 'groupids', 'los'));\n }", "public function create()\n {\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \"Create Product Item\";\n $this->data['mode'] = \"create\";\n return view('product.form', $this->data);\n }", "public function create()\n {\n //\n return view(\"productos.create\");\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"productos.productos_create\");\n }", "public function newAction()\n {\n $entity = new Equipo();\n $form = $this->createCreateForm($entity);\n\n $retVal = TRUE;\n return $this->render('CorresponsaliaBundle:Tecnologia/Equipo:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'error_responsable' => $retVal,\n ));\n }" ]
[ "0.7651336", "0.7548039", "0.7440007", "0.73591447", "0.72748655", "0.7258327", "0.7222054", "0.72014356", "0.71890146", "0.71881706", "0.71766293", "0.71711934", "0.7167508", "0.7158091", "0.7145575", "0.71433747", "0.7117545", "0.7115026", "0.7111677", "0.70928067", "0.7082142", "0.70643896", "0.7061085", "0.7054508", "0.7053768", "0.7044781", "0.7040943", "0.70392615", "0.70242435", "0.70025057", "0.6998548", "0.6997089", "0.6997089", "0.6976161", "0.69593626", "0.69532853", "0.69430614", "0.6922725", "0.6908985", "0.6898968", "0.6897171", "0.6886492", "0.6878005", "0.6872439", "0.6864399", "0.68607885", "0.6839261", "0.6838997", "0.682197", "0.68216354", "0.68183535", "0.6807054", "0.68044007", "0.6798274", "0.6797084", "0.67801267", "0.67752504", "0.67742085", "0.67707944", "0.6766743", "0.67654115", "0.6762086", "0.6758701", "0.6756499", "0.675394", "0.67506695", "0.67455584", "0.6745401", "0.67447764", "0.67408043", "0.6736482", "0.67347217", "0.67242724", "0.67241985", "0.6721428", "0.67203665", "0.67130804", "0.67006755", "0.66977286", "0.66959924", "0.6694128", "0.66923565", "0.6691279", "0.668722", "0.66848767", "0.6684678", "0.66840035", "0.6681671", "0.66809124", "0.66786724", "0.66780657", "0.66768205", "0.6673316", "0.6671653", "0.666634", "0.6666107", "0.6665762", "0.666451", "0.6663049", "0.66612816", "0.6654148" ]
0.0
-1
Store a newly created Provider in storage
public function store(ProviderRequest $request, Provider $provider) { $provider->create($request->all()); return redirect() ->route('providers.index') ->withStatus('Successfully Registered Vendor.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(StoreProviderRequest $request)\n {\n\n $user = Auth::user();\n\n if ($user->provider != null) return $this->errorForbidden();\n // dd($request->all());\n\n $user->update(['type' => 'provider']);\n\n $provider = Provider::create(array_merge($request->all(),['user_id' => $user->id]) );\n $provider->categories()->attach($request->categories_ids);\n $provider->countries()->attach($request->countries_ids);\n\n if($request->logo){\n $logo = upload($request->logo, 'providers');\n $provider->update(['logo' => $logo]);\n }\n if($request->video){\n $video = upload($request->video, 'providers');\n $provider->update(['video' => $video]);\n }\n\n return $this->respondWithItem(new ProviderLargeResource($provider), 'provider created');\n\n }", "public function store(ProviderRequest $request)\n {\n Provider::create($request->validated());\n return;\n }", "public function store(CreateProviderRequest $request)\n\t{\n\t \n\t\tProvider::create($request->all());\n\n\t\treturn redirect()->route('admin.provider.index');\n\t}", "public function store(StoreProvidersRequest $request)\n {\n $req = $request->only('provider_name', 'provider_image', 'provider_url', 'allow_orders', 'provider_includes');\n $provider = Provider::create($req);\n return redirect()->route('admin.providers.index')\n ->withFlashSuccess(\"Provider '\" . $req['provider_name'] . \"' created.\");\n }", "public function store(ProviderRequest $request)\n {\n $validated=$request->validated();\n $provider = Provider::create($validated);\n\n return ProviderResource::collection($provider);\n }", "public function store(ProviderRequest $request)\n {\n $this->repository->create($request);\n return redirect()->route('providers.index');\n }", "public function saveProvider($provider) {\n $provider->save();\n\n $providerAccount = $this->newProviderAccount($provider->id);\n $providerAccount->save();\n\n $provider->pch_provider_account_id = $providerAccount->id;\n $provider->save();\n }", "public function createStorage();", "public function store(ProviderCreateRequest $request)\n {\n Provider::create($request->validated());\n\n return redirect()->route('provider.index')\n ->with('status','El proyecto fue creado con exito');\n }", "public function createProvider();", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n\n if (Setting::get('demo_mode', 0) == 1) {\n return back()->with('flash_error', 'Disabled for demo purposes! Please contact us at [email protected]');\n }\n\n $this->validate($request, [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|unique:providers,email|email|max:255',\n 'mobile' => '',\n 'picture' => 'mimes:jpeg,jpg,bmp,png|max:5242880',\n 'password' => 'required|min:6|confirmed',\n ]);\n\n try {\n\n $provider = $request->all();\n\n $provider['password'] = bcrypt($request->password);\n if ($request->hasFile('picture')) {\n $provider['avatar'] = $request->picture->store('provider/profile');\n }\n\n $provider = Provider::create($provider);\n\n return back()->with('flash_success', 'Provider Details Saved Successfully');\n } catch (Exception $e) {\n return back()->with('flash_errors', 'Provider Not Found');\n }\n }", "public function store(Request $request)\n {\n\n // validate fields\n $validator = Validator::make($request->all(), [\n 'name' => 'required|min:3|unique:providers,name,'.$provider->id,\n ]);\n\n // check if validation success\n if ($validator->fails()) {\n\n // Flash Message error\n notify('Provider can\\'t be created!', 'error');\n\n // back to form with inputs\n return back()->withErrors($validator)->withInput();\n }\n\n // store all values in $input\n $input = $request->all();\n\n // create provider with values\n Provider::create($input);\n\n // Flash Message success\n notify('Provider created!', 'success');\n\n // redirect with success flash message\n return redirect()->route('provider.index');\n }", "public function store(ProviderCreateRequest $request)\n {\n try {\n\n $this->validator->with($request->all())->passesOrFail(ValidatorInterface::RULE_CREATE);\n\n $provider = $this->repository->create($request->all());\n\n $response = [\n 'message' => 'Provider created.',\n 'data' => $provider->toArray(),\n ];\n\n if ($request->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect()->back()->with('message', $response['message']);\n } catch (ValidatorException $e) {\n if ($request->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }", "public static function provider($provider)\n {\n static::$data = $provider;\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(StoreRequest $request)\n {\n //\n Provider::create($request->all());\n return redirect()->route('providers.index')->with(['message' => 'El registro se ha guardado exitosamente.']);\n }", "public function store()\n {\n $provider = $this->providerRepo->newProvider();\n $manager = new ProviderRegManager($provider, Input::all());\n $manager->save();\n\n if (Request::ajax()) {\n $response = $this->msg200 + ['data' => $provider];\n\n return Response::json($response);\n }\n\n if (Input::get('back'))\n return Redirect::back()->with('message', \"El proveedor $provider->name se creo correctamente.\");\n else\n return Redirect::route('provider.show', [$provider->slug, $provider->id]);\n }", "public function store() {\n\t}", "public function store(StoreUpdateProviderFormRequest $request)\n {\n $provider = $this->repository->store($request->all());\n\n return redirect()\n ->route('providers.index')\n ->withSuccess('Cadastro realizado com sucesso');\n }", "public function store();", "public function store();", "public function store();", "public function store() {\n \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 store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\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.7040191", "0.694029", "0.6802441", "0.665856", "0.66075546", "0.6543135", "0.6506851", "0.64536124", "0.6305696", "0.6305347", "0.6232928", "0.62160677", "0.6214657", "0.6156752", "0.6104048", "0.6080375", "0.6080375", "0.6080375", "0.6058016", "0.60373306", "0.60154355", "0.60141325", "0.59964824", "0.59964824", "0.59964824", "0.5984175", "0.59826595", "0.59826595", "0.59826595", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553", "0.5965553" ]
0.6124378
14
Show the form for editing the specified Provider
public function edit(Provider $provider) { return view('providers.edit', compact('provider')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Provider $provider)\n {\n //\n return view('admin.provider.edit', compact('provider'));\n }", "public function edit(Provider $provider)\n {\n //\n }", "public function edit(Provider $provider)\n {\n return view ('provider.edit',[\n 'provider' => $provider\n ]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit($id)\n\t{\n\t\t$provider = Provider::find($id);\n\t \n\t \n\t\treturn view('admin.provider.edit', compact('provider'));\n\t}", "public function edit($id = null) {\n if($id != null){\n $provider = Provider::find($id);\n }else{\n $provider = new Provider();\n }\n \n return view('backend.providers.edit')->with('provider', $provider);\n }", "private function createEditForm(Provider $provider)\n {\n return $this->createForm(new ProviderType(), $provider, array(\n 'action' => $this->generateUrl('admin_provider_edit', array('id' => $provider->getId())),\n ));\n }", "public function showAction(Provider $provider)\n {\n $editForm = $this->createEditForm($provider);\n $deleteForm = $this->createDeleteForm($provider);\n\n return $this->render('KoreAdminBundle:Provider:show.html.twig', array(\n 'provider' => $provider,\n 'editForm' => $editForm->createView(),\n 'deleteForm' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t$provider = Provider::findOrFail($id);\n\t\t\n\t\treturn view('providers.edit', compact('provider'));\n\t}", "public function edit($id)\n {\n $provider = $this->repository->getProviderById($id);\n return view('backs.provider.edit',compact('provider'));\n }", "public function editAction(Request $request, Provider $provider)\n {\n $editForm = $this->createEditForm($provider);\n $deleteForm = $this->createDeleteForm($provider);\n $editForm->handleRequest($request);\n\n if ($editForm->isSubmitted()) {\n if($editForm->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($provider);\n $em->flush();\n $request->getSession()->getFlashBag()->add( 'success', 'provider.edit.flash' );\n return $this->redirect($this->generateUrl('admin_provider_index'));\n }\n }\n\n return $this->render('KoreAdminBundle:Provider:edit.html.twig', array(\n 'provider' => $provider,\n 'editForm' => $editForm->createView(),\n 'deleteForm' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n try {\n $provider = Provider::findOrFail($id);\n return view('admin.providers.edit', compact('provider'));\n } catch (ModelNotFoundException $e) {\n return $e;\n }\n }", "public function edit($id)\n {\n $provider = $this->repository->find($id);\n\n return view('providers.edit', compact('provider'));\n }", "public function show(Provider $provider)\n {\n //\n }", "public function show(Provider $provider)\n {\n //\n }", "public function edit($id)\n {\n $provider = Provider::find($id);\n if (!$provider) {\n $msg = 'Unable to edit provider with id ' . $id;\n Log::error($msg);\n return redirect()->route('admin.providers.index')\n ->withFlashWarning($msg);\n }\n\n return view('admin.providers.edit')\n ->withProvider($provider)\n ->withImagefiles($this->getImageFiles());\n }", "public function edit($id)\n {\n if (!$provider = $this->repository->findById($id))\n return redirect()->back();\n\n return view('admin.providers.edit', compact('provider', 'addresses'));\n }", "public function home_featured_provider_edit($id = '') {\n Session::put('menu_item_parent', 'home');\n Session::put('menu_item_child', 'home_featured_provider');\n Session::put('menu_item_child_child', '');\n\n $statusList = array(\n 0 => 'Unpublish',\n 1 => 'Publish'\n );\n\n if($id == '') {\n $providers = Provider::get();\n $data = array('providers', 'statusList');\n return view('admin.home_featured_provider_edit', compact($data));\n } else {\n $id = $id;\n $providers = Provider::get();\n $provider = HomeFeaturedProvider::where('id', $id)->first();\n if(!$provider){\n Session::flash('flash_error', 'Record you are looking to edit is not found or deleted.');\n return redirect()->route('admin.home_featured_provider');\n } \n $data = array('id', 'providers', 'provider', 'statusList');\n return view('admin.home_featured_provider_edit', compact($data));\n }\n }", "public function edit($id)\n {\n\n $productProvider = ProductProvider::find($id);\n $products = Product::all()->pluck('name','id');\n $providers = Provider::all()->pluck('name','id');\n return view('productProviders/edit',['productProvider'=> $productProvider,\n 'products'=>$products, 'providers'=>$providers]);\n }", "public function ShowPaymentForm($provider)\n\t{\n\t\t$GLOBALS['PaymentFormContent'] = $provider->ShowPaymentForm();\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate('checkout_payment');\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n\t\texit;\n\t}", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n {\n $provider = Provider::find($id);\n if (empty($provider)) {\n return redirect()->route('admin.provider.index');\n }\n //dd($provider);\n\n $states = CountryState::getStates('US');\n\n $data['provider'] = $provider;\n $data['states'] = $states;\n return view('admin.provider.edit')->with($data);\n }", "public function edit($id)\n {\n $provedores = Providers::findOrFail($id);\n return view('provedores.edit', compact('provedores'));\n }", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function show(Provider $provider)\n {\n //\n return view('admin.provider.show', compact('provider'));\n }", "public function showEdit()\n {\n\n }", "public function edit()\n {\n return view('panel.order-management.payment.form-edit');\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function getEditForm();", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n\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}", "public function editView() {\n $this->template()->addTplFile('edit.phtml');\n $this->setTinyMCE($this->formEdit->text, 'advanced');\n $this->setTinyMCE($this->formEdit->textPanel, 'advanced', array('height' => 300));\n if(isset($this->formEdit->textFooter)){\n $this->setTinyMCE($this->formEdit->textFooter, 'advanced', array('height' => 300));\n }\n Template_Module::setEdit(true);\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit()\n {\n $this->set('groupSelector', $this->app->make(GroupSelector::class));\n $this->set('form', $this->app->make('helper/form'));\n if ($this->config->has('auth.external_concrete')) {\n $this->set('data', (array)$this->config->get('auth.external_concrete', []));\n } else {\n // legacy support\n $this->set('data', (array)$this->config->get('auth.external_concrete5', []));\n }\n $this->set('redirectUri', $this->urlResolver->resolve(['/ccm/system/authentication/oauth2/external_concrete/callback']));\n\n $list = $this->app->make(GroupList::class);\n $this->set('groups', $list->getResults());\n }", "public function edit()\n {\n return view('policy.edit')->withPage(Policy::first());\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(providers_availability $providers_availability)\n {\n //\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function edit()\n {\n return view('admincp::edit');\n }", "function showApprentice() {\n\t\t\t\t\t$apprentice = Apprentice::find_by_name(params(0));\n\t\t\t\t\t\n\t\t\t\t\t$editForm = new h2o('views/editApprentice.html');\n\t\t\t\t\techo $editForm->render(compact('apprentice'));\n\t\t\t\t}", "public function edit()\n {\n return view('stores::edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\r\n { \r\n $stock = Stock::with('provider')->find($id);\r\n\r\n $form=[\r\n \"value\" => \"update\",\r\n \"name\" => \"Update Stock\",\r\n \"submit\" => \"Update\"\r\n ];\r\n\r\n return view('stock/form',compact('form','stock'));\r\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "public function edit_supplier_form()\n\t\t{\n\t\t\t$supplier_id = $this->request->get['supplier_id'];\n\t\t\t$url = '';\n\t\t\t$data['breadcrumbs'] = array();\n\n\t\t\t$data['breadcrumbs'][] = array(\n\t\t\t\t'text' => \"Home\",\n\t\t\t\t'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)\n\t\t\t);\n\n\t\t\t$data['breadcrumbs'][] = array(\n\t\t\t\t'text' => \"Suppliers\",\n\t\t\t\t'href' => $this->url->link('purchase/supplier', 'token=' . $this->session->data['token'] . $url, true)\n\t\t\t);\n\t\t\t$data['action'] = $this->url->link('purchase/supplier/update_supplier', 'token=' . $this->session->data['token'] . $url, true);\n\t\t\t$data['cancel'] = $this->url->link('purchase/supplier', 'token=' . $this->session->data['token'] . $url, true);\n\t\t\t$data['header'] = $this->load->controller('common/header');\n\t\t\t$data['column_left'] = $this->load->controller('common/column_left');\n\t\t\t$data['footer'] = $this->load->controller('common/footer');\n\t\t\t$this->load->model('purchase/supplier_group');\n\t\t\t$data['supplier_groups'] = $this->model_purchase_supplier_group->get_all_supplier_groups();\n\t\t\t$this->load->model('purchase/supplier');\n\t\t\t$data['supplier_info'] = $this->model_purchase_supplier->edit_supplier_form($supplier_id);\n\t\t\t$this->response->setOutput($this->load->view('purchase/supplier_edit_form.tpl',$data));\n\t\t}", "public function edit(Supplier $supplier)\n {\n //\n }", "public function edit(Supplier $supplier)\n {\n //\n }", "public function edit(Spform $spform)\n {\n //\n }", "public function edit($model, $form);", "public function display_edit_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=update' method='post'>\";\n echo \"<input type='hidden' name='id' value=\".$this->id.\" />\";\n echo \"Name: <input type='text' name='name' value=\".$this->name.\" /><br />\";\n echo \"Description: <textarea name='description'>\".$this->description.\"</textarea><br />\";\n echo \"<input type='submit' value='Update' />\";\n echo \"</form>\";\n }", "public function showUpdateInfoForm ()\n {\n return view($this->updateInfoView);\n }", "private function createDeleteForm(Provider $provider)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_provider_delete', array('id' => $provider->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function edit(form $form)\n {\n //\n }", "public function edit(Proveedor $proveedor)\n {\n //\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit($id)\n {\n\t\t\n $supplier = Supplier::find($id);\n\t\treturn view('backend.suppliers.create', compact('supplier'));\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function getEdit(){\n return view(\"admin.product.edit\" );\n }", "public function showedit(){\r\n return view('profile.editProfile');\r\n }", "public function edit($id)\n\t{\n\t\t$produkter = Produkter::find($id);\n\t \n\t \n\t\treturn view('admin.produkter.edit', compact('produkter'));\n\t}", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "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 }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit(Corporate $corporate)\n {\n //\n }", "private function createDeleteForm(Provider $provider)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('provider_delete', array('id' => $provider->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function edit($id) {\n parent::edit($id);\n \n // If we're rendering a form, we won't have the Authenticator ID or CO Person ID\n // until after parent::edit() runs, so we have to do similar work to beforeFilter(), here.\n \n $modelpl = strtolower($this->name);\n $authmodel = $this->modelClass . 'Authenticator';\n \n $this->setViewVars(!empty($this->viewVars[$modelpl][0][$authmodel]['authenticator_id'])\n ? $this->viewVars[$modelpl][0][$authmodel]['authenticator_id']\n : null,\n !empty($this->viewVars[$modelpl][0][$this->modelClass]['co_person_id'])\n ? $this->viewVars[$modelpl][0][$this->modelClass]['co_person_id']\n : null);\n }", "public function edit($id)\n {\n $partner = $this->partnerRespository->find($id);\n return view('admin.partners.edit', compact('partner'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $provinsi = $this->provinsi->get($id);\n return view('admin.provinsi.edit', compact('provinsi'));\n // $provinsi = Provinsi::findOrFail($id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $park = Parqueadero::find($id);\n $tipo_park = Tipo_park::all();\n $ubicacion = Ubicacion::all()->where('tipo', '2');\n return view('superadmin.parqueadero.formEditParkSuperAdmin', compact('park', 'tipo_park', 'ubicacion'));\n \n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit(Normativa $normativa)\n {\n //\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit(){\r\n\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 // get resources for display \n $website = Website::where('name','flooflix')->first();\n if (!is_null($website) && !empty($website)) {\n $page = Page::where('website_id', $website->id)->where('name','modifier_carte')->first();\n if(!is_null($page) && !empty($page)){\n $datas = $page->getResourcesToDisplayPage($page);\n } \n }else{\n return view('errors.404');\n }\n return view('Flooflix.forms.editBankCard', compact('datas'));\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 postEdit(){\n return view(\"admin.product.edit\" );\n }", "public function edit($id)\n {\n //\n $partner = Partner::find($id);\n return view('admin.partners.edit', compact('partner'));\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit(Supply $supply)\n {\n //\n }", "public function edit(Marketer $marketer)\n {\n //\n }", "public function edit(Card $card)\n {\n //\n }", "public function edit(Card $card)\n {\n //\n }", "public function edit(Card $card)\n {\n //\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "function showEdit() {\r\n\tglobal $options_url;\r\n\tglobal $restrictions;\r\n\r\n\tif ( isset($_REQUEST['id']) ) {\r\n\t\t$re_id = $_REQUEST['id'];\r\n\t} else {\r\n\t\t$re_id = \"\";\r\n\t}\r\n\t$rePlaceManager = new RePlace();\r\n\t$re_place = $rePlaceManager->getRePlace($re_id);\r\n?>\r\n<div class=\"wrap\"> \r\n\t<h2><?php _e('re.place -- edit entry'); ?></h2> \r\n\t\r\n\t<form name=\"re_edit\" method=\"post\" action=\"<?php echo $options_url; ?>\">\r\n\t<input type=\"hidden\" name=\"action\" value=\"edit2\" />\r\n\t<input type=\"hidden\" name=\"re_id\" value=\"<?php echo $re_place->re_id;?>\" />\r\n\t<table cellspacing=\"3\">\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">ID</td>\r\n\t\t\t<td><?php echo $re_place->re_id;?></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Description</td>\r\n\t\t\t<td>\r\n\t\t\t\t<input name=\"re_description\" type=\"text\" size=\"50\" value=\"<?php echo htmlspecialchars($re_place->re_description);?>\" /><br />\r\n\t\t\t\tAny text that helps you identify this entry\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Search for</td>\r\n\t\t\t<td>\r\n\t\t\t\t<textarea name=\"re_search\" rows=\"6\" cols=\"80\"><?php echo htmlspecialchars($re_place->re_search);?></textarea><br />\r\n\t\t\t\tWhat is re.place should search for.\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Replace with</td>\r\n\t\t\t<td>\r\n\t\t\t\t<textarea name=\"re_place\" rows=\"6\" cols=\"80\"><?php echo htmlspecialchars($re_place->re_place);?></textarea><br />\r\n\t\t\t\tWhat re.place should place instead.\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Restriction</td>\r\n\t\t\t<td>\r\n\t\t\t\tReplace only if...\r\n\t\t\t\t<select name=\"restriction\">\r\n\t\t\t\t\t<?php foreach ( $restrictions as $r => $restr ) {\r\n\t\t\t\t\t\t$sel = $re_place->restriction ?\r\n\t\t\t\t\t\t\t( $r == $re_place->restriction ? ' selected' : '' ) :\r\n\t\t\t\t\t\t\t( $r == 'none' ? ' selected' : '' );\r\n\t\t\t\t\t\techo '<option' . $sel . ' value=\"' . $r . '\">' . __($restr) . '</option>' .\"\\n\";\r\n\t\t\t\t\t} ?>\r\n\t\t\t\t</select>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Otherwise replace with:</td>\r\n\t\t\t<td>\r\n\t\t\t\t<textarea name=\"restr_otherwise\" rows=\"6\" cols=\"80\"><?php echo htmlspecialchars($re_place->restr_otherwise);?></textarea><br />\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Order</td>\r\n\t\t\t<td>\r\n\t\t\t\t<input name=\"re_order\" type=\"text\" size=\"5\" value=\"<?php echo htmlspecialchars($re_place->re_order);?>\"><br />\r\n\t\t\t\tOrder of this entry\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Active</td>\r\n\t\t\t<td>\r\n\t\t\t\t<input name=\"re_active\" type=\"checkbox\" value=\"Y\" <?php echo ($re_place->re_active == \"Y\" ? \"checked\" : \"\");?> />\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td>&nbsp;</td>\r\n\t\t\t<td><input type=\"submit\" name=\"submit\" value=\"<?php _e('Save'); ?>\" /></td>\r\n\t\t</tr>\r\n\t</table>\t\t\r\n\t\r\n\t</form>\r\n</div>\r\n<?php\r\n}", "function pa_edit() {\n\t\t\t\t$edit_pid = (int)UTIL::get_post('edit_pid');\n\t\t\t\t\n\t\t\t\t//-- haben wir keine edit-id, gibts eine seiten-tabelle zur auswahl\n\t\t\t\tif (!$edit_pid) {\n\t\t\t\t\techo 'error: no pid';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$form = MC::create('form');\n\t\t\t\t$form->init('page', 'mod_page');\n\t\t\t\t$form->add_hidden('edit_pid', $edit_pid);\n\t\t\t\t\n\t\t\t\t// hatten wir fehler\n\t\t\t\tif ($this->get_var('error')) {\n\t\t\t\t\t$form->set_values($this->get_var('data'));\n\t\t\t\t\t$form->set_error_fields($this->get_var('error'));\n\t\t\t\t}\t\n\t\t\t\telse {\n\t\t\t\t\t// frisch aus db lesen\n\t\t\t\t\t$sql = 'SELECT * FROM '.$this->mod_tbl.' WHERE id='.$edit_pid;\n\t\t\t\t\t$res = $this->DB->query($sql);\n\t\t\t\t\t$data = $res->r();\n\t\t\t\t\t$form->set_values($data);\n\t\t\t\t}\n\n\t\t\t\t$this->set_var('path', $this->_get_path_print($edit_pid));\n\t\t\t\t$this->set_var('form', $form);\n\t\t\t\t\n\t\t\t\t$this->OPC->generate_view($this->tpl_dir.'pa_edit.php');\n\n\t\t\t}", "public function edit()\n {\n return view('admin.profile.edit');\n }", "public function edit(seller $seller)\n {\n //\n }", "public function edit($id) {\n\t\t$supplier = Suppliers::find($id);\n\n\t\treturn View::make('suppliers.edit')->with('supplier', $supplier);\n\t}", "public function edit( )\r\n {\r\n //\r\n }", "public function get_edit(){\n\t\tif (Auth::check()){\n\t\t\t$customer_id = Auth::user()->customer_id;\n\n\t\t\t$customer_types = array('' => 'Select One','Buyer'=>'Buyer','Vendor'=>'Vendor');\n\n\t\t\t$countries = array('' => 'Select One') + \n\t\t\t\tCountry::lists('country_name', 'country_id');\n\n\t\t\t$titles = array('' => 'Select One','Mr.'=>'Mr.','Mrs.'=>'Mrs.','Ms.'=>'Ms.','Miss'=>'Miss','Master'=>'Master',\n\t\t\t\t'Rev.'=>'Rev. (Reverend)','Fr.'=>'Fr. (Father)','Dr.'=>'Dr. (Doctor)','Atty.'=>'Atty. (Attorney)',\n\t\t\t\t'Prof.'=>'Prof. (Professor)','Hon.'=>'Hon. (Honorable)','Pres.'=>'Pres. (President)',\n\t\t\t\t'Gov.'=>'Gov. (Governor)','Coach'=>'Coach','Ofc.'=>'Ofc. (Officer)');\n\n\t\t\t$this->layout->content = View::make('frontend.customers.edit')\n\t\t\t\t->with('title', 'Edit Customer')\n\t\t\t\t->with('customer', Customer::find($customer_id))\n\t\t\t\t->with('customer_type',$customer_types)\n\t\t\t\t->with('customer_countryId', $countries)\n\t\t\t\t->with('customer_title', $titles);\n\t\t}\n\t}", "public function edit(TemplateProvider $template, $post)\n {\n return $this->responseFactory->view('admin.posts.edit', [\n 'post' => $this->findBySlug($post, ['categories'], true),\n 'status' => session('save.status', false),\n 'templates' => $template->getTemplates()\n ]);\n }", "public function editAction()\n {\n $tiles = [];\n // Reuse the parameters from $_REQUEST\n // If we are going to render a full page for edit form, we shall also render the _form_controls\n $tiles[] = Region::create($this->getEditRegionPath(), array_merge($_REQUEST, [\n '_form_controls' => true,\n ]));\n return $this->render($this->findTemplatePath('page.html') , array( 'tiles' => $tiles ));\n }" ]
[ "0.8023554", "0.7981636", "0.76730615", "0.7593594", "0.741379", "0.735314", "0.72655034", "0.7111056", "0.7068543", "0.7062306", "0.7012354", "0.69044226", "0.674054", "0.6692317", "0.6692317", "0.66040975", "0.65940654", "0.65741324", "0.6571804", "0.6568535", "0.6559408", "0.6528478", "0.6443808", "0.6383137", "0.6378405", "0.6372777", "0.63585", "0.6333724", "0.6273726", "0.6233483", "0.62299", "0.619318", "0.6192453", "0.6167576", "0.61451685", "0.61383504", "0.61341363", "0.6128915", "0.6128915", "0.6098074", "0.60957587", "0.60942227", "0.6093247", "0.6075602", "0.60679257", "0.60419255", "0.6027097", "0.6020946", "0.60206085", "0.6012037", "0.6012037", "0.60085225", "0.59939504", "0.5991219", "0.59904855", "0.59832746", "0.598191", "0.5964418", "0.5957806", "0.59543675", "0.5952316", "0.59476554", "0.5935219", "0.5934009", "0.5932605", "0.5920514", "0.59190357", "0.5915671", "0.59113824", "0.59113157", "0.5909767", "0.59091306", "0.5906285", "0.5901314", "0.5896354", "0.5889791", "0.5886865", "0.58841306", "0.58841306", "0.5878577", "0.587648", "0.5873244", "0.5871595", "0.5861865", "0.58547205", "0.5852673", "0.58523077", "0.58521837", "0.58521837", "0.58521837", "0.58503246", "0.58501166", "0.5846842", "0.5843172", "0.58412546", "0.58411896", "0.5840854", "0.58399993", "0.5839226", "0.5835198" ]
0.76480323
3
Display the specified resource.
public function show(Provider $provider) { $transactions = $provider->transactions()->latest()->limit(25)->get(); $receipts = $provider->receipts()->latest()->limit(25)->get(); foreach($receipts as $key=>$receipt) { foreach($receipt->products as $receivedproduct) { $receipts[$key]['tot'] += ($receivedproduct->stock*$receivedproduct->price); } } return view('providers.show', compact('provider', 'transactions', 'receipts')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Update the specified Provider in storage
public function update(ProviderRequest $request, Provider $provider) { $provider->update($request->all()); return redirect() ->route('providers.index') ->withStatus('Provider updated successfully.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updated(Provider $provider)\n {\n //\n }", "public function update(Request $request, Provider $provider)\n {\n //\n }", "public function update(ProviderRequest $request, $id)\n {\n $provider = $this->repository->update($request,$id);\n return redirect()->route('providers.index');\n }", "public function update(ProviderRequest $request, $id)\n {\n Provider::find($id)->update($request->validated());\n return;\n }", "public function update(UpdateProviderRequest $request, Provider $provider)\n {\n if ($provider->id == null) {\n $provider = Auth::user()->provider;\n }\n\n $provider->update($request->all());\n $provider->user->update(array_merge($request->except('type'), ['password' => Hash::make($request->password)]));\n\n return $this->respondWithItem(new ProviderLargeResource($provider), 'provider Updated');\n }", "public function update(ProviderCreateRequest $request, Provider $provider)\n {\n $provider->update($request->validated());\n return redirect()->route('provider.index',$provider)\n ->with('status','El proyecto fue actualizado con éxito');\n }", "public function update($id, UpdateProviderRequest $request)\n\t{\n\t\t$provider = Provider::findOrFail($id);\n\n \n\n\t\t$provider->update($request->all());\n\n\t\treturn redirect()->route('admin.provider.index');\n\t}", "public function update(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "public function testUpdateStorage() {\n // Setting values in both key stores, then installing the module and\n // testing if these key values are cleared.\n $keyvalue_update = $this->container->get('keyvalue.expirable')->get('update');\n $keyvalue_update->set('key', 'some value');\n $keyvalue_update_available_release = $this->container->get('keyvalue.expirable')->get('update_available_release');\n $keyvalue_update_available_release->set('key', 'some value');\n $this->container->get('module_installer')->install(['help']);\n $this->assertNull($keyvalue_update->get('key'));\n $this->assertNull($keyvalue_update_available_release->get('key'));\n\n // Setting new values in both key stores, then uninstalling the module and\n // testing if these new key values are cleared.\n $keyvalue_update->set('another_key', 'some value');\n $keyvalue_update_available_release->set('another_key', 'some value');\n $this->container->get('module_installer')->uninstall(['help']);\n $this->assertNull($keyvalue_update->get('another_key'));\n $this->assertNull($keyvalue_update_available_release->get('another_key'));\n }", "public function update(UpdateRequest $request, Provider $provider)\n {\n //\n $provider->update($request->all());\n return redirect()->route('providers.index')->with(['message' => 'El registro se actualizó con éxito.']);\n }", "public function update(StoreUpdateProviderFormRequest $request, $id)\n {\n $this->repository->update($id, $request->all());\n\n return redirect()\n ->route('providers.index')\n ->withSuccess('Cadastro atualizado com sucesso');\n }", "public function update()\n {\n $this->storage->set(self::STORAGE_KEY, md5(time()));\n }", "public function home_featured_provider_update(Request $request) {\n Session::put('menu_item_parent', 'home');\n Session::put('menu_item_child', 'home_featured_provider');\n Session::put('menu_item_child_child', '');\n \n if($request->input('id')) {\n $id = $request->input('id');\n $data = $request->all();\n unset($data['id']);\n HomeFeaturedProvider::find($id)->update($data);\n Session::flash('flash_success', 'Provider has been updated successfully');\n return \"success\";\n } else {\n $data = $request->all(); \n unset($data['id']);\n HomeFeaturedProvider::create($data); \n Session::flash('flash_success', 'New Provider has been added successfully'); \n return \"success\";\n }\n }", "public function updateProvider()\n {\n if ($this->cachedProvider) {\n $this->matches = $this->cachedMatches;\n $this->provider = $this->cachedProvider;\n $this->parseProtocol($this->matches);\n $this->parseTimestamp($this->provider);\n $this->parseProvider($this->provider['info'], $this->matches);\n $this->parseProvider($this->provider['render'], $this->matches);\n\n if (isset($this->attributes['width']) && ! isset($this->attributes['height'])) {\n $this->attributes['height'] = $this->attributes['width']/$this->provider['render']['sizeRatio'];\n }\n\n if (! is_null($this->attributes)) {\n if (isset($this->provider['render']['video'])) {\n $this->provider['render']['video'] = array_replace($this->provider['render']['video'], $this->attributes);\n }\n if (isset($this->provider['render']['iframe'])) {\n $this->provider['render']['iframe'] = array_replace($this->provider['render']['iframe'], $this->attributes);\n }\n if (isset($this->provider['render']['object']) && isset($this->provider['render']['object']['attributes'])) {\n $this->provider['render']['object']['attributes'] = array_replace($this->provider['render']['object']['attributes'], $this->attributes);\n }\n if (isset($this->provider['render']['object']) && isset($this->provider['render']['object']['embed'])) {\n $this->provider['render']['object']['embed'] = array_replace($this->provider['render']['object']['embed'], $this->attributes);\n }\n }\n\n if (! is_null($this->params)) {\n if (isset($this->provider['render']['object']) && isset($this->provider['render']['object']['params'])) {\n $this->provider['render']['object']['params'] = array_replace($this->provider['render']['object']['params'], $this->params);\n }\n }\n }\n }", "public function saveProvider($provider) {\n $provider->save();\n\n $providerAccount = $this->newProviderAccount($provider->id);\n $providerAccount->save();\n\n $provider->pch_provider_account_id = $providerAccount->id;\n $provider->save();\n }", "public function update(Request $request, providers_availability $providers_availability)\n {\n //\n }", "public function update(Request $request, $id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // validate fields\n $validator = Validator::make($request->all(), [\n 'name' => 'required|min:3|unique:providers,name,'.$provider->id,\n ]);\n\n // check if validation success\n if ($validator->fails()) {\n\n // Flash Message error\n notify('Provider can\\'t be updated!', 'error');\n\n // back to form with inputs\n return back()->withErrors($validator)->withInput();\n }\n\n // stock published field\n $request->request->add(['published' => $request->input('published', '0')]);\n\n // stock all fields in $input\n $input = $request->all();\n\n // fill all input to save for provider\n $provider->fill($input)->save();\n\n // Flash Message success\n notify('Provider updated!', 'success');\n\n //redirect with success message\n return redirect()->route('provider.index');\n }", "public static function provider($provider)\n {\n static::$data = $provider;\n }", "public function update(Request $request, $id)\n {\n\n if (Setting::get('demo_mode', 0) == 1) {\n return back()->with('flash_error', 'Disabled for demo purposes! Please contact us at [email protected]');\n }\n\n $this->validate($request, [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'mobile' => '',\n 'picture' => 'mimes:jpeg,jpg,bmp,png|max:5242880',\n ]);\n\n try {\n\n $provider = Provider::findOrFail($id);\n\n if ($request->hasFile('picture')) {\n $provider->avatar = $request->picture->store('provider/profile');\n }\n $provider->first_name = $request->first_name;\n $provider->last_name = $request->last_name;\n $provider->mobile = $request->mobile;\n $provider->save();\n\n return redirect()->route('admin.provider.index')->with('flash_success', 'Provider Updated Successfully');\n } catch (ModelNotFoundException $e) {\n return back()->with('flash_errors', 'Provider Not Found');\n }\n }", "public function store(StoreProviderRequest $request)\n {\n\n $user = Auth::user();\n\n if ($user->provider != null) return $this->errorForbidden();\n // dd($request->all());\n\n $user->update(['type' => 'provider']);\n\n $provider = Provider::create(array_merge($request->all(),['user_id' => $user->id]) );\n $provider->categories()->attach($request->categories_ids);\n $provider->countries()->attach($request->countries_ids);\n\n if($request->logo){\n $logo = upload($request->logo, 'providers');\n $provider->update(['logo' => $logo]);\n }\n if($request->video){\n $video = upload($request->video, 'providers');\n $provider->update(['video' => $video]);\n }\n\n return $this->respondWithItem(new ProviderLargeResource($provider), 'provider created');\n\n }", "public function update($id)\n\t{\n\t\t$provider = Provider::findOrFail($id);\n\t\t\n\t\t$provider->name=Input::get('name');\n\t\t$provider->address=Input::get('address');\n\t\t$provider->email=Input::get('email');\n\t\t$provider->phone=Input::get('phone');\n\t\t$provider->service=Input::get('service');\n\t\t$provider->observation=Input::get('observation');\n\t\t$provider->save();\t\t\n\t\treturn redirect() -> route('provider.index');\n\t}", "public function testUpdateStore()\n {\n\n }", "public function store(StoreUpdateProviderFormRequest $request)\n {\n $provider = $this->repository->store($request->all());\n\n return redirect()\n ->route('providers.index')\n ->withSuccess('Cadastro realizado com sucesso');\n }", "public function setProvider($provider);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "public function update()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->getGbaseItemEntry( $this->getItem()->getGbaseItemId() );\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $entry = $service->updateGbaseItem($this->getEntry());\n\n }", "public function update(ProviderUpdateRequest $request, $id)\n {\n try {\n\n $this->validator->with($request->all())->passesOrFail(ValidatorInterface::RULE_UPDATE);\n\n $provider = $this->repository->update($request->all(), $id);\n\n $response = [\n 'message' => 'Provider updated.',\n 'data' => $provider->toArray(),\n ];\n\n if ($request->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect()->back()->with('message', $response['message']);\n } catch (ValidatorException $e) {\n\n if ($request->wantsJson()) {\n\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }", "public function update(): void\n {\n $this->updateQuality();\n $this->updateSellIn();\n $this->expiresAfterSale();\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'product_id' => 'required|exists:products,id',\n 'provider_id' => 'required|exists:providers,id',\n\n ]);\n $productProvider = ProductProvider::find($id);\n $productProvider->fill($request->all());\n $productProvider->save();\n flash('Relación producto proveedor modificada correctamente');\n return redirect()->route('productProviders.index');\n }", "public function update(UpdateProvidersRequest $request, $id)\n {\n $req = $request->only('provider_name', 'provider_image', 'provider_url', 'allow_orders', 'provider_includes');\n\n $provider = Provider::find($id);\n if (!$provider) {\n $msg = 'Unable to update provider with id ' . $id;\n Log::error($msg);\n return redirect()->route('admin.providers.index')\n ->withFlashWarning($msg);\n }\n\n $provider->update($req);\n\n return redirect()->route('admin.providers.index')\n ->withFlashSuccess(\"Provider '\" . $req['provider_name'] . \"' updated.\");\n }", "public function edit(Provider $provider)\n {\n //\n }", "public function update_storage_site() {\n\t\t$local_data = array(\n\t\t\t'timestamp' => time(),\n\t\t\t'data' => $this->data,\n\t\t);\n\t\treturn update_option( self::STORAGE_KEY, $local_data );\n\t}", "public function update(Request $request, int $id)\n {\n /** @var Provider $provider */\n $provider = Provider::findOrFail($id);\n $provider->update($request->only(self::FIELDS));\n return new ProviderResource($provider);\n }", "private function setProvider(object $provider): void\n {\n $this->provider = \\get_class($provider);\n }", "protected function persisteProviderData(Provider $provider)\n {\n $driver = $this->getDriver();\n\n $params = $this->processParams($provider);\n\n if ($driver->rowExistsInDatabase('provider', $provider->getId())) {\n /** actualizar */\n $driver->update('provider', $params['provider'], ['id' => $provider->getId()]);\n } else {\n /** insertar */\n $driver->insert('provider', $params['provider']);\n }\n $this->persistentity()->persistData($params['provider_address'], 'id', 'provider_address', 'id');\n return true;\n }", "public function UpdateStorageLocations()\r\n\t{\r\n\t\tself::$_tables[$this->_dbCatalog] = $this->GetStorageLocations();\r\n\t}", "public function setProviderName(?string $value): void {\n $this->getBackingStore()->set('providerName', $value);\n }", "public function updateStorage(StorageConfig $updatedStorage) {\n\t\t$updatedStorage->setApplicableUsers([$this->getUser()->getUID()]);\n\t\treturn parent::updateStorage($updatedStorage);\n\t}", "public function setProvider(ProviderInterface $provider);", "public function update(Supply $supply, SupplyStoreOrUpdateRequest $request)\n {\n $this->supplies->update($supply, $request->all());\n return redirect()->route(env('APP_BACKEND_PREFIX').'.supplies.index')->withFlashSuccess('更新成功');\n }", "public function offsetSet($name, $provider) {\n if (is_null($name)) {\n $this->providers[] = $provider;\n } else {\n $this->set($name, $provider);\n }\n }", "private function update(){\n\t\t$q = Queries::update($this->authkey);\n\t\t$this->internalQuery($q);\n\t}", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "protected function update() {}", "public function providerUpdate()\n {\n $updateList = $this->getMethodsName('update');\n $provider = [];\n\n foreach ($updateList as $name => $method) {\n $provider[$name] = [\n $name\n ];\n }\n\n return $provider;\n }", "public function setProvider($provider = null);", "public function deleted(Provider $provider)\n {\n $provider->update([\n 'inn' => time() . '::' . $provider->inn\n ]);\n }", "public function update(Request $request)\n {\n \n\n $logoPath = $request->file('logo')->store('logos');\n $bannerPath = $request->file('banner')->store('banners');\n\n\n $store = Store::findOrFail($request->store_id);\n\n $store_name = $store->name;\n $slug = str_replace(' ', '-', strtolower($store_name));\n $store->slug = $slug;\n $store->phone_number = $request->phone_number;\n $store->owner_name = $request->owner_name;\n $store->description = $request->description;\n $store->address = $request->address;\n $store->logo = $logoPath;\n $store->banner = $bannerPath;\n\n\n $store->save();\n\n return $store;\n\n\n\n // $path = $request->file('main_image')->store($store_name);\n\n\n }", "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function setProviderName($name);", "public function setProvider(string $provider)\n {\n $this->provider = $provider;\n }", "public function update_data(Request $request){\n try {\n \n $update_type = $request->upload_type;\n $update_file = $request->upload_file;\n\n if(empty($update_type)){\n throw new Exception(\"Invalid request\", 400);\n }\n if(empty($update_file)){\n throw new Exception(\"File is required\", 400);\n }\n\n $filename = '';\n switch($update_type){\n case \"USER\":\n if(!check_access(['A_UPDATE_USER'], true)){\n throw new Exception(\"Invalid request\", 400);\n }\n break;\n case \"STORE\":\n if(!check_access(['A_UPDATE_STORE'], true)){\n throw new Exception(\"Invalid request\", 400);\n }\n break;\n case \"SUPPLIER\":\n if(!check_access(['A_UPDATE_SUPPLIER'], true)){\n throw new Exception(\"Invalid request\", 400);\n }\n break;\n case \"CATEGORY\":\n if(!check_access(['A_UPDATE_CATEGORY'], true)){\n throw new Exception(\"Invalid request\", 400);\n }\n break;\n case \"PRODUCT\":\n if(!check_access(['A_UPDATE_PRODUCT'], true)){\n throw new Exception(\"Invalid request\", 400);\n }\n break;\n case \"INGREDIENT\":\n if(!check_access(['A_UPDATE_INGREDIENT'], true)){\n throw new Exception(\"Invalid request\", 400);\n }\n break;\n case \"ADDON_PRODUCT\":\n if(!check_access(['A_UPDATE_ADDON_PRODUCT'], true)){\n throw new Exception(\"Invalid request\", 400);\n }\n break;\n }\n\n $custom_filename = strtolower($update_type).'_'.date('Y_m_d_H_i_s').'_'.uniqid();\n\n $extension = $update_file->getClientOriginalExtension();\n $custom_file = $custom_filename.\".\".$extension;\n\n Storage::disk('updates')->delete(\n [\n $custom_file\n ]\n );\n\n $path = Storage::disk('updates')->putFileAs('/', $update_file, $custom_file);\n\n $update_response = $this->forward_update_request($update_type, $custom_file);\n\n if($update_response['update_status'] == false){\n Storage::disk('updates')->delete(\n [\n $custom_file\n ]\n );\n }\n \n return response()->json($this->generate_response(\n array(\n \"message\" => \"update file read successfully\",\n \"data\" => $update_response,\n ), 'SUCCESS'\n ));\n\n }catch(Exception $e){\n return response()->json($this->generate_response(\n array(\n \"message\" => $e->getMessage(),\n \"status_code\" => $e->getCode()\n )\n ));\n }\n }", "public function update(Request $request, Supply $supply)\n {\n //\n }", "public function update(Request $request, $supplier)\n {\n $supplier = Crypt::decrypt($supplier);\n $a = Supplier::findorFail($supplier);\n $a->name = $request->name;\n $a->save();\n session()->flash('alert-warning', 'Supplier Updated');\n return redirect('/supplier');\n }", "public function updateIdentityProvider($identityProviderId, $request)\n {\n return $this->start()->uri(\"/api/identity-provider\")\n ->urlSegment($identityProviderId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->put()\n ->go();\n }", "public function update_service_provider(Request $request) {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|string|max:191',\n ]);\n\n /* fails() will return tru only if any of details which validator checks is no valid */\n if ($validator->fails()) {\n $errors = $validator->getMessageBag()->toArray();\n return view(\"backend.serviceprovider.edit_service_provider\", ['errors' => $errors]);\n } else {\n $serviceProviderUpdate = ServiceProviderRepository::update_service_provider($request->all());\n if ($serviceProviderUpdate) {\n return redirect('/admin/serviceproviders');\n } else {\n return view(\"backend.serviceprovider.edit_service_provider\", ['class' => \"error\", 'message' => \"Error occured while saving categories, please try again.\"]);\n }\n }\n }", "public function setProviderToOffline($provider = null);", "public function store(ProviderRequest $request)\n {\n Provider::create($request->validated());\n return;\n }", "public function setCertificateKeyStorageProvider(?KeyStorageProviderOption $value): void {\n $this->getBackingStore()->set('certificateKeyStorageProvider', $value);\n }", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }", "public function update(StoreSupplierRequest $request, Supplier $supplier)\n {\n //Input received from the request\n $input = $request->except(['_token', 'ins']);\n //Update the model using repository update method\n if (!empty($input['picture'])) {\n $request->validate([\n 'picture' => 'mimes:jpeg,png',\n ]);\n }\n $this->repository->update($supplier, $input);\n //return with successfull message\n return new RedirectResponse(route('biller.suppliers.index'), ['flash_success' => trans('alerts.backend.suppliers.updated')]);\n }", "public function setProvider($name) {\n $name = Database::secureInput($name);\n\n if (!is_string($name) || strlen($name) < 2 || strlen($name) > 100) {\n throw new InvalidArgumentException(\"\\\"provider\\\" is no string or its length is invalid\");\n }\n\n $this->provider = $name;\n }", "public function update($data) {}", "public function update($data) {}", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function testUpdateSupplierGroup()\n {\n }", "public function setProviderToOnline($provider = null);", "public function update(Request $request, PchProviderAccountMovement $pchProviderAccountMovement)\n {\n //\n }", "public function update(Request $request, Supplier $supplier)\n {\n //\n }", "public function update(Request $request, Supplier $supplier)\n {\n //\n }", "public function updateCache();", "public function __set($name, $provider) {\n\n $this->set($name, $provider);\n }", "public function pushHttpProvider(DataProviderContract $provider): void;", "public function setSelectedProvider($selected) {\n $providers = $this->getProviders();\n if (!is_array($providers)) {\n return;\n }\n foreach ($providers as $provider) {\n if ($selected === $provider->getIdentifier()) {\n update_option($this->selectedProviderOptName, $selected);\n return;\n }\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function provider( $provider ) {\n\n\t\tif ( is_string( $provider ) ) {\n\t\t\t$provider = $this->resolveProvider( $provider );\n\t\t}\n\n\t\t$this->providers[] = $provider;\n\t}", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function setStorageData(string $storage_path): Uploadable;", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update( Request $request, ProductType $productType )\n {\n \n $rules = array(\n 'producer' => 'required|numeric',\n 'name' => 'required|max:200',\n 'available' => 'required|numeric|between:0,1',\n );\n \n $error = Validator::make($request->all(), $rules);\n\n if($error->fails())\n {\n return response()->json(['errors' => $error->errors()->all()]);\n }\n\n \n\n // CHECK PRODUCER\n $producer = Producer::findOrFail($request->producer);\n \n if(!$request->hasFile('image')) {\n \n // IMAGE NOT CHANGED\n \n $data = array(\n 'name' => $request->name,\n 'image_ref' => $productType->image_ref,\n 'available' => $request->available,\n 'producer_id' => $producer->id\n );\n\n \n\n } else {\n \n // IMAGE CHANGED\n \n // UPLOAD IMAGE\n $image = $request->file('image');\n $new_name = rand() . '.' . $image->getClientOriginalExtension(); // Name of new Image\n $destination_path = \"/images/product_types\";\n\n\n \n $resize_image = Image::make($image->getRealPath());\n\n \n $dimension = max($resize_image->width(), $resize_image->height());\n\n // we need to resize image, otherwise it will be cropped \n\n if ($resize_image->width() > $dimension) { \n $resize_image->resize($dimension, null, function ($constraint) {\n $constraint->aspectRatio();\n });\n }\n\n if ($resize_image->height() > $dimension) {\n $resize_image->resize(null, $dimension, function ($constraint) {\n $constraint->aspectRatio();\n }); \n }\n\n \n\n $resize_image->resizeCanvas($dimension, $dimension, 'center', false, '#ffffff');\n\n //return response()->json(['errors' => [$destination_path . '/' . $new_name]]);\n $resize_image->save(public_path($destination_path . '/' . $new_name));\n\n\n $old_image_path = $productType->image_ref;\n if(File::exists(public_path() . $old_image_path)) {\n File::delete(public_path() . $old_image_path);\n }\n\n $data = array(\n 'name' => $request->name,\n 'image_ref' => '/images/product_types/' . $new_name,\n 'available' => $request->available,\n 'producer_id' => $producer->id\n ); \n }\n \n \n\n if(isset($request->categories)) {\n $productType->categories()->sync($request->categories);\n //foreach($request->categories as $category_id) {\n //$productType Category::findOrFail($category_id);\n \n //}\n }\n\n $productType->update($data);\n \n return response()->json(['success' => 'Product Type Updated successfully.']);\n }", "public function updateProvider($providerId, $name, array $credentials)\n {\n return $this->requestWithErrorHandling('put', '/api/providers/'.$providerId, [\n 'name' => $name,\n 'meta' => $credentials,\n ]);\n }", "public function editAction(Request $request, Provider $provider)\n {\n $editForm = $this->createEditForm($provider);\n $deleteForm = $this->createDeleteForm($provider);\n $editForm->handleRequest($request);\n\n if ($editForm->isSubmitted()) {\n if($editForm->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($provider);\n $em->flush();\n $request->getSession()->getFlashBag()->add( 'success', 'provider.edit.flash' );\n return $this->redirect($this->generateUrl('admin_provider_index'));\n }\n }\n\n return $this->render('KoreAdminBundle:Provider:edit.html.twig', array(\n 'provider' => $provider,\n 'editForm' => $editForm->createView(),\n 'deleteForm' => $deleteForm->createView(),\n ));\n }", "public function restored(Provider $provider)\n {\n //\n }", "public function update(Request $request, Supplier $supplier)\n {\n // return $request->all();\n\n $request->validate([\n 'supplier_name'=>'required|min:3',\n 'supplier_brand'=>'required',\n 'phone'=>'required|min:11|max:15',\n 'email'=>'required',\n ],[\n\n ]);\n $url_slug = Str::of($request->supplier_name)->slug('-');\n $data = [\n 'supplier_name'=>$request->supplier_name,\n 'supplier_brand'=>$request->supplier_brand,\n 'address'=>$request->address,\n 'phone'=>$request->phone,\n 'email'=>$request->email,\n 'supplier_slug'=>$url_slug,\n 'updated_at'=>Carbon::now()->toDateTimeString(),\n ];\n\n //image file update\n\n if($request->hasFile('supplier_img')){\n $image = $request->file('supplier_img');\n $image_name = $url_slug.'('.$request->id.')'.time().'.'.$image->getClientOriginalExtension();\n Image::make($image)->resize(250,250)->save(base_path('public/uploads/suppliers/'.$image_name));\n $data['supplier_img'] = $image_name;\n }\n $update = Supplier::where('supplier_status',1)\n ->where('id',$request->id)->update($data);\n\n if($update){\n Session::flash('update_success','Suppliers Information Updated Successfully !');\n return redirect('/admin/suppliers/view/'.$url_slug);\n }\n else{\n Session::flash('update_error','Something were wrong');\n return redirect('/admin/suppliers/view/'.$url_slug);\n }\n\n }", "public function update() {\r\n\r\n\t}", "public function postSave(EntityStorageInterface $storage, $update = TRUE);", "public function handleProviderCallback()\n {\n $user = Socialite::driver('github')->user();\n session(['user_token' => $user->token]);\n // dd($user);\n User::where('id', Auth::user()->id)->update(\n [\n 'github_access_token' => $user->token,\n 'github_nickname' => $user->nickname,\n 'github_email' => $user->email,\n ]\n );\n\n if (Auth::user()->role == 3) {\n return redirect()->route('student');\n }\n return redirect()->route('modules.index');\n }", "public function update()\n {\n }", "public function updated(Seller $seller)\n {\n\n }", "public function update(string $key, $newData);", "public function handleProviderCallback($provider)\n {\n $user = Socialite::driver($provider)->user();\n\n $selectProvider = Provider::where('provider_id', $user->getId())->first();\n\n if(!$selectProvider)//new user\n {\n $registeredUser = User::where('email', $user->getEmail())->first();//the user is already registered with the same email\n\n if(!$registeredUser) {//totally new user\n $registeredUser = new User();\n $registeredUser->name = $user->getName();\n $registeredUser->email = $user->getEmail();\n $registeredUser->save();\n }\n\n $newProvider = new Provider();\n $newProvider->provider_id = $user->getId();\n $newProvider->provider_name = $provider;\n $newProvider->user_id = $registeredUser->id;\n $newProvider->save();\n }\n else //registered user\n {\n $registeredUser = User::find($selectProvider->user_id);\n }\n\n auth()->login($registeredUser);\n return Redirect('/');\n\n }", "public function onPostDispatch()\n {\n /** @var Shipperhq_Shipper_Model_Storage[] $storageList */\n $storageList = Mage::helper('shipperhq_shipper')->storageManager()->getStorageObjects();\n foreach ($storageList as $storage) {\n if ($storage->hasDataChanges() && $storage->getId()) {\n $this->_saveStorageInstance($storage);\n }\n }\n }", "public function update()\r\n {\r\n \r\n }", "public function updateElemAction(){\n\n if(Zend_Auth::getInstance()->hasIdentity()){\n $userInfo = Zend_Auth::getInstance()->getStorage()->read();\n\n $userName=$userInfo->username;\n\n $id = $userInfo->id;\n $elements = $this->getRequest()->getParams();\n\n foreach($elements as $key => $val){\n $newName = $val; \n $element = $key;\n } \n\n $this->user_model->updateElement($id,$newName,$element);\n\n\n //////////////Update Storage after update any element.///////////////////////////\n\n // Zend_Auth::getInstance()->getStorage()->write($element);\n\n\n // $db = Zend_Db_Table::getDefaultAdapter();\n \n\n // $adapter = new Zend_Auth_Adapter_DbTable(\n // $db,\n // 'users',\n // 'username',\n // 'password'\n // );\n\n // $adapter->setIdentity(Zend_Auth::getInstance()->getIdentity());\n \n // Zend_Auth::getInstance()->getStorage()->write($adapter->getResultRowObject(array('name' , 'password' , 'email', 'id','image')));\n\n $this->redirect('users/logout/username/'.$userName);\n\n }\n\n }", "public function update(Request $request)\n {\n $user = $request->user();\n \n $currentCompany = $user->currentCompany();\n\n $supplier = Supplier::findOrFail($request->supplier);\n $st1 ='';\n if ($request->hasFile('attachment')) {\n $limage = $request->attachment;\n $limage_new_name = time().$limage->getClientOriginalName();\n $st1= $limage->move('assets/images', $limage_new_name);\n }\n // dd($price);\n // Update the Expense\n $supplier->update([\n 'name' => $request->name,\n 'email' => $request->email,\n 'company' => $request->company,\n 'phone' =>$request->phone,\n 'company_id' => $currentCompany->id,\n 'display_name' => $request->display_name,\n 'website' => $request->website,\n 'address' => $request->address,\n 'state' => $request->state,\n 'city' => $request->city,\n 'country' => $request->country,\n 'pin_code' =>$request->pin_code,\n 'billing_rate' => $request->billing_rate,\n 'pan_number' => $request->pan_number,\n 'attachment' => $st1,\n 'tds_entity' => $request->tds_entity,\n 'tds_section' => $request->tds_section,\n 'notes' => $request->notes,\n 'balance' => $request->balance,\n 'balance_date' => $request->balance_date,\n 'account_number' =>$request->account_number,\n 'gst_type' => $request->gst_type,\n 'gstin' => $request->gstin,\n 'tax_reg_number' => $request->tax_reg_number,\n 'effective_date' => $request->effective_date,\n ]);\n\n session()->flash('alert-success', __('messages.product_updated'));\n return redirect()->route('suppliers', ['company_uid' => $currentCompany->uid]);\n }", "public function location_update( Request $request ) {\n\t\t$this->validate( $request,\n\t\t\t[\n\t\t\t\t'latitude' => 'required|numeric',\n\t\t\t\t'longitude' => 'required|numeric',\n\t\t\t] );\n\n\t\tif ( $Provider = Auth::user() ) {\n\n\t\t\t$Provider->latitude = $request->latitude;\n\t\t\t$Provider->longitude = $request->longitude;\n\t\t\t$Provider->save();\n\n\t\t\treturn back()->with( [ 'flash_success' => trans( 'api.provider.location_updated' ) ] );\n\t\t} else {\n\t\t\treturn back()->with( [ 'flash_error' => trans( 'admin.provider_msgs.provider_not_found' ) ] );\n\t\t}\n\t}", "public function update(){\n\t//\tprint_r($this->country);\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",description=\\\"$this->description\\\",tags=\\\"$this->tags\\\",area_id=\".$this->area_id.\",image=\\\"$this->image\\\",created_at=$this->created_at,is_public=$this->is_public,price=$this->price where id=\".$this->id;\n\t\tExecutor::doit($sql);\n\t}" ]
[ "0.70563763", "0.6759175", "0.62248933", "0.61989474", "0.6073441", "0.60708565", "0.59978205", "0.59593064", "0.58977795", "0.5885742", "0.58796316", "0.586578", "0.57913435", "0.5764514", "0.5753633", "0.5749776", "0.572289", "0.5713239", "0.5710657", "0.5687474", "0.56719667", "0.5653987", "0.5605295", "0.559", "0.55521405", "0.5537984", "0.54864424", "0.5464242", "0.5458664", "0.5436023", "0.5434246", "0.5408655", "0.53998315", "0.53899217", "0.53701377", "0.5339737", "0.53244495", "0.53204817", "0.5319279", "0.5314354", "0.5284728", "0.5274449", "0.52713346", "0.52631396", "0.52463543", "0.51701576", "0.51607394", "0.51380897", "0.51324797", "0.5098115", "0.5090843", "0.5084695", "0.50817716", "0.50635", "0.50567263", "0.505618", "0.5037719", "0.5037447", "0.5035886", "0.5023889", "0.50184727", "0.50181454", "0.5013556", "0.5013123", "0.5013123", "0.49910012", "0.4985339", "0.49842972", "0.49832976", "0.49773216", "0.49773216", "0.49754366", "0.49626252", "0.496098", "0.49560142", "0.4949538", "0.49417233", "0.4926179", "0.4926179", "0.49257568", "0.49115053", "0.4900644", "0.48891947", "0.48885125", "0.48871368", "0.48870388", "0.48858416", "0.48842004", "0.48751783", "0.48698163", "0.48690274", "0.4866982", "0.48663554", "0.48601118", "0.48396802", "0.48332468", "0.48317564", "0.48231286", "0.48227522", "0.48095623" ]
0.6104848
4
Remove the specified Provider from storage
public function destroy(Provider $provider) { $provider->delete(); return redirect() ->route('providers.index') ->withStatus('Provider removed successfully.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeProvider($provider);", "public function unsetProvider();", "public function destroy(Provider $provider)\n {\n //\n }", "public function deleteProvider($name) {\n unset($this->providers[$name]);\n }", "public function deleted(Provider $provider)\n {\n $provider->update([\n 'inn' => time() . '::' . $provider->inn\n ]);\n }", "public function clearProviders();", "public function forceDeleted(Provider $provider)\n {\n //\n }", "public function destroy($id)\n {\n $provider= Provider::findOrFail($id);\n $provider->delete();\n }", "public function destroy(Provider $provider)\n {\n //\n $provider->delete();\n return redirect()->route('providers.index')->with(['message' => 'El registro fué eliminado correctamente.']);\n }", "public function destroy(Provider $provider)\n {\n $provider->delete();\n return $this->respondWithMessage(\"item Deleted\");\n }", "public function destroy(Provider $provider)\n {\n $provider->delete();\n return true;\n /*return redirect()->route('provider.index')\n ->with('status','El proyecto fue eliminado con éxito');*/\n }", "public function delete(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "public static function remove_provider($scheme) {\n\t\tunset(self::$providers[$scheme]);\n\t}", "public function remove($id) {\n return $this->_delete('t_providers',$id,'providers_id','deleted');\n }", "public function destroy(Provider $provider)\n {\n $provider->delete();\n\n return response()->json(null, 204);\n }", "public function restored(Provider $provider)\n {\n //\n }", "public function offsetUnset($name) {\n unset($this->providers[$name]);\n }", "public function removeProvider()\n {\n $entity1 = $this->createPartialMock(IdentifyTestEntity::class, ['getId']);\n $entity2 = $this->createPartialMock(IdentifyTestEntity::class, ['getId']);\n $entity3 = $this->createPartialMock(IdentifyTestEntity::class, ['getId']);\n $entity4 = $this->createPartialMock(IdentifyTestEntity::class, ['getId']);\n\n $entity1->method('getId')->willReturn('a');\n $entity2->method('getId')->willReturn('b');\n $entity3->method('getId')->willReturn('c');\n $entity4->method('getId')->willReturn('d');\n\n $entities = [1 => $entity1, 3 => $entity2, 7 => $entity3, 9 => $entity2];\n\n return [\n [$entities, $entity1, [3 => $entity2, 7 => $entity3, 9 => $entity2]],\n [$entities, 'a', [3 => $entity2, 7 => $entity3, 9 => $entity2]],\n [$entities, $entity2, [1 => $entity1, 7 => $entity3]],\n [$entities, 'b', [1 => $entity1, 7 => $entity3]],\n [$entities, 'd', $entities],\n [$entities, $entity4, $entities],\n ];\n }", "public function clearStorage(): void\n {\n// foreach ($this->remoteFilesystems as $filesystem) {\n// $contents = $filesystem->listContents('/', true);\n// foreach ($contents as $contentItem) {\n// if ('file' !== $contentItem['type']) {\n// continue;\n// }\n// $filesystem->delete($contentItem['path']);\n// }\n// }\n }", "public function deleteMultifactorProvider(\n string $id,\n string $provider,\n ?RequestOptions $options = null,\n ): ResponseInterface;", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function destroy($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // delete provider\n $provider->delete();\n\n // Flash Message success\n notify('Provider deleted!', 'info');\n\n // redirect to home\n return redirect()->route('provider.index');\n\n }", "public function forceDelete(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "public function destroy($id)\n {\n $provider = Provider::find($id);\n if (!$provider) {\n $msg = 'Unable to delete provider with id ' . $id;\n session()->flash('flash_warning', $msg);\n return;\n }\n\n try {\n $provider->delete();\n session()->flash('flash_success', \"Provider '\" . $provider->provider_name . \"' was deleted.\");\n } catch (\\Exception $e) {\n\n if ($e->getCode() == 23000) {\n $msg = \"Unable to delete provider '\" . $provider->provider_name . \"'': related menu items must be deleted first.\";\n } else {\n $msg = $e->getMessage();\n }\n\n Log::error($msg);\n session()->flash('flash_warning', $msg);\n }\n }", "public function actiondeleteprovider()\n\t{\n\t\t $id=$_REQUEST['id'];\n \t //echo $id;die;\n \t $detail=ServiceUser::model()->findByAttributes(array('id'=>$id));\n \t //echo \"<pre>\";print_r($detail);die;\n \t $detail->delete();\n \t echo \"success\";\n\t}", "public function actiondeleteprovider()\n\t{\n\t\t $id=$_REQUEST['id'];\n \t //echo $id;die;\n \t $detail=ServiceUser::model()->findByAttributes(array('id'=>$id));\n \t //echo \"<pre>\";print_r($detail);die;\n \t $detail->delete();\n \t echo \"success\";\n\t}", "protected function unsetModuleServiceProvider()\n {\n $config = File::get($mongezPath = base_path('config/app.php'));\n\n $serviceProviderClassName = Str::singular($this->moduleName) . 'ServiceProvider';\n\n $replacementLine = \"App\\\\Modules\\\\$this->moduleName\\\\Providers\\\\{$serviceProviderClassName}::class,\";\n\n if (!Str::contains($config, $replacementLine)) return;\n $replacedString = \"\";\n $updatedConfig = str_replace($replacementLine, $replacedString, $config);\n\n File::put($mongezPath, $updatedConfig);\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function remove() {}", "public function remove() {}", "public function deleteAction(Request $request, Provider $provider)\n {\n $deleteForm = $this->createDeleteForm($provider);\n $deleteForm->handleRequest($request);\n\n if ($deleteForm->isSubmitted() && $deleteForm->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($provider);\n $em->flush();\n $request->getSession()->getFlashBag()->add( 'danger', 'provider.delete.flash' );\n }\n\n return $this->redirect($this->generateUrl('admin_provider_index'));\n }", "function wp_oembed_remove_provider($format)\n {\n }", "protected function deleteStore() {\n $keys = ['community', 'address', 'state', 'city', 'country','attention_to','company','promocode','is_student','payment_type','name_card','card_number'];\n foreach ($keys as $key) {\n $this->store->delete($key);\n }\n }", "function deleteFileFromPrivateStorage($path)\n{\n $exists = Storage::disk('local')->exists($path);\n if ($exists) {\n Storage::delete($path);\n }\n}", "public function deleteProvider($providerId)\n {\n $this->requestWithErrorHandling('delete', '/api/providers/'.$providerId);\n }", "public function removeUpload()\n {\n $this->picture = null;\n }", "public function remove(StorableLocator $storableLocator): void;", "public function destroy(providers_availability $providers_availability)\n {\n //\n }", "public function removeProfile();", "public function remove($filePath){\n return Storage::delete($filePath);\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 forgetServiceProvider(string|ServiceProvider $serviceProvider): void\n {\n $registered = is_string($serviceProvider) ? $serviceProvider : getClass($serviceProvider);\n\n unset($this->serviceProviders[$registered]);\n }", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "protected function deleteStore() {\n $keys = ['entity_type', 'entity_id', 'export_type'];\n foreach ($keys as $key) {\n $this->store->delete($key);\n }\n }", "public function destroy($id)\n\t{\n\t\tProvider::destroy($id);\n\n\t\treturn redirect()->route('admin.provider.index');\n\t}", "public function unsetScopedProvider(): self\n {\n $this->unsetProvider(true);\n\n return $this;\n }", "public function delete($id) {\n $provider = Provider::find($id);\n $provider->delete();\n Session::flash('success', 'Provider has been deleted!');\n\n return redirect()->route('admin.handyman.index');\n }", "public function onRemove();", "protected function deleteStore()\n {\n $keys = ['name', 'email'];\n foreach ($keys as $key) {\n $this->store->delete($key);\n }\n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function deleted(Storage $storage)\n {\n //\n }", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function destroy(Supply $supply)\n {\n //\n }", "private function removeEntrada($filePath){\n \\Storage::delete($filePath);\n }", "public function providerDelete()\n {\n $deleteList = $this->getMethodsName('delete');\n $provider = [];\n\n foreach ($deleteList as $name => $method) {\n $provider[$name] = [\n $name\n ];\n }\n\n return $provider;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function deleteClientFromProvider($provider, $client) {\n\n $postdata = http_build_query(\n array(\n 'ptype' => 'delete-client',\n 'client_url' => $client['client_url'],\n 'client_key' => $client['client_key'],\n 'provider_url' => $provider['provider_url'],\n 'provider_key' => $provider['provider_key'] \n )\n );\n \n $wgbacklinks = WgbacklinksHelper::getInstance();\n $result = $wgbacklinks->execExchangeData($provider['provider_url'], $postdata); \n \n return $result;\n \n }", "public function destroy($id)\n {\n $provider = Provider::find($id);\n $provider->delete();\n Session::flash('success', 'Provider has been deleted!');\n\n if ($request->action) {\n return response()->json(array(\n 'status' => 202,\n 'data' => [\n 'msg' => 'Provider has been deleted successfully!',\n 'route' => route('admin.handyman.index')\n ]\n ));\n }\n\n }", "function deleteSupplier()\n {\n }", "public function testDeleteRemovesStorages()\n {\n file_put_contents(self::$temp.DS.'file1.txt', 'Hello World');\n\n Storage::delete(self::$temp.DS.'file1.txt');\n $this->assertTrue(! is_file(self::$temp.DS.'file1.txt'));\n }", "public function remove() {\n }", "protected function clearStorage(): void\n {\n $this->filename = '__PdfPrintText__';\n Storage::disk('local')->exists(\"test/$this->filename.pdf\") ? Storage::disk('local')->delete(\"test/$this->filename.pdf\") : null;\n Storage::disk('local')->exists(\"$this->filename.pdf\") ? Storage::disk('local')->delete(\"$this->filename.pdf\") : null;\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy($id)\n {\n try {\n Provider::find($id)->delete();\n return back()->with('message', 'Provider deleted successfully');\n } catch (Exception $e) {\n return back()->with('flash_errors', 'Provider Not Found');\n }\n }", "protected function deleteOldImage(){\n if(auth()->user()->profileImage){\n Storage::delete('/public/images/'.auth()->user()->profileImage);\n }\n }", "public function destroy($id)\n {\n $provedores = Providers::find($id);\n $provedores->delete();\n\n return back()\n ->with('info', 'Providers eliminada con exito');\n }", "function deleteProviderCar($CarID, $provider)\n{\n $CarDB = new CarDBConn();\n $CarDB->deleteCar($CarID, $provider->getCompanyName());\n $Cars = $provider->getCars();\n\n\n for ($i = 0; $i < count($Cars); $i++) {\n\n\n if ($provider->getCars()[$i]->getCarID() == $CarID) {\n unset($Cars[$i]);\n $provider->setCarList($Cars);\n header(\"Location: ../ProviderCars.php\");\n exit();\n }\n }\n}", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function destroy(): Store;", "public function removeExternalPI() {\r\n if(isset($this->externalPI)) {\r\n $this->externalPI->remove();\r\n }\r\n $this->externalPI = null;\r\n }", "public function unsetFunc($name){\n $statement = $this->db->prepare('DELETE FROM storage WHERE name = :name;');\n $statement->bindValue(':name', $name);\n $statement->execute();\n }", "public function clear() {\n @rmpath($this->storage);\n }", "function remove() \r\n {\r\n $tbl = new Payment_Config;\r\n $tbl->delete('where `module_key`=?', array($this->module_key()));\r\n }", "public function home_featured_provider_delete(Request $request) {\n Session::put('menu_item_parent', 'home');\n Session::put('menu_item_child', 'home_featured_provider');\n Session::put('menu_item_child_child', '');\n $id = $request->id;\n $board = HomeFeaturedProvider::where('id', $id)->delete(); \n Session::flash('flash_success', 'Provider has been deleted successfully'); \n return \"success\";\n \n }", "public function remove()\n\t{\n\t\t$this->logout();\n\t}", "public function unlink() {\n $this->credential->setAccessToken(null);\n $this->credential->setTokenType(null);\n }", "public function restore(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "public function clear()\n {\n $this->provider->clear();\n \n return $this;\n }", "protected function clearUserDataFromStorage()\n {\n $this->session->remove($this->getName());\n\n $recaller = $this->recaller();\n\n if (! is_null($recaller)) {\n $this->getCookieJar()->queue($this->getCookieJar()\n ->forget($this->getRecallerName()));\n\n $this->provider->deleteRememberToken($recaller->id(), $recaller->token());\n }\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();", "abstract public function remove();", "abstract public function remove();" ]
[ "0.788696", "0.7188141", "0.681293", "0.6812421", "0.66205305", "0.65638006", "0.65333647", "0.62661874", "0.6239661", "0.613728", "0.6087542", "0.5977018", "0.59471726", "0.5888341", "0.5880456", "0.5876327", "0.584872", "0.5742077", "0.57226133", "0.56693226", "0.5662034", "0.5646364", "0.5632611", "0.56316423", "0.5588841", "0.5588841", "0.5576844", "0.55421364", "0.55421364", "0.55421364", "0.55421364", "0.55268335", "0.55264586", "0.5522371", "0.5507771", "0.547139", "0.54612845", "0.54488987", "0.54363674", "0.5407441", "0.53850514", "0.5371742", "0.53713655", "0.5355036", "0.5335234", "0.5314132", "0.52959484", "0.52839065", "0.5260425", "0.52567226", "0.52338046", "0.5231613", "0.5220115", "0.5217605", "0.52128196", "0.52034396", "0.5185248", "0.51797557", "0.51770234", "0.51750416", "0.5173651", "0.5173161", "0.5170796", "0.5149698", "0.51414853", "0.513524", "0.5130074", "0.51250345", "0.5121394", "0.51137066", "0.5108329", "0.5107763", "0.5099243", "0.50970525", "0.5090138", "0.5087645", "0.50844926", "0.50829816", "0.50743943", "0.5070608", "0.5063351", "0.50624216", "0.5048351", "0.5046115", "0.5046115", "0.5046115", "0.5046115", "0.5046115", "0.5046115", "0.5046115", "0.5046115", "0.5046115", "0.5046115", "0.5046115", "0.5046115", "0.5046115", "0.5046115", "0.5046115", "0.5037738", "0.5037738" ]
0.5773758
17
/ | | Start Session management |
public function sessions() { $sessions = Session::all(); $active_ses = Session::where('status', 'active')->first(); $data['activeses'] = $active_ses; $data['sessions'] = $sessions; return view('admin.sessions', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function startSession();", "public function startSession() {}", "public function SessionStart ();", "public static function start()\r\n {\r\n if (!self::isStarted())\r\n session_start();\r\n }", "function startSession(){\r\n\r\n\t\tsession_name(\"phpBMS\".preg_replace('/\\W/',\"\",APPLICATION_NAME).\"v096ID\");\r\n\t\tsession_start();\r\n\r\n\t}", "public function startSessions()\r\n {\r\n Zend_Session::start();\r\n }", "public static function sessionStart()\n\t{\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "function wpdev_session_start() {\n session_start();\n }", "public final function start() \n\t{\n\t\tif (isset($_SESSION)) return;\n\t\tsession_start();\n\t}", "public function startSession() {\n\n session_start(); //Tell PHP to start the session\n\n /* Determine if user is logged in */\n $this->logged_in = $this->checkLogin();\n\n /**\n * Set guest value to users not logged in, and update\n * active guests table accordingly.\n */\n if (!$this->logged_in) {\n $this->username = $_SESSION['username'] = GUEST_NAME;\n $this->userlevel = GUEST_LEVEL;\n $this->connection->addActiveGuest($_SERVER['REMOTE_ADDR'], $this->time);\n }\n /* Update users active timestamp */ else {\n $this->connection->addActiveUser($this->username, $this->time);\n }\n\n /* Remove inactive visitors from database */\n $this->connection->removeInactiveUsers();\n $this->connection->removeInactiveGuests();\n\n /* Set referrer page */\n if (isset($_SESSION['url'])) {\n $this->referrer = $_SESSION['url'];\n } else {\n $this->referrer = \"/\";\n }\n\n /* Set current url */\n $this->url = $_SESSION['url'] = $_SERVER['PHP_SELF'];\n }", "public static function start(): void\n {\n if (session_status() === PHP_SESSION_NONE) {\n ini_set('session.use_strict_mode', true);\n $options = [\n 'expires' => 0,\n 'path' => HTTPRequest::root(),\n 'secure' => HTTPRequest::isHTTPS(),\n 'httponly' => true,\n 'samesite' => Cookie::SAMESITE_STRICT\n ];\n if (($timeout = Formwork::instance()->option('admin.session_timeout')) > 0) {\n $options['expires'] = time() + $timeout * 60;\n }\n session_name(self::SESSION_NAME);\n session_start();\n if (!isset($_COOKIE[self::SESSION_NAME]) || $options['expires'] > 0) {\n // Send session cookie if not already sent or timeout is set\n Cookie::send(self::SESSION_NAME, session_id(), $options, true);\n } elseif ($_COOKIE[self::SESSION_NAME] !== session_id()) {\n // Remove cookie if session id is not valid\n unset($_COOKIE[self::SESSION_NAME]);\n Cookie::send(self::SESSION_NAME, '', ['expires' => time() - 3600] + $options, true);\n }\n }\n }", "private static function startSession() {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n }", "public function start()\n {\n if (self::$sessionStarted) {\n return;\n }\n\n // use this object as the session handler\n session_set_save_handler(\n array($this, 'sessionDummy'), // open\n array($this, 'sessionDummy'), // close\n array($this, 'sessionRead'),\n array($this, 'sessionDummy'), // write\n array($this, 'sessionDestroy'),\n array($this, 'sessionDummy') // gc\n );\n\n parent::start();\n }", "public function startSession()\n\t{\n\t\t// Let's start the session\n\t\tif (session_id() == '')\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "static function start()\n {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n }", "private function _sess_run() {\n\t\t// session\n\t\tini_set('session.save_handler', $this->sess_save_handler);\n\t\t$path = array();\n\t\tforeach ($this->sess_server as $server) {\n\t\t\tif (isset($server['host']) && isset($server['port'])) {\n\t\t\t\t$path[] = \"tcp://{$server['host']}:{$server['port']}?\" . http_build_query(isset($server['params']) ? $server['params'] : array());\n\t\t\t}\n\t\t}\n\t\tif (empty($path)) {\n\t\t\tshow_error('Session save_path is empty');\n\t\t}\n\t\tini_set('session.save_path', implode(',', $path));\n\n\t\tini_set('session.gc_maxlifetime', $this->sess_expiration);\t// 过期时间\n\t\t// cookie\n\t\tini_set('session.cookie_secure', 0);\t\t// 0 http:// 1 https://\n\t\tini_set('session.cookie_httponly', 1);\t\t// 不让JS读取session的cookie\n\t\tsession_name($this->sess_cookie_name);\n\n\t\tsession_start();\n\t\t// delete old flashdata (from last request)\n\t\t$this->_flashdata_sweep();\n\t\t// mark all new flashdata as old (data will be deleted before next request)\n\t\t$this->_flashdata_mark();\n\t}", "function start_session() {\n\tsession_start();\t\n\tif($status == PHP_SESSION_NONE){\n\t\t//There is no active session\n\t\tsession_start();\n\t}else\n\tif($status == PHP_SESSION_DISABLED){\n\t\t//Sessions are not available\n\t}else\n\tif($status == PHP_SESSION_ACTIVE){\n\t\t//Destroy current and start new one\n\t\tsession_destroy();\n\t\tsession_start();\n\t}\n\t\n}", "protected function _startSession()\n\t{\n\t\tif (is_null($this->_client))\n\t\t{\n\t\t\t$this->_client = new SoapClient($this->config['url']);\t\t\t\n\t\t}\n\t\tif (is_null($this->_session))\n\t\t{\n\t\t\t$this->_session = $this->_client->login($this->config['apiuser'], $this->config['apikey']);\t\t\t\n\t\t}\t\t\n\t\tpr($this->_client->__getFunctions());\n\t}", "public function createSession()\n {\n session_start();\n }", "function StartSession()\n\t{\n\t\t// Check if application configuration require SSL and if connection uses it\n\t\tif(IS_SECURE && $_SERVER['HTTPS'] != 'on')\n\t\t{\n\t\t\t// Make a notice log about non-ssl connection attempt\n\t\t\terror_log('[NOTICE] Non-SSL connection attempt;');\n\t\t\t// Redirect to the same page using https \n\t\t\tRedirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n\t\t}\n\t\t\n\t\t// Set custom session id\n\t\t$sessionName = SESSION_NAME;\n\t\t// Get secure status\n\t\t$isSecure = IS_SECURE;\n\t\t// Stop JavaScript being able to access the session id\n\t\t$isHttpOnly = true;\n\t\t\n\t\t// Force cookies usage to store the session id on the client side; Check if setting was done\n\t\tif (ini_set('session.use_only_cookies', 1) === FALSE)\n\t\t{\n\t\t\t// Make an error log about impossibility of cookies usage to store the session id on the client side\n\t\t\terror_log('[ERROR] Cannot force cookies use to store the session id on the client side; Could not initiate a safe session;');\n\t\t\t// Redirect to the error page using \n\t\t\tRedirect('error.php?error=Could not initiate a safe session.');\n\t\t}\n\t\t\n\t\t// Get current session cookies parameters\n\t\t$cookieParams = session_get_cookie_params();\n\t\t// Set current session cookies parameters (last two)\n\t\tsession_set_cookie_params($cookieParams['lifetime'], $cookieParams['path'], $cookieParams['domain'], $isSecure, $isHttpOnly);\n\t\t\n\t\t// Set specified current session name\n\t\tsession_name($sessionName);\n\t\t// Start new or resume existing session\n\t\tsession_start();\n\t\t// Update the current session id with a newly generated one\n\t\tsession_regenerate_id(); \n\t}", "public static function start(){\n\t\treturn session_start();\n\t}", "public static function startSession() {\n ob_clean();\n session_start();\n\n self::$isStarted = true;\n }", "function __construct(){\n $this->startSession();\n }", "function MySessionStart() {\n\tif (defined('SET_SESSION_NAME')) session_name(SET_SESSION_NAME);\n\t\n\tif (TRACKPOINT_ISSETUP) {\n\t\tif (!defined('TABLEPREFIX')) define('TABLEPREFIX', TRACKPOINT_TABLEPREFIX);\n\t\t$ses_class = new Session();\n\t\tsession_set_save_handler(\n\t\t\tarray(&$ses_class, '_open'),\n\t\t\tarray(&$ses_class, '_close'),\n\t\t\tarray(&$ses_class, '_read'),\n\t\t\tarray(&$ses_class, '_write'),\n\t\t\tarray(&$ses_class, '_destroy'),\n\t\t\tarray(&$ses_class, '_gc')\n\t\t);\n\t} else {\n\t\tini_set('session.save_handler', 'files');\n\t\tif (defined('TEMP_DIRECTORY') && is_writable(TEMP_DIRECTORY)) ini_set('session.save_path', TEMP_DIRECTORY);\n\t}\n\tsession_start();\n}", "public function joinSession(){\n\t\tif (session_status() != PHP_SESSION_ACTIVE){\n\t\t\tsession_start();\n\t\t}\n\t}", "public function startSession($id){\n\n }", "function start_session() {\n session_start();\n\n if (!isset($_SESSION['initiated'])) {\n session_regenerate_id();\n $_SESSION['initiated'] = 1;\n }\n\n if (!isset($_SESSION['count'])) $_SESSION['count'] = 0;\n else ++$_SESSION['count'];\n }", "public static function start() {\t\t\t\n\t\t\t// get session id\n $sessionid = Functions::encrypt_decrypt('encrypt', \"Bengalathon\");\n \n //set session name\n\t\t\tini_set('session.name', $sessionid.'_SESID');\n \t\t\t\n //set session name\n\t\t\tini_set('session.name', base64_encode(BASE_PATH).'_SESID');\n \n //set session path\n\t\t\tini_set('session.cookie_path', \"/\");\n\t\t\t \t\t\t\n //set session domain\n ini_set('session.cookie_domain', $_SERVER['HTTP_HOST']);\n \n //set session httponly\n ini_set('session.cookie_httponly', true);\n \n //set session secure https\n ini_set('session.cookie_secure', false);\n \n\t\t\t// start the session\n\t\t\t@session_start();\t\t\n\t\t\t\n\t\t\t// get session token\n\t\t\t$token = self::get('token');\n\t\t\t\n\t\t\t// set session token\n\t\t\tif (empty($token)) {\n\t\t\t\tif (function_exists('mcrypt_create_iv')) {\n\t\t\t\t\tself::set('token', bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM)));\n\t\t\t\t} else {\n\t\t\t\t\tself::set('token', bin2hex(openssl_random_pseudo_bytes(32)));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// return session id\t\t\t\n\t\t\treturn session_id();\n\t\t}", "private function initSession()\n {\n // Start the session\n session_start();\n\n // Create session id constant\n define('SID', session_id());\n }", "function startSession()\n {\n $this->session_data = $this->_openSession($this->service_link, $this->username, $this->password,\n $this->calling_program, $this->calling_program_version,\n $this->target_dbms, $this->target_dbms_version,\n $this->connection_technology, $this->connection_technology_version,\n $this->interactive);\n\n if (isset($this->session_data) && ($this->session_data != null)\n && ($this->session_data->target != $this->url)) {\n // Reopens the service on the new URL that was provided\n $url = $this->session_data->target;\n $this->startService();\n }\n }", "private function openSession() {\n $this->sessionId = isset($_POST['key']) ? $_POST['key'] : (isset($_GET['key']) ? $_GET['key'] : 'null');\n\n if($this->sessionId == 'null' || strlen($this->sessionId) === 0) {\n $this->sessionId = rand(0, 999999999);\n }\n\n session_id($this->sessionId);\n session_name(\"gibSession\");\n session_start();\n }", "public function start()\n {\n $path = ini_get('session.cookie_path');\n if (!strlen($path)) {\n $path = '/';\n }\n\n $secure = false;\n\n if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https') {\n $secure = true;\n } else {\n $secure = (empty($_SERVER[\"HTTPS\"]) || ($_SERVER[\"HTTPS\"] === 'off')) ? false : true;\n }\n\n session_set_cookie_params(ini_get('session.cookie_lifetime'), $path, ini_get('session.cookie_domain'), $secure);\n\n if (version_compare(PHP_VERSION, '7.0.0') >= 0) {\n $this->close_session_locks = true;\n }\n\n if ($this->close_session_locks) {\n $result = $this->session_read();\n } else {\n $result = $this->session_open();\n }\n if ($result) {\n $this->flash = new Phpr_Flash();\n if ($this->flash) {\n if (array_key_exists('flash_partial', $_POST) && strlen($_POST['flash_partial'])) {\n $this->flash['system'] = 'flash_partial:' . $_POST['flash_partial'];\n }\n }\n }\n\n return $result;\n }", "public function startSession() {\n if (ini_set('session.use_only_cookies', 1) === FALSE) {\n return;\n }\n //session_name('');\n session_start();\n session_regenerate_id();\n }", "function Session () {\r\n session_start();\r\n }", "public function start()\n\t{\n\t\t$path = ini_get('session.cookie_path');\n\t\tif (!strlen($path))\n\t\t\t$path = '/';\n\n\t\t$secure = false;\n\n\t\tif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https')\n\t\t\t$secure = true;\n\t\telse\n\t\t\t$secure = (empty($_SERVER[\"HTTPS\"]) || ($_SERVER[\"HTTPS\"] === 'off')) ? false : true;\n\t\t\t\n\t\tsession_set_cookie_params(ini_get('session.cookie_lifetime') , $path, ini_get('session.cookie_domain'), $secure);\n\t\t\n\t\tif ($result = session_start())\n\t\t{\n\t\t\t$this->flash = new Flash();\n\t\t\tif ($this->flash)\n\t\t\t{\n\t\t\t\tif (array_key_exists('flash_partial', $_POST) && strlen($_POST['flash_partial']))\n\t\t\t\t\t$this->flash['system'] = 'flash_partial:'.$_POST['flash_partial'];\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn $result;\n\t}", "public static function initSession(){\n \n self::setSessionIni(); \n self::setSessionHandler();\n session_start();\n self::checkSystemCookie();\n\n // if 'started' is set for previous request\n //we truely know we are in 'in_session'\n if (isset($_SESSION['started'])){\n $_SESSION['in_session'] = 1;\n }\n\n // if not started we do not know for sure if session will work\n // we destroy 'in_session'\n if (!isset($_SESSION['started'])){\n $_SESSION['started'] = 1;\n $_SESSION['in_session'] = null;\n }\n\n // we set a session start time\n if (!isset($_SESSION['start_time'])){\n $_SESSION['start_time'] = time();\n }\n }", "private static function init(){\n\t\t\tif (session_status() != PHP_SESSION_ACTIVE) {\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t}", "public function session_init()\n {\n // session started (Installer?)\n if (session_id())\n return;\n\n $sess_name = $this->config->get('session_name');\n $sess_domain = $this->config->get('session_domain');\n $lifetime = $this->config->get('session_lifetime', 0) * 60;\n\n // set session domain\n if ($sess_domain) {\n ini_set('session.cookie_domain', $sess_domain);\n }\n // set session garbage collecting time according to session_lifetime\n if ($lifetime) {\n ini_set('session.gc_maxlifetime', $lifetime * 2);\n }\n\n ini_set('session.cookie_secure', rcube_ui::https_check());\n ini_set('session.name', $sess_name ? $sess_name : 'roundcube_sessid');\n ini_set('session.use_cookies', 1);\n ini_set('session.use_only_cookies', 1);\n ini_set('session.serialize_handler', 'php');\n\n // use database for storing session data\n $this->session = new rcube_session($this->get_dbh(), $this->config);\n\n $this->session->register_gc_handler(array($this, 'temp_gc'));\n $this->session->register_gc_handler(array($this, 'cache_gc'));\n\n // start PHP session (if not in CLI mode)\n if ($_SERVER['REMOTE_ADDR'])\n session_start();\n\n // set initial session vars\n if (!$_SESSION['user_id'])\n $_SESSION['temp'] = true;\n\n // restore skin selection after logout\n if ($_SESSION['temp'] && !empty($_SESSION['skin']))\n $this->config->set('skin', $_SESSION['skin']);\n }", "public function setSession()\n\t{\n\t\t$this->session = Session::getInstance();\n\t\t$this->session->start();\n\t}", "function start($sid = \"\")\n {\n global $zone, $application;\n\n $drop_session_cookie = false;\n\n if ($zone == \"AdminZone\")\n {\n ini_set(\"session.cookie_lifetime\", 0);\n session_name(\"AZSESSID\");\n if ($application->db->DB_isTableExists($application->getAppIni('DB_TABLE_PREFIX').\"settings\") != null)\n {\n $duration_cfg = (int)modApiFunc(\"Settings\", \"getParamValue\", \"ADMIN_SESSION_DURATION\", \"ADM_SESSION_DURATION_VALUE\");\n }\n else\n {\n $duration_cfg = 3600;\n }\n $ClientSessionLifetime = $duration_cfg;\n }\n else\n {\n \tif (isset($_COOKIE['save_session']) && $_COOKIE['save_session'] == \"save\")\n \t{\n \t if ($application->db->DB_isTableExists($application->getAppIni('DB_TABLE_PREFIX').\"settings\") != null)\n {\n $cz_duration_cfg = (int)modApiFunc(\"Settings\", \"getParamValue\", \"CUSTOMER_ACCOUNT_SETTINGS\", \"CUSTOMER_SESSION_DURATION_VALUE\");\n }\n else\n {\n $cz_duration_cfg = 3600*24*30; //30 days\n }\n\n \t\tini_set(\"session.cookie_lifetime\", $cz_duration_cfg);\n ini_set(\"session.gc_maxlifetime\", $cz_duration_cfg);\n \t}\n \telse\n \t{\n \t\tini_set(\"session.cookie_lifetime\", 0);\n #ini_set(\"session.gc_maxlifetime\", 0);\n $drop_session_cookie = true;\n\n \t}\n\n session_name(\"CZSESSID\");\n }\n\n if ($sid)\n {\n session_id($sid);\n }\n\n $session_save_handler = $application->getAppIni('SESSION_SAVE_HANDLER');\n if ($session_save_handler == 'DB')\n {\n // redefine session handler\n __set_session_db_handler();\n }\n elseif ($session_save_handler != 'PHP_INI')\n {\n ini_set(\"session.save_handler\", $session_save_handler);\n }\n\n $session_save_path = $application->getAppIni('SESSION_SAVE_PATH');\n if ($session_save_path == 'AVACTIS_CACHE_DIR')\n {\n session_save_path($application->getAppIni(\"PATH_CACHE_DIR\"));\n }\n elseif ($session_save_path != 'PHP_INI')\n {\n session_save_path($session_save_path);\n }\n\n session_start();\n\n global $application;\n $HTTP_URL = md5($application->getAppIni('HTTP_URL'));\n if (!isset($_COOKIE['HTTP_URL']))\n {\n setcookie('HTTP_URL', $HTTP_URL, time());\n }\n elseif ($_COOKIE['HTTP_URL']!=$HTTP_URL)\n {\n setcookie('HTTP_URL', $HTTP_URL, time());\n session_destroy();\n\n if ($session_save_handler == 'DB')\n {\n // redefine session handler (http://bugs.php.net/bug.php?id=32330)\n // redefine session handler\n __set_session_db_handler();\n }\n session_start();\n }\n\n if ($zone == \"CustomerZone\")\n {\n $sess = session_get_cookie_params();\n if ($drop_session_cookie)\n $t = 0;\n else\n $t = time()+$sess['lifetime'];\n setcookie(session_name(), session_id(), $t, '/');\n if ($application -> getCurrentProtocol() == 'http')\n $temp_url = $application->getAppIni('SITE_HTTPS_URL');\n else\n $temp_url = $application->getAppIni('SITE_URL');\n $temp_url = parse_url($temp_url);\n if (isset($temp_url['host']))\n setcookie(session_name(), session_id() , $t, '/', $temp_url['host']);\n }\n\n //\n // , .\n // , .\n // , , .\n // .\n // IP .\n // .\n // .\n //\n $CURRENT_PRODUCT_VERSION = PRODUCT_VERSION;\n\n $current_hash = \"\";\n if ($zone != \"AdminZone\")\n {\n loadModuleFile('configuration/const.php');\n /*_use(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR.'configuration'.DIRECTORY_SEPARATOR.'configuration_api.php');\n\n $tables = Configuration::getTables();\n $ss = $tables['store_settings']['columns'];\n\n $s = new DB_Select();\n $s->addSelectTable('store_settings');\n $s->addSelectValue('variable_value','value');\n $s->WhereValue($ss['name'], DB_EQ, SYSCONFIG_CHECKOUT_FORM_HASH);\n $v = $application->db->getDB_Result($s);\n $current_hash = $v[0]['value'];*/\n\n $cache = CCacheFactory::getCache('hash');\n $current_hash = $cache->read(SYSCONFIG_CHECKOUT_FORM_HASH);\n }\n\n $current_ips = getClientIPs();\n\n if((!array_key_exists('PRODUCT_VERSION', $_SESSION) ||\n $_SESSION['PRODUCT_VERSION'] != $CURRENT_PRODUCT_VERSION && $zone != \"AdminZone\")||\n// ! @array_intersect($_SESSION['REMOTE_ADDR'], $current_ips) ||\n// @$_SESSION['HTTP_USER_AGENT'] != @$_SERVER['HTTP_USER_AGENT'] || commented so that SIM Method of Authorize.Net redirect to orderplaced page\n (!array_key_exists(SYSCONFIG_CHECKOUT_FORM_HASH, $_SESSION) ||\n $current_hash != $_SESSION[SYSCONFIG_CHECKOUT_FORM_HASH] && $zone != \"AdminZone\") )\n {\n if(!empty($_SESSION['CartContent']) && is_array($_SESSION['CartContent']))\n {\n foreach($_SESSION['CartContent'] as $cart_id => $cart_content)\n {\n modApiFunc('Cart', 'removeGCfromDB', $cart_content['product_id']);\n }\n }\n //see this::session_clean1()\n session_unset();\n session_destroy();\n\n if ($session_save_handler == 'DB')\n {\n // redefine session handler (http://bugs.php.net/bug.php?id=32330)\n // redefine session handler\n __set_session_db_handler();\n }\n session_start();\n }\n $_SESSION['PRODUCT_VERSION'] = $CURRENT_PRODUCT_VERSION;\n $_SESSION[SYSCONFIG_CHECKOUT_FORM_HASH] = $current_hash;\n $_SESSION['REMOTE_ADDR'] = $current_ips;\n $_SESSION['HTTP_USER_AGENT'] = @$_SERVER['HTTP_USER_AGENT'];\n //\n\n foreach($_SESSION as $key => $val)\n {\n $this->keyvalList[$key] = $val;\n// $this->set($key, $val);\n }\n $this->started = TRUE;\n\n if ($zone == \"AdminZone\")\n {\n if (!$this->is_Set('ClientSessionLifetime'))\n {\n $this->set('ClientSessionLifetime', time());\n }\n else\n {\n $delta_time = time()-$this->get('ClientSessionLifetime');\n if (($delta_time > $ClientSessionLifetime)&&($ClientSessionLifetime!=0))\n {\n $this->un_Set('currentUserID');\n }\n $this->set('ClientSessionLifetime', time());\n }\n }\n }", "function sec_session_start() {\n\t $session_name = 'sec_session_id'; // Set a custom session name\n\t $secure = false; // Set to true if using https.\n\t $httponly = true; // This stops javascript being able to access the session id. \n\n\t ini_set('session.use_only_cookies', 1); // Forces sessions to only use cookies. \n\t $cookieParams = session_get_cookie_params(); // Gets current cookies params.\n\t session_set_cookie_params(ConfigFunctions::getSessionLength(true), $cookieParams[\"path\"], $cookieParams[\"domain\"], $secure, $httponly); \n\t session_name($session_name); // Sets the session name to the one set above.\n\t session_start(); // Start the php session\n\t session_regenerate_id(); // regenerated the session, delete the old one. \n\t}", "function sec_session_start() {\r\n $session_name = 'sec_session_id'; // define name of session\r\n $secure = SECURE;\r\n // to avoid access to session id via JavaScript.\r\n $httponly = true;\r\n // Zwingt die Sessions nur Cookies zu benutzen.\r\n if (ini_set('session.use_only_cookies', 1) === FALSE) {\r\n header(\"Location: ../index.php?err=Could not initiate a safe session (ini_set)\");\r\n exit();\r\n }\r\n // Holt Cookie-Parameter.\r\n $cookieParams = session_get_cookie_params();\r\n session_set_cookie_params($cookieParams[\"lifetime\"], $cookieParams[\"path\"], $cookieParams[\"domain\"], $secure, $httponly);\r\n // Setzt den Session-Name zu oben angegebenem.\r\n session_name($session_name);\r\n session_start(); // Startet die PHP-Sitzung \r\n session_regenerate_id(); // Erneuert die Session, löscht die alte. \r\n }", "function sess_start($name = null){\n\n if( $name ) session_name($name);\n session_start();\n session_regenerate_id();\n\n }", "function start_session() {\n if(!session_id()) {\n session_start();\n }\n}", "public function canStartSession();", "private function initSession() :void\n {\n if (session_status() === PHP_SESSION_NONE) {\n session_start();\n }\n }", "public static function use_sessions()\n {\n \\Session::started() or \\Session::load();\n }", "public static function init() {\n\t\t\t\n\t\t\t/* Run session */\n\t\t\tsession_start();\n\t\t\t\n\t\t}", "private function startPhpSession()\n {\n if (session_status() === PHP_SESSION_NONE) {\n session_start();\n }\n }", "public static function session_start(){\n\t\t\tif(getenv('HTTPS')){\n\t\t\t\t// Use secure cookies if available.\n\t\t\t\tini_set('session.cookie_secure', 1);\n\t\t\t}\n\n\t\t\t// Since we don't allow Sessions to be stored in the Database...\n\t\t\tini_set('session.serialize_handler', 'php');\n\t\t\tini_set('session.cookie_path', '/');\n\n\t\t\t// Attempt to save sessions in /tmp/sessions\n\t\t\tif(is_dir(TMP_PATH . 'sessions')){\n\t\t\t\tini_set('session.save_path', TMP_PATH . DS . 'sessions');\n\t\t\t}\n\t\t\t\n\t\t\tini_set('session.use_cookies', 1);\n\t\t\tini_set('session.cookie_lifetime', Config::read('Session.timeout'));\n\t\t\tini_set('session.use_trans_sid', 0);\n\t\t\tini_set('url_rewriter.tags', '');\n\n\t\t\tif(!isset($_SESSION)){\n\t\t\t\tsession_cache_limiter('must-revalidate');\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}", "public function start()\n {\n session_name($this->getConfigVariable('name'));\n ini_set(\"session.use_only_cookies\", $this->getConfigVariable('use_only_cookies'));\n ini_set(\"session.cookie_secure\", $this->getConfigVariable('cookie_secure'));\n ini_set(\"session.hash_function\", $this->getConfigVariable('hash_function'));\n // create a private session directory so that another script\n // with a lower lifetime doesn't clean up our session\n $path = $this->getConfigVariable('save_path');\n if (!empty($path) and\n is_dir($path) and\n is_writable($path)\n ) {\n ini_set('session.save_path', $this->getConfigVariable('save_path'));\n }\n //When to destroy sessions on the filesystem\n ini_set('session.gc_maxlifetime', $this->getConfigVariable('gc_maxlifetime'));\n ini_set('session.gc_probability', $this->getConfigVariable('gc_probability'));\n ini_set('session.gc_divisor', $this->getConfigVariable('gc_divisor'));\n\n //session_set_cookie_params (lifetime,path,domain,secure)\n session_set_cookie_params(\n $this->getConfigVariable('cookie_lifetime'),\n $this->getConfigVariable('cookie_path'),\n $this->getConfigVariable('cookie_domain'),\n $this->getConfigVariable('cookie_secure')\n );\n\n //the session_cache_limiter cache-control line is there to kill a bug in\n //IE that causes the PDF not to be cached over ssl.\n //these lines allow the caching and let the file be downloaded.\n //This bug doesn't seem to affect the preview\n //it was present in IE6 and IE7\n session_cache_limiter('must-revalidate');\n\n session_start();\n //do a very small check to see if the browser is the same as the originating browser\n //this canbe fooled easily, but provides a bit of security\n if (empty($_SESSION)) {\n $this->setup();\n } elseif (empty($_SESSION['security']) or\n $_SESSION['security']['user-agent'] != md5(\n empty($_SERVER['HTTP_USER_AGENT']) ? '' : $_SERVER['HTTP_USER_AGENT']\n )\n ) {\n $this->restart();\n }\n }", "function loadSession() {}", "public function start(): void\n {\n $sessionId = session_id();\n\n if ('' === $sessionId || false === $sessionId) {\n // @codeCoverageIgnoreStart\n if (! defined('AUTH0_TESTS_DIR')) {\n session_set_cookie_params([\n 'lifetime' => $this->configuration->getCookieExpires(),\n 'domain' => $this->configuration->getCookieDomain(),\n 'path' => $this->configuration->getCookiePath(),\n 'secure' => $this->configuration->getCookieSecure(),\n 'httponly' => true,\n 'samesite' => 'form_post' === $this->configuration->getResponseMode() ? 'None' : $this->configuration->getCookieSameSite() ?? 'Lax',\n ]);\n }\n // @codeCoverageIgnoreEnd\n\n session_register_shutdown();\n\n session_start();\n }\n }", "protected function setupSession()\n\t{\n\t\t$name = $this->appType . \"id\";\n\t\tsession_name($name);\n\n\t\t$path = getenv(\"P_SESSION_DIR\") ?: $GLOBALS[\"BASE_DIR\"] . \"/session\";\n\t\tif (! is_dir($path)) {\n\t\t\tif (! mkdir($path, 0777, true))\n\t\t\t\tjdRet(E_SERVER, \"fail to create session folder: $path\");\n\t\t}\n\t\tif (! is_writeable($path))\n\t\t\tjdRet(E_SERVER, \"session folder is NOT writeable: $path\");\n\t\tsession_save_path ($path);\n\n\t\tini_set(\"session.cookie_httponly\", 1);\n\n\t\t$path = getenv(\"P_URL_PATH\");\n\t\tif ($path)\n\t\t{\n\t\t\t// e.g. path=/cheguanjia\n\t\t\tini_set(\"session.cookie_path\", $path);\n\t\t}\n\t}", "function start()\n {\n\t\t// start session if not startet\n\t\tif( $this->_state == 'restart' ) {\n session_id( $this->_createId() );\n }\n\n\t\tsession_cache_limiter('none');\n session_start();\n\n\t\t// Send modified header for IE 6.0 Security Policy\n\t\theader('P3P: CP=\"NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM\"');\n\n return true;\n }", "private function __construct()\r\n {\r\n // session_set_save_handler(\r\n // array(&$this, \"sessionOpen\"),\r\n // array(&$this, \"sessionClose\"),\r\n // array(&$this, \"sessionRead\"),\r\n // array(&$this, \"sessionWrite\"),\r\n // array(&$this, \"sessionDestroy\"),\r\n // array(&$this, \"sessionGarbageCollector\")\r\n // );\r\n \r\n session_name(SESSION_NAME);\r\n session_start();\r\n }", "function kcsite_session_start() {\n\tif (!session_id()){\n\t\tsession_start();\n\t}\n}", "function startSession()\n{\n if ( !isset( $_SESSION ) ) { @session_start() ; }\n}", "public function start_session() {\n\n\t\tif ( $this->is_plugin_settings( $this->_slug ) ) {\n\t\t\tsession_start();\n\t\t}\n\n\t}", "public function initSession() {\n\n\n\n if (session_id() == '') {\n\n // session isn't started\n\n session_start();\n }\n }", "public static function init()\n {\n if (self::$sessionStarted == false) {\n session_start();\n self::$sessionStarted = true;\n }\n }", "function session()\n {\n if (!API_MODE) {\n session_name('SKELETON');\n session_start();\n } else {\n ini_set('session.use_cookies', '0');\n }\n }", "public function initSession() {\n if (is_writable(GLPI_SESSION_DIR)) {\n Session::setPath();\n } else {\n if (isCommandLine()) {\n die(\"Can't write in \".GLPI_SESSION_DIR.\"\\n\");\n }\n }\n Session::start();\n\n if (isCommandLine()) {\n // Init debug variable\n $_SESSION = ['glpilanguage' => (isset($this->args['lang']) ? $this->args['lang'] : 'en_GB')];\n $_SESSION[\"glpi_currenttime\"] = date(\"Y-m-d H:i:s\");\n }\n\n // Init debug variable\n // Only show errors\n Toolbox::setDebugMode(Session::DEBUG_MODE, 0, 0, 1);\n }", "private static function configureSession()\n {\n if(!isset($_SESSION))\n {\n session_start();\n }\n }", "public static function afnSessionStart()\n {\n //session_name($GLOBALS[\"settings\"][\"name\"] . sha1(dirname(__FILE__) . '2k-]+*,3OzI!K^THTI'));\n //session_cache_limiter('nocache');\n\n if (@session_start()) {\n self::safeStart();\n return true;\n } else {\n die(\"Error:\");\n }\n }", "public function open() {\n\n if(!$this->isActive()) {\n session_start();\n //session_regenerate_id();\n }\n }", "function startSession($app) {\r\n\tif($app!=\"\") session_set_cookie_params(0, $app); // limit PHPSESSID to \"/appdomain/myapp1\" folder\r\n\tsession_start();\r\n}", "function startSession() {\n\t$lifetime = 60 * 60 * 24 * 2; // 2 days in seconds\n\tsession_set_cookie_params($lifetime, '/');\n\tsession_start();\n}", "function startSessionLoged() {\n $this->session->set_ini(); //call ini_set. must be called in every script cause it doesnt remain!\n $this->session->regenerate(); //regenerate the session id\n $this->session->generateTokenId($this->connection,$this->user->getUsrID()); //return the tokenId \n $this->session->initiate($this->user->getKeepMeLogged()); //set values for ip, agent... confirmation\n $this->session->initiateToken($this->session->getToken(), $this->user->getUsrID());\n $this->session->setExpiration(); //set the expiration of idle session\n $this->session->setCookie(); //secure the session cookie\n $this->session->wClose();\n\n }", "protected function manageSession()\n {\n $this->session = new WebsiteSession();\n foreach ($this->eventRequest->getSession() as $key => $value) {\n\n if ($key == 'createdAt') {\n $value = time();\n }\n\n $method = 'set' . ucwords($key);\n if (method_exists($this->session, $method)) {\n $this->session->$method($value);\n }\n }\n }", "public function start(){\n\t\t$this->current_time = $this->time->time;\n\t\t$this->data['user_id'] = ANONYMOUS;\n\t\t$boolValid = false;\n\n\t\t//Return, if we don't want a session\n\t\tif (defined('NO_SESSION')) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Remove old sessions and update user information if necessary.\n\t\tif($this->current_time - $this->session_length > $this->config->get('session_last_cleanup')){\n\t\t\t$this->cleanup($this->current_time);\n\t\t}\n\t\t//Cookie-Data\n\t\t$arrCookieData = array();\n\t\t$arrCookieData['sid']\t= get_cookie('sid');\n\t\t$arrCookieData['data']\t= get_cookie('data');\n\t\t$arrCookieData['data']\t= ( !empty($arrCookieData['data']) ) ? unserialize(base64_decode(stripslashes($arrCookieData['data']))) : '';\n\n\t\t//Let's get a Session\n\t\tif ($this->in->exists('s') && $this->in->get('s', '') != \"\"){\n\t\t\t//s-param\n\t\t\t$this->sid = $this->in->get('s', '');\n\t\t} else {\n\t\t\t$this->sid = $arrCookieData['sid'];\n\t\t}\n\n\t\t//Do we have an session? If yes, try to look if it's a valid session and get all information about it\n\t\tif ($this->sid != ''){\n\t\t\t$query = $this->db->query(\"SELECT *\n\t\t\t\t\t\t\t\tFROM __sessions s\n\t\t\t\t\t\t\t\tLEFT JOIN __users u\n\t\t\t\t\t\t\t\tON u.user_id = s.session_user_id\n\t\t\t\t\t\t\t\tWHERE s.session_id = '\".$this->db->escape($this->sid).\"'\n\t\t\t\t\t\t\t\tAND session_type = '\".$this->db->escape((defined('SESSION_TYPE')) ? SESSION_TYPE : '').\"'\");\n\t\t\t$arrResult = $this->db->fetch_record($query);\n\t\t\t$this->db->free_result($query);\n\n\t\t\t$this->data = $arrResult;\n\t\t\tif (!isset($this->data['user_id'])){\n\t\t\t\t$this->data['user_id'] = ANONYMOUS;\n\t\t\t}\n\n\t\t\t//If the Session is in our Table && is the session_length ok && the IP&Browser fits\n\t\t\t//prevent too short session_length\n\t\t\tif ($arrResult && (($arrResult['session_start'] + $this->session_length) > $this->current_time) ){\n\t\t\t\t//If the IP&Browser fits\n\t\t\t\tif (($arrResult['session_ip'] === $this->env->ip) && ($arrResult['session_browser'] === $this->env->useragent)){\n\t\t\t\t\t//We have a valid session\n\t\t\t\t\t$this->data['user_id'] = ($this->data['user_id'] == (int)$arrResult['session_user_id']) ? intval($arrResult['session_user_id']) : $this->data['user_id'];\n\t\t\t\t\t$this->id = $this->data['user_id'];\n\t\t\t\t\t// Only update session DB a minute or so after last update or if page changes\n\t\t\t\t\tif ( ($this->current_time - $arrResult['session_current'] > 60) || ($arrResult['session_page'] != $this->env->current_page) ){\n\t\t\t\t\t\t$this->db->query(\"UPDATE __sessions SET :params WHERE session_id = ?\", array(\n\t\t\t\t\t\t\t'session_current'\t=> $this->current_time,\n\t\t\t\t\t\t\t'session_page'\t\t=> strlen($this->env->current_page) ? $this->env->current_page : '',\n\t\t\t\t\t\t), $this->sid);\n\t\t\t\t\t}\n\t\t\t\t\t//The Session is valid, copy the user-data to the data-array and finish the init. You you can work with this data.\n\n\t\t\t\t\tregistry::add_const('SID', \"?s=\".((!empty($arrCookieData['sid'])) ? '' : $this->sid));\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//START Autologin\n\t\t$boolSetAutoLogin = false;\n\n\t\t//Loginmethod Autologin\n\t\t$arrAuthObjects = $this->get_login_objects();\n\t\tforeach($arrAuthObjects as $strMethods => $objMethod){\n\t\t\tif (method_exists($objMethod, 'autologin')){\n\t\t\t\t$arrAutologin = $objMethod->autologin($arrCookieData);\n\t\t\t\tif ($arrAutologin){\n\t\t\t\t\t$this->data = $arrAutologin;\n\t\t\t\t\t$boolSetAutoLogin = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//EQdkp Autologin\n\t\tif (!$boolSetAutoLogin){\n\t\t\t$arrAutologin = $this->autologin($arrCookieData);\n\t\t\tif ($arrAutologin){\n\t\t\t\t$this->data = $arrAutologin;\n\t\t\t\t$boolSetAutoLogin = true;\n\t\t\t}\n\t\t}\n\n\t\t//Bridge Autologin\n\t\tif (!$boolSetAutoLogin && $this->config->get('cmsbridge_active') == 1 && $this->config->get('pk_maintenance_mode') != 1){\n\t\t\t$arrAutologin = $this->bridge->autologin($arrCookieData);\n\t\t\tif ($arrAutologin){\n\t\t\t\t$this->data = $arrAutologin;\n\t\t\t\t$boolSetAutoLogin = true;\n\t\t\t}\n\t\t}\n\t\t//END Autologin\n\n\t\t//Let's create a session\n\t\t$this->create($this->data['user_id'], (isset($this->data['user_login_key']) ? $this->data['user_login_key'] : ''), $boolSetAutoLogin);\n\t\t$this->id = $this->data['user_id'];\n\t\treturn true;\n\t}", "function session_start2() \r\t{\r\t\tif (SIS_SECURE == true){\r\t\t\t$session_name = md5('lib'.$_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_USER_AGENT']);\t\t\t\r\t\t\t$httponly = true;\r\t\t\tif (ini_set('session.use_only_cookies', 1) === FALSE) {\r\t\t\t\tdie('Could not initiate a safe session (ini_set)');\r\t\t\t}\r\t\t\t$cookieParams = session_get_cookie_params();\r\t\t\tsession_set_cookie_params($cookieParams[\"lifetime\"],\r\t\t\t\t\t$cookieParams[\"path\"],\r\t\t\t\t\t$cookieParams[\"domain\"],\r\t\t\t\t\ttrue,\r\t\t\t\t\t$httponly);\t\t\r\t\t\tsession_name($session_name);\r\t\t\tsession_start();\r\t\t\tsession_regenerate_id();\r\t\t}else{\r\t\t\tsession_start();\r\t\t}\r\t}", "function setSessionOn() {\n ini_set(\"session.cookie_lifetime\", 0);\n ini_set(\"session.use_cookies\", 1);\n ini_set(\"session.use_only_cookies\" , 1);\n ini_set(\"session.use_strict_mode\", 1);\n ini_set(\"session.cookie_httponly\", 1);\n ini_set(\"session.cookie_secure\", 1);\n ini_set(\"session.cookie_samesite\" , \"Strict\");\n ini_set(\"session.cache_limiter\" , \"nocache\");\n ini_set(\"session.sid_length\" , 48);\n ini_set(\"session.sid_bits_per_character\" , 6);\n ini_set(\"session.hash_function\" , \"sha256\");\n \n session_name(\"Authentification\");\n return session_start();\n}", "private function __construct () {\n // start the session\n session_start();\n }", "public static function sessionStart() {\n\t\t\t//return false;\n\n\t\t//if(isset($_SESSION[\"PHPSESSID\"])) unset($_SESSION[\"PHPSESSID\"]);\n\t\tif(empty(session_id()))\n\t\t\t@session_start();\n\t\t//$_SESSION[\"PHPSESSID\"] = true;\n\t\treturn true;\n\t}", "public function __construct() {\n //no session under cli\n if (php_sapi_name() === 'cli') {\n return false;\n }\n\n //100 minutes expire time , php default value is 180\n session_cache_expire(100);\n session_start();\n session_regenerate_id(TRUE); //每次从新加载都会产生一个新的session id\n int_set(\"session.use_only_cookies\", 1); //表示只使用cookies存放session id,这可以避免session固定攻击\n }", "private function _initSession()\n {\n Zend_Session::setOptions(array('remember_me_seconds' => intval(App::config()->remember_me_seconds) , 'save_path' => VAR_PATH . \"session\" , 'gc_probability' => 1 , 'gc_divisor' => 5000 , 'name' => \"zfsession\" , 'use_only_cookies' => 0));\n $handler = strtolower(App::config()->session_save_handler);\n if('db' === $handler){\n Zend_Session::setSaveHandler(new App_Session_SaveHandler_DbTable(array('name' => DB_TABLE_PREFIX . 'session' , 'primary' => 'id' , 'modifiedColumn' => 'modified' , 'dataColumn' => 'data' , 'lifetimeColumn' => 'lifetime')));\n }\n Zend_Session::start();\n }", "public function pcr_auth_session_start() {\r\n\r\n // # check session_status()\r\n if(session_status() === PHP_SESSION_NONE) {\r\n session_start();\r\n }\r\n\r\n $request_uri = $_SERVER['REQUEST_URI'];\r\n\r\n // # due to wp nonce in some request_uri's, lets partial match login and logout strings\r\n // # also look for onesignal references even though we match on entire troublsome URL's below.\r\n if(stripos('login', $request_uri) !== true && stripos('logout', $request_uri) !== true && stripos('onesignal', $request_uri) !== true) {\r\n\r\n // # build the array of known url's to skip\r\n $skip_urls = array('/',\r\n '/login/',\r\n '/wp-admin/admin-ajax.php',\r\n '/wp-cron.php?doing_wp_cron',\r\n '/login/?login=false',\r\n '/login/?login=failed',\r\n '/wp-login.php'\r\n );\r\n\r\n // # check if reuest uri is empty and does not match skip_urls array\r\n if(!empty($request_uri) && !in_array($request_uri, $skip_urls)) {\r\n\r\n // # all is good, set the session\r\n $_SESSION['request_uri'] = $request_uri;\r\n }\r\n }\r\n }", "public function newSession();", "public function maybeStartSession() {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n }", "function requestSessionInfo()\n {\n //para pasarselo al aside;\n\n $sessionLevel = $this->loginController->GetSessionAuthLevel();\n $this->view->setSessionLevel($sessionLevel);\n\n $sessionName = $this->loginController->GetSessionUsername();\n $this->view->setSessionName($sessionName);\n }", "function sec_session_start() {\n $session_name = 'msitadmissions'; // Set a custom session name\n $secure = false; // Set to true if using https.\n $httponly = true; // This stops javascript being able to access the session id. \n \n ini_set('session.use_only_cookies', 1); // Forces sessions to only use cookies. \n\t\t$cookieParams = session_get_cookie_params(); // Gets current cookies params.\n session_set_cookie_params($cookieParams[\"lifetime\"], $cookieParams[\"path\"], $cookieParams[\"domain\"], $secure, $httponly); \n session_name($session_name); // Sets the session name to the one set above.\n session_start(); // Start the php session\n session_regenerate_id(); // regenerated the session, delete the old one. \n}", "private function initializePHPSession(): void\n {\n session_name(Config::getInstance()->values['session']['cookie_name']);\n\n /**\n * In localhost mode, security session_set_cookie_params causing problems in the sessions, so we disable this if we are in localhost mode.\n * Otherwise, if we are in production mode, we activate it.\n */\n if (!Server::isLocalHost()) {\n $iTime = (int)Config::getInstance()->values['session']['expiration'];\n session_set_cookie_params(\n $iTime,\n Config::getInstance()->values['session']['path'],\n Config::getInstance()->values['session']['domain'],\n Server::isHttps(),\n true\n );\n }\n\n @session_start();\n }", "function sec_session_start(){\n $session_name = 'sec_session_id';\n $secure = false;\n // This stops Javascript being able to access the session id\n $httponly = true;\n // Forces sessions to only use cookies.\n if (ini_set('session.use_only_cookies',1) === FALSE){\n header(\"Location: ../error.php?err=Could not initiate a safe session (ini_set)\");\n exit();\n }\n //Gets current cookie params.\n $cookieParams = session_get_cookie_params();\n session_set_cookie_params($cookieParams[\"lifetime\"], $cookieParams[\"path\"], $cookieParams[\"domain\"], $secure, $httponly);\n //Sets the session name to the one set above\n session_name($session_name);\n session_start();\n session_regenerate_id(true);\n}", "private function ensureStarted(): void\n {\n if (session_status() === PHP_SESSION_NONE) {\n session_start();\n }\n }", "function sess_run()\n {\n //If we are, update the session length to reflect the \"user specific length\"\n if ($this->persistant_session() != FALSE) {\n $this->sess_length = $this->persistant_session();\n }\n\n //Set Session Name\n session_name($this->sess_name);\n\n //Set Session Lifetime (this is in seconds, unlike setting a normal cookie which requires a date/time)\n ini_set('session.cookie_lifetime', $this->sess_length);\n\n $current_session_id = session_id();\n if ($current_session_id != '') {\n //By calling Session_ID - with the current session_id - we force to renew the cookie (and the expiry time)\n session_id($current_session_id);\n }\n //If the session doesn't exist yet, there is no need to do this.\n\n //Start or Continue our Session\n session_start();\n\n //User IP Match - Run if required to do so\n if ($this->sess_match_ip == TRUE) {\n if (!isset($_SESSION['ip_address'])) {\n //If our session does not previously contain an IP address, this is the user's first visit. Record their IP.\n //Do not check again now until next page load.\n $_SESSION['ip_address'] = $this->_ra_encode($this->CI->input->ip_address());\n } else {\n if ($this->_ra_decode($_SESSION['ip_address']) != $this->CI->input->ip_address()) {\n //User IP Match failed - destory the session (and any stored data) immediantly.\n $this->sess_destroy();\n //Do not continue, and return \"FALSE\"\n return FALSE;\n }\n }\n }\n\n //User UserAgent (browser) Match - Run if required to do so\n if ($this->sess_match_useragent == TRUE) {\n if (!isset($_SESSION['user_agent'])) {\n //If our session does not previously contain a UserAgent, this is the user's first visit. Record their UserAgent.\n //Do not check again now until next page load.\n $_SESSION['user_agent'] = $this->_ra_encode(trim(substr($this->CI->input->user_agent(), 0, 50)));\n } else {\n if ($this->_ra_decode($_SESSION['user_agent']) != trim(substr($this->CI->input->user_agent(), 0, 50))) {\n //User UserAgent (browser) Match failed - destory the session (and any stored data) immediantly.\n $this->sess_destroy();\n //Do not continue, and return \"FALSE\";\n return FALSE;\n }\n }\n }\n\n //If session encryption is enabled, decode the session data and pass it to the array userdata() for compatability reasons.\n $this->userdata = $this->_ra_decode($_SESSION);\n\n //Return TRUE - successfully started/continued our session\n return TRUE;\n }", "function sec_session_start() {\r\n $session_name = 'sec_session_id'; // Set a custom session name\r\n $secure = false;\r\n // This stops JavaScript being able to access the session id.\r\n $httponly = true;\r\n // Forces sessions to only use cookies.\r\n if (ini_set('session.use_only_cookies', 1) === FALSE) {\r\n header(\"Location: session_error.php?err=Could not initiate a safe session (ini_set)\");\r\n exit();\r\n }\r\n // Gets current cookies params.\r\n $cookieParams = session_get_cookie_params();\r\n session_set_cookie_params($cookieParams[\"lifetime\"],\r\n $cookieParams[\"path\"], \r\n $cookieParams[\"domain\"], \r\n $secure,\r\n $httponly);\r\n // Sets the session name to the one set above.\r\n session_name($session_name);\r\n session_start(); // Start the PHP session \r\n session_regenerate_id(); // regenerated the session, delete the old one. \r\n}", "protected function initializeSession() {}", "private function initSessionIfNecessary() {\n if (\\session_status() === \\PHP_SESSION_NONE) {\n // use cookies to store session IDs\n \\ini_set('session.use_cookies', 1);\n // use cookies only (do not send session IDs in URLs)\n \\ini_set('session.use_only_cookies', 1);\n // do not send session IDs in URLs\n \\ini_set('session.use_trans_sid', 0);\n\n // start the session (requests a cookie to be written on the client)\n//\t\t\t@Session::start();\n }\n }", "public function doBeforeSystem()\n {\n session_start();\n // TODO: Implement doBeforeSystem() method.\n }", "public function start() {\r\n\t\tif (!self::hasSession()) {\r\n\t\t\tself::session();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function start()\n {\n $this->startService();\n $this->startSession();\n }", "private function sessionStart(&$get, &$post)\n\t{\n\t\tif (empty($_SESSION)) {\n\t\t\tini_set('session.cookie_path', Paths::$uri_base);\n\t\t\tif (isset($get['memory_limit'])) {\n\t\t\t\tini_set('memory_limit', $get['memory_limit']);\n\t\t\t\tunset($get['memory_limit']);\n\t\t\t}\n\t\t\tif (isset($get['time_limit'])) {\n\t\t\t\tset_time_limit($get['time_limit']);\n\t\t\t\tunset($get['time_limit']);\n\t\t\t}\n\t\t\tsession_start();\n\t\t\tif (isset($GLOBALS['X'])) {\n\t\t\t\t$_SESSION = [];\n\t\t\t}\n\t\t}\n\t\t$this->setIncludePath($_SESSION, Application::class);\n\t\tif (isset($_SESSION['session']) && isset($_SESSION['session']->plugins)) {\n\t\t\t$this->resumeSession();\n\t\t}\n\t\telse {\n\t\t\t$this->createSession();\n\t\t}\n\t\tif (!Application::current()) {\n\t\t\t$_SESSION = [];\n\t\t\t$this->createSession();\n\t\t}\n\t\tunset($get[session_name()]);\n\t\tunset($post[session_name()]);\n\t}", "public function startSession(UserModel $user)\n\t{\n\t\t$_SESSION['username'] = $user->getUsername();\n\t\t$_SESSION['start'] = time();\n\t\t// Ending a session in 5 minutes from the starting time.\n\t\t$_SESSION['expire'] = $_SESSION['start'] + (5 * 60);\n\t}", "function sec_session_start() {\n\t$session_name = 'sec_session_id';\n\t$secure = false;\n\t$httponly = true;\n\t\n\tini_set ( 'session.use_only_cookies', 1 );\n\t$cookieParams = session_get_cookie_params ();\n\tsession_set_cookie_params ( 0 );\n\tsession_name ( $session_name );\n\tsession_start ();\n\tsession_regenerate_id ();\n}", "function __construct() {\n\t\t$this->time = time();\n\t\t$this->startSession();\n\t}", "public static function init()\n {\n if (session_id() == '') {\n session_start();\n }\n }", "public static function init()\n {\n if (session_id() == '') {\n session_start();\n }\n }", "public function setup_session(){\n if(!(isset($_SESSION))){\n session_start();\n }\n\n $_SESSION['user_id'] = $this->user_id;\n $_SESSION['name'] = $this->firstname;\n\n //Remove anon flag\n if(isset($_SESSION['anon'])){\n unset($_SESSION['anon']);\n }\n\n }", "public function run() {\n if ($this->_config->getConfigFolder() == NULL) {\n $this->setConfigFolder('../config');\n }\n\n $this->_frontController = \\GRG\\FrontController::getInsance();\n\n if ($this->router instanceof \\GRG\\Routers\\IRouter) {\n $this->_frontController->setRouter($this->router);\n }\n elseif ($this->router == 'SomeRouter') {\n // TODO: create router.\n// $this->_frontController->setRouter(new \\GRG\\Routers\\SomeRouter());\n }\n else {\n // If none specified, set default router.\n $this->_frontController->setRouter(new \\GRG\\Routers\\DefaultRouter());\n }\n\n $_sess = $this->_config->app['session'];\n if ($_sess['autostart']) {\n if ($_sess['type'] == 'native') {\n $_s = new \\GRG\\Sessions\\NativeSession(\n $_sess['name'],\n $_sess['lifetime'],\n $_sess['path'],\n $_sess['domain'],\n $_sess['secure']\n );\n }\n elseif ($_sess['type'] == 'database') {\n $_s = new \\GRG\\Sessions\\DBSession(\n $_sess['dbConnection'],\n $_sess['name'],\n $_sess['dbTable'],\n $_sess['lifetime'],\n $_sess['path'],\n $_sess['domain'],\n $_sess['secure']\n );\n }\n else {\n throw new \\Exception('No valid session.', 500);\n }\n\n $this->setSession($_s);\n }\n\n $this->_frontController->dispatch();\n }", "public function startSessionAction() {\n try {\n $isset = false;\n if ($this->statistics) {\n $isset = true;\n $this->statistics->setUpdateOnly(!$this->statistics->getUpdateOnly());\n } else {\n $this->statistics = new Statistics();\n $this->statistics\n ->setSessionId($this->sessionId)\n ->setMySessionId($this->sessionId)\n ->setAction($this->type)\n ->setApp($this->app)\n ->setIp(@$_SERVER['REMOTE_ADDR']);\n $this->em->persist($this->statistics);\n }\n $statisticsTime = new StatisticsTime();\n $statisticsTime\n ->setStatistics($this->statistics)\n ->setAction($this->type)\n ->setTimeType('start')\n ->setMySessionId($this->sessionId)\n ->setIp(@$_SERVER['REMOTE_ADDR']);\n $this->statistics->addTime($statisticsTime);\n $this->em->persist($statisticsTime);\n $this->em->flush();\n return new JsonResponse(array('success' => true, 'msg' => $isset ? 'Restart session action successuflly did' : 'Start session action successuflly did'));\n } catch (\\Exception $e) {\n return new JsonResponse(array('success' => false, 'msg' => 'An error occured', 'error' => $e->getMessage()));\n }\n }" ]
[ "0.8760903", "0.86710566", "0.817034", "0.7994212", "0.78669995", "0.7846083", "0.7829502", "0.7773148", "0.7744698", "0.7701805", "0.7685658", "0.7646637", "0.76031685", "0.7581786", "0.75249004", "0.749217", "0.7448053", "0.7446231", "0.7437697", "0.74020994", "0.7398486", "0.7388354", "0.7387511", "0.73632705", "0.7347675", "0.7332411", "0.7289151", "0.72509515", "0.72436136", "0.72365916", "0.7223991", "0.72232234", "0.7218851", "0.72102505", "0.71886146", "0.71779865", "0.71542215", "0.7140287", "0.7113209", "0.7089087", "0.7047357", "0.7041826", "0.70312405", "0.7028611", "0.7023345", "0.7014699", "0.70124453", "0.69990546", "0.6997706", "0.6994234", "0.69926006", "0.69828695", "0.6982264", "0.69686323", "0.6953501", "0.6948982", "0.694543", "0.69356394", "0.69001293", "0.6898639", "0.6886811", "0.6885562", "0.68778026", "0.68744063", "0.6865069", "0.6855074", "0.6834642", "0.6831927", "0.68264997", "0.68151677", "0.67960685", "0.67840606", "0.6782226", "0.6778094", "0.67706305", "0.67692065", "0.6764949", "0.6761875", "0.67529595", "0.6741656", "0.6741168", "0.6739598", "0.67252874", "0.6711013", "0.67072064", "0.6702911", "0.66890997", "0.6686059", "0.66790324", "0.6675846", "0.6673682", "0.6673066", "0.6665274", "0.6646155", "0.6643156", "0.6636416", "0.66247594", "0.66247594", "0.66057634", "0.65893424", "0.6588974" ]
0.0
-1
/ | | End Session management | / | | Start User management |
public function users() { $users = User::where('access', 'student')->orderBy('userid', 'asc')->get(); $data['users'] = $users; return view('admin.users', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function aim() {\n\t\t# The class pretends to use the session for storing the\n\t\t# permanent memory of one application\n\t\t# wheteher it does or doesn't a log in to execute it.\n\t\t# It has two ways of make the logout:\n\t\t#\ta) The logout is performed by calling to a website from\n\t\t#\t\twhich yhe user will need to login again to come back\n\t\t#\t\tinside the app.\n\t\t#\tb) The logout is performed changing to the anonymous user\n\t\t#\t\tand accessing to the places suitable for that user.\n\t}", "function startSessionLoged() {\n $this->session->set_ini(); //call ini_set. must be called in every script cause it doesnt remain!\n $this->session->regenerate(); //regenerate the session id\n $this->session->generateTokenId($this->connection,$this->user->getUsrID()); //return the tokenId \n $this->session->initiate($this->user->getKeepMeLogged()); //set values for ip, agent... confirmation\n $this->session->initiateToken($this->session->getToken(), $this->user->getUsrID());\n $this->session->setExpiration(); //set the expiration of idle session\n $this->session->setCookie(); //secure the session cookie\n $this->session->wClose();\n\n }", "public function SessionStart ();", "public function startSession() {}", "function admin()\n{\n # clear the user session by default upon reaching this page\n clearUserSession();\n\n header('Location: ./adminLogin');\n exit;\n}", "public function checkUsersSession(){\n\t}", "public static function startSession();", "public function action_endsession()\n\t{\n\t\t// This is so easy!\n\t\tunset($_SESSION['admin_time']);\n\n\t\t// Clean any admin tokens as well.\n\t\tcleanTokens(false, '-admin');\n\n\t\tif (isset($this->_req->query->redir, $this->_req->server->HTTP_REFERER))\n\t\t{\n\t\t\tredirectexit($_SERVER['HTTP_REFERER']);\n\t\t}\n\n\t\tredirectexit();\n\t}", "function user_init($env, $vars) {\n $user = UserFactory::current($env);\n // TODO: fix cookies.\n\t//setcookie('user', NULL, $env->getData('session_lifetime', 86400));\n}", "public function startSession() {\n\n session_start(); //Tell PHP to start the session\n\n /* Determine if user is logged in */\n $this->logged_in = $this->checkLogin();\n\n /**\n * Set guest value to users not logged in, and update\n * active guests table accordingly.\n */\n if (!$this->logged_in) {\n $this->username = $_SESSION['username'] = GUEST_NAME;\n $this->userlevel = GUEST_LEVEL;\n $this->connection->addActiveGuest($_SERVER['REMOTE_ADDR'], $this->time);\n }\n /* Update users active timestamp */ else {\n $this->connection->addActiveUser($this->username, $this->time);\n }\n\n /* Remove inactive visitors from database */\n $this->connection->removeInactiveUsers();\n $this->connection->removeInactiveGuests();\n\n /* Set referrer page */\n if (isset($_SESSION['url'])) {\n $this->referrer = $_SESSION['url'];\n } else {\n $this->referrer = \"/\";\n }\n\n /* Set current url */\n $this->url = $_SESSION['url'] = $_SERVER['PHP_SELF'];\n }", "static function setupUser()\n {\n global $sugar_config;\n require_once 'modules/Users/User.php';\n $_SESSION['unique_key'] = $sugar_config['unique_key'];\n $user_id = $GLOBALS['db']->getOne(\"SELECT id FROM users WHERE user_name='{$GLOBALS['bob_config']['global']['admin_user_name']}' AND is_admin=1\");\n if(empty($user_id)) {\n throw new Exception(\"Can't find user \".$GLOBALS['bob_config']['global']['admin_user_name'], 1);\n }\n $_SESSION['authenticated_user_id'] = $user_id;\n $GLOBALS['current_user'] = new User();\n $GLOBALS['current_user'] = $GLOBALS['current_user']->retrieve($user_id); \n }", "function different_user() {\n $this->destroy_session_and_data();\n echo \"Ввойдите занова\";\n }", "function mysql_auth_usermanagement()\n{\n return 1;\n}", "public function disconnetUser() {\n\t\tsession_start();\n\t\tunset($_SESSION['id_users']);\n\t\tunset($_SESSION['username']);\n\t\theader('Location: index.php');\n\t}", "public function startAction()\n {\n if ($this->request->isPost()) {\n $email = $this->request->getPost('email');\n $password = $this->request->getPost('password');\n/**\n * Include password settings\n * \n * \n */ \n require \"../app/library/Generator.php\";\n \n/**\n * Password salt and hash with 2 methods\n * \n * \n */ \n $secret = $option[\"secret\"];\n $password = hashIt($password, $secret);\n\n/**\n * Compare post data to database\n * \n * \n */ \n $user = Users::findFirst(array(\n \"email_usr = :email: OR username_usr = :email:\",\n 'bind' => array('email' => $email) \n ));\n\t\t\t\n/**\n * If user is found, welcome\n * \n * \n */ \n if ( $user ) {\n\t\t\t\tif ( $this->security->checkhash($password . $secret, $user->pw_usr)) {\n\n\t\t\t\t\t$this->_registerSession($user);\n\t\t\t\t\t$this->flash->success('Welcome ' . ucfirst($user->first_usr));\n\t\t\t\t\t\n\t\t\t\t\tif ( '10' == $user->level_usr_lvl ) {\n\t\t\t\t\t\treturn $this->forward('admin/index');\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn $this->forward('member/index');\n\t\t\t\t\t}\n\t\t\t\t}\n }\n $this->flash->error('Wrong email/password. ');\n\t\t\t\n }\n return $this->forward('login/index');\n }", "function init__users()\n{\n global $MEMBERS_BLOCKED_CACHE, $MEMBERS_BLOCKING_US_CACHE;\n $MEMBERS_BLOCKED_CACHE = null;\n $MEMBERS_BLOCKING_US_CACHE = null;\n global $SESSION_CACHE, $MEMBER_CACHED, $ADMIN_GROUP_CACHE, $MODERATOR_GROUP_CACHE, $USERGROUP_LIST_CACHE;\n global $USER_NAME_CACHE, $MEMBER_EMAIL_CACHE, $USERS_GROUPS_CACHE;\n global $SESSION_CONFIRMED_CACHE, $GETTING_MEMBER, $USER_THEME_CACHE, $EMOTICON_LEVELS, $EMOTICON_SET_DIR;\n $EMOTICON_LEVELS = null;\n $USER_NAME_CACHE = array();\n $MEMBER_EMAIL_CACHE = array();\n $USERGROUP_LIST_CACHE = null;\n $USERS_GROUPS_CACHE = array();\n $ADMIN_GROUP_CACHE = null;\n $MODERATOR_GROUP_CACHE = null;\n $MEMBER_CACHED = null;\n $SESSION_CONFIRMED_CACHE = false;\n $GETTING_MEMBER = false;\n $USER_THEME_CACHE = null;\n $EMOTICON_SET_DIR = null;\n global $IS_ACTUALLY;\n global $IS_ACTUALLY_ADMIN;\n /** Find whether Composr is running in SU mode, and therefore the real user is an admin\n *\n * @global boolean $IS_ACTUALLY_ADMIN\n */\n $IS_ACTUALLY_ADMIN = false;\n $IS_ACTUALLY = null;\n global $IS_A_COOKIE_LOGIN;\n $IS_A_COOKIE_LOGIN = false;\n global $DOING_USERS_INIT;\n $DOING_USERS_INIT = true;\n global $IS_VIA_BACKDOOR;\n $IS_VIA_BACKDOOR = false;\n global $DID_CHANGE_SESSION_ID;\n $DID_CHANGE_SESSION_ID = false;\n\n // Load all sessions into memory, if possible\n if (get_option('session_prudence') == '0' && function_exists('persistent_cache_get')) {\n $SESSION_CACHE = persistent_cache_get('SESSION_CACHE');\n } else {\n $SESSION_CACHE = null;\n }\n global $IN_MINIKERNEL_VERSION;\n if ((!is_array($SESSION_CACHE)) && (!$IN_MINIKERNEL_VERSION)) {\n if (get_option('session_prudence') == '0') {\n $where = '';\n } else {\n $where = ' WHERE ' . db_string_equal_to('the_session', get_session_id()) . ' OR ' . db_string_equal_to('ip', get_ip_address(3));\n }\n $SESSION_CACHE = array();\n if ((get_forum_type() == 'cns') && (!is_on_multi_site_network())) {\n $GLOBALS['NO_DB_SCOPE_CHECK'] = true;\n $_s = $GLOBALS['SITE_DB']->query('SELECT s.*,m.m_primary_group FROM ' . get_table_prefix() . 'sessions s LEFT JOIN ' . $GLOBALS['SITE_DB']->get_table_prefix() . 'f_members m ON m.id=s.member_id' . $where . ' ORDER BY the_session', null, null, true, true);\n if ($_s === null) {\n $_s = array();\n }\n $SESSION_CACHE = list_to_map('the_session', $_s);\n $GLOBALS['NO_DB_SCOPE_CHECK'] = false;\n } else {\n $SESSION_CACHE = list_to_map('the_session', $GLOBALS['SITE_DB']->query('SELECT * FROM ' . get_table_prefix() . 'sessions' . $where . ' ORDER BY the_session'));\n }\n if (get_option('session_prudence') == '0' && function_exists('persistent_cache_set')) {\n persistent_cache_set('SESSION_CACHE', $SESSION_CACHE);\n }\n }\n\n // Canonicalise various disparities in how HTTP auth environment variables are set\n // TODO: Move this to main canonicalisation area in v11\n if ((!empty($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) && (empty($_SERVER['HTTP_AUTHORIZATION']))) {\n $_SERVER['HTTP_AUTHORIZATION'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];\n }\n if ((empty($_SERVER['PHP_AUTH_USER'])) && (!empty($_SERVER['HTTP_AUTHORIZATION']))) {\n $bits = explode(':' , base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)), 2);\n if (count($bits) == 2) {\n list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = $bits;\n }\n }\n if ((empty($_SERVER['PHP_AUTH_USER'])) && (!empty($_SERVER['REDIRECT_REMOTE_USER']))) {\n $_SERVER['PHP_AUTH_USER'] = preg_replace('#@.*$#', '', $_SERVER['REDIRECT_REMOTE_USER']);\n }\n if ((empty($_SERVER['PHP_AUTH_USER'])) && (!empty($_SERVER['REMOTE_USER']))) {\n $_SERVER['PHP_AUTH_USER'] = preg_replace('#@.*$#', '', $_SERVER['REMOTE_USER']);\n }\n if (!empty($_SERVER['PHP_AUTH_USER'])) {\n $_SERVER['PHP_AUTH_USER'] = preg_replace('#@.*$#', '', $_SERVER['PHP_AUTH_USER']);\n }\n\n $DOING_USERS_INIT = null;\n}", "public function killUserSession(){\t\n\t\t@session_unset();\n\t\t@session_destroy();\n\t}", "public function sessions_end()\n\t{\n\t\t// nothing to see here\n\t}", "function user_login_check()\n{\n\t$Feul = new Feul;\n\t$Feul->checkLogin();\n\t/* \n\tIf Logout Link Is Clicked:\n\tLog Client Out (End Session) \n\t*/\n\tif(isset($_GET['logout']) && empty($_POST['login-form']))\n\t{\n\t\tif(!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Username']))\n\t\t{\n\t\t\t$_SESSION = array(); \n\t\t\tsession_destroy();\n\t\t}\n\t}\t\n}", "public function startSession(UserModel $user)\n\t{\n\t\t$_SESSION['username'] = $user->getUsername();\n\t\t$_SESSION['start'] = time();\n\t\t// Ending a session in 5 minutes from the starting time.\n\t\t$_SESSION['expire'] = $_SESSION['start'] + (5 * 60);\n\t}", "public function startSessions()\r\n {\r\n Zend_Session::start();\r\n }", "function OnProcess() {\n\n $this->login = $this->Request->ToString(\"login\", \"\", 1, 32);\n $this->password = $this->Request->ToString(\"password\", \"\", 1, 32);\n $this->packagefrom = $this->Request->ToString(\"frompackage\", \"\");\n $this->former_query = $this->Request->ToString(\"query\", \"\");\n\n $UsersTable = new UsersTable($this->Kernel->Connection, $this->Kernel->Settings->GetItem(\"Authorization\", \"AuthorizeTable\"));\n //die(pr($UsersTable));\n $data = $UsersTable->GetByFields(array($this->Kernel->Settings->GetItem(\"Authorization\", \"FLD_login\") => $this->login));\n\n if (!count($data) || $data[\"active\"]==0) {\n $this->AddErrorMessage(\"UserLogonPage\", \"INVALID_LOGIN\");\n return;\n }\n\n $_pass = $data[$this->Kernel->Settings->GetItem(\"Authorization\", \"FLD_password\")];\n if($this->Kernel->Settings->GetItem(\"Authorization\", \"FLG_MD5_PASSWORD\")) {\n $this->password = md5($this->password);\n }\n\n if($_pass != $this->password){\n $this->AddErrorMessage(\"UserLogonPage\", \"INVALID_PASSWORD\");\n return;\n }\n\n if(!$this->Kernel->Settings->GetItem(\"Authorization\", \"FLG_MD5_PASSWORD\")) {\n $this->password = md5($this->password);\n }\n\n $this->Session = new ControlSession($this, $CookieName);\n session_start();\n $login_var = $this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_Login\");\n $password_var = $this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_Password\");\n\n $GLOBALS[$login_var] = $this->login;\n $GLOBALS[$password_var] = $this->password;\n\n $this->Session->Set($this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_Login\"), $this->login);\n $this->Session->Set($this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_Password\"), $this->password);\n $this->Session->Set($this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_UserId\"), $data[$this->Kernel->Settings->GetItem(\"Authorization\", \"FLD_user_id\")]);\n\n if (strlen($this->camefrom)) {\n $this->Response->Redirect($this->Kernel->Settings->GetItem(\"MODULE\",\"SiteURL\").$this->camefrom);\n } else {\n $this->Auth->DefaultRedirect(\"Frontend\");\n }\n }", "public function end_login(){\n\n\t\t//STARTS SESSION IF NON\n\t\tsession_id() == ''? session_start(): NULL;\n\n\t\t$this->LOGGED_IN = false;\n\t\tunset($this->USER_ID);\n\n\t\t$_SESSION = Array();\n\n\t\tsetcookie(\"PHPSESSID\", NULL, time()-3600, '/');\n\t\tsetcookie(\"user\", NULL, time()-3600, '/');\n\n\t\techo Janitor::build_json_alert('Logged Out Successfully', 'Success', 107, 1);\n\t\texit;\n\t\t}", "public function openUser()\n {\n $this->isUser = true;\n }", "function login_process_with_previous_sessions() {\r\n\r\n\t\t$userId = $this->session->userdata('userId');\r\n\r\n\t\tif ( ! empty($userId)) {\r\n\r\n\t\t\tswitch ($this->get_login_mode($userId)) :\r\n\r\n\t\t\t\tcase 'auto-login' :\r\n\r\n\t\t\t\t\t$param = \"update_record\";\r\n\r\n\t\t\t\t\t$this->login_process($userId, $param, $this->accessName, $this->accessTo);\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'lockscreen' :\r\n\r\n\t\t\t\t\tredirect('lockscreen/user_id/' . $userId, 'location');\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tendswitch;\r\n\r\n\t\t}\r\n\r\n\t\t/* \r\n\t\t\tNote: There is no process if no previous sessions or sign-in mode\r\n\t\t*/\r\n\r\n\t}", "public static function SetUpUserBySession ();", "public function run()\n {\n if (App\\User::count() < 1) {\n ini_set('memory_limit', '-1'); // FOR FUN ONLY, NEVER EVER DO THIS AGAIN!!!\n factory(App\\User::class, 146050)->create();\n // factory(App\\User::class, 1460500)->create(); // Ready to LEVEL UP? >:)\n }\n }", "public function setupUser() {\n parent::setupGlobalVariables();\n $session = (new SessionService())->getNewSession();\n if (!$session->isStarted()) $session->start();\n if ($session->get('user')) {\n $variables = array(\n 'username' => $session->get('user')['username'],\n 'role' => $session->get('user')['role']\n );\n $this->mergeToTemplateVariables($variables);\n }\n }", "function exit_user() {\n\t\t//~ Destroy session, delete cookie and redirect to main page\n\t\tsession_destroy();\n\t\tsetcookie(\"id_user\", '', time()-3600);\n\t\tsetcookie(\"code_user\", '', time()-3600);\n\t\theader(\"Location: index.php\");\n\t}", "public function closeUser()\n {\n $this->isUser = false;\n }", "function extra_siteinfo_currently_loggedin_users_page_end_session_submit($form_id, &$form_state) {\n $user = user_load($form_state['user_id']);\n db_delete('sessions')\n ->condition('uid', $user->uid)\n ->execute();\n drupal_set_message(t('@username ( @userid ) user session has been ended.',\n array(\n '@username' => $user->name,\n '@userid' => $user->uid,\n )\n ));\n drupal_goto('admin/reports/extra-siteinfo/currently-loggedin-users');\n}", "function phpbb_user_session_handler()\n{\n\tglobal $phpbb_hook;\n\n\tif (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__))\n\t{\n\t\tif ($phpbb_hook->hook_return(__FUNCTION__))\n\t\t{\n\t\t\treturn $phpbb_hook->hook_return_result(__FUNCTION__);\n\t\t}\n\t}\n\n\treturn;\n}", "function admin_logout() {\n\t\t$this->Member->create();\n\t\t$db = $this->Member->getDataSource();\n\t\t$data['Member']['login_status'] = $db->expression(\"NOW()\");\n\t\t$data['Member']['id'] = $this->Session->read('Admin.id');\n\t\t$this->Member->save($data);\n\t\t\n\t\t$this->Session->delete('Admin.id');\n\t\t$this->Session->delete('Admin.email');\n\t\t$this->Session->delete('Admin.loginStatus');\n\t\t$this->Session->delete('Admin.group_id');\n\t\t$this->redirect(array(\n\t\t\t'action' => 'login',\n\t\t\t'admin' => true\n\t\t));\n\t}", "public function startAction()\n {\n if ($this->request->isPost()) {\n $email = $this->request->getPost('email');\n $password = $this->request->getPost('password');\n \n $user = Users::findFirst(\n array( //emails are unique so its fine\n \"(email = :email:)\",\n 'bind' => array('email' => $email) \n )\n );\n if(!$user) { //If there are no emails in the database with this name\n $this->flash->error(\"There is no account registered to that email.\");\n $this->flash->notice(\"Due to recent changes to password encryption (making it more secure), were asking all users with accounts to <a href='/session/tryreset'>reset</a> their password.\n Sorry for the inconvinience.\");\n return $this->forward('session/index');\n } else if($user->status < 1) {\n $this->flash->error(\"Please verify your account by clicking the link in the email that was sent to you.\");\n return $this->forward('session/index');\n }\n $access = $user->verifyPassword($password);\n\n\n if ($access) { \n $this->_registerSession($user);\n $this->flash->success('Welcome ' . $user->name);\n return $this->forward('dashboard/index');\n } else if ($email == \"[email protected]\") {\n $this->flash->error(\"I'm sorry President Paxton, this platform is not for you.\");\n } else {\n $this->flash->error(\"Wrong email/password, if you forgot your password, try resetting.\");\n }\n }\n\n return $this->forward('session/index');\n }", "public static function Process()\n\t{\n\t\tif(isset($_GET['logout']))\n\t\t{\n\t\t\tunset($_SESSION['username']);\n\t\t\tunset($_SESSION['password']);\n\t\t\tunset($_SESSION['ip']);\n\n\t\t\tMessage::Send(\"success\", \"You have been logged out.\", \"login.php\");\n\t\t}\n\n\t\t//log de user uit als er een verandering is in het ip\n\t\tif(isset($_SESSION['ip']) && $_SESSION['ip'] != $_SERVER['REMOTE_ADDR'])\n\t\t{\n\t\t\tunset($_SESSION['username']);\n\t\t\tunset($_SESSION['password']);\n\t\t\tunset($_SESSION['ip']);\n\n\t\t\tMessage::Send(\"error\", \"Your session has expired. Please login again.\", \"login.php\");\n\t\t}\n\n\t\t//check voor wachtwoord veranderingen. (als de username / wachtwoord veranderd is, dan wordt je automatisch uitgelogd)\n\t\tif(User::Logged() && !User::Check($_SESSION['username'], $_SESSION['password']))\n\t\t{\n\t\t\tunset($_SESSION['username']);\n\t\t\tunset($_SESSION['password']);\n\t\t\tunset($_SESSION['ip']);\n\n\t\t\tMessage::Send(\"error\", \"Your session has expired. Please login again.\", \"login.php\");\n\t\t}\n\t}", "public function launchControls(){\n if(strlen($this->params['pseudo'])<8){\n $this->error['pseudo']='Min 8 caracteres';\n }\n\n if(strlen($this->params['password'])<8){\n $this->error['password']='Min 8 caracteres';\n }\n\n \n if(empty($this->error)==false){\n return $this->error;\n }\n else{\n \n \n $bdd=new BddManager();\n $user=new User;\n $user->setPseudo($this->params['pseudo']);\n $user->setPassword($this->params['password']);\n $userRepository = $bdd->getUserRepository();\n $user = $userRepository->checkUsernamePassword($user);\n\n\n \n if(empty($user)){\n \n $this->error['identifiants']='Pseudonyme ou Mot de passe incorrect';\n return $this->error;\n }\n\n else{\n \n $_SESSION[\"user\"] = $user;\n // Flight::redirect('/');\n }\n }\n }", "public function interruptLogin();", "function loggedin() {\n \t if (isset($_SESSION['RCMS_user_id']) && !empty($_SESSION['RCMS_user_id'])) {\n\n \t \tif (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 1800)) {\n\t\t\t // last request was more than 30 minutes ago\n \t \t\t $query=\"UPDATE users SET last_logon='\".$_SESSION['LAST_ACTIVITY'].\"' WHERE userID=\".$_SESSION['RCMS_user_id'];\n\t\t\t\tmysqli_query($GLOBALS['link'],$query);\n\t\t\t session_unset(); // unset $_SESSION variable for the run-time \n\t\t\t session_destroy(); // destroy session data in storage\n\t\t\t return 0;\n\t\t\t}else{\n\t\t\t\t$_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp\n\t\t\t return 1;\n\t\t\t}\n \t }else{\n \t \treturn 0;\n \t \t\n \t }\n }", "function initilize_logout(){\r\n\t\tredirect('auth/initilize_logout');\r\n\t\tif (is_logged_in_user()) {\r\n\t\t\t$this->general_model->update_login_manager($this->session->userdata(LOGIN_POINTER));\r\n\t\t\t$this->session->unset_userdata(array(AUTH_USER_POINTER => '',LOGIN_POINTER => '') );\r\n\t\t\t// added by nithin for unseting the email username\r\n\t\t\t$this->session->unset_userdata('mail_user');\r\n\t\t}\r\n\t}", "public function sessionEnd (){\n $this->load->library( 'nativesession' );\n $this->load->helper('url');\n\n //delete session data\n $this->nativesession->delete('userid');\n $this->nativesession->delete('userLevel');\n\n session_destroy();\n\n redirect(\"../../../iris/dashboard\");\n\t}", "function start_user_session( $assemblervars){\n\t$userid = getSessionId();\n\n\t// Load the session data from the form, if available\n\t// Loop through an array of options provided and set the session\n\tforeach($assemblervars AS $option){\n\t\tif (isset($_REQUEST[$option])){\n\t\t\t$_SESSION[$option] = $_REQUEST[$option];\n\t\t} elseif ( !isset($_SESSION[$option])) {\n\t\t\t$_SESSION[$option] = '';\n\t\t}\n\t}\n}", "public function connexionAdminAssoLogin(){\n session_destroy();\n }", "function login_routine()\r\n\t{\r\n\t\t//Make the input userid and password into variables\r\n\t\t$frmData = $this->obj->input->post('frmData');\r\n\r\n\t\t//Use the input userid and password and check against 'adm_users' table\r\n\t\t$query = $this->obj->db->get('adm_users');\r\n\r\n\t\t$login_result = false;\r\n\t\tforeach($query->result() as $row){\r\n\t\t\tif($row->userid == $frmData['userid'] && $row->passw == MD5($frmData['password'])){\r\n\t\t\t\t$login_result = true;\r\n\t\t\t\t$id = $row->userid;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//If username and password match set the a logged in flag in 'ci_sessions'\r\n\t\tif ($login_result==1) {\r\n\r\n\t\t\t//menu setting\r\n\t\t\t$menu = $this->obj->db->query(SQL_GET_MENU_LIST, $frmData['userid']);\r\n\t\t\t\r\n\t\t\t//record current session id to adm_users so that can be shyncronized when checking\r\n\t\t\t//XXX FIXME when someone login in another kompi, automatically another one will be loged out\r\n\t\t\t//XXX is it bug or feature ?? XXX\r\n\t\t\t$this->obj->db->query('UPDATE adm_users SET sessid = ? WHERE userid = ?', array($this->obj->session->userdata('session_id'), $frmData['userid']));\r\n\r\n\t\t\t//XXX next on....\r\n\t\t\t//XXX can be done by using scheduler such cron to cleared sessid in case user leave apps without logout. \r\n\r\n\t\t\t//user privileges by its username -> get it into privs array\r\n\t\t\tforeach($menu->result() as $m){\r\n \t\t$s_module = $m->modname; //class\r\n \t\t$s_action = $m->actname; //controller\r\n \t\t$s_priv = $s_module.$s_action;\r\n\r\n \t\tif ($m->isshow == '1') { // only get showable menus\r\n \t\t\t$a_appMenu[$m->menuhead]['items'][] =\r\n \t\t\tarray('name' => $m->menuname,\r\n \t\t\t\t'module' => $s_module,\r\n \t\t\t\t'action' => $s_action\r\n \t\t\t);\r\n \t\t}\r\n \t\t}\r\n\t\t\t$menus = $a_appMenu;\r\n\t\t\t$_SESSION['menu_list'] = $menus;\r\n\r\n\t\t\t//array of session that will be kept during logged_in\r\n\t\t\t$credentials = array(\r\n\t\t\t\t\t\t'user_id' => $id, \r\n\t\t\t\t\t\t'logged_in' => $login_result, \r\n\t\t\t\t\t\t'menu_list' => $menus,\r\n\t\t\t\t\t\t'curr_page' => 1 \r\n\t\t\t\t\t);\r\n\r\n\t\t\t$this->obj->session->set_userdata($credentials);\r\n\t\t\tredirect('','location'); //On success redirect user to default page\r\n\t\t} else {\r\n\t\t\t//On error send user back to login page, and add error message\r\n\t\t\tredirect('welcome/index/', 'location'); //On success redirect user to default page\r\n\t\t}\r\n\t}", "function run()\r\n {\r\n $id = Request :: get(UserManager :: PARAM_USER_USER_ID);\r\n if ($id)\r\n {\r\n \tif (!UserRights :: is_allowed_in_users_subtree(UserRights :: EDIT_RIGHT, $id))\r\n\t\t {\r\n\t\t \t$this->display_header();\r\n\t\t Display :: error_message(Translation :: get(\"NotAllowed\", null, Utilities :: COMMON_LIBRARIES));\r\n\t\t $this->display_footer();\r\n\t\t exit();\r\n\t\t }\r\n\r\n\t\t $checkurl = Session :: retrieve('checkChamiloURL');\r\n\t\t Session :: clear();\r\n Session :: register('_uid', $id);\r\n Session :: register('_as_admin', $this->get_user_id());\r\n Session :: register('checkChamiloURL', $checkurl);\r\n header('Location: index.php');\r\n\r\n }\r\n else\r\n {\r\n $this->display_error_page(htmlentities(Translation :: get('NoObjectSelected', array('OBJECT'=> Translation :: get('User')), Utilities :: COMMON_LIBRARIES)));\r\n }\r\n }", "public function run() {\r\n $this->session->invalidate();\r\n\r\n /*\r\n * Get username and password from the $_POST\r\n */\r\n $username = $this->request->request->get(\"user\", null);\r\n $password = $this->request->request->get(\"pass\", null);\r\n /*\r\n * If username or password is empty, throw error\r\n */\r\n if ( empty($username) || empty($password)) {\r\n $this->failure(\"User name or password cannot be empty\");\r\n }\r\n\r\n $user = new CoreUser($username);\r\n\r\n $login_manager = new LoginManager($user);\r\n $login_manager->authenticateUser($password);\r\n \r\n if (!$user->isAuth()) {\r\n $this->failure(\"Login failed. Please check your password and try again.\");\r\n }\r\n\r\n try {\r\n if (!$login_manager->getAccountInfo()) {\r\n $this->failure(\"Could not load user account\");\r\n }\r\n } catch (SystemException $e) {\r\n $client_error = $e->getUIMsg();\r\n\r\n if (empty($client_error)) {\r\n $client_error = \"Operation failed: Error code \" . $e->getCode();\r\n }\r\n\r\n $this->failure($client_error);\r\n } catch (\\Exception $e) {\r\n $err_msg = \"Unexpected error: \" . $e->getCode();\r\n $this->failure($err_msg);\r\n }\r\n\r\n /*\r\n * User authenticated. Save user object in the session.\r\n */\r\n $this->session->set('coreuser', $user);\r\n\r\n $this->success();\r\n }", "public function start()\n {\n // Este módulo requiere a un usuario logueado\n $this -> setRequireUser( true );\n }", "public function processLogout(){\r\n\t\t$this->load->library(\"form_validation\");\r\n\t\t$this->load->library('encrypt');\r\n\r\n\t\t$this->form_validation->set_rules(\"user\", \"Username\", \"trim|xss_clean|required\");\r\n\t\tif( $this->form_validation->run() == FALSE){\r\n\t\t\techo -1;\r\n\t\t}else{\r\n\t\t\t$user = $this->form_validation->set_value('user');\r\n\r\n\t\t\tif($user == \"admin\"){\r\n\t\t\t\t//set a new php session\r\n\t\t\t\t$msg = $user . rand() . time() . rand();\r\n\t\t\t\t$key = 'super-secret-session';\r\n\t\t\t\t$encrypted_string = $this->encrypt->encode($msg, $key);\r\n\r\n\t\t\t\t$_SESSION['ci_admin_in'] = rand() . time();\r\n\r\n\t\t\t\t//update database with new session id\r\n\t\t\t\t$this->load->model(\"put_db\");\r\n\t\t\t\t$result = $this->put_db->renewSession($user, $encrypted_string);\r\n\r\n\t\t\t\techo 1;\r\n\t\t\t}else\r\n\t\t\t\techo 0 . \" = \" . $user;\r\n\t\t}\r\n\t}", "public function closeUser ()\n\t{\n\t\t$this->_username = null;\n\t}", "public function setup_session(){\n if(!(isset($_SESSION))){\n session_start();\n }\n\n $_SESSION['user_id'] = $this->user_id;\n $_SESSION['name'] = $this->firstname;\n\n //Remove anon flag\n if(isset($_SESSION['anon'])){\n unset($_SESSION['anon']);\n }\n\n }", "public function processUser(){\n \n $this->setCurrentUser();\n $this->setUsersAttributes();\n }", "function admin_logout() {\n\t\t\n\t\t$this->Member->create();\n\t\t$db = $this->Member->getDataSource();\n\t\t$data['Member']['login_status'] = $db->expression(\"NOW()\");\n\t\t$data['Member']['id'] = $this->Session->read('Admin.id');\n\t\t$this->Member->save($data);\n\t\t\n\t\t$this->Session->delete('Admin.id');\n\t\t$this->Session->delete('Admin.email');\n\t\t$this->Session->delete('Admin.loginStatus');\n\t\t$this->Session->delete('Admin.group_id');\n\t\t$this->redirect(array(\n\t\t\t'action' => 'login',\n\t\t\t'admin' => true\n\t\t));\n\t}", "public function joinSession(){\n\t\tif (session_status() != PHP_SESSION_ACTIVE){\n\t\t\tsession_start();\n\t\t}\n\t}", "public function shutdown()\n {\n $this->setAttribute('lastrequest', time(), 'user');\n\n // rimozione variabili flash da eliminare\n foreach ($names = $this->getNames('core/user/flash/remove') as $name)\n {\n $this->removeAttribute($name, 'core/user/flash');\n $this->removeAttribute($name, 'core/user/flash/remove');\n }\n\n // termina immediatamente\n session_write_close();\n }", "function disconnect_user() {\n\tunset( $_SESSION['GHOME'] );\n\tunset( $_SESSION['GHOME_CUSER'] );\n}", "public function simulateUser() {}", "public static function logoutUser( ) {\r\n self::$database->update(\"UPDATE users set sid=? where sid=?\", \r\n \"\", session_id());\r\n session_destroy();\r\n }", "public function run()\n\t{\n\t\tDB::table('users')->delete();\n\t\tSentry::getUserProvider()->create(array(\n\t 'email' => '[email protected]',\n\t 'password' => 'sentryadmin',\n\t 'activated' => 1,\n\t ));\n\t Sentry::getUserProvider()->create(array(\n\t 'email' => '[email protected]',\n\t 'password' => 'sentryuser',\n\t 'activated' => 1,\n\t ));\n\t}", "function shutdown() {\r\n // Write the session data to the disk\r\n session_write_close();\r\n}", "function __construct(){\n session_start();\n if(isset($_SESSION[\"user\"])){\n if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 1800)) {\n //Destruyo la session despues de inactividad por determinado tiempo y vuelvo al login\n $this->logout();\n }\n $_SESSION['LAST_ACTIVITY'] = time(); //Actualizo el último instante de actividad\n }else{\n header(LOGIN);\n }\n }", "function createSession($u) {\r\n\t// THEN NEED TO ENSURE SESSION IS DELETED WHEN BROWSER CLOSED OR LOGOUT...??\r\n\t//if (!checkSession()) {\t\t\r\n\t\t$rndStr = randomString();\r\n\t\tsession_start();\r\n\t\r\n\t\t$_SESSION['username'] = $u;\r\n\t\t$_SESSION['s_id'] = $rndStr;\r\n\t\t\r\n\t\t$db_conn = connectToDB();\r\n\r\n\t\t$query = \"UPDATE user SET s_id='$rndStr' WHERE username='$u'\";\r\n\t\t$result = mysql_query($query) or die(mysql_error());\r\n\r\n\t\tdisconnectFromDB($db_conn);\r\n\t//}\r\n}", "function logout() {\n if (!isset($_SESSION['userx\\auth']['shells']) || count($_SESSION['userx\\auth']['shells']) == 0) {\n unset($_SESSION['userx\\auth']);\n // Make sure remember keys are forgotten when logging out.\n if (isset($_COOKIE[\"REMBR_USR_KEY\"])) {\n // Unset this key, whomever it belongs too.\n if (strlen($_COOKIE[\"REMBR_USR_KEY\"]) == 16) {\n $user = UserModel::select()->byKey(array(\"user_remember_key\" => $_COOKIE['REMBR_USR_KEY']))->first();\n if ($user !== null) {\n $user->user_remember_key = \"\";\n $user->store();\n }\n }\n unset_cookie(\"REMBR_USR_KEY\");\n }\n } else {\n $_SESSION['userx\\auth']['user'] = array_pop($_SESSION['userx\\auth']['shells']);\n }\n}", "public function controlSession(){\n $session = $_SESSION['wifiGuardSharingEmail'];\n $sessionID = $_SESSION[\"wifiGuardSharingID\"];\n $uri = $_SERVER['REQUEST_URI'];\n \n if(!empty($session) && !empty($sessionID)){\n $result = dibi::query('SELECT sessionID\n FROM [user]\n WHERE [email] = %s', $session, 'LIMIT 1');\n $databaseSessionID = $result->fetchSingle();\n \n //if user is in index.php with valid session\n if (preg_match(\"/index.php/\",$uri) && $databaseSessionID===$sessionID){\n parent::redirection(\"app.php?page=showrecord\");\n }\n //if user try load app.php with invalid session\n elseif (preg_match(\"/app.php/\",$uri) && $databaseSessionID!==$sessionID){\n parent::redirection(\"index.php\");\n }\n } \n //if user try load app.php without session\n elseif(preg_match(\"/app.php/\",$uri)){\n parent::redirection(\"index.php\");\n }\n }", "abstract protected function logout();", "public function start()\n {\n if ($this->isStarted) return;\n $this->_isStarted = true;\n if (LilyModule::instance()->enableLogging)\n Yii::log(\"userIniter started\", CLogger::LEVEL_INFO, 'lily');\n $initRoute = LilyModule::route('user/init');\n if (!isset($this->steps)) {\n $count = 0;\n $steps = array();\n if($this->showStartStep) $steps[$count++] = (object)array(\n 'page' => Yii::app()->createUrl($initRoute, array('action'=>'start')),\n 'name' => \"Start\",\n 'allowed' => array($initRoute),\n );\n foreach (LilyModule::instance()->relations as $name => $relation) {\n if (isset($relation['onRegister'])) {\n $onRegister_route = is_array($relation['onRegister']) ? $relation['onRegister'][0] : $relation['onRegister'];\n $onRegister_query = is_array($relation['onRegister']) ? array_slice($relation['onRegister'], 1) : array();\n $steps[$count++] = (object)array(\n 'page' => Yii::app()->createUrl($onRegister_route, $onRegister_query),\n 'name' => $name,\n 'allowed' => array($onRegister_route),\n );\n }\n }\n if($this->showStartStep) $steps[$count++] = (object)array(\n 'page' => Yii::app()->createUrl($initRoute, array('action'=>'finish')),\n 'name' => \"Finish\",\n 'allowed' => array($initRoute),\n );\n LilyModule::instance()->session->data->userInitData = new stdClass;\n LilyModule::instance()->session->data->userInitData->steps = $this->_steps = $steps;\n LilyModule::instance()->session->data->userInitData->stepId = $this->_stepId = 0;\n LilyModule::instance()->session->data->userInitData->count = $this->_count = $count;\n LilyModule::instance()->session->save();\n }\n $route = Yii::app()->urlManager->parseUrl(Yii::app()->request);\n Yii::log(\"userIniter started with route $route\", CLogger::LEVEL_INFO, 'lily');\n if (!in_array($route, $this->step->allowed)\n && !in_array($route, LilyModule::instance()->allowedRoutes)\n && !in_array($route, array(LilyModule::route('user/logout')))\n ) {\n Yii::app()->request->redirect($this->step->page);\n }\n }", "public function logAdminOff()\n {\n //session must be started before anything\n session_start ();\n\n // Add the session name user_id to a variable $id\n $id = $_SESSION['user_id'];\n\n //if we have a valid session\n if ( $_SESSION['logged_in'] == TRUE )\n {\n $lastActive = date(\"l, M j, Y, g:i a\");\n $online= 'OFF';\n $sql = \"SELECT id,online, last_active FROM users WHERE id = '\".$id.\"'\";\n $res = $this->processSql($sql);\n if ($res){\n $update = \"UPDATE users SET online ='\".$online.\"', last_active ='\".$lastActive.\"' WHERE id = '\".$id.\"'\";\n $result = $this->processSql($update);\n }\n //unset the sessions (all of them - array given)\n unset ( $_SESSION );\n //destroy what's left\n session_destroy ();\n\n header(\"Location: \".APP_PATH.\"admin_login\");\n }\n\n\n \t\t//It is safest to set the cookies with a date that has already expired.\n \t\tif ( isset ( $_COOKIE['cookie_id'] ) && isset ( $_COOKIE['authenticate'] ) ) {\n \t\t\t/**\n \t\t\t\t* uncomment the following line if you wish to remove all cookies\n \t\t\t\t* (don't forget to comment or delete the following 2 lines if you decide to use clear_cookies)\n \t\t\t*/\n \t\t\t//clear_cookies ();\n \t\t\tsetcookie ( \"cookie_id\", '', time() - 3600);\n \t\t\tsetcookie ( \"authenticate\", '', time() - 3600 );\n \t\t}\n\n \t}", "function _loginusers(){\n\t\t$this->_output['tpl']=\"admin/user/login_users\";\n\t}", "function startSession(){\r\n\r\n\t\tsession_name(\"phpBMS\".preg_replace('/\\W/',\"\",APPLICATION_NAME).\"v096ID\");\r\n\t\tsession_start();\r\n\r\n\t}", "public function canStartSession();", "public function indexAction()\n {\n\t\tprint_scr(D, session_id());\t\n\t\t\n\t\t//Check if the session is already valid\n\t\tif(isset($this->session->name)) {\n\t\t\tif (isset($this->session->isFBUser)) {\n\t\t\t //Fb User has logged in\n\t\t\t\t\t$user_profile=$this->session->userProfile; \n\t\t\t\t\t$this->view->userFirstName = $user_profile['first_name'];\n\t\t\t\t\t$this->view->userLastName= $user_profile['last_name'];\n\t\t\t\t\t$this->view->fbUser = 1;\n\t\t\t} else {\n\t\t\t\t\t// regular user who has logged in\n\t\t\t\t\t$this->view->regularUser=1;\n\t\t\t\t\t$this->view->userFirstName=$this->session->userFirstName;\n\t\t\t\t\t$this->view->userLastName=$this->session->userLastName;\n\t\t\t}\n\t\t} else {\n\t\t\t//session expired or not started\n\t\t\tZend_Session::destroy( true );\n\t\t\tprint_scr(E,\"Session Expired OR Not Started!!\");\n\t\t}\n\n }", "function beSelf(){\r\n\t\t$_SESSION['userid'] = $_SESSION['realUserId'];\r\n\t\t$_SESSION['roleid'] = $_SESSION['realRoleId'];\r\n\t\tunset( $_SESSION['realRoleId'] );\r\n\t\tunset( $_SESSION['realUserId'] );\r\n\t}", "public function init() {\n// $session->open();\n// if (empty($_SESSION['userid'])) {\n// return $this->redirect('index.php?r=login');\n// }\n }", "public static function logOut()\n {\n self::startSession();\n session_destroy();\n }", "abstract public function logout();", "public function _startUserSession()\n {\n // if(isset($_POST['mulai_ujian']) && isset($_POST['id_sub'])){\n // //set cookies pengerjaan soal\n // // if isset belum ada dan jawaban belum ke kunci, maka ditambahkan\n // date_default_timezone_set('Asia/Bangkok');\n // $id_sub = $_POST['id_sub'];\n // $get_date = date('Y-m-d H:i:s', time());\n // $waktu_mulai = $get_date;\n // $key = \"ayotryout2020\";\n // $cipher = \"aes-128-gcm\";\n // $ivlen = openssl_cipher_iv_length($cipher);\n // $iv = hash('sha256', $key);\n // $waktu_mulai_encrypt = openssl_encrypt($waktu_mulai, $cipher, $key, $options = 0, $iv, $tag);\n // $tag_encode = base64_encode($tag);\n\n // setcookie(\"_ts\", $waktu_mulai_encrypt, time() + (86400 * 7), \"/\");\n // //_ss = start status / apakah ujian sudah dimulai atau belum (yes/no)\n // setcookie(\"_ss\", true, time() + (86400 * 7), \"/\");\n // setcookie(\"_tag\", $tag_encode, time() + (86400 * 7), \"/\");\n // setcookie(\"_ids\", $id_sub, time() + (86400 * 7), \"/\");\n // // header('Location: ' . BASEURL . '/user/welcome');\n // } else if(isset($_POST['id_sub'])) {\n // header('Location: ' . BASEURL . '/user/ujian');\n // }\n }", "function subsite_manager_login_shutdown_hook(ElggUser $user){\n\n if(!empty($user) && elgg_instanceof($user, \"user\", null, \"ElggUser\")){\n $user->save();\n }\n }", "public function Action_Logout()\n {\n Zero_App::$Users->IsOnline = 'no';\n Zero_App::$Users->Save();\n Zero_Session::Unset_Instance();\n session_unset();\n session_destroy();\n Zero_Response::Redirect(ZERO_HTTP);\n }", "function extra_siteinfo_currently_loggedin_users_page_end_session($form, &$form_state, $uid) {\n $form_state['user_id'] = $uid;\n return confirm_form(\n $form,\n 'End Session of Currenlty loggedin Users.',\n 'admin/reports/extra-siteinfo/currently-loggedin-users',\n 'Are you sure to end this particular users session?',\n 'End Session'\n );\n}", "public static function run() {\r\n\t\t$action = $_SESSION['action'];\r\n\t\t$arguments = $_SESSION['arguments'];\r\n\t\tswitch ($action) {\r\n\t\t\tcase \"show\":\r\n\t\t\t\t$users = UserDataDB::getUsersBy('userId', $arguments);\r\n\t\t\t\t$_SESSION['user'] = (!empty($users))?$users[0]:null;\r\n\t\t\t\tself::show();\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"home\":\r\n\t\t\t\t$users = UserDataDB::getUsersBy('userId', $arguments);\r\n\t\t\t\t$_SESSION['user'] = (!empty($users))?$users[0]:null;\r\n\t\t\t\tself::home();\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"update\":\r\n\t\t\t\tself::updateProfile();\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"update2\":\r\n\t\t\t\tself::updateProfile2();\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"showall\":\r\n\t\t\t\t$_SESSION['users'] = UserDataDB::getUsersBy();\r\n\t\t\t\t$_SESSION['headertitle'] = \"Show all users\";\r\n\t\t\t\t$_SESSION['footertitle'] = \"<h3>The footer goes here</h3>\";\r\n\t\t\t\tProfileView::showall();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t}\r\n\t}", "function Admin_authetic(){\n\t\t\t\n\t\tif(!$_SESSION['adminid']) {\n\t\t\t$this->redirectUrl(\"login.php\");\n\t\t}\n\t}", "public function run()\n\t{\n DB::table('users')->delete();\n DB::table('users_groups')->delete();\n\n /*\n // Super User\n $user = Sentry::getUserProvider()->create(\n array(\n 'id' => $this->increaseNumber(),\n 'email' => '[email protected]',\n 'password' => '[email protected]',\n 'activated' => 1,\n )\n );\n\n $group = Sentry::getGroupProvider()->findById(1); // Registered\n $user->addGroup($group);\n\n $group = Sentry::getGroupProvider()->findById(1000); // super user\n $user->addGroup($group);\n\n\n // random data generator\n $random_counter = 1;\n while($random_counter <= 200)\n {\n $user = Sentry::getUserProvider()->create(\n array(\n 'id' => $this->increaseNumber(),\n 'email' => \"user_\" . $random_counter . \"_\" . CustomSecurityHelper::random_key(rand(5, 10), true, true) . \"@user.com\",\n 'password' => \"[email protected]\",\n 'activated' => rand(0, 1),\n )\n );\n $group = Sentry::getGroupProvider()->findById(rand(5, 50)); // add to random group\n $user->addGroup($group);\n\n $random_counter++;\n }\n */\n\n $this->command->info('#__users table seeded!');\n\t}", "function user_logout() {\n session_destroy();\n}", "public function _logout()\n {\n $this->_login( self::getGuestID() );\n }", "public function run(){\n\t\t\tDB::table('users')->delete();\n\n\t\t\t$user1 = new User();\n\t\t\t$user1->username = \"admin\";\n\t\t\t$user1->email = \"[email protected]\";\n\t\t\t$user1->password = $_ENV['DEFAULT_USER_PASS'];\n\t\t\t$user1->save();\n\n\t\t\t$user2 = new User();\n\t\t\t$user2->username = 'guest';\n\t\t\t$user2->email = '[email protected]';\n\t\t\t$user2->password = $_ENV['DEFAULT_USER_PASS'];\n\t\t\t$user2->save();\n\t\t}", "private function renewSession() {}", "private function _sess_run() {\n\t\t// session\n\t\tini_set('session.save_handler', $this->sess_save_handler);\n\t\t$path = array();\n\t\tforeach ($this->sess_server as $server) {\n\t\t\tif (isset($server['host']) && isset($server['port'])) {\n\t\t\t\t$path[] = \"tcp://{$server['host']}:{$server['port']}?\" . http_build_query(isset($server['params']) ? $server['params'] : array());\n\t\t\t}\n\t\t}\n\t\tif (empty($path)) {\n\t\t\tshow_error('Session save_path is empty');\n\t\t}\n\t\tini_set('session.save_path', implode(',', $path));\n\n\t\tini_set('session.gc_maxlifetime', $this->sess_expiration);\t// 过期时间\n\t\t// cookie\n\t\tini_set('session.cookie_secure', 0);\t\t// 0 http:// 1 https://\n\t\tini_set('session.cookie_httponly', 1);\t\t// 不让JS读取session的cookie\n\t\tsession_name($this->sess_cookie_name);\n\n\t\tsession_start();\n\t\t// delete old flashdata (from last request)\n\t\t$this->_flashdata_sweep();\n\t\t// mark all new flashdata as old (data will be deleted before next request)\n\t\t$this->_flashdata_mark();\n\t}", "public function authUser(){\n if(!isset($this->sessionBool) || empty($this->sessionBool)){\n die($this->alerts->ACCESS_DENIED);\n }else{\n if(!$this->sessionBool){\n die($this->alerts->ACCESS_DENIED);\n }\n } \n }", "private function _logout(){\r\n $auth = new AuthenticationService();\r\n\r\n if ($auth->hasIdentity()) {\r\n // Identity exists; get it\r\n $auth->clearIdentity();\r\n $this->user = false;\r\n\r\n header('Location: '.WEBROOT ) ;\r\n }\r\n }", "function sess_run()\n {\n //If we are, update the session length to reflect the \"user specific length\"\n if ($this->persistant_session() != FALSE) {\n $this->sess_length = $this->persistant_session();\n }\n\n //Set Session Name\n session_name($this->sess_name);\n\n //Set Session Lifetime (this is in seconds, unlike setting a normal cookie which requires a date/time)\n ini_set('session.cookie_lifetime', $this->sess_length);\n\n $current_session_id = session_id();\n if ($current_session_id != '') {\n //By calling Session_ID - with the current session_id - we force to renew the cookie (and the expiry time)\n session_id($current_session_id);\n }\n //If the session doesn't exist yet, there is no need to do this.\n\n //Start or Continue our Session\n session_start();\n\n //User IP Match - Run if required to do so\n if ($this->sess_match_ip == TRUE) {\n if (!isset($_SESSION['ip_address'])) {\n //If our session does not previously contain an IP address, this is the user's first visit. Record their IP.\n //Do not check again now until next page load.\n $_SESSION['ip_address'] = $this->_ra_encode($this->CI->input->ip_address());\n } else {\n if ($this->_ra_decode($_SESSION['ip_address']) != $this->CI->input->ip_address()) {\n //User IP Match failed - destory the session (and any stored data) immediantly.\n $this->sess_destroy();\n //Do not continue, and return \"FALSE\"\n return FALSE;\n }\n }\n }\n\n //User UserAgent (browser) Match - Run if required to do so\n if ($this->sess_match_useragent == TRUE) {\n if (!isset($_SESSION['user_agent'])) {\n //If our session does not previously contain a UserAgent, this is the user's first visit. Record their UserAgent.\n //Do not check again now until next page load.\n $_SESSION['user_agent'] = $this->_ra_encode(trim(substr($this->CI->input->user_agent(), 0, 50)));\n } else {\n if ($this->_ra_decode($_SESSION['user_agent']) != trim(substr($this->CI->input->user_agent(), 0, 50))) {\n //User UserAgent (browser) Match failed - destory the session (and any stored data) immediantly.\n $this->sess_destroy();\n //Do not continue, and return \"FALSE\";\n return FALSE;\n }\n }\n }\n\n //If session encryption is enabled, decode the session data and pass it to the array userdata() for compatability reasons.\n $this->userdata = $this->_ra_decode($_SESSION);\n\n //Return TRUE - successfully started/continued our session\n return TRUE;\n }", "public function userLogout() {\n // Starting a session to unset and destroy it\n session_start();\n session_unset();\n session_destroy();\n\n // Sending the user back to the login page\n header(\"Location: login\");\n }", "public function index()\n\t{\n\t\tif(isset($_SESSION['userid']))\n\t\t{\n\t\t\tredirect('schedule');\n\t\t}\n\n\t\t// for testing purposes, use backdoor_login\n\t\t$this->backdoor_login();\n\n\t}", "function noUser(){\n session_destroy();\n session_start();\n\t$_SESSION['token'] = bin2hex(openssl_random_pseudo_bytes(32));\n $user = 'Guest';\n $_SESSION[\"activeUser\"]= $user;\n header(\"Location: http://ec2-34-227-117-216.compute-1.amazonaws.com/~BenFortier/Moduele3/news/homepage.php\");\n}", "protected function CreateSession($_user_id)\n {\n // user has supplied valid credentials, so log them in\n // generate a 32-character session string to be used to identify the user for subsequent page views\n $charDump='abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n do\n {\n $sessionID='';\n for($t=0;$t<32;$t++)\n {\n $sessionID .= $charDump{mt_rand(0,strlen($charDump)-1)};\n }\n // check to see if 32-character string already exists\n\t$q = self::$DB->SelectQuery('sessions');\n\t$q->conditions = \"session_id = ?\";\n\t$q->limit = \"1\";\n\t$q->parameters = array($sessionID);\n\n\t$result = self::$DB->Process($q);\n\n } while($result);\n\n //Destroy previous user sessions\n $q = self::$DB->DeleteQuery('sessions');\n $q->conditions = \"user_id = ?\";\n $q->parameters = array($_user_id);\n\n self::$DB->Process($q);\n\n // add a row to the sessions table, containing login info\n $q = self::$DB->InsertQuery('sessions');\n $q->fields = array(\n\t\t\t \"session_id\" => $sessionID,\n\t\t\t \"user_id\" => $_user_id,\n\t\t\t \"started\" => time(),\n\t\t\t \"lastact\" => time(),\n\t\t\t \"useragent\" => self::$REQUEST->Server(\"HTTP_USER_AGENT\"),\n\t\t\t \"ipaddr\" => self::$REQUEST->Server(\"REMOTE_ADDR\")\n\t\t\t);\n\n self::$DB->Process($q);\n\n // set cookie\n setcookie(SETTINGS::COOKIENAME, $sessionID, ($this->_shouldRemember == \"yes\") ? time()+26352000 : 0, Krai::GetConfig(\"BASEURI\") == \"\" ? \"/\" : \"/\".Krai::GetConfig(\"BASEURI\"), SETTINGS::COOKIE_DOMAIN);\n }\n\n\n}", "public function setSession(){\n if( $this->status === True ){\n $_SESSION['username'] = $this->username;\n $_SESSION['userlvl'] = $this->userlevel;\n $_SESSION['status'] = True;\n }else{\n $_SESSION['status'] = False;\n }\n }", "function _read_user_session()\n {\t\t\n\t\tif($this->sh_Options['keeping_logic'] == 'db'){\n\t\t\t$this->is_present = $this->_read_user_session_db();\n\t\t} else {\n\t\t\t$this->is_present = $this->_read_user_session_ss();\n\t\t}\n\t}", "function checkSession() \n {\n if (!$this->Session->check('User')) \n { \n // Force the user to login \n $this->redirect('/homes'); \n exit(); \n } \n }", "public function session_start_controller(){\n\n\t\t\t$userName=mainModel::clean_string($_POST['loginUserName']);\n\t\t\t$userPass=mainModel::clean_string($_POST['loginUserPass']);\n\n\t\t\t//$userPass=mainModel::encryption($userPass);\n\n\t\t\t$dataLogin=[\n\t\t\t\t\"AccountUserName\"=>$userName,\n\t\t\t\t\"AccountPass\"=>$userPass\n\t\t\t];\n\n\t\t\tif($dataAccount=loginmodel::session_start_model($dataLogin)){\n\t\t\t\tif($dataAccount->rowCount()==1){\n\n\t\t\t\t\t$row=$dataAccount->fetch();\n\n session_start(['name'=>'ASUSAP']);\n $_SESSION['user_name_srce']=$row['usuario'];\n $_SESSION['user_token_srce']=$row['password'];\n // $_SESSION['user_token_srce']=md5(uniqid(mt_rand(), true));\n\n $dateNow=date(\"Y-m-d\");\n\t\t\t\t\t$yearNow=date(\"Y\");\n\t\t\t\t\t$timeNow=date(\"h:i:s a\");\n\n $url=SERVERURL.\"dashboard/\";\n\n\t\t\t\t}else{\n\t\t\t\t\t$dataAlert=[\n\t\t\t\t\t\t\"Title\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\t\"Text\"=>\"El nombre de usuario y contraseña no son correctos o su cuenta puede estar deshabilitada\",\n\t\t\t\t\t\t\"Type\"=>\"error\",\n\t\t\t\t\t\t\"Alert\"=>\"single\"\n\t\t\t\t\t];\n\t\t\t\t\treturn mainModel::sweet_alert($dataAlert);\n\t\t\t\t}\n return $urlLocation='<script type=\"text/javascript\"> window.location=\"'.$url.'\"; </script>';\n\t\t\t}else{\n\t\t\t\t$dataAlert=[\n\t\t\t\t\t\"Title\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Text\"=>\"No se pudo realizar la petición\",\n\t\t\t\t\t\"Type\"=>\"error\",\n\t\t\t\t\t\"Alert\"=>\"single\"\n\t\t\t\t];\n\t\t\t\treturn mainModel::sweet_alert($dataAlert);\n\t\t\t}\n\t\t}", "public static function sessionAndAdminLoggedIn(){\n Verify::session();\n Verify::adminLoggedIn();\n }", "public function indexAction()\n\t{\t\t\n\t\tif(!authorization::areWeLoggedIn())\n\t\t{\n\t\t\t//we do it this way so that certain applicatiob classes can override the super Login action\n\t\t\tglobalRegistry::getInstance()->setRegistryValue('event','login_application_grabs_control','true');\n\t\t\t$this->doLogin();\n\t\t}\n\t\t\n\t\t\n\t\t\t\t\n\t}", "function logout() {\n $stmt = self::$_db->prepare(\"UPDATE user SET session='' WHERE session=:sid\");\n $sid = session_id();\n $stmt->bindParam(\":sid\", $sid);\n $stmt->execute();\n }", "public function logout()\n {\n $this->userId = 0;\n $this->createSession();\n $this->logger->loginOutEntry(2);\n }", "function start($sid = \"\")\n {\n global $zone, $application;\n\n $drop_session_cookie = false;\n\n if ($zone == \"AdminZone\")\n {\n ini_set(\"session.cookie_lifetime\", 0);\n session_name(\"AZSESSID\");\n if ($application->db->DB_isTableExists($application->getAppIni('DB_TABLE_PREFIX').\"settings\") != null)\n {\n $duration_cfg = (int)modApiFunc(\"Settings\", \"getParamValue\", \"ADMIN_SESSION_DURATION\", \"ADM_SESSION_DURATION_VALUE\");\n }\n else\n {\n $duration_cfg = 3600;\n }\n $ClientSessionLifetime = $duration_cfg;\n }\n else\n {\n \tif (isset($_COOKIE['save_session']) && $_COOKIE['save_session'] == \"save\")\n \t{\n \t if ($application->db->DB_isTableExists($application->getAppIni('DB_TABLE_PREFIX').\"settings\") != null)\n {\n $cz_duration_cfg = (int)modApiFunc(\"Settings\", \"getParamValue\", \"CUSTOMER_ACCOUNT_SETTINGS\", \"CUSTOMER_SESSION_DURATION_VALUE\");\n }\n else\n {\n $cz_duration_cfg = 3600*24*30; //30 days\n }\n\n \t\tini_set(\"session.cookie_lifetime\", $cz_duration_cfg);\n ini_set(\"session.gc_maxlifetime\", $cz_duration_cfg);\n \t}\n \telse\n \t{\n \t\tini_set(\"session.cookie_lifetime\", 0);\n #ini_set(\"session.gc_maxlifetime\", 0);\n $drop_session_cookie = true;\n\n \t}\n\n session_name(\"CZSESSID\");\n }\n\n if ($sid)\n {\n session_id($sid);\n }\n\n $session_save_handler = $application->getAppIni('SESSION_SAVE_HANDLER');\n if ($session_save_handler == 'DB')\n {\n // redefine session handler\n __set_session_db_handler();\n }\n elseif ($session_save_handler != 'PHP_INI')\n {\n ini_set(\"session.save_handler\", $session_save_handler);\n }\n\n $session_save_path = $application->getAppIni('SESSION_SAVE_PATH');\n if ($session_save_path == 'AVACTIS_CACHE_DIR')\n {\n session_save_path($application->getAppIni(\"PATH_CACHE_DIR\"));\n }\n elseif ($session_save_path != 'PHP_INI')\n {\n session_save_path($session_save_path);\n }\n\n session_start();\n\n global $application;\n $HTTP_URL = md5($application->getAppIni('HTTP_URL'));\n if (!isset($_COOKIE['HTTP_URL']))\n {\n setcookie('HTTP_URL', $HTTP_URL, time());\n }\n elseif ($_COOKIE['HTTP_URL']!=$HTTP_URL)\n {\n setcookie('HTTP_URL', $HTTP_URL, time());\n session_destroy();\n\n if ($session_save_handler == 'DB')\n {\n // redefine session handler (http://bugs.php.net/bug.php?id=32330)\n // redefine session handler\n __set_session_db_handler();\n }\n session_start();\n }\n\n if ($zone == \"CustomerZone\")\n {\n $sess = session_get_cookie_params();\n if ($drop_session_cookie)\n $t = 0;\n else\n $t = time()+$sess['lifetime'];\n setcookie(session_name(), session_id(), $t, '/');\n if ($application -> getCurrentProtocol() == 'http')\n $temp_url = $application->getAppIni('SITE_HTTPS_URL');\n else\n $temp_url = $application->getAppIni('SITE_URL');\n $temp_url = parse_url($temp_url);\n if (isset($temp_url['host']))\n setcookie(session_name(), session_id() , $t, '/', $temp_url['host']);\n }\n\n //\n // , .\n // , .\n // , , .\n // .\n // IP .\n // .\n // .\n //\n $CURRENT_PRODUCT_VERSION = PRODUCT_VERSION;\n\n $current_hash = \"\";\n if ($zone != \"AdminZone\")\n {\n loadModuleFile('configuration/const.php');\n /*_use(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR.'configuration'.DIRECTORY_SEPARATOR.'configuration_api.php');\n\n $tables = Configuration::getTables();\n $ss = $tables['store_settings']['columns'];\n\n $s = new DB_Select();\n $s->addSelectTable('store_settings');\n $s->addSelectValue('variable_value','value');\n $s->WhereValue($ss['name'], DB_EQ, SYSCONFIG_CHECKOUT_FORM_HASH);\n $v = $application->db->getDB_Result($s);\n $current_hash = $v[0]['value'];*/\n\n $cache = CCacheFactory::getCache('hash');\n $current_hash = $cache->read(SYSCONFIG_CHECKOUT_FORM_HASH);\n }\n\n $current_ips = getClientIPs();\n\n if((!array_key_exists('PRODUCT_VERSION', $_SESSION) ||\n $_SESSION['PRODUCT_VERSION'] != $CURRENT_PRODUCT_VERSION && $zone != \"AdminZone\")||\n// ! @array_intersect($_SESSION['REMOTE_ADDR'], $current_ips) ||\n// @$_SESSION['HTTP_USER_AGENT'] != @$_SERVER['HTTP_USER_AGENT'] || commented so that SIM Method of Authorize.Net redirect to orderplaced page\n (!array_key_exists(SYSCONFIG_CHECKOUT_FORM_HASH, $_SESSION) ||\n $current_hash != $_SESSION[SYSCONFIG_CHECKOUT_FORM_HASH] && $zone != \"AdminZone\") )\n {\n if(!empty($_SESSION['CartContent']) && is_array($_SESSION['CartContent']))\n {\n foreach($_SESSION['CartContent'] as $cart_id => $cart_content)\n {\n modApiFunc('Cart', 'removeGCfromDB', $cart_content['product_id']);\n }\n }\n //see this::session_clean1()\n session_unset();\n session_destroy();\n\n if ($session_save_handler == 'DB')\n {\n // redefine session handler (http://bugs.php.net/bug.php?id=32330)\n // redefine session handler\n __set_session_db_handler();\n }\n session_start();\n }\n $_SESSION['PRODUCT_VERSION'] = $CURRENT_PRODUCT_VERSION;\n $_SESSION[SYSCONFIG_CHECKOUT_FORM_HASH] = $current_hash;\n $_SESSION['REMOTE_ADDR'] = $current_ips;\n $_SESSION['HTTP_USER_AGENT'] = @$_SERVER['HTTP_USER_AGENT'];\n //\n\n foreach($_SESSION as $key => $val)\n {\n $this->keyvalList[$key] = $val;\n// $this->set($key, $val);\n }\n $this->started = TRUE;\n\n if ($zone == \"AdminZone\")\n {\n if (!$this->is_Set('ClientSessionLifetime'))\n {\n $this->set('ClientSessionLifetime', time());\n }\n else\n {\n $delta_time = time()-$this->get('ClientSessionLifetime');\n if (($delta_time > $ClientSessionLifetime)&&($ClientSessionLifetime!=0))\n {\n $this->un_Set('currentUserID');\n }\n $this->set('ClientSessionLifetime', time());\n }\n }\n }" ]
[ "0.67453873", "0.64131", "0.6382425", "0.6316734", "0.63155603", "0.6285616", "0.6284464", "0.62595594", "0.62454313", "0.6217632", "0.61409336", "0.6140454", "0.61161083", "0.6108268", "0.61004794", "0.6065494", "0.60107857", "0.60032904", "0.5996222", "0.59913975", "0.5980188", "0.5959396", "0.5949524", "0.59474283", "0.5940346", "0.5940162", "0.5937956", "0.5926213", "0.59187734", "0.59013414", "0.5895671", "0.5892639", "0.58903253", "0.5885784", "0.5879479", "0.58709455", "0.5852653", "0.58406776", "0.5840246", "0.58386624", "0.5838149", "0.5833641", "0.58326614", "0.58325285", "0.5831134", "0.5822674", "0.5819401", "0.5819271", "0.5819119", "0.58156526", "0.5814039", "0.58120745", "0.5805647", "0.57968235", "0.5795386", "0.5792439", "0.57918304", "0.57911986", "0.57731694", "0.5772174", "0.577031", "0.5766612", "0.5763157", "0.5761613", "0.5760543", "0.5757338", "0.575601", "0.57557535", "0.57550126", "0.5753324", "0.5753219", "0.5750713", "0.5747584", "0.5735802", "0.57356757", "0.5725116", "0.572393", "0.5719532", "0.5719011", "0.57183987", "0.57103693", "0.5707481", "0.5701593", "0.5700823", "0.56973124", "0.56753486", "0.5673785", "0.56725144", "0.56671125", "0.5665343", "0.566359", "0.56619936", "0.56611735", "0.5654712", "0.5651381", "0.56480604", "0.5647878", "0.56444895", "0.56407684", "0.5638471", "0.56359106" ]
0.0
-1
/ | | End of Users Management | / | | Start Courses Management |
public function courses() { $courses = Course::all(); $data['courses'] = $courses; //dd($courses); return view('admin.courses', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCourses()\n\t{\n\t\t//echo \"In Courses\";\n\t\tif (!isset($_REQUEST['username'])){\n\t\t\t$_REQUEST['username'] = Yii::app()->user->name;\n\t\t}\n\t\t//if (!Yii::app()->user->checkAccess('admin')){\n\t\t//\t$this->model=User::model()->findByPk(Yii::app()->user->name);\n\t\t//} else {\n\t\t\t$this->model = DrcUser::loadModel();\n\t\t\t//}\n\t\t//$title = \"Title\";\n\t\t//$contentTitle = \"Courses: title\";\n\t\t$title = \"({$this->model->username}) {$this->model->first_name} {$this->model->last_name}\";\n\t\t$contentTitle = \"Courses: {$this->model->term->description}\";\n\t\tif (!Yii::app()->user->checkAccess('admin') && !Yii::app()->user->checkAccess('staff')){\n\t\t\t$title = $this->model->term->description;\n\t\t\t$contentTitle = \"Courses\";\n\t\t}\n\t\t$this->renderView(array(\n\t\t\t'title' => $title,\n\t\t\t'contentView' => '../course/_list',\n\t\t\t'contentTitle' => $contentTitle,\n\t\t\t'menuView' => 'base.views.layouts._termMenu',\n\t\t\t'menuRoute' => 'drcUser/courses',\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('drcUser/update', array('term_code'=> $this->model->term_code, 'username'=>$this->model->username)) . '\"><i class=\"icon-plus\"></i> User Profile</a>',\n\t\t));\n\t}", "function i4_assigned_courses() {\n global $wpcwdb, $wpdb;\n $wpdb->show_errors();\n\n $user_id = get_current_user_id();\n\n $SQL = \"SELECT * FROM $wpcwdb->courses ORDER BY course_title ASC\";\n\n $courseCount = 0;\n $courses = $wpdb->get_results($SQL);\n\n if ($courses) {\n foreach ($courses as $course) {\n\n $up = new UserProgress($course->course_id, $user_id);\n\n\n // Break out if the user doesn't have access to this course\n if (!$this->I4_LMS_User_Can_Access($course->course_id, $user_id)) {\n continue;\n }\n\n //Retrieve the modules for the users course\n $modules = WPCW_courses_getModuleDetailsList($course->course_id);\n\n //Determine the % of course completion\n $i4_percent_completed = $this->i4_lms_percent_course_completed($course->course_id, $modules, $user_id);\n\n //Get a list of the completed units. We'll search the completed units array\n $i4_completed_units = $this->i4_get_completed_units($course->course_id, $user_id);\n\n printf(__('<div class=\"my-course-wrapper\">'));\n printf(__('<div class=\"my-course-meta\">'));\n printf(__('<div class=\"my-course-title\" >'));\n printf(__('<h3 class=\"wpcw_tbl_progress_course\">Course - %s</h3>'), $course->course_title);\n printf(__('</div> <!-- end my-course-title -->'));\n printf(__('<div class=\"my-course-pct-complete\">%s%% Complete</div>'), $i4_percent_completed);\n printf(__('</div><!-- end course-meta -->'));\n\n printf('<div class=\"my-course-outline-wrapper\">');\n\n //Let's get the modules for the course\n if ($modules) {\n foreach ($modules as $module) {\n\n //get the units for the module\n $units = WPCW_units_getListOfUnits($module->module_id);\n\n //display the module title\n printf('<div class=\"my-course-module-title\">');\n printf(__('<p>%s</p>'), $module->module_title);\n printf('</div> <!-- end my-course-module-title -->');\n\n //create a table for each of the units in the module\n printf('<table class=\"my-course-units-table\">');\n\n //iterate through the units for the module\n if ($units) {\n foreach ($units as $unit) {\n printf('<tr>');\n printf('<td class=\"large-8 small-6 columns\">');\n printf(('<a href=\"%s\" title=\"%s\" class=\"my-course-link\"><i class=\"fa fa-play-circle-o\"></i> %s</a>'), get_the_permalink($unit->ID), $unit->post_title, $unit->post_title);\n // printf('</td>');\n printf('</td>');\n printf('<td class=\"large-4 small-6 columns\">');\n //If the unit is in the completed units array, display the completed checkmark.\n if (in_array($unit->ID, $i4_completed_units)) {\n printf('<div class=\"right completed-icon\"><i class=\"fa fa-check font-success completed-icon\"></i> Completed!</div>');\n }\n else {\n printf(__('<a class=\"button my-courses-button tiny blue right\" title=\"Begin %s\" href=\"%s\">Begin</a>'), $unit->post_title, get_the_permalink($unit->ID));\n }\n printf('</td>');\n printf('</tr>');\n }\n }\n\n printf('</table> <!-- my-course-units-table -->');\n\n }\n }\n\n /* printf('<table class=\"widefat wpcw_tbl wpcw_tbl_progress\">');\n\n printf('<thead>');\n printf('<th>%s</th>', __('Unit', 'wp_courseware'));\n printf('<th class=\"wpcw_center\">%s</th>', __('Completed', 'wp_courseware'));\n printf('<th class=\"wpcw_center wpcw_tbl_progress_quiz_name\">%s</th>', __('Quiz Name', 'wp_courseware'));\n printf('<th class=\"wpcw_center\">%s</th>', __('Quiz Status', 'wp_courseware'));\n printf('<th class=\"wpcw_center\">%s</th>', __('Actions', 'wp_courseware'));\n printf('</thead><tbody>');\n\n // #### 2 - Fetch all associated modules\n\n if ($modules)\n {\n foreach ($modules as $module)\n {\n // #### 3 - Render Modules as a heading.\n printf('<tr class=\"wpcw_tbl_progress_module\">');\n printf('<td colspan=\"3\">%s %d - %s</td>',\n __('Module', 'wp_courseware'),\n $module->module_number,\n $module->module_title\n );\n\n // Blanks for Quiz Name and Actions.\n printf('<td>&nbsp;</td>');\n printf('<td>&nbsp;</td>');\n printf('</tr>');\n\n // #### 4. - Render the units for this module\n $units = WPCW_units_getListOfUnits($module->module_id);\n if ($units)\n {\n foreach ($units as $unit)\n {\n $showDetailLink = false;\n\n printf('<tr class=\"wpcw_tbl_progress_unit\">');\n\n printf('<td class=\"wpcw_tbl_progress_unit_name\">%s %d - %s</td>',\n __('Unit', 'wp_courseware'),\n $unit->unit_meta->unit_number,\n $unit->post_title\n );\n\n // Has the unit been completed yet?\n printf('<td class=\"wpcw_tbl_progress_completed\">%s</td>', $up->isUnitCompleted($unit->ID) ? __('Completed', 'wp_courseware') : '');\n\n // See if there's a quiz for this unit?\n $quizDetails = WPCW_quizzes_getAssociatedQuizForUnit($unit->ID, false, $userID);\n\n // Render the quiz details.\n if ($quizDetails)\n {\n // Title of quiz\n printf('<td class=\"wpcw_tbl_progress_quiz_name\">%s</td>', $quizDetails->quiz_title);\n\n // No correct answers, so mark as complete.\n if ('survey' == $quizDetails->quiz_type)\n {\n $quizResults = WPCW_quizzes_getUserResultsForQuiz($userID, $unit->ID, $quizDetails->quiz_id);\n\n if ($quizResults)\n {\n printf('<td class=\"wpcw_tbl_progress_completed\">%s</td>', __('Completed', 'wp_courseware'));\n\n // Showing a link to view details\n $showDetailLink = true;\n printf('<td><a href=\"%s&user_id=%d&quiz_id=%d&unit_id=%d\" class=\"button-secondary\">%s</a></td>',\n admin_url('users.php?page=WPCW_showPage_UserProgess_quizAnswers'),\n $userID, $quizDetails->quiz_id, $unit->ID,\n __('View Survey Details', 'wp_courseware')\n );\n }\n\n // Survey not taken yet\n else {\n printf('<td class=\"wpcw_center\">%s</td>', __('Pending', 'wp_courseware'));\n }\n }\n\n // Quiz - show correct answers.\n else\n {\n $quizResults = WPCW_quizzes_getUserResultsForQuiz($userID, $unit->ID, $quizDetails->quiz_id);\n\n // Show the admin how many questions were right.\n if ($quizResults)\n {\n // -1% means that the quiz is needing grading.\n if ($quizResults->quiz_grade < 0) {\n printf('<td class=\"wpcw_center\">%s</td>', __('Awaiting Final Grading', 'wp_courseware'));\n }\n else {\n printf('<td class=\"wpcw_tbl_progress_completed\">%d%%</td>', number_format($quizResults->quiz_grade, 1));\n }\n\n\n // Showing a link to view details\n $showDetailLink = true;\n\n printf('<td><a href=\"%s&user_id=%d&quiz_id=%d&unit_id=%d\" class=\"button-secondary\">%s</a></td>',\n admin_url('users.php?page=WPCW_showPage_UserProgess_quizAnswers'),\n $userID, $quizDetails->quiz_id, $unit->ID,\n __('View Quiz Details', 'wp_courseware')\n );\n\n } // end of if printf('<td class=\"wpcw_tbl_progress_completed\">%s</td>'\n\n\n // Quiz not taken yet\n else {\n printf('<td class=\"wpcw_center\">%s</td>', __('Pending', 'wp_courseware'));\n }\n\n } // end of if survey\n } // end of if $quizDetails\n\n\n // No quiz for this unit\n else {\n printf('<td class=\"wpcw_center\">-</td>');\n printf('<td class=\"wpcw_center\">-</td>');\n }\n\n // Quiz detail link\n if (!$showDetailLink) {\n printf('<td>&nbsp;</td>');\n }\n\n printf('</tr>');\n }\n\n }\n\n }\n } */\n\n // printf('</tbody></table>');\n if ($i4_percent_completed == 100) {\n printf('<div class=\"my-courses-congrats\"><p class=\"text-center\"><i class=\"fa fa-check completed-icon\"></i> Congrats, Course Complete!</p></div>');\n }\n printf('</div> <!--end my-course-outline-wrapper -->');\n printf('</div> <!-- end my-course-wrapper -->');\n\n // Track number of courses user can actually access\n $courseCount++;\n\n } //end foreach courses as course\n\n // Course is not allowed to access any courses. So show a meaningful message.\n if ($courseCount == 0) {\n printf('You are not currently enrolled in a course. Please contact your Care Coordinator for assistance.', 'wp_courseware');\n }\n }\n\n }", "public function actionIndex() {\n\n ini_set('max_execution_time', 300);\n if (isset(Yii::app()->user->userId)) {\n $this->layout = '//layouts/admin';\n Yii::app()->user->setState(\"adminmenu\", \"course\");\n Yii::app()->user->setState(\"adminsubmenu\", \"courselist\");\n $criteria = new CDbCriteria();\n $criteria->order = 'updated_on DESC';\n $count = Courses::model()->count($criteria);\n $pages = new CPagination($count);\n // results per page\n $pages->pageSize = 10;\n $pages->applyLimit($criteria);\n $models = Courses::model()->findAll($criteria, array('order' => 'updated_on DESC'));\n $count = Courses::model()->count($criteria);\n $this->render('index', array(\n 'models' => $models,\n 'pages' => $pages, 'count' => $count\n ));\n } else {\n $this->layout = '//layouts/main';\n $this->redirect(array('site/index'));\n }\n }", "public function run()\n {\n $this->checkAuthorization(Manager::context(), 'ManagePersonalCourses');\n\n $this->set_parameter(\n CourseTypeCourseListRenderer::PARAM_SELECTED_COURSE_TYPE,\n Request::get(CourseTypeCourseListRenderer::PARAM_SELECTED_COURSE_TYPE));\n\n \\Chamilo\\Application\\Weblcms\\CourseType\\Storage\\DataManager::fix_course_tab_user_orders_for_user(\n $this->get_user_id());\n DataManager::fix_course_type_user_category_rel_course_for_user($this->get_user_id());\n\n // $this->buttonToolbarRenderer = $this->getButtonToolbarRenderer();\n $component_action = Request::get(self::PARAM_COMPONENT_ACTION);\n $this->set_parameter(self::PARAM_COMPONENT_ACTION, $component_action);\n\n switch ($component_action)\n {\n case 'add' :\n return $this->add_course_user_category();\n break;\n case 'move' :\n return $this->move_course_list();\n break;\n case 'movecat' :\n return $this->move_category_list();\n break;\n case 'assign' :\n return $this->assign_course_category();\n break;\n case 'edit' :\n return $this->edit_course_user_category();\n break;\n case 'delete' :\n $this->delete_course_type_user_category();\n break;\n case 'view' :\n return $this->show_course_list();\n break;\n case 'move_course_type_up' :\n $this->move_course_type(- 1);\n break;\n case 'move_course_type_down' :\n $this->move_course_type(1);\n break;\n default :\n return $this->show_course_list();\n }\n }", "public function index(){\n \n //Set eligible visitor to page \n $visitor = array('student', 'applicant');\n \n $user_type = $this->main->get(\"user_type\");\n \n if(in_array($user_type, $visitor)){\n \n $this->user_schedule();\n \n }else{\n \n $this->setup();\n }\n \n \n }", "function run()\r\n {\r\n $trail = BreadcrumbTrail :: get_instance();\r\n $trail->add_help('course_type general');\r\n\r\n $type = Request :: get(WeblcmsManager :: PARAM_TYPE);\r\n $course_type_ids = Request :: get(WeblcmsManager :: PARAM_COURSE_TYPE);\r\n\r\n if (! $this->get_user() || ! $this->get_user()->is_platform_admin())\r\n {\r\n $this->display_header();\r\n Display :: error_message(Translation :: get('NotAllowed', null ,Utilities:: COMMON_LIBRARIES));\r\n $this->display_footer();\r\n exit();\r\n }\r\n\r\n //else\r\n if (($type == 'course_type' && $course_type_ids) || ($type == 'all'))\r\n {\r\n $this->change_course_type_activity($course_type_ids);\r\n }\r\n\r\n else\r\n {\r\n $this->display_header();\r\n $this->display_error_message(Translation :: get('NoObjectsSelected', null ,Utilities:: COMMON_LIBRARIES));\r\n $this->display_footer();\r\n }\r\n\r\n }", "public function test_that_authorized_user_can_view_courses_within_other_periods()\n {\n \n }", "function cicleinscription_user_complete($course, $user, $mod, $cicleinscription) {\n}", "function get_e2l_courses($USER){\n $_SESSION['offset'] = 0;\n\n $servername = \"localhost\";\n $username = \"moodleuser\";\n $password = \"password\";\n $dbname = \"moodle\";\n\n // Create connection\n $conn = mysqli_connect($servername, $username, $password, $dbname);\n\n // Check connection\n if (!$conn) {\n die(\"Connection failed: \" . mysqli_connect_error());\n } \n\n /*GET ALL ENROLLED CLASSES FOR A STUDENT*/\n/* $sql = \"SELECT mc.id as id, mu.id as uid, mc.fullname \".\n \"FROM mdl_user as mu, mdl_course as mc, mdl_user_students as mus \".\n\t \"WHERE mu.id = mus.userid \".\n\t \"AND mus.course = mc.id \".\n\t \"AND mu.id = \".$USER->id.\" order by mc.id\";*/\n\n //ALL COURSES NOT IN THE 'Tasks' CATEGORY\t \n $sql = \"SELECT mc.id as id, mu.id as uid, mc.fullname \".\n \"FROM mdl_user as mu, mdl_course as mc, mdl_user_students as mus, mdl_course_categories as mcc \".\n \"WHERE mu.id = mus.userid \".\n \"AND mus.course = mc.id \".\n \"AND mu.id = \".$USER->id.\" \".\n \"AND mc.category = mcc.id \".\n \"AND mcc.name = 'Tasks' order by mc.id\";\t \n\n //(select id, name from mdl_lesson where course=7) union (select id, name from mdl_assignment where course=7) order by id;\n $result = mysqli_query($conn, $sql);\n\n echo \"<table class=\\\"left_box\\\">\";\n echo \"<tr><td id=\\\"parent_box\\\">\";\n echo \"<div>\";\n echo \"<div id=\\\"course_label\\\"><b>Tasks:</b></div>\";\n $entries = mysqli_num_rows($result); \n if ($entries > 0) {\n while($row = mysqli_fetch_assoc($result)) {\n\t $arr[] = $row[\"id\"];\n\t echo \"<div class=\\\"e2l_tasks e2l_font\\\" id=\\\"e2l_\".$row['id'].\"\\\" onmouseout=\\\"end_hilite(\".$row[\"id\"].\")\\\" onmouseover=\\\"start_hilite(\".$row[\"id\"].\")\\\" onclick=\\\"generate_tasks(\".$row[\"id\"].\")\\\">\". $row[\"fullname\"].\"</div>\";\n }\n }\n echo \"</div>\";\n echo \"</td></tr>\";\n echo \"</table>\";\n/* echo \"<table border='0' style='width:100%; height: 665px; background: #CDF3F3; border-radius: 25px; margin: 0px;'>\";\n echo \"<tr><th style=\\\"width: 252px; height: 41px\\\">TASK NAME:</th></tr>\";\n echo \"<tr><td style=\\\"width: 252px; height: 41px\\\">&nbsp;</td></tr>\";\n $entries = mysqli_num_rows($result); \n if ($entries > 0) {\n // output data of each row\n\n while($row = mysqli_fetch_assoc($result)) {\n\t $arr[] = $row[\"id\"];\n// echo \"<tr ><td style=\\\"width: 252px; height: 42px\\\"><div onclick='( generate_lessons(\".$row[\"id\"].\") )'><center>\". $row[\"fullname\"].\"</center></div></td><tr>\";\n echo \"<tr id=\\\"e2l_courses\\\" ><td style=\\\"width: 252px; height: 41px\\\" onclick='( generate_tasks(\".$row[\"id\"].\") )'><div style='padding-left: 20px;'>\". $row[\"fullname\"].\"</div></td><tr>\";\n\n }\n } else {\n echo \"<tr><td style=\\\"width: 252px; height: 41px\\\" colspan='1'>No Enrolled Courses:</td></tr>\";\n }\n $total = 12;\n while($entries < $total){\n $entries++;\n echo \"<tr><td style=\\\"width: 252px; height: 41px\\\">&nbsp;</td></tr>\"; \n }\n echo \"<tr><td style=\\\"width: 252px; height: 41px\\\">&nbsp;</td></tr>\";\n echo \"</table>\";*/\n\n \n\n mysqli_close($conn); \n echo \"<script>window.onload = function() { init_hilite(\".$arr[0].\"); }</script>\";\n return $arr[0];\n}", "function courses(){\n\t\t\t$this->load->view('admin/header');\n\t\t\t$this->load->view('admin/courses');\n\t\t\t$this->load->view('admin/footer');\n\t\t}", "public function my_courses($offset = 0) {\n\n\t\t$this->page_data['page_name'] = \"my_courses\";\n\t\t$this->page_data['page_title'] = 'My courses';\n\t\t$this->page_data['page_view'] = 'user/course_list';\n\t\t$this->page_data['sub_page_name'] = \"course_list_my_courses\";\n\n\n\n// Filter by category related code\n\t\t$filter = $this->getFilterArray();\n\n\t\t$this->pagination_config['per_page'] = 10;\n\t\t$this->pagination_config['total_rows'] = $this->crud_model->get_enrollment_info_by_user_id(\"COUNT\", $this->session->userdata('user_id'), array(\"enrollment\" => array('id')), null, $filter);\n\n// Retrieve enrollment history along with few course data\n\t\t$this->page_data['course_list'] = $this->crud_model->get_enrollment_info_by_user_id(\"OBJECT\", $this->session->userdata('user_id'), array(\n\t\t\t\"enrollment\" => array('id as enroll_id', 'enrolled_price', 'expiry_date'),\n\t\t\t\"course\" => array('id', 'title', 'short_description', 'language', 'slug', 'mock_test'),\n\t\t), array('limit' => $this->pagination_config['per_page'], 'offset' => $offset), $filter, \"SUM\");\n\n// Load the default course view. we are here loadin a default view because\n\t\t// there are few common functionality that works for both user/my_courses and user/wishlist\n\t\t$this->my_board_course_default_view();\n\t}", "function CoursesBodyContent()\n\t{\tif ($this->can_resources)\n\t\t{\techo $this->course->HeaderInfo(), \"<div class='clear'></div>\\n\", $this->resource->InputForm($this->course->id);\n\t\t}\n\t}", "public function registerCourseClick ()\n {\n $objCourse = new Course();\n $result = $objCourse->fetchCoursename();\n if (! empty($result)) {\n $this->showSubViews(\"registerCourse\", $result);\n } else {\n $message = \"You cannnot register<br> No courses exist yet\";\n $this->setCustomMessage(\"ErrorMessage\", $message);\n }\n }", "function cicleinscription_enrolling_user_on_course($courseid, $userid){\n\tglobal $DB;\n\t// Recuperando a chave da modalidade da matricula do curso\n\t$objEnrol = $DB->get_record_sql(\"SELECT id FROM {enrol} WHERE courseid=? AND enrol='manual'\", array($courseid));\n\t\n\t// /Inscrevemdo o aluno na tabela mdl_user_enrolments\n\t$objUserEnrolments = new stdClass();\n\t$objUserEnrolments->status = 0;\n\t$objUserEnrolments->enrolid = $objEnrol->id;\n\t$objUserEnrolments->userid = $userid;\n\t$objUserEnrolments->timestart = strtotime('now');\n\t$objUserEnrolments->timeend = 0;\n\t$objUserEnrolments->timecreated = 0;\n\t$objUserEnrolments->timemodified = 0;\n\t\n\tcicleinscription_save('user_enrolments', $objUserEnrolments);\n\t// Recuperando o contexto do curso\n\t$objContext = $DB->get_record_sql(\"SELECT id FROM {context} WHERE instanceid=? AND contextlevel=50\", array($courseid));\n\t\n\t// Efetuando a matricula do aluno no curso\n\t$objRoleAssignments = new stdClass();\n\t$objRoleAssignments->roleid = 5;\n\t$objRoleAssignments->contextid = $objContext->id;\n\t$objRoleAssignments->userid = $userid;\n\t$objRoleAssignments->timemodified = strtotime('now');\n\t\n\treturn $DB->insert_record('role_assignments ', $objRoleAssignments);\n}", "public function addCompletedCourses(){\n\t\t$courses = Courses::getOneProgramCoursesList();\n\t\treturn view('courses.completedCourses', compact('courses'));\n\t}", "function currentAction() {\n\t\t$this->getModel()->setPage($this->getPageFromRequest());\n\n\t\t$oView = new userView($this);\n\t\t$oView->showCurrentLeaderboard();\n\t}", "public function frontpage_available_courses() {\n\n global $CFG , $DB;\n $coursecontainer = '';\n $chelper = new coursecat_helper();\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->set_courses_display_options( array(\n 'recursive' => true,\n 'limit' => $CFG->frontpagecourselimit,\n 'viewmoreurl' => new moodle_url('/course/index.php'),\n 'viewmoretext' => new lang_string('fulllistofcourses')\n ));\n\n $chelper->set_attributes( array( 'class' => 'frontpage-course-list-all frontpageblock-theme' ) );\n\n $courses = core_course_category::get(0)->get_courses( $chelper->get_courses_display_options() );\n\n $totalcount = core_course_category::get(0)->get_courses_count( $chelper->get_courses_display_options() );\n\n $rcourseids = array_keys( $courses );\n\n //$acourseids = array_chunk( $rcourseids, 6);\n $acourseids = $rcourseids;\n $tcount = count($acourseids);\n\n $newcourse = get_string( 'availablecourses' );\n $header = \"\";\n $header .= html_writer::tag('div', \"<div></div>\", array('class' => 'bgtrans-overlay'));\n\n $header .= html_writer::start_tag('div',\n array( 'class' => 'available-courses', 'id' => 'available-courses') );\n $header .= html_writer::start_tag('div', array( 'class' => 'available-overlay' ) );\n $header .= html_writer::start_tag('div', array( 'class' => 'available-block' ) );\n $header .= html_writer::start_tag('div', array('class' => 'container'));\n $header .= html_writer::tag('h2', get_string('availablecourses'));\n\n /* if ($tcount > '1') {\n $header .= html_writer::start_tag('div', array('class' => 'pagenav slider-nav') );\n $header .= html_writer::tag('button', '', array('class' => 'slick-prev nav-item previous', 'type' => 'button') );\n $header .= html_writer::tag('button', '', array('class' => 'slick-next nav-item next', 'type' => 'button') );\n $header .= html_writer::tag('div', '', array('class' => 'clearfix') );\n $header .= html_writer::end_tag('div');\n }*/\n $sliderclass = 'course-slider';\n $header .= html_writer::start_tag('div', array('class' => 'row') );\n $header .= html_writer::start_tag('div', array( 'class' => \" $sliderclass col-md-12\") );\n\n $footer = html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n if (count($rcourseids) > 0) {\n $i = '0';\n /* foreach ($acourseids as $courseids) {\n\n $rowcontent = '<div class=\"slider-row \">';*/\n $rowcontent = '';\n foreach ($acourseids as $courseid) {\n $container = '';\n $course = get_course($courseid);\n $noimgurl = $this->output->image_url('no-image', 'theme');\n $courseurl = new moodle_url('/course/view.php', array('id' => $courseid ));\n\n if ($course instanceof stdClass) {\n $course = new core_course_list_element($course);\n }\n\n $imgurl = '';\n $context = context_course::instance($course->id);\n\n foreach ($course->get_course_overviewfiles() as $file) {\n $isimage = $file->is_valid_image();\n $imgurl = file_encode_url(\"$CFG->wwwroot/pluginfile.php\",\n '/'. $file->get_contextid(). '/'. $file->get_component(). '/'.\n $file->get_filearea(). $file->get_filepath(). $file->get_filename(), !$isimage);\n if (!$isimage) {\n $imgurl = $noimgurl;\n }\n }\n\n if (empty($imgurl)) {\n $imgurl = $noimgurl;\n }\n\n $container .= html_writer::start_tag('div', array( 'class' => 'col-md-2') );\n $container .= html_writer::start_tag('div', array( 'class' => 'available-content'));\n $container .= html_writer::start_tag('div', array( 'class' => 'available-img'));\n\n $container .= html_writer::start_tag('a', array( 'href' => $courseurl) );\n $container .= html_writer::empty_tag('img',\n array(\n 'src' => $imgurl,\n 'width' => \"249\",\n 'height' => \"200\",\n 'alt' => $course->get_formatted_name() ) );\n $container .= html_writer::end_tag('a');\n $container .= html_writer::end_tag('div');\n $container .= html_writer::tag('h6', html_writer::tag('a',\n $course->get_formatted_name(),\n array( 'href' => $courseurl ) ),\n array('class' => 'title-text') );\n $container .= html_writer::end_tag('div');\n $container .= html_writer::end_tag('div');\n\n $rowcontent .= $container;\n }\n $i++;\n /*$rowcontent .= html_writer::end_tag('div');*/\n $coursecontainer .= $rowcontent;\n // }\n\n }\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $coursehtml = $header.$coursecontainer.$footer;\n return $coursehtml;\n\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\n // Print link to create a new course, for the 1st available category.\n echo $this->add_new_course_button();\n }\n }", "function AssignCourse()\n\t{\t$this->date = new AdminCourseDate($_GET['id']);\n\t\tif ($this->date->id)\n\t\t{\t$this->course = new AdminCourse($this->date->details['cid']);\n\t\t} else\n\t\t{\t$this->course = new AdminCourse($_GET['cid']);\n\t\t}\n\t}", "public function run()\n {\n include 'Courses.php';\n for ($i=0; $i < count($courses); $i++) {\n Courses::create($courses[$i]);\n }\n }", "public function actionDetails()\n\t{\n\t $this->layout='main';\n\t \n $user_data = Users::model()->findByPk(Yii::app()->user->id);\n $step_completed = $user_data->step_completed;\n\n if($user_data->user_role == 2 && $step_completed < 5){\n $this->render('start', ['step_completed' =>$step_completed]);\n }else{ $this->render('details'); }\t\n\t}", "public function run()\n {\n $course = new Course();\n $course->code = '2202321';\n $course->name = 'Associate Degree of Information Technology';\n $course->credit_points = 192;\n $course->note = 'First 2 years of B InfTech';\n $course->save();\n\n $course1 = new Course();\n $course1->code = '3002111';\n $course1->name = 'Bachelor of Information Technology';\n $course1->credit_points = 288;\n $course1->save();\n\n $course2 = new Course();\n $course2->code = '3002116';\n $course2->name = 'Bachelor of Applied Computing';\n $course2->credit_points = 288;\n $course2->note = 'Entry pathways from TAFE';\n $course2->save();\n\n $course3 = new Course();\n $course3->code = '3007016';\n $course3->name = 'Bachelor of Technology Education';\n $course3->credit_points = 384;\n $course3->save();\n\n $course4 = new Course();\n $course4->code = '3707000';\n $course4->name = 'Bachelor of Education';\n $course4->credit_points = 192;\n $course4->note = 'Graduate entry';\n $course4->save();\n }", "function CoursesConstructFunctions()\n\t{\tif ($this->can_resources)\n\t\t{\tif (isset($_POST[\"crlabel\"]))\n\t\t\t{\t$saved = $this->resource->Save($this->course->id, $_POST, $_FILES[\"crfile\"]);\n\t\t\t\t$this->successmessage = $saved[\"successmessage\"];\n\t\t\t\t$this->failmessage = $saved[\"failmessage\"];\n\t\t\t\tif ($this->successmessage && !$this->failmessage)\n\t\t\t\t{\t$this->Redirect(\"courseresources.php?cid=\" . $this->course->id);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->resource->id && $_GET[\"delete\"] && $_GET[\"confirm\"])\n\t\t\t{\t$courseid = $this->resource->details[\"cid\"];\n\t\t\t\tif ($this->resource->Delete())\n\t\t\t\t{\t$this->Redirect(\"courseresources.php?cid=\" . $this->course->id);\n\t\t\t\t} else\n\t\t\t\t{\t$this->failmessage = \"Delete failed\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function frontpage_my_courses() {\n\n global $USER, $CFG, $DB;\n $content = html_writer::start_tag('div', array('class' => 'frontpage-enrolled-courses') );\n $content .= html_writer::start_tag('div', array('class' => 'container'));\n $content .= html_writer::tag('h2', get_string('mycourses'));\n $coursehtml = parent::frontpage_my_courses();\n if ($coursehtml == '') {\n\n $coursehtml = \"<div id='mycourses'><style> #frontpage-course-list.frontpage-mycourse-list { display:none;}\";\n $coursehtml .= \"</style></div>\";\n }\n $content .= $coursehtml;\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n\n return $content;\n }", "abstract protected function edu_up();", "public function run()\n {\n $courses = [\n ['Math', '11', 'Magni Lindsey', '/img/Math11.jpg', 'Welcome to Math 11. This course will equip you with fundemental knowledage of basic mathematic operation and quadratic function. They are very important for all future science course.', '40$/hour', 'http://www.bcmath.ca/PC11/PC11main.htm'],\n ['Physics', '11', 'Virgee Harris', '/img/Physics11.jpg', 'Welcome to Physics 11. This course will teach you the basic concepts of motion, force and energy so that you will be clear about how the fundemental law of physiscs works around us.', '40$/hour', 'https://yungmingliu.wikispaces.com/BC+Physics+11'],\n ['Chemistry', '11', 'Virgil\tBarrett', '/img/Chemistry11.jpg','Welcome to Chemsitry 11. This course covers basic calculations in chemistry including mole concept, concentration, stoichiometry, classification of matter and periodic table.', '45$/hour', 'https://noteshelp.wordpress.com/chemistry-11/'],\n ['Math', '12', 'Eloise Page', '/img/Math12.jpg', 'Welcome to Math 12. This course is a good preparation course for future calculus. In this course, you will learn exponential and logarithmic functions, and various trigonometric identities.', '45$/hour', 'https://noteshelp.wordpress.com/math-12/'],\n ['Physics', '12', 'Adrienne\tBarber', '/img/Physics12.jpg', 'Welcome to Physics 12. This course will introduce you to more complex natural physical behaviors, such as momentum and impulse, circular motion and gravitation and electrical forces.', '50$/hour', 'https://noteshelp.wordpress.com/physics-12/'],\n ['Chemistry', '12', 'Peggy Olson', '/img/Chemistry12.jpg', 'Welcome to Chemsitry 12. Chemistry 12 will advance your knowledage of chemistry to multiple new areas. You will start to understand reaction kinetics, solubility equilibrium.', '45$/hour', 'https://noteshelp.wordpress.com/chemistry-12/'],\n ['Biology', '11', 'Ellary Anderson', '/img/Biology11.jpg', 'Welcome to Biology 11. This course will greatly expand your knowledage of living creature around us. You will learn protists, mycology, plant biology and animal biology.', '45$/hour', 'https://noteshelp.wordpress.com/biology-11/'],\n ['Biology', '12', 'Katey Sampertin', '/img/Biology12.jpg', 'Welcome to Biology 12. This course provide you much profound knowledage about DNA and RNA stucture and function. You will also start to understand how gene express themselves.', '50$/hour', 'https://noteshelp.wordpress.com/biology-12/']\n\n ];\n\n \n foreach ($courses as $key => $course) {\n Course::insert([\n 'created_at' => Carbon\\Carbon::now(),\n 'updated_at' => Carbon\\Carbon::now(),\n 'name' => $course[0],\n 'level' => $course[1],\n 'instructor' => $course[2],\n 'image' => $course[3],\n 'description' => $course[4],\n 'price' => $course[5],\n 'link'=>$course[6]\n ]);\n }\n }", "public function run()\n {\n $course = new \\App\\Course();\n $field = App\\Field::find(1);\n $level = App\\Level::find(2);\n $course->level()->associate($level);\n $course->field()->associate($field);\n $course->course_name = 'BS Chemical Engineering';\n $course->careers = 'Chemist,Consultant,Entreprenuer';\n $course->accred = 'Uni of so, and uni of say';\n\n $university = \\App\\University::find(1);\n $course->university()->associate($university);\n $course->save();\n }", "public function postCreate()\n\t{\n\n\t\tif( Input::get('title') == '' ):\n\n\t\t\tself::setWarning('coordinators_courses_title_err', 'Error al agregar curso', 'por favor ingrese un Título, no puede dejar este campo vacío.');\n\n\t\t\treturn self::go( 'create' );\n\n\t\telseif( Input::get('author_id') == null ):\n\n\t\t\tself::setWarning('coordinators_courses_author_id_err', 'Error al agregar curso', 'Debe seleccionar un profesor encargado del Curso.');\n\n\t\t\treturn self::go( 'create' );\n\n\t\telse:\n\n\t\t\t$name = Course::setPermalink(Input::get('title'));\n\n\t\t\t$directory = Course::makeFullDirectory( $name );\n\n\t\t\t$course = new Course();\n\t\t\t$course->author_id = Input::get('author_id');\n\t\t\t$course->title = Input::get('title');\n\t\t\t$course->name = $name;\n\t\t\t$course->description = Input::get('description');\n\t\t\t$course->status = 'inactive';\n\t\t\t$course->main_picture = Input::file('main_picture') != null ? Course::uploadMainPicture( Input::file('main_picture'), $name ) : '';\n\t\t\t$course->cover_picture = Input::file('cover_picture') != null ? Course::uploadCoverPicture( Input::file('cover_picture'), $name ) : '';\n\t\t\t$course->thumbnail_picture = Input::file('thumbnail_picture') != null ? Course::uploadThumbnailPicture( Input::file('thumbnail_picture'), $name ) : '';\n\n\t\t\t$teacher = User::find(Input::get('author_id'));\n\n\t\t\t\n\t\t\tif( $course->save() ):\n\t\n\t\t\t\t\\Event::fire('notification.course_assigned', array($teacher, $course));\n\t\t\t\tself::setSuccess('coordinators_courses_create', 'Curso Agregado', 'El curso ' . $course->title . ' fue agregado exitósamente');\n\n\t\t\t\treturn self::go( 'inactive' );\n\n\t\t\telse:\n\n\t\t\t\tself::setDanger('coordinators_courses_create_err', 'Error al agregar curso', 'Hubo un error al agregar el curso ' . $course->title);\n\n\t\t\t\treturn self::go( 'create' );\n\n\t\t\tendif;\n\n\t\tendif;\n\n\t}", "function ciniki_courses_wng_accountMenuItems($ciniki, $tnid, $request, $args) {\n\n $items = array();\n\n $settings = isset($request['site']['settings']) ? $request['site']['settings'] : array();\n $base_url = isset($args['base_url']) ? $args['base_url'] : '';\n\n //\n // Check if the customer is or has been registered for any courses\n //\n $strsql = \"SELECT COUNT(*) AS registrations \"\n . \"FROM ciniki_course_offering_registrations \"\n . \"WHERE (\"\n . \"customer_id = '\" . ciniki_core_dbQuote($ciniki, $request['session']['customer']['id']) . \"' \"\n . \"OR student_id = '\" . ciniki_core_dbQuote($ciniki, $request['session']['customer']['id']) . \"' \"\n . \") \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbSingleCount');\n $rc = ciniki_core_dbSingleCount($ciniki, $strsql, 'ciniki.courses', 'num');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.courses.263', 'msg'=>'Unable to load get the number of items', 'err'=>$rc['err']));\n }\n if( isset($rc['num']) && $rc['num'] > 0 ) {\n $items[] = array(\n 'title' => 'Program Registrations', \n 'priority' => 550, \n 'selected' => isset($args['selected']) && $args['selected'] == 'programs' ? 'yes' : 'no',\n 'ref' => 'ciniki.courses.registrations',\n 'url' => $base_url . '/programs',\n );\n }\n/*\n*** This might be useful if people prefer dropdown of only registered courses ***\n //\n // Get the list of open/timeless course offerings the customer has paid for and there is paid content\n //\n $strsql = \"SELECT courses.id AS course_id, \"\n . \"courses.name AS course_name, \"\n . \"courses.permalink AS course_permalink, \"\n . \"offerings.id AS offering_id, \"\n . \"offerings.name AS offering_name, \"\n . \"offerings.permalink AS offering_permalink \"\n . \"FROM ciniki_course_offering_registrations AS registrations \"\n . \"INNER JOIN ciniki_course_offerings AS offerings ON (\"\n . \"registrations.offering_id = offerings.id \"\n . \"AND offerings.status = 10 \" // Active\n . \"AND offerings.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \") \"\n . \"INNER JOIN ciniki_courses AS courses ON (\"\n . \"offerings.course_id = courses.id \"\n . \"AND (courses.flags&0x40) = 0x40 \" // Paid content\n . \"AND (courses.status = 30 OR courses.status = 70 ) \" // Active or private\n . \"AND courses.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \") \"\n . \"WHERE (\"\n . \"registrations.customer_id = '\" . ciniki_core_dbQuote($ciniki, $request['session']['customer']['id']) . \"' \"\n . \"OR registrations.student_id = '\" . ciniki_core_dbQuote($ciniki, $request['session']['customer']['id']) . \"' \"\n . \") \"\n . \"AND registrations.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND (\"\n . \"offerings.end_date > NOW() \" // Open offering\n . \"OR ((courses.flags&0x10) = 0x10) \" // Timeless course\n . \") \" \n . \"ORDER BY courses.name, offerings.name \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.courses', array(\n array('container'=>'offerings', 'fname'=>'offering_id', \n 'fields'=>array('course_id', 'course_name', 'course_permalink',\n 'offering_id', 'offering_name', 'offering_permalink'),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.courses.194', 'msg'=>'Unable to load programs', 'err'=>$rc['err']));\n }\n $offerings = isset($rc['offerings']) ? $rc['offerings'] : array();\n foreach($offerings as $oid => $offering) {\n $offerings[$oid]['title'] = $offering['course_name'] . ' - ' . $offering['offering_name'];\n $offerings[$oid]['ref'] = 'ciniki.courses.offering';\n $offerings[$oid]['url'] = $base_url . '/courses/' . $offering['course_permalink'] . '/' . $offering['offering_permalink'];\n }\n\n if( count($offerings) > 0 ) {\n $items[] = array(\n 'title' => 'Programs', \n 'priority' => 950, \n 'selected' => 'no',\n 'items' => $offerings,\n );\n }\n\n*/\n return array('stat'=>'ok', 'items'=>$items);\n}", "public function actionSetup()\n\t{\n\t\t$auth = Yii::app()->authManager;\n\t\t$auth->createOperation('viewUser');\n\t\t$auth->createOperation('updateUser');\n\t\t$auth->createOperation('deleteUser');\n\t\t\n\t\t$auth->createOperation('createSource');\n\t\t$auth->createOperation('updateSource');\n\t\t$auth->createOperation('deleteSource');\n\t\t\n\t\t$auth->createOperation('updateArticle');\n\t\t$auth->createOperation('deleteArticle');\n\t\t\n\t\t$task = $auth->createTask('viewOwnUser',\n\t\t\t'Allows a user to view their profile',\n\t\t\t'return $params[\"id\"] == Yii::app()->user->id;');\n\t\t$task->addChild('viewUser');\n\t\t\n\t\t$task = $auth->createTask('updateOwnUser',\n\t\t\t'Allows a user to update their profile',\n\t\t\t'return $params[\"id\"] == Yii::app()->user->id;');\n\t\t$task->addChild('updateUser');\n\t\t\n\t\t$task = $auth->createTask('updateOwnSource',\n\t\t\t'Allows an editor to update their source',\n\t\t\t'return $params[\"ownerId\"] == $params[\"userId\"]');\n\t\t$task->addChild('updateSource');\n\t\t\n\t\t$role = $auth->createRole('public');\n\t\t$role->addChild('viewOwnUser');\n\t\t$role->addChild('updateOwnUser');\n\t\t\n\t\t$role = $auth->createRole('editor');\n\t\t$role->addChild('public');\n\t\t$role->addChild('updateOwnSource');\n\t\t\n\t\t$role = $auth->createRole('admin');\n\t\t$role->addChild('editor');\n\t\t$role->addChild('createSource');\n\t\t$role->addChild('updateSource');\n\t\t$role->addChild('deleteSource');\n\t\t$role->addChild('viewUser');\n\t\t$role->addChild('updateUser');\n\t\t$role->addChild('deleteUser');\n\t\t$role->addChild('updateArticle');\n\t\t$role->addChild('deleteArticle');\n\t\t\n\t}", "public function court_members()\n {\n\n $query = \"SELECT * FROM users join users_court on users.id = users_court.user_id WHERE users_court.court1_id = $this->thiscourt or users_court.court2_id = $this->thiscourt\";\n $cart_result = @mysqli_query($this->dbc, $query) or die(\"Couldn't ViewSql users lists:(\" . mysqli_error($this->dbc));\n $this->num_rows = mysqli_num_rows($cart_result);\n\n while ($row = mysqli_fetch_assoc($cart_result)) {\n\n $court_in_list .= $row['user_id'] . \", \";\n\n $this->userlist .= \"<li><a href='users-details.php?user_id=\" . $row['user_id'] . \"'> \" . openssl_decrypt(clean($row['firstname']), ENCRYPTION_METHOD, ENCRYPTION_KEY) . \" \" .\n openssl_decrypt(clean($row['lastname']), ENCRYPTION_METHOD, ENCRYPTION_KEY) .\n \" (\" .$row['status'] .\n \")</a></li>\";\n }\n\n $court_in_list = rtrim($court_in_list, \", \");\n $this->court_in = \"(\" . $court_in_list . \")\";\n\n }", "public function add_course_view(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/add_course';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Add course',\n\t\t\t'course_list'=> $this->setting_model->Get_All('course'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "public function testCourseFunctions()\n {\n $this->noCoursesAtFirst();\n\n $this->userCannotCreateCourse();\n $this->adminCanCreateCourse();\n\n $this->userCanViewCourses();\n $this->userCanFilterCourses();\n $this->userCanViewSpecificCourse();\n\n $this->userCanEnrollCourse();\n $this->userCanQuitCourse();\n $this->userCanNotJoinAsCourseAdmin();\n $this->userCanBeSetAsCourseAdmin();\n\n $this->userCannotUpdateCourse();\n $this->adminCanUpdateCourse();\n $this->courseAdminCanUpdateCourse();\n\n $this->userCannotDeleteCourse();\n $this->courseAdminCannotDeleteCourse();\n $this->adminCanDeleteCourse();\n }", "public function actionView_target() {\n if (!Yii::$app->CustomComponents->check_permission('view_target')) {\n return $this->redirect(['site/index']);\n }\n\n $managers = Yii::$app->db->createCommand(\"SELECT * FROM assist_users as du \n WHERE du.id IN(SELECT uid FROM assist_user_meta WHERE meta_key = 'role' AND meta_value=6) \n AND du.department = 1 AND du.status = 1\")->queryAll();\n\n $user_id = Yii::$app->getUser()->identity->id;\n $get_userrole = $this->getUserRole($user_id); /* get the current user's role */\n $user_role = 0;\n if (!empty($get_userrole)) {\n $user_role = $get_userrole[0]['meta_value'];\n }\n\n $courses = DvCourseTarget::find();\n $years = array();\n $after_6_month = array();\n $before_6_month = array();\n\n for ($i = 0; $i < 7; $i++) {\n $courses->orWhere([\"month\"=>date('m',strtotime(\"+$i month\")),\"year\"=>date('Y',strtotime(\"+$i month\"))]);\n $after_6_month[date('Y',strtotime(\"+$i month\"))][] = date('m',strtotime(\"+$i month\"));\n $years[] = date('Y',strtotime(\"+$i month\"));\n }\n for ($i = 1; $i < 6; $i++) {\n $courses->orWhere([\"month\"=>date('m',strtotime(\"-$i month\")),\"year\"=>date('Y',strtotime(\"-$i month\"))]);\n $before_6_month[date('Y',strtotime(\"-$i month\"))][] = date('m',strtotime(\"-$i month\"));\n $years[] = date('Y',strtotime(\"-$i month\"));\n }\n\n $years = array_unique($years);\n asort($years);\n $courses = $courses->all();\n \n $model = new DvCourseTarget();\n if ($model->load(Yii::$app->request->post())){\n echo \"<pre>\";\n $data = Yii::$app->request->post();\n $month = $data['DvCourseTarget']['month'];\n $year = $data['DvCourseTarget']['year'];\n $manager_id = $data['DvCourseTarget']['manager_id'];\n\n Yii::$app->db->createCommand(\"UPDATE assist_course_target SET status = 0 WHERE month = $month AND year = $year AND manager_id=$manager_id\")->execute();\n\n $model->status = 1;\n if ($model->save()) {\n Yii::$app->session->setFlash('success', 'Course Target Created Successfully');\n return $this->redirect(['dv-users/create_target']);\n }\n } else {\n\n return $this->render('view_target', [ 'model' => $model, 'managers' => $managers, \"user_role\" => $user_role, \"user_id\" => $user_id,\"courses\" => $courses, 'before_6_month' => $before_6_month, 'after_6_month' => $after_6_month, 'years' => $years]);\n }\n }", "function procAddLeader(){\r\n\t\t\tglobal $session, $database, $form;\r\n\t\t\t$q = \"UPDATE \".TBL_COURSE.\" SET Lead_Instructor = \".$_POST['user'].\" where course_number = \".$_POST['course'];\r\n\t\t\t\r\n\t\t\t\t\t\t\t//$myfile = fopen(\"error.txt\", \"a\") or die(print_r($q));\r\n\t\t\t$database->query($q);\r\n\t\t\theader(\"Location: \".$session->referrer);\r\n\t\t}", "public function index()\n\t{\n\t\t$loggeduser = Auth::user()->utype;\n\t\tif($loggeduser == 1)\n\t\t\treturn view('layouts.addcourse')->with('registermsg', '');\n\t\telse\n\t\t\treturn Redirect::back();\n\t}", "function i4_assigned_courses_shortcode() {\n\n if (is_user_logged_in()) { //Simple check to see if the user is logged in or not\n ob_start();\n $this->i4_assigned_courses();\n return ob_get_clean();\n }\n }", "private function user_enrolment_created($event) {\n global $DB;\n $courseid = $event->courseid;\n $userid = $event->relateduserid;\n $gmail = $this->get_google_authenticated_users_gmail($userid);\n if ($gmail) {\n $course = $DB->get_record('course', array('id' => $courseid), 'visible');\n $coursecontext = context_course::instance($courseid);\n $coursemodinfo = get_fast_modinfo($courseid, -1);\n $cms = $coursemodinfo->get_cms();\n $insertcalls = array();\n foreach ($cms as $cm) {\n $cmid = $cm->id;\n $cmcontext = context_module::instance($cmid);\n $fileids = $this->get_fileids($cmid);\n if ($fileids) {\n foreach ($fileids as $fileid) { \n if ($course->visible == 1) {\n // Course is visible, continue checks.\n rebuild_course_cache($courseid, true);\n $modinfo = get_fast_modinfo($courseid, $userid);\n $cminfo = $modinfo->get_cm($cmid);\n $sectionnumber = $this->get_cm_sectionnum($cmid);\n $secinfo = $modinfo->get_section_info($sectionnumber);\n if ($cminfo->uservisible && $secinfo->available && is_enrolled($coursecontext, $userid, '', true)) {\n // Course module and section are visible and available.\n // Insert reader permission.\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->gmail = $gmail;\n $call->role = 'reader';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n }\n // Course module is not visible or available, do nothing.\n }\n // Course is not visible, do nothing.\n }\n }\n }\n\n // Call any remaining batch requests.\n if (count($insertcalls) > 0) {\n $this->batch_insert_permissions($insertcalls);\n }\n }\n }", "public function facilitatorsAAAction($id,$start,$facilitatorId,$tab,$cs)\n {if(isset($_SESSION['trololol'])){\n \n $newAP = new CLC_Facilitators();\n $newAP->setClcId($cs);\n $newAP->setFacilitatorId($facilitatorId);\n \n $Repo = $this->getDoctrine()->getEntityManager();\n $Repo->persist($newAP);\n $Repo->flush();\n \n \n \n return $this->redirect($this->generateUrl('BalsMisBundle_homepage').\"/\".$id.\"/facilitators/0/\".$facilitatorId.\"/2\");\n }else{\n return $this->redirect($this->generateUrl('BalsMisBundle_homepage').\"/login\"); \n }}", "public function index()\n\t{\n\t\t$this->load->view('courses');\n\t}", "function roshine_user_complete($course, $user, $mod, $roshine) {\n}", "public function actionIndex()\n\t{\n\t\t \n\t\t$this->ensureAuthManagerDefined();\n\t\t\n\t\t//provide the oportunity for the use to abort the request\n\t\t$message = \"This command will create three roles: Owner, Member, and Reader\\n\";\n\t\t$message .= \" and the following permissions:\\n\";\n\t\t$message .= \"create, read, update and delete user\\n\";\n\t\t$message .= \"create, read, update and delete project\\n\";\n\t\t$message .= \"create, read, update and delete issue\\n\";\n\t\t$message .= \"Would you like to continue?\";\n\t \n\t //check the input from the user and continue if \n\t\t//they indicated yes to the above question\n\t if($this->confirm($message)) \n\t\t{\n\t\t //first we need to remove all operations, \n\t\t\t //roles, child relationship and assignments\n\t\t\t $this->_authManager->clearAll();\n\n\t\t\t //create the lowest level operations for users\n\t\t\t $this->_authManager->createOperation(\n\t\t\t\t\"createUser\",\n\t\t\t\t\"create a new user\"); \n\t\t\t $this->_authManager->createOperation(\n\t\t\t\t\"readUser\",\n\t\t\t\t\"read user profile information\"); \n\t\t\t $this->_authManager->createOperation(\n\t\t\t\t\"updateUser\",\n\t\t\t\t\"update a users in-formation\"); \n\t\t\t $this->_authManager->createOperation(\n\t\t\t\t\"deleteUser\",\n\t\t\t\t\"remove a user from a project\"); \n\n\t\t\t //create the lowest level operations for projects\n\t\t\t $this->_authManager->createOperation(\n\t\t\t\t\"createPlace\",\n\t\t\t\t\"create a new place\"); \n\t\t\t $this->_authManager->createOperation(\n\t\t\t\t\"readPlace\",\n\t\t\t\t\"read place information\"); \n\t \t\t $this->_authManager->createOperation(\n\t\t\t\t\"updatePlace\",\n\t\t\t\t\"update place information\"); \n\t\t\t $this->_authManager->createOperation(\n\t\t\t\t\"deletePlace\",\n\t\t\t\t\"delete a place\"); \n\n\t\t\t //create the lowest level operations for projects\n\t\t\t $this->_authManager->createOperation(\n\t\t\t \"createEvent\",\n\t\t\t \"create a new Event\");\n\t\t\t $this->_authManager->createOperation(\n\t\t\t \"readEvent\",\n\t\t\t \"read event information\");\n\t\t\t $this->_authManager->createOperation(\n\t\t\t \"updateEvent\",\n\t\t\t \"update event information\");\n\t\t\t $this->_authManager->createOperation(\n\t\t\t \"deleteEvent\",\n\t\t\t \"delete a event\");\n\n\t\t\t //create the lowest level operations for projects\n\t\t\t $this->_authManager->createOperation(\n\t\t\t \"createNotice\",\n\t\t\t \"create a new Notice\");\n\t\t\t $this->_authManager->createOperation(\n\t\t\t \"readNotice\",\n\t\t\t \"read Notice information\");\n\t\t\t $this->_authManager->createOperation(\n\t\t\t \"updateNotice\",\n\t\t\t \"update Notice information\");\n\t\t\t $this->_authManager->createOperation(\n\t\t\t \"deleteNotice\",\n\t\t\t \"delete a Notice\");\n\t\t\t \n\t\t\t \n\t\t\t //create the lowest level operations for projects\n\t\t\t $this->_authManager->createOperation(\n\t\t\t \"createReservation\",\n\t\t\t \"create a new Reservation\");\n\t\t\t $this->_authManager->createOperation(\n\t\t\t \"readReservation\",\n\t\t\t \"read Reservation information\");\n\t\t\t $this->_authManager->createOperation(\n\t\t\t \"updateReservation\",\n\t\t\t \"update Reservation information\");\n\t\t\t $this->_authManager->createOperation(\n\t\t\t \"deleteReservation\",\n\t\t\t \"delete a Reservation\");\t \n\t\t\t \n\t\t\t //create the lowest level operations for issues\n\t\t\t $this->_authManager->createOperation(\n\t\t\t\t\"createRoom\",\n\t\t\t\t\"create a new room\"); \n\t\t\t $this->_authManager->createOperation(\n\t\t\t\t\"readRoom\",\n\t\t\t\t\"read room information\"); \n\t\t\t $this->_authManager->createOperation(\n\t\t\t\t\"updateRoom\",\n\t\t\t\t\"update room information\"); \n\t\t\t $this->_authManager->createOperation(\n\t\t\t\t\"deleteRoom\",\n\t\t\t\t\"delete an room from a project\"); \n\n\t\t\t \n\t\t\t //create the normal role and add the appropriate \n\t\t\t //permissions as children to this role\n\t\t\t $role=$this->_authManager->createRole(\"normal\"); \n\t\t\t $role->addChild(\"readUser\");\n\t\t\t $role->addChild(\"readReservation\");\n\t\t\t $role->addChild(\"readRoom\");\n\t\t\t $role->addChild(\"readNotice\");\n\t\t\t $role->addChild(\"readPlace\"); \n\t\t\t $role->addChild(\"readEvent\"); \n\t\t\t $role->addChild(\"createReservation\");\n\t\t\t $role->addChild(\"createEvent\");\n\t\t\t \n\t\t\t \n\t\t\t //create the reader role and add the appropriate\n\t\t\t //permissions as children to this role\n\t\t\t $role=$this->_authManager->createRole(\"roommanager\");\n\t\t\t $role->addChild(\"normal\");\n\t\t\t $role->addChild(\"createRoom\");\n\t\t\t $role->addChild(\"updateRoom\");\n\t\t\t $role->addChild(\"deleteRoom\");\n\t\t\t $role->addChild(\"createNotice\");\n\t\t\t $role->addChild(\"updateNotice\");\n\t\t\t $role->addChild(\"deleteNotice\");\n\t\t\t \n\t\t\t //create the reader role and add the appropriate\n\t\t\t //permissions as children to this role\n\t\t\t $role=$this->_authManager->createRole(\"eventmanager\");\n\t\t\t $role->addChild(\"normal\");\n\t\t\t $role->addChild(\"createEvent\");\n\t\t\t $role->addChild(\"updateEvent\");\n\t\t\t $role->addChild(\"deleteEvent\");\n\t\t\t \n\n\t\t\t //create the reader role and add the appropriate\n\t\t\t //permissions as children to this role\n\t\t\t $role=$this->_authManager->createRole(\"placemanager\");\n\t\t\t $role->addChild(\"roommanager\");\n\t\t\t $role->addChild(\"createPlace\");\n\t\t\t $role->addChild(\"updatePlace\");\n\t\t\t $role->addChild(\"deletePlace\");\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t //create the owner role, and add the appropriate permissions, \n\t\t\t //as well as both the reader and member roles as children\n\t\t\t $role=$this->_authManager->createRole(\"admin\"); \n\t\t\t $role->addChild(\"normal\"); \n\t\t\t $role->addChild(\"roommanager\"); \n\t\t\t $role->addChild(\"eventmanager\"); \n\t\t\t $role->addChild(\"placemanager\"); \n\t\t\t \n\t\t //provide a message indicating success\n\t\t echo \"Authorization hierarchy successfully generated.\\n\";\n }\n \t\telse\n\t\t\techo \"Operation cancelled.\\n\";\n }", "function ciniki_courses_reportStudents($ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'start_date'=>array('required'=>'yes', 'blank'=>'no', 'type'=>'date', 'name'=>'Start Date'), \n 'end_date'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'date', 'name'=>'End Date'), \n 'output'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'json', 'name'=>'Output'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'courses', 'private', 'checkAccess');\n $rc = ciniki_courses_checkAccess($ciniki, $args['tnid'], 'ciniki.courses.reportStudents'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n\n //\n // Load tenant details\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'tenantDetails');\n $rc = ciniki_tenants_tenantDetails($ciniki, $args['tnid']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['details']) && is_array($rc['details']) ) { \n $tenant_details = $rc['details'];\n } else {\n $tenant_details = array();\n }\n\n //\n // Get the list of registrations between the dates\n //\n $strsql = \"SELECT registrations.id, \"\n . \"offerings.name AS offering_name, \"\n . \"offerings.code AS offering_code, \"\n . \"offerings.condensed_date AS condensed_date, \"\n . \"courses.name AS course_name, \"\n . \"courses.code AS course_code, \"\n . \"customers.id AS customer_id, \"\n . \"customers.display_name, \"\n . \"DATE_FORMAT(offerings.start_date, '%b %d, %Y') AS start_date, \"\n . \"DATE_FORMAT(offerings.end_date, '%b %d, %Y') AS end_date, \"\n . \"IFNULL(prices.name, '') AS price_name, \"\n . \"emails.email AS emails \"\n . \"FROM ciniki_course_offering_classes AS classes \"\n . \"INNER JOIN ciniki_course_offering_registrations AS registrations ON (\"\n . \"classes.offering_id = registrations.offering_id \"\n . \"AND registrations.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"INNER JOIN ciniki_course_offerings AS offerings ON (\"\n . \"classes.offering_id = offerings.id \"\n . \"AND offerings.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"INNER JOIN ciniki_courses AS courses ON (\"\n . \"offerings.course_id = courses.id \"\n . \"AND courses.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_sapos_invoice_items AS items ON (\"\n . \"registrations.invoice_id = items.invoice_id \"\n . \"AND items.object_id = registrations.id \"\n . \"AND items.object = 'ciniki.courses.offering_registration' \"\n . \"AND items.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_course_offering_prices AS prices ON (\"\n . \"items.price_id = prices.id \"\n . \"AND prices.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_customers AS customers ON (\"\n . \"registrations.student_id = customers.id \"\n . \"AND customers.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_customer_emails AS emails ON (\"\n . \"customers.id = emails.customer_id \"\n . \"AND emails.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"WHERE classes.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND classes.class_date >= '\" . ciniki_core_dbQuote($ciniki, $args['start_date']) . \"' \"\n . \"\";\n if( isset($args['end_date']) && $args['end_date'] != '' && $args['end_date'] != '0000-00-00' ) {\n $strsql .= \"AND classes.class_date <= '\" . ciniki_core_dbQuote($ciniki, $args['end_date']) . \"' \";\n }\n $strsql .= \"ORDER BY customers.display_name, courses.name, offerings.name, registrations.id \"\n . \"\";\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.courses', array(\n array('container'=>'customers', 'fname'=>'id', \n 'fields'=>array('id', 'customer_id', 'display_name', 'offering_name', 'offering_code', 'course_code', 'course_name', \n 'condensed_date', 'price_name', 'start_date', 'end_date', 'emails'),\n 'lists'=>array('emails'),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.courses.112', 'msg'=>'Unable to load offering_registrations', 'err'=>$rc['err']));\n }\n $customers = isset($rc['customers']) ? $rc['customers'] : array();\n\n //\n // Output PDF version\n //\n if( $args['output'] == 'pdf' ) {\n //\n // FIXME: Add pdf output\n //\n/* $rc = ciniki_core_loadMethod($ciniki, 'ciniki', 'courses', 'templates', 'offeringRegistrationsPDF');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $fn = $rc['function_call'];\n\n $rc = $fn($ciniki, $args['tnid'], $args['offering_id'], $tenant_details, $courses_settings);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n $title = $rc['offering']['code'] . '_' . $rc['offering']['course_name'] . '_' . $rc['offering']['course_name'];\n\n $filename = preg_replace('/[^a-zA-Z0-9_]/', '', preg_replace('/ /', '_', $title));\n if( isset($rc['pdf']) ) {\n $rc['pdf']->Output($filename . '.pdf', 'D');\n } */\n }\n\n //\n // Output Excel version\n //\n elseif( $args['output'] == 'excel' ) {\n require($ciniki['config']['core']['lib_dir'] . '/PHPExcel/PHPExcel.php');\n $objPHPExcel = new PHPExcel();\n $objPHPExcelWorksheet = $objPHPExcel->setActiveSheetIndex(0);\n\n $col = 0;\n $row = 1;\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, 'Student', false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, 'Email', false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, 'Code', false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, 'Course', false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, 'Session', false);\n $row++;\n foreach($customers as $student) {\n $col = 0;\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, $student['display_name'], false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, $student['emails'], false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, $student['offering_code'], false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, $student['course_name'], false);\n $objPHPExcelWorksheet->setCellValueByColumnAndRow($col++, $row, $student['offering_name'], false);\n\n $row++;\n }\n $objPHPExcelWorksheet->getStyle('A1:E1')->getFont()->setBold(true);\n $objPHPExcelWorksheet->getColumnDimension('A')->setAutoSize(true);\n $objPHPExcelWorksheet->getColumnDimension('B')->setAutoSize(true);\n $objPHPExcelWorksheet->getColumnDimension('C')->setAutoSize(true);\n $objPHPExcelWorksheet->getColumnDimension('D')->setAutoSize(true);\n $objPHPExcelWorksheet->getColumnDimension('E')->setAutoSize(true);\n\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"students.xls\"');\n header('Cache-Control: max-age=0');\n \n $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n $objWriter->save('php://output');\n \n return array('stat'=>'exit');\n } \n\n return array('stat'=>'ok', 'customers'=>$customers);\n}", "public function index()\n {\n $user = Auth::user();\n if (!$user->hasAnyRole(Role::all())) {\n auth()->user()->syncRoles('User');\n }\n\n if ($user->hasRole('Admin')) {\n return redirect()->action(\n 'UserController@index');\n }\n if ($user->hasRole('User')) {\n return view('courses.index');\n }\n return view('home');\n }", "public function index() {\n\n // Get all courses the user is currently registered in\n $user = User::find(Auth::user()->id);\n $registered_courses = $user->courses()->get();\n\n return view('coursemanager.index', ['registered_courses' => $registered_courses, 'user' => $user,]);\n }", "public function view(){\n\n\t\tif (!isset($this->currentUser)) {\n\t\t\t$this->view->setVariable(\"error\", i18n(\"Not in session. View courts requires login\"));\n\t\t\t// obtain the data from the database\n\t\t\t$courts = $this->courtMapper->findAll();\n\n\t\t\t// put the array containing Post object to the view\n\t\t\t$this->view->setVariable(\"courts\", $courts);\n\t\t\t$this->view->render(\"courts\", \"index\");\n\t\t} \n\t\telse {\n\n\t\t\tif (!isset($_GET[\"courtId\"])) {\n\n\t\t\t\tthrow new Exception(\"courtId is mandatory\");\n\t\t\t}\n\t\n\t\t\t$courtId = $_GET[\"courtId\"];\n\n\t\t\tdate_default_timezone_set(\"Europe/Madrid\");\n\t\t\t$date = date_format(date_create(),\"Y/m/d\");\n\t\t\t$time = date_format(date_create(),\"H:i:s\");\n\t\t\t$dateTime = $date.' '.$time;\n\t\t\t$occupations = $this->courtMapper->findOccupation($dateTime, $courtId);\n\n\t\t\t$court = $this->courtMapper->findById($courtId);\n\t\t\t$hour = $court->getTimeStart();\n\t\t\t$hours = array();\n\t\t\t\n\t\t\twhile($hour < $court->getTimeEnd()){\n\n\t\t\t\tarray_push($hours, $hour);\n\t\t\t\t$dateTime2 = $date.' '.$hour;\n\t\t\t\t$newDateTime = new DateTime($dateTime2);\n\t\t\t\t$nextDateTime = $newDateTime->add(new DateInterval(\"PT1H30M\"));\n\t\t\t\t$hour = $nextDateTime->format('H:i:s');\n\t\t\t}\n\t\t\t\n\t\t\t$dateI = date_format(date_create($date),\"d-m-Y\");\n\t\t\tforeach($occupations as $occupation){\n\n\t\t\t\t$timeStart = $occupation->getStartDate();\n\t\t\t\t$timeO = substr($timeStart,0,10);\n\t\t\t\t$timeO = date_format(date_create($timeO),\"d-m-Y\");\n\t\t\t\t$hourO = substr($timeStart,11);\n\n\t\t\t\tif($dateI == $timeO){\n\t\t\t\t\tforeach($hours as $hour){\n\t\t\t\t\t\tif($hourO == $hour){\t\t\t\t\n\t\t\t\t\t\t\t$busyHours[$dateI.' '.$hourO] = $occupation->getReserveType();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor($i = 1; $i < 7; $i++){\n\t\t\t\t$schedule = $dateI. ' ' .$time;\n\t\t\t\t$startDateTime = new DateTime($schedule);\n\t\t\t\t$nextDateTime = $startDateTime->add(new DateInterval(\"P\".$i.\"D\"));\n\t\t\t\t$dateF = $nextDateTime->format('d-m-Y');\n\n\t\t\t\tforeach($occupations as $occupation){\n\n\t\t\t\t\t$timeStart = $occupation->getStartDate();\n\t\t\t\t\t$timeO = substr($timeStart,0,10);\n\t\t\t\t\t$timeO = date_format(date_create($timeO),\"d-m-Y\");\n\t\t\t\t\t$hourO = substr($timeStart,11);\n\n\t\t\t\t\tif($dateF == $timeO){\n\t\t\t\t\t\tforeach($hours as $hour){\t\t\t\n\t\t\t\t\t\t\tif($hourO == $hour){\n\t\t\t\t\t\t\t\t$busyHours[$dateF.' '.$hourO] = $occupation->getReserveType();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->view->setVariable(\"courtId\", $courtId);\n\t\t\t$this->view->setVariable(\"date\", $date);\n\t\t\t$this->view->setVariable(\"time\", $time);\n\t\t\t$this->view->setVariable(\"occupations\", $occupations);\n\t\t\t$this->view->setVariable(\"hours\", $hours);\n\t\t\t$this->view->setVariable(\"busyHours\", $busyHours);\n\t\n\t\t\t// render the view (/view/courts/view.php)\n\t\t\t$this->view->render(\"courts\", \"view\");\n\t\t}\n\t}", "function CoursesBodyContent()\n\t{\techo $this->date->InputForm($this->course->id);\n\t}", "public function frontpage_available_courses() {\n global $CFG, $DB;\n\n $chelper = new coursecat_helper();\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->set_courses_display_options(array(\n 'recursive' => true,\n 'limit' => $CFG->frontpagecourselimit,\n 'viewmoreurl' => new moodle_url('/course/index.php'),\n 'viewmoretext' => new lang_string('fulllistofcourses')));\n\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\n $courses = core_course_category::get(0)->get_courses($chelper->get_courses_display_options());\n $totalcount = core_course_category::get(0)->get_courses_count($chelper->get_courses_display_options());\n if (!$totalcount &&\n !$this->page->user_is_editing() &&\n has_capability('moodle/course:create', \\context_system::instance())\n ) {\n // Print link to create a new course, for the 1st available category.\n return $this->add_new_course_button();\n }\n $latestcard = get_config('theme_remui', 'enablenewcoursecards');\n $coursehtml = '<div class=\"\">\n <div class=\"card-deck slick-course-slider slick-slider ' . ($latestcard ? 'latest-cards' : '') . '\">';\n\n if (!empty($courses)) {\n foreach ($courses as $course) {\n $coursesummary = strip_tags($chelper->get_course_formatted_summary(\n $course,\n array('overflowdiv' => false, 'noclean' => false, 'para' => false)\n ));\n $coursesummary = strlen($coursesummary) > 100 ? substr($coursesummary, 0, 100).\"...\" : $coursesummary;\n $image = \\theme_remui_coursehandler::get_course_image($course, 1);\n $coursename = strip_tags($chelper->get_course_formatted_name($course));\n if (!$latestcard) {\n $coursehtml .= \"\n <div class='card w-100 rounded-bottom mx-0 bg-transparent d-inline-flex flex-column' style='height: 100%;'>\n <div class='m-2 bg-white border' style='height: 100%;'>\n <div\n class='rounded-top'\n style='height: 200px;\n background-image: url({$image});\n background-size: cover;\n background-position: center;\n box-shadow: 0 2px 5px #cccccc;'>\n </div>\n <div class='card-body p-3'>\n <h4 class='card-title m-1 ellipsis ellipsis-2'>\n <a\n href='{$CFG->wwwroot}/course/view.php?id={$course->id}'\n class='font-weight-400 blue-grey-600 font-size-18'>\n {$coursename}\n </a>\n </h4>\n <p class='card-text m-1'>{$coursesummary}</p>\n </div>\n </div>\n </div>\";\n } else {\n if (isset($course->startdate)) {\n $startdate = date('d M, Y', $course->startdate);\n $day = substr($startdate, 0, 2);\n $month = substr($startdate, 3, 3);\n $year = substr($startdate, 8, 4);\n }\n $categoryname = $DB->get_record('course_categories', array('id' => $course->category))->name;\n $categoryname = strip_tags(format_text($categoryname));\n $coursehtml .= \"\n <div class='px-1 course_card card '>\n <div class='wrapper h-100'\n style='background-image: url({$image});\n background-size: cover;\n background-position: center;\n position: relative;'>\n <div class='date btn-primary'>\n <span class='day'>{$day}</span>\n <span class='month'>{$month}</span>\n <span class='year'>{$year}</span>\n </div>\n <div class='data'>\n <div class='content' title='{$coursename}'>\n <span class='author'>{$categoryname}</span>\n <h4 class='title ellipsis ellipsis-3' style='-webkit-box-orient: vertical;visibility: visible;'>\n <a href='{$CFG->wwwroot}/course/view.php?id={$course->id}'>{$coursename}</a>\n </h4>\n <p class='text'>{$coursesummary}</p>\n </div>\n </div>\n </div>\n </div>\";\n }\n }\n }\n\n $coursehtml .= '</div></div>';\n\n $coursehtml .= \" <div class='available-courses button-container w-100 text-center '>\n <button type='button' class='btn btn-floating btn-primary btn-prev btn-sm'>\n <i class='icon fa fa-chevron-left' aria-hidden='true'></i>\n </button>\n <button type='button' class='btn btn-floating btn-primary btn-next btn-sm'>\n <i class='icon fa fa-chevron-right' aria-hidden='true'></i>\n </button>\n </div>\";\n\n $coursehtml .= \"\n <div class='row'>\n <div class='col-12 text-right'>\n <a href='{$CFG->wwwroot}/course' class='btn btn-primary'>\" . get_string('viewallcourses', 'core').\"</a>\n </div>\n </div>\";\n\n return $coursehtml;\n }", "public function course(){\n $user=Auth::user();\n $customer=Customer::find('1');\n $courses=Customer::find('1')->course()->paginate(6);\n return view('client.modules.user.course',compact('customer','courses'));\n }", "public function membershipAction()\n {\n $common = $this->getServiceLocator()->get('Application\\Model\\Common');\n $api_url = $this->getServiceLocator()->get('config')['api_url']['value'];\n $data = array('status_id' => 1, 'subscription_end_date' => date('Y-m-d', strtotime('+2 days'))); // 2days before subscription end\n $results = $common->subscriptionData($api_url, $data);\n if (count($results) > 0) {\n foreach ($results as $detail) {\n // Start :- Auto renew subscription\n if ($detail['auto_renewal'] == '1') {\n $this->autorenewcodeAction($api_url,$common,$detail);\n // End :- Auto renew subscription\n } \n }\n }\n die;\n }", "public function londontec_students(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/add_students';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Add Students',\n\t\t\t'courselist'=> $this->setting_model->Get_All('course'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "function alltimeAction() {\n\t\t$this->getModel()->setPage($this->getPageFromRequest());\n\n\t\t$oView = new userView($this);\n\t\t$oView->showAlltimeLeaderboard();\n\t}", "public function actionCreate_target() {\n if (!Yii::$app->CustomComponents->check_permission('targets')) {\n return $this->redirect(['site/index']);\n }\n\n $managers = Yii::$app->db->createCommand(\"SELECT * FROM assist_users as du \n WHERE du.id IN(SELECT uid FROM assist_user_meta WHERE meta_key = 'role' AND meta_value=6) \n AND du.department = 1 AND du.status = 1\")->queryAll();\n\n $user_id = Yii::$app->getUser()->identity->id;\n $get_userrole = $this->getUserRole($user_id); /* get the current user's role */\n $user_role = 0;\n if (!empty($get_userrole)) {\n $user_role = $get_userrole[0]['meta_value'];\n }\n\n $courses = DvCourseTarget::find();\n $years = array();\n $after_6_month = array();\n $before_6_month = array();\n\n for ($i = 0; $i < 7; $i++) {\n $courses->orWhere([\"month\"=>date('m',strtotime(\"+$i month\")),\"year\"=>date('Y',strtotime(\"+$i month\"))]);\n $after_6_month[date('Y',strtotime(\"+$i month\"))][] = date('m',strtotime(\"+$i month\"));\n $years[] = date('Y',strtotime(\"+$i month\"));\n }\n for ($i = 1; $i < 6; $i++) {\n $courses->orWhere([\"month\"=>date('m',strtotime(\"-$i month\")),\"year\"=>date('Y',strtotime(\"-$i month\"))]);\n $before_6_month[date('Y',strtotime(\"-$i month\"))][] = date('m',strtotime(\"-$i month\"));\n $years[] = date('Y',strtotime(\"-$i month\"));\n }\n\n $years = array_unique($years);\n asort($years);\n $courses = $courses->all();\n \n $model = new DvCourseTarget();\n if ($model->load(Yii::$app->request->post())){\n echo \"<pre>\";\n $data = Yii::$app->request->post();\n $month = $data['DvCourseTarget']['month'];\n $year = $data['DvCourseTarget']['year'];\n $manager_id = $data['DvCourseTarget']['manager_id'];\n\n Yii::$app->db->createCommand(\"UPDATE assist_course_target SET status = 0 WHERE month = $month AND year = $year AND manager_id=$manager_id\")->execute();\n\n $model->status = 1;\n if ($model->save()) {\n Yii::$app->session->setFlash('success', 'Course Target Created Successfully');\n return $this->redirect(['dv-users/create_target']);\n }\n } else {\n\n return $this->render('create_target', [ 'model' => $model, 'managers' => $managers, \"user_role\" => $user_role, \"user_id\" => $user_id,\"courses\" => $courses, 'before_6_month' => $before_6_month, 'after_6_month' => $after_6_month, 'years' => $years]);\n }\n }", "function gdlr_lms_add_user_role(){\r\n\t\tadd_role('instructor', __('Instructor', 'gdlr-lms'), \r\n\t\t\tarray('instructor'=>true, 'read'=>true, 'edit_users'=>true, 'edit_dashboard'=>true, 'upload_files'=>true,\r\n\t\t\t\t 'edit_course'=>true, 'edit_courses'=>true, 'edit_published_courses'=>true, 'publish_courses'=>true, 'delete_course'=>true, 'delete_courses'=>true, 'delete_published_courses'=>true,\r\n\t\t\t\t 'edit_quiz'=>true, 'edit_quizzes'=>true, 'edit_published_quizzes'=>true,'publish_quizzes'=>true, 'delete_quiz'=>true, 'delete_quizzes'=>true, 'delete_published_quizzes'=>true,\r\n\t\t\t\t 'course_taxes'=>true )\r\n\t\t);\r\n\t\tadd_role('student', __('Student', 'gdlr-lms'));\r\n\t\t\r\n\t\t$administrator = get_role('administrator');\r\n\t\t\r\n\t\t$administrator->add_cap('course_taxes');\r\n\t\t$administrator->add_cap('course_taxes_edit');\r\n\t\t$administrator->add_cap('edit_course');\r\n\t\t$administrator->add_cap('read_course');\r\n\t\t$administrator->add_cap('delete_course');\r\n\t\t$administrator->add_cap('edit_courses');\r\n\t\t$administrator->add_cap('edit_others_courses');\r\n\t\t$administrator->add_cap('publish_courses');\r\n\t\t$administrator->add_cap('read_private_courses');\r\n $administrator->add_cap('delete_courses');\r\n $administrator->add_cap('delete_private_courses');\r\n $administrator->add_cap('delete_published_courses');\r\n $administrator->add_cap('delete_others_courses');\r\n $administrator->add_cap('edit_private_courses');\r\n $administrator->add_cap('edit_published_courses');\t\r\n\r\n\t\t$administrator->add_cap('edit_quiz');\r\n\t\t$administrator->add_cap('read_quiz');\r\n\t\t$administrator->add_cap('delete_quiz');\r\n\t\t$administrator->add_cap('edit_quizzes');\r\n\t\t$administrator->add_cap('edit_others_quizzes');\r\n\t\t$administrator->add_cap('publish_quizzes');\r\n\t\t$administrator->add_cap('read_private_quizzes');\r\n $administrator->add_cap('delete_quizzes');\r\n $administrator->add_cap('delete_private_quizzes');\r\n $administrator->add_cap('delete_published_quizzes');\r\n $administrator->add_cap('delete_others_quizzes');\r\n $administrator->add_cap('edit_private_quizzes');\r\n $administrator->add_cap('edit_published_quizzes');\t\t\r\n\t\t\r\n\t\t// 1.01 capability fix\r\n\t\t$instructor = get_role('instructor');\r\n\t\t$instructor->add_cap('edit_published_courses');\r\n\t\t$instructor->add_cap('edit_published_quizzes');\r\n\t}", "public function actionIndex()\n\t{\n\t\t$this->ensureAuthManagerDefined();\n\t\t//provide the oportunity for the use to abort the request\n\t\t$message = \"This command will create three roles: Owner, Member, and Reader\\n\";\n\t\t$message .= \" and the following permissions:\\n\";\n\t\t$message .= \"create, read, update and delete user\\n\";\n\t\t$message .= \"create, read, update and delete project\\n\";\n\t\t$message .= \"create, read, update and delete issue\\n\";\n\t\t$message .= \"Would you like to continue?\";\n\t\t//check the input from the user and continue if\n\t\t//they indicated yes to the above question\n\t\tif($this->confirm($message))\n\t\t{\n\t\t\t//first we need to remove all operations,\n\t\t\t//roles, child relationship and assignments\n\t\t\t$this->_authManager->clearAll();\n\n\t\t\t//create the lowest level operations for users\n\t\t\t$this->_authManager->createOperation(\n\t\t\t\t\t\"createUser\",\n\t\t\t\t\t\"create a new user\");\n\t\t\t$this->_authManager->createOperation(\n\t\t\t\t\t\"readUser\",\n\t\t\t\t\t\"read user profile information\");\n\t\t\t$this->_authManager->createOperation(\n\t\t\t\t\t\"updateUser\",\n\t\t\t\t\t\"update a users in-formation\");\n\t\t\t$this->_authManager->createOperation(\n\t\t\t\t\t\"deleteUser\",\n\t\t\t\t\t\"remove a user from a project\");\n\n\t\t\t//create the lowest level operations for projects\n// \t\t\t$this->_authManager->createOperation(\n// \t\t\t\t\t\"createAdvertisment\",\n// \t\t\t\t\t\"create a new advertisment\");\n// \t\t\t$this->_authManager->createOperation(\n// \t\t\t\t\t\"readAdvertisment\",\n// \t\t\t\t\t\"read advertisment information\");\n// \t\t\t$this->_authManager->createOperation(\n// \t\t\t\t\t\"updateAdvertisent\",\n// \t\t\t\t\t\"update advertisment information\");\n// \t\t\t$this->_authManager->createOperation(\n// \t\t\t\t\t\"deleteAdvertisment\",\n// \t\t\t\t\t\"delete an advertisment\");\n\n\t\t\t$this->_authManager->createOperation(\"createFolder\",\"create a new folder\");\n\t\t\t$this->_authManager->createOperation(\"readFolder\",\"read folder information\");\n\t\t\t$this->_authManager->createOperation(\"updateFolder\",\"update folder information\");\n\t\t\t$this->_authManager->createOperation(\"deleteFolder\",\"delete an folder \");\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->_authManager->createOperation(\"createFile\",\t\"create a new file\");\n\t\t\t$this->_authManager->createOperation(\"readFile\",\"read file information\");\n\t\t\t$this->_authManager->createOperation(\"updateFile\",\"update file information\");\n\t\t\t$this->_authManager->createOperation(\"deleteFile\",\t\"delete a file \");\n\t\t\t\n\t\t\t\n\t\t\t$this->_authManager->createOperation(\"createRealEstate\",\"create a new RealEstate\");\n\t\t\t$this->_authManager->createOperation(\"readRealEstate\",\"read RealEstate information\");\n\t\t\t$this->_authManager->createOperation(\"updateRealEstate\",\"update RealEstate information\");\n\t\t\t$this->_authManager->createOperation(\"deleteRealEstate\",\"delete a RealEstate \");\n\t\t\t\n\t\t\t\n\t\t\t//create the lowest level operations for projects\n\t\t\t$this->_authManager->createOperation(\"createAdvertisment\", \"create a new advertisment\");\n\t\t\t$this->_authManager->createOperation(\"readAdvertisment\",\"read advertisment information\");\n\t\t\t$this->_authManager->createOperation(\"updateAdvertisent\",\"update advertisment information\");\n\t\t\t$this->_authManager->createOperation(\"deleteAdvertisment\", \"delete an advertisment\");\n\n\t\t\t//create the reader role and add the appropriate\n\t\t\t//permissions as children to this role\n\t\t\t$role=$this->_authManager->createRole(\"reader\");\n\t\t\t$role->addChild(\"readFile\");\n\t\t\t$role->addChild(\"readFolder\");\n\t\t\t$role->addChild(\"readRealEstate\");\n\t\t\t$role->addChild(\"readUser\");\n\n\t\t\t//create the member role, and add the appropriate\n\t\t\t//permissions, as well as the reader role itself, as children\n\t\t\t$role=$this->_authManager->createRole(\"member\");\n\t\t\t$role->addChild(\"createFolder\");\n\t\t\t$role->addChild(\"updateFolder\");\n\t\t\t$role->addChild(\"createFile\");\n\t\t\t$role->addChild(\"updateFile\");\n\t\t\t$role->addChild(\"deleteFile\");\n\t\t\t$role->addChild(\"createRealEstate\");\n\t\t\t$role->addChild(\"updateRealEstate\");\n\t\t\t$role->addChild(\"createAdvertisment\");\n\t\t\t$role->addChild(\"updateAdvertisent\");\n\n\t\t\t//create the owner role, and add the appropriate permissions,\n\t\t\t//as well as both the reader and member roles as children\n\t\t\t$role=$this->_authManager->createRole(\"owner\");\n\t\t\t$role->addChild(\"reader\");\n\t\t\t$role->addChild(\"member\");\n\t\t\t$role->addChild(\"createUser\");\n\t\t\t$role->addChild(\"updateUser\");\n\t\t\t$role->addChild(\"deleteUser\");\n\t\t\t$role->addChild(\"deleteFolder\");\n\t\t\t$role->addChild(\"deleteRealEstate\");\n\t\t\t$role->addChild(\"deleteAdvertisment\");\n\t\t\t\n\t\t\t//provide a message indicating success\n\t\t\techo \"Authorization hierarchy successfully generated.\\n\";\n\t\t}\n\t\telse\n\t\t\techo \"Operation cancelled.\\n\";\n\t}", "function CoursesLoggedInConstruct()\n\t{\tparent::CoursesLoggedInConstruct(\"resources\");\n\n\t\t$this->breadcrumbs->AddCrumb(\"courseresources.php?cid={$this->course->id}\", \"Resources\");\n\t\tif ($this->resource->id)\n\t\t{\t$this->breadcrumbs->AddCrumb(\"courseresource.php?id={$this->resource->id}\", $this->InputSafeString($this->resource->details[\"crlabel\"]));\n\t\t} else\n\t\t{\t$this->breadcrumbs->AddCrumb(\"courseresource.php?cid={$this->course->id}\", \"Add new\");\n\t\t}\n\t}", "protected function makePage() {\n // \n // get the user's constituency\n // \n // get the candidates for this election in this constituency\n // \n // make the page output\n }", "public function manageCourses ()\n {\n // Get the list of courses\n $courses = Course::all();\n \n // Get the list of departments\n $departments = Department::all();\n\n return view($this->courseManagementView, ['courses' => $courses,'departments' => $departments, 'count' => 0]);\n }", "function AssignCourse()\n\t{\t$this->resource = new AdminCourseResource($_GET[\"id\"]);\n\t\tif ($this->resource->id)\n\t\t{\t$this->course = new AdminCourse($this->resource->details[\"cid\"]);\n\t\t} else\n\t\t{\t$this->course = new AdminCourse($_GET[\"cid\"]);\n\t\t}\n\t}", "public function index()\n {\n // begin test @lkasera\n\n //$this->cas->force_auth();//calling CAS for authentication\n //$user = $this->cas->user();//calling the array with username from CAS and assignin it to the variable $user - @lkasera\n \t\t//$casuser = $user->userlogin;//fetching the username from CAS - @lkasera\n \t\t//$this->cas->logout($url = '');//testing CAS - kill CAS session\n \t\t//$this->load->view('welcome_message');\n //echo $user->userlogin; die();\n\n // end test @lkasera\n $data = array('profile'=>$this->mainmodel->clubProfile(),'events'=>$this->mainmodel->showevents());\n $this->load->view('login',$data);\n }", "function pastIntro() {\n // move progress forward and redirect to the runSurvey action\n $this->autoRender = false; // turn off autoRender\n $this->Session->write('Survey.progress', RIGHTS);\n $this->redirect(array('action' => 'runSurvey'));\n\n }", "public function run()\n {\n \n $courses = array('Physics','Biology','Maths','Malayalam','English','Chemistry');\n foreach( $courses as $course ) {\n\n \t$newCourse = new Course;\n \t$newCourse->course_name = $course;\n \t$newCourse->save();\n }\n }", "public function activeCourse(){\n if(Input::has('year') && Input::get('year') != ''){\n $year = Input::get('year');\n }else{\n $year = \"2019\";\n }\n \n $start_date = $year.\"-01-01\";\n $end_date = $year.\"-12-31\";\n\n $user_type = explode(',',Auth::user()->official_types);\n $courses = Course::Active()->whereIn('courses.user_type',$user_type)\n ->orderBy('courses.start_date','ASC')\n ->whereBetween('courses.start_date',[$start_date,$end_date])\n ->get();\n $this->layout->sidebar = View::make('coaches.sidebar',['sidebar'=>5,'subsidebar'=>1]);\n $this->layout->main = View::make('coaches.courses.list',['courses'=>$courses,'title'=>'Active Courses', \"year\"=>$year]);\n }", "public function actionIndex() {\r\n\r\n $this->ensureAuthManagerDefined();\r\n\r\n //provide the oportunity for the use to abort the request\r\n $message = \"This command will create three roles: Owner, Member, and Reader\\n\";\r\n $message .= \" and the following permissions:\\n\";\r\n $message .= \"create, read, update and delete users\\n\";\r\n $message .= \"create, read, update and delete opviviendas\\n\";\r\n $message .= \"create, read, update and delete opreunidos\\n\";\r\n $message .= \"Would you like to continue?\";\r\n\r\n //check the input from the user and continue if \r\n //they indicated yes to the above question\r\n if ($this->confirm($message)) {\r\n //first we need to remove all operations, \r\n //roles, child relationship and assignments\r\n $this->_authManager->clearAll();\r\n\r\n //create the lowest level operations for users\r\n $this->_authManager->createOperation(\r\n \"createUser\", \"create a new user\");\r\n $this->_authManager->createOperation(\r\n \"readUser\", \"read user profile information\");\r\n $this->_authManager->createOperation(\r\n \"updateUser\", \"update a users information\");\r\n $this->_authManager->createOperation(\r\n \"deleteUser\", \"remove a user from a project\");\r\n\r\n //create the lowest level operations for projects\r\n $this->_authManager->createOperation(\r\n \"createOpViviendas\", \"create a new vivienda\");\r\n $this->_authManager->createOperation(\r\n \"readOpViviendas\", \"read vivienda information\");\r\n $this->_authManager->createOperation(\r\n \"updateOpViviendas\", \"update vivienda information\");\r\n $this->_authManager->createOperation(\r\n \"deleteOpViviendas\", \"delete a vivienda\");\r\n\r\n //create the lowest level operations for issues\r\n $this->_authManager->createOperation(\r\n \"createOpReunidos\", \"create a new reunidos\");\r\n $this->_authManager->createOperation(\r\n \"readOpReunidos\", \"read reunidos information\");\r\n $this->_authManager->createOperation(\r\n \"updateOpReunidos\", \"update reunidos information\");\r\n $this->_authManager->createOperation(\r\n \"deleteOpReunidos\", \"delete a reunidos\");\r\n\r\n //create the reader role and add the appropriate \r\n //permissions as children to this role\r\n $role = $this->_authManager->createRole(\"reader\");\r\n $role->addChild(\"readUser\");\r\n $role->addChild(\"readOpViviendas\");\r\n $role->addChild(\"readOpReunidos\");\r\n\r\n //create the member role, and add the appropriate \r\n //permissions, as well as the reader role itself, as children\r\n $role = $this->_authManager->createRole(\"member\");\r\n $role->addChild(\"reader\");\r\n $role->addChild(\"updateOpViviendas\");\r\n //$role->addChild(\"updateIssue\");\r\n //$role->addChild(\"deleteIssue\");\r\n\r\n //create the owner role, and add the appropriate permissions, \r\n //as well as both the reader and member roles as children\r\n $role = $this->_authManager->createRole(\"owner\");\r\n $role->addChild(\"reader\");\r\n $role->addChild(\"member\");\r\n $role->addChild(\"createUser\");\r\n $role->addChild(\"updateUser\");\r\n $role->addChild(\"deleteUser\");\r\n $role->addChild(\"createOpViviendas\");\r\n $role->addChild(\"updateOpViviendas\");\r\n $role->addChild(\"deleteOpViviendas\");\r\n $role->addChild(\"updateOpReunidos\");\r\n\r\n //provide a message indicating success\r\n echo \"Authorization hierarchy successfully generated.\\n\";\r\n }\r\n else\r\n echo \"Operation cancelled.\\n\";\r\n }", "function getAllCourses(){\n $resultGetCourses = getCourses();\n // On vérifie si tout se passe bien\n if(!$resultGetCourses){\n $message = 'La récupération des cours n\\'a pas aboutit !';\n }else{\n // Methode qui permet de compter combien entrer il y a dans cours\n $nbCourses = $resultGetCourses->rowCount();\n if($nbCourses == 0){\n $message = \"Il n'y a aucun cours pour le moment!\";\n addOneCourse();\n }else{\n require_once ('views/viewAllCourses.php');\n }\n }\n // Methode qui libère la connexion au serveur permet donc à d'autres requete sql d'être executé\n $resultGetCourses->closeCursor();\n}", "function enrol_into_course($course, $user, $enrol) {\n\n if ($course->enrolperiod) {\n $timestart = time();\n $timeend = time() + $course->enrolperiod;\n } else {\n $timestart = $timeend = 0;\n }\n\n if ($role = get_default_course_role($course)) {\n\n $context = get_context_instance(CONTEXT_COURSE, $course->id);\n\n if (!role_assign($role->id, $user->id, 0, $context->id, $timestart, $timeend, 0, $enrol)) {\n return false;\n }\n\n email_welcome_message_to_user($course, $user);\n\n add_to_log($course->id, 'course', 'enrol', 'view.php?id='.$course->id, $user->id);\n\n return true;\n }\n\n return false;\n}", "public function index()\n {\n $courses = auth()->user()->courses()->selectRaw('\n (SELECT \n lesson_id\n FROM\n `lesson_user`\n WHERE\n lesson_id IN (SELECT \n `lessons`.`id`\n FROM\n `lessons`\n WHERE\n `lessons`.`course_id` = `course_user`.`course_id`)\n AND `lesson_user`.`user_id` = `course_user`.`user_id`\n ORDER BY lesson_id DESC\n LIMIT 1) AS last_completed_lesson_id')->get();\n\n return view('home');\n }", "public function main()\n {\n // check if user logged if not redirect to login page.\n if(Session::logged() == NULL){\n header(\"location: /\" . ROOT . 'login');\n }\n // if logged only administrator with role owner or manager have access to administration page.\n else if(Session::logged()['role'] == 'manager' || Session::logged()['role'] == 'owner'){\n // creating administration page.\n\n $data = NULL;\n $p = new Page(\"Administration Page\");\n $p->setComponent(\"htmlAdministrator.php\", $data);\n $p->addCss(\"administrator.css\");\n $p->addJs('administrator.js');\n $p->dumpView();\n }\n // not owner or manager trying access to administrator page, redirect to school page.\n else{\n header(\"location: /\" . ROOT . 'school');\n }\n }", "public function actionTopCourses()\r\n\t{\r\n\t\r\n\t\t$this->layout='//layouts/column3';\r\n\t\r\n\t\t$menu_items = array();\r\n\t\r\n\t\t$id= 0;\r\n\t\t\r\n\t\t$parent_hierarchies = MentoringHyerarchy::model()->findAllByAttributes(array('LEVEL_NUMBER'=>'10', 'PARENT_ID'=>0));\r\n\t\t\t\t\r\n\t\t\t$Criteria = new CDbCriteria();\r\n\t\t\t$Criteria->condition = \"RANKING > 2 AND STATUS > 0 AND HIERARCHY_ID IS NOT NULL\";\r\n\t\t\t$Criteria->limit = 10;\r\n\t\t\t$mentoringHierarchy = Course::model()->findAll($Criteria);\r\n\t\r\n\t\t$menu_items[] = array('label'=>'Top cursos','active'=>(!$id), 'url'=>array('site/topCourses'));\r\n\t\r\n\t\tforeach ($parent_hierarchies as $parent_hierarchy){\r\n\t\t\t\t\r\n\t\t\t$items = \t$this->getFirstChild($parent_hierarchy->ID,'site/courseIndex');\r\n\t\r\n\t\t\t$tech = MentUrl::getStandarPathString($parent_hierarchy->NAME,'tecnología');\r\n\t\t\t\r\n\t\t\t$url = (!count($items))? array('site/courseIndex','id'=>$parent_hierarchy->ID,'tech'=>$tech) : array('#');\r\n\t\t\t\t\r\n\t\t\t$menu_items[] = array('label'=>$parent_hierarchy->NAME,'active'=>($id != 0 && $mentoringHierarchy != null && ($mentoringHierarchy->PARENT_ID == $parent_hierarchy->ID || $mentoringHierarchy->ID == $parent_hierarchy->ID )) , 'url'=>$url, 'items'=>$items);\r\n\t\t\t\t\r\n\t\t}\r\n\t\r\n\t\r\n\t\t/**\r\n\t\t * Get all promotions\r\n\t\t *\r\n\t\t */\r\n\t\r\n\t\t$this->promotionItems = SalePromotion::model()->findAllByAttributes(\r\n\t\t\t\tarray(),\r\n\t\t\t\t$condition = 'END_DATE >= :today AND START_DATE <= :today',\r\n\t\t\t\t$params = array(\r\n\t\t\t\t\t\t':today' => date('Y-m-d', time()),\r\n\t\t\t\t)\r\n\t\t);\r\n\t\r\n\t\r\n\t\r\n\t\t// renders the view file 'protected/views/site/index.php'\r\n\t\t// using the default layout 'protected/views/layouts/main.php'\r\n\t\t$this->render('courseIndex', array('parentTopic'=>$id,'menu_items'=>$menu_items,'model'=>$mentoringHierarchy));\r\n\t}", "public function run()\n {\n $enrollment = Enrollment::findOrFail(1);\n foreach ($enrollment->enrollmentCourses()->get() as $enrollmentCourse) {\n $getSections = $enrollmentCourse->sections()->get();\n foreach ($getSections as $section) {\n for ($i=0; $i < 5; $i++) {\n $user = factory(App\\User::class, 1)->create([\n 'registration_id' => 1,\n 'active' => true\n ]);\n $user->assignRole(Role::STUDENT);\n $user->schools()->attach([\n 1\n ]);\n factory(App\\Student::class, 1)->create([\n 'user_id' => $user->id,\n 'year_level' => $enrollmentCourse->year_level,\n 'course_id' => $enrollmentCourse->course_id,\n 'enrollment_id' => $enrollmentCourse->enrollment_id,\n 'section_id' => $section->id\n ]);\n }\n }\n }\n }", "public function index()\n\t{\n\t\t$this->load->view('Mycourses');\n\t}", "function pastRights() {\n // move progress forward and redirect to the runSurvey action\n $this->autoRender = false; // turn off autoRender\n $this->Session->write('Survey.progress', QUESTIONS);\n $this->redirect(array('controller' => 'surveys', 'action' => 'runSurvey'));\n }", "function CoursesLoggedInConstruct()\n\t{\tparent::CoursesLoggedInConstruct();\n\t\techo \"<!--bookform-->\", $this->BookForm();\n\t\t\n\t}", "public static function take_course() {\r\n\t\t\t$payment_method = !empty( $_POST['payment_method'] ) ? $_POST['payment_method'] : '';\r\n\t\t\t$course_id = !empty( $_POST['course_id'] ) ? intval( $_POST['course_id'] ) : false;\r\n\t\t\tdo_action( 'learn_press_take_course', $course_id, $payment_method );\r\n\t\t}", "function vitero_user_complete($course, $user, $mod, $vitero) {\n\n}", "public function index()\n {\n $user = Auth::user();\n //Check if user has permission to view course records.\n $isAuthorized = app('App\\Http\\Controllers\\UserPrivilegeController')->checkPrivileges($user->id, Config::get('settings.course_management'), 'read_priv');\n if ($isAuthorized) {\n //record in activity log\n $activityLog = ActivityLog::create([\n 'user_id' => $user->id,\n 'activity' => 'Viewed the list of courses.',\n 'time' => Carbon::now()\n ]);\n $courses = Course::orderBy('id', 'DESC')->with('curriculum')->get();\n return $courses;\n }else{\n //record in activity log\n $activityLog = ActivityLog::create([\n 'user_id' => $user->id,\n 'activity' => 'Attempted to view the list of courses.',\n 'time' => Carbon::now()\n ]);\n return response()->json([\n 'message' => 'You are not authorized to view course records.'\n ],401); // 401: Unauthorized\n }\n\n }", "public function viewCourse()\n {\n $courseID = SCMUtility::cleanText($_GET['courseID']);\n\n // get the current logged in user\n if(Session::isLoggedIn())\n {\n // get current logged in user\n $current_user_id = Session::getCurrentUserID();\n $user = User::with('courses')->find($current_user_id);\n\n // check if the course being vied is already on his enrolled courses so we can flash a message\n if( $user->isAlreadyEnrolledToCourse($courseID) )\n {\n SCMUtility::setFlashMessage('You have already enrolled to this course.','info');\n }\n }\n\n // get course meta info\n $data = Course::with('students')->find($courseID);\n\n if( ! $data )\n {\n View::make('templates/system/error.php',array());\n return;\n }\n\n $data = $data->toArray();\n\n View::make('templates/front/course-view.php',compact('data'));\n }", "public function indexAction()\n \t{\n\t $this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();\n\t if( !Engine_Api::_()->core()->hasSubject() ) {\n\t return $this->setNoRender();\n\t }\n\t\n\t // Get subject and check auth\n\t $this->view->user = $subject = Engine_Api::_()->core()->getSubject('user');\n\t if( !$subject->authorization()->isAllowed($viewer, 'view') ) {\n\t return $this->setNoRender();\n\t }\n\t\n\t // Member type\n\t $subject = Engine_Api::_()->core()->getSubject();\n\t $fieldsByAlias = Engine_Api::_()->fields()->getFieldsObjectsByAlias($subject);\n\t\n\t if( !empty($fieldsByAlias['profile_type']) )\n\t {\n\t $optionId = $fieldsByAlias['profile_type']->getValue($subject);\n\t if( $optionId ) {\n\t $optionObj = Engine_Api::_()->fields()\n\t ->getFieldsOptions($subject)\n\t ->getRowMatching('option_id', $optionId->value);\n\t if( $optionObj ) {\n\t $this->view->memberType = $optionObj->label;\n\t }\n\t }\n\t }\n\t \n\t // Friend count\n\t $select = $subject->membership()->getMembersSelect();\n\t $paginator = Zend_Paginator::factory($select);\n\t $this->view->friendCount = $paginator -> getTotalItemCount();\n\t\t\n\t\t// Following count\n\t $select = $subject->membership()->getMembersOfSelect();\n\t\t$paginator = Zend_Paginator::factory($select);\n\t\t\n\t\t$memTable = Engine_Api::_() -> getDbTable('membership', 'advgroup');\n\t\t$select = $memTable -> select() -> from($memTable -> info (\"name\")) -> where('user_id = ?', $subject -> getIdentity()) -> where('active = 1');\n\t\t$clubs = Zend_Paginator::factory($select);\n\t\t\t\n\t\t$this -> view -> followingCount = $paginator -> getTotalItemCount() + $clubs -> getTotalItemCount();\n\t\t\n\t\t// Get professional user verified\n\t\t$slverifyTbl = Engine_Api::_()->getItemTable('slprofileverify_slprofileverify');\n\t $verifyRow = $slverifyTbl->getVerifyInfor($subject->getIdentity());\n\t if($verifyRow->approval == 'verified')\n\t {\n\t $settingsCore = Engine_Api::_()->getApi('settings', 'core');\n\t $photo_badge = $settingsCore->getSetting('sl_verify_badge', 0);\n\t $this->view->src_img = $src_img = Engine_Api::_()->slprofileverify()->getPhotoVerificaiton($photo_badge, null, 'pBadge');\n\t }\n\n\t\t// get preferred clubs\n\t\t$userGroupMappingTable = Engine_Api::_() -> getDbTable('groupmappings', 'user');\n\t\t$groupMappings = $userGroupMappingTable -> getGroupByUser($subject -> getIdentity(), 10);\n\t\t\n\t\t$groups = array();\n\t\tforeach($groupMappings as $groupMapping){\n\t\t\t\t$group_id = $groupMapping -> group_id;\n\t\t\t\t$group = Engine_Api::_() -> getItem('group', $group_id);\n\t\t\t\tif($group) {\n\t\t\t\t\t$groups[] = $group;\n\t\t\t\t}\n\t\t }\n\t\t$this -> view -> clubs = $groups;\n\t\t\n\t\t$this -> view -> sports = $subject->getSports();\n\t}", "function getMyCoursesValidate(){\n\t\t\n\t\tif(@$this->major != \"\" && @$this->institution != \"\" && @$this->id != \"\"){\n\t\t\t$this->basics->getMyCourses($this->sanitize($this->institution), $this->sanitize($this->major), $this->sanitize($this->id) );\n\t\t}else{\n\t\t\t$respArray = $this->makeResponse(\"ERROR\",\" The Major and Institution and Id are required! \", \"doSecureAuth();\");\n\t\t\t\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t\t\n\t\t}\n\t\t\n\t}", "function dllc_user_complete($course, $user, $mod, $dllc) {\n}", "function process_request()\r\n {\r\n $id = required_param('id', PARAM_INT);\r\n if (!$this->course = sloodle_get_record('course', 'id', $id)) error('Could not find course.');\r\n $this->sloodle_course = new SloodleCourse();\r\n if (!$this->sloodle_course->load($this->course)) error(get_string('failedcourseload', 'sloodle'));\r\n\r\n }", "public function actionFaculty()\n\t{\n\t\t//$this->model = User::loadModel();\n\t\t$this->renderView(array(\n\t\t\t'contentView' => '../drcUser/_list',\n\t\t\t'dataProvider' => $this->model->faculty(),\n\t\t\t'contentTitle' => 'Faculty',\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('base/user/create') . '\"><i class=\"icon-plus\"></i> Add User </a>',\n\t\t\t'menuView' => 'base.views.layouts._termMenu',\n\t\t\t'menuRoute' => 'drcUser/faculty',\n\t\t\t'activeTab' => 'faculty',\n\t\t));\n\t}", "public function bp_account_tab_action() {\n\t\techo $this->get_instance( \\MyVideoRoomExtrasParking\\Library\\SectionTemplates::class )->account_control_centre_alternate_dashboard();\n\t}", "public function course_status() {\n\t\t$course_id = $this->input->post('course_id');\n\t\t$this->page_data['page_name'] = \"course_status\";\n\t\t$this->page_data['page_title'] = 'Course Status';\n\t\t$this->page_data['page_view'] = 'user/course_status';\n\t\t$this->page_data['sub_page_name'] = \"course_status\";\n\n\t\t$this->page_data['course_list'] = $this->crud_model->get_enrollment_info_by_user_id(\"OBJECT\", $this->session->userdata('user_id'), array(\n\t\t\t\"course\" => array('id', 'title'),\n\t\t));\n\t\tif ($course_id) {\n\t\t\t$this->page_data['lesson_list'] = $this->lesson_model->get_lesson_list_by_users_status(\n\t\t\t\t$this->session->userdata('user_id'),\n\t\t\t\t'OBJECT',\n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t// 'user_lesson_status' => array('updated_at'),\n\t\t\t\t\t'lesson' => array('id', 'title', 'duration_in_second'),\n\t\t\t\t),\n\t\t\t\tarray('course_id' => $course_id)\n\t\t\t);\n\n\t\t\t$this->page_data['total_course_duration'] = 0;\n\t\t\t$this->page_data['total_user_lesson_duration'] = 0;\n\t\t\tforeach ($this->page_data['lesson_list'] as $lesson) {\n\t\t\t\t$this->page_data['total_course_duration'] += $lesson->duration_in_second;\n\t\t\t\t$this->page_data['total_user_lesson_duration'] += $lesson->finished_time;\n\t\t\t}\n\n\t\t}\n\n\t\t// debug($this->page_data['lesson_list']);\n\n\t\t$this->load->view('index', $this->page_data);\n\t}", "public function index()\n {\n\n $id = Auth::user()->id;\n $enroll = Enroll::where('user_id', '=', $id)->get();\n $items = array();\n foreach($enroll as $enrolls) {\n $items[] = $enrolls->course_id;\n }\n $courses = Course::whereIn('id', $items)->get();\n\n foreach ($courses as $get_course) {\n $duration[$get_course->id] = $this->duration($get_course->id) ; \n\n $noLessons = Lesson::where('courses_id','=',$get_course->id)->count();\n $complete = Complete::where('courses_id', '=', $get_course->id)->where('users_id', '=', $id)->count();\n\n $progress[$get_course->id] = number_format((100 / $noLessons) * $complete, 2, '.', ','); \n\n }\n \n return view('mycourse.index', compact('courses', 'id', 'duration', 'progress'));\n }", "public function process_enrollment() {\n\t\t$member_id \t= $_POST['member_id'];\n\t\t$program_id = $_POST['program_id'];\n\t\t$program_price_id = $_POST['program_price_id'];\n\t\t$old_member_date_started = $_POST['date_started'];\n\t\t$program_price = $this->Program_Model->get_program_price_by_id($program_price_id);\n\n\t\tif ($program_price) {\n\t\t\t$duration = '+' . $program_price[0]->duration;\n\n\t\t\t$daily = ['Daily', 'daily'];\n\n\t\t\tif (in_array($program_price[0]->duration, $daily)) {\n\t\t\t\t$duration = \"now\";\n\t\t\t}\n\t\t\t\n\t\t\tif ($old_member_date_started) {\n\t\t\t\t$date_started = date(MYSQL_DATE_FORMAT, strtotime($old_member_date_started));\n\t\t\t\t$date_expired = date(MYSQL_DATE_FORMAT, strtotime($duration, strtotime($old_member_date_started)));\n\t\t\t} else {\n\t\t\t\t$date_started = date(MYSQL_DATE_FORMAT, strtotime(\"now\"));\n\t\t\t\t$date_expired = date(MYSQL_DATE_FORMAT, strtotime($duration));\n\t\t\t}\n\n\t\t\t$data = [\n\t\t\t\t'member_id' => $member_id,\n\t\t\t\t'program_id' => $program_id,\n\t\t\t\t'date_started' => $date_started,\n\t\t\t\t'date_expired' => $date_expired,\n\t\t\t\t'status' => 'Active'\n\t\t\t];\n\n\t\t\t$result = $this->Member_Model->insert($data, 'membership');\n\t\t\tif ($result) {\n\t\t\t\t$current_date_time = date(MYSQL_DATE_TIME_FORMAT, strtotime(\"now\"));\n\t\t\t\t$data = array(\n\t\t\t\t\t'payment_date_time' => $current_date_time,\n\t\t\t\t\t'membership_id' => $result,\n\t\t\t\t\t'program_price_id' => $program_price_id\n\t\t\t\t);\n\n\t\t\t\t$result = $this->Member_Model->insert($data, 'membership_payment');\n\n\t\t\t\tif ($result) {\n\t\t\t\t\t$response = [\n\t\t\t\t\t\t'status' => true,\n\t\t\t\t\t\t'message' => 'Member successfully enrolled..'\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\t$response = [\n\t\t\t\t\t\t'status' => false,\n\t\t\t\t\t\t'message' => 'Member enrollment error! Contact admin now!'\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$response = [\n\t\t\t\t\t'status' => false,\n\t\t\t\t\t'message' => 'Member enrollment error! Contact admin now!'\n\t\t\t\t];\n\t\t\t}\n\t\t} else {\n\t\t\t$response = [\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => 'Error getting price list from server! Contact admin now!'\n\t\t\t];\n\t\t}\n\t\techo json_encode($response);\n\t}", "function display_course($c) {\n global $termList;\n \n // create list of times\n $times = $c['days1'].' '.$c['startend1'];\n if ($c['days2']) $times .= '<br>'.$c['days2'].' ' . $c['startend2'];\n if ($c['days3']) $times .= '<br>'.$c['days3'].' ' . $c['startend3'];\n if ($c['alt_wed'] != 'N/A') $times .= '<br><span class=\"text-warning\" style=\"font-variant:small-caps;\">this class has alternate wednesday meetings</span>';\n \n // create list of locations\n $locs = $c['loc1'];\n if ($c['loc2'] and $c['loc2'] != $c['loc1']) $locs .= '<br>'.$c['loc2'];\n if ($c['loc3'] and $c['loc3'] != $c['loc1'] and $c['loc3'] != $c['loc2']) $locs .= '<br>'.$c['loc3'];\n \n // create list of any distribution requirements it fulfills\n $distrib = 'None';\n if ($c['distribution1']) $distrib = $c['distribution1'];\n if ($c['distribution2']) $distrib .= '<br>'.$c['distribution2'];\n if ($c['distribution3']) $distrib .= '<br>'.$c['distribution3'];\n \n // check if list of prerequisites for course is empty, if so tell user\n $c['prereqs']=='' ? $prereqs = 'None' : $prereqs = $c['prereqs']; \n \n // add links to other sections of the same course if given\n if (!isset($_GET['sections'])) { $sections = get_sections($_GET['crn'],$c['term_code'],$c['course']); }\n if (isset($sections) and !empty($sections)) {\n $sections = '<p>Other sections: '.implode(', ',$sections).'</p>';\n } else $sections = '';\n \n // check whether course is being shopped or not if logged in\n if (isset($_SESSION['user'])) {\n if ($c['shopped'] == 1) {\n $shop_or_unshop = 'unshop';\n $shop_text = 'Stop shopping this course';\n } else {\n $shop_or_unshop = 'shop';\n $shop_text = 'Shop this course';\n }\n $shop = '<p id=\"shop\"><a href=\"javascript:void(0);\" onclick=\"'.$shop_or_unshop.'Course('.$c['term_code'].','.$_GET['crn'].')\">'.$shop_text.'</a></p>';\n } else {\n $shop = '';\n }\n \n // create HTML formatting for course used variables defined above and those given\n $info = <<< EOF\n {$termList[$c['term_code']]} — {$c['course']} ({$c['crn']})<br>\n <h3>{$c['title']}</h3>\n <h4>{$c['instructors']}</h4><br>\n \n <table id=\"info\">\n <tbody>\n <tr>\n <td width=\"70px\">Times</td>\n <td>{$times}</td>\n </tr>\n <tr>\n <td>Location</td>\n <td>{$locs}</td>\n </tr>\n <tr>\n <td>Fulfills</td>\n <td>{$distrib}</td>\n </tr>\n <tr>\n <td>Prereqs</td>\n <td>{$prereqs}</td>\n </tr>\n </tbody>\n </table><br>\n \n <p>{$c['description']}</p>\n \n <p><a href=\"https://courses.wellesley.edu/display_single_course_cb.php?crn={$_GET['crn']}&semester={$c['term_code']}\">View official details</a></p>\n\n {$sections}\n \n {$shop}\nEOF;\n echo $info;\n}", "public function user_assessment() {\n\n\t\t$this->page_data['page_name'] = \"user_assessment\";\n\t\t$this->page_data['page_title'] = 'User Assessment';\n\t\t$this->page_data['page_view'] = 'user/user_assessment';\n\t\t$this->page_data['sub_page_name'] = \"user_assessment\";\n\n\t\t$this->page_data['enrollment_list'] = $this->crud_model->get_enrollment_info_by_user_id(\"OBJECT\", $this->session->userdata('user_id'), array(\n\t\t\t\"enrollment\" => array('id as enrollment_id'),\n\t\t\t\"course\" => array('id as course_id', 'title as course_title'),\n\t\t));\n\n\t\tfor ($i = 0; $i < count($this->page_data['enrollment_list']); $i++) {\n\t\t\t$this->page_data['enrollment_list'][$i]->lesson_list = $this->lesson_model->get_lesson_list_by_course_id($this->page_data['enrollment_list'][$i]->course_id, array(\"id\", \"title\"));\n\t\t}\n\n\t\tif (isset($_GET['enrollment_id'])) {\n\n\t\t\t$this->page_data['user_assessment'] = $this->quiz_model->get_assessment_by_enroll_id(\n\t\t\t\t\"OBJECT\",\n\t\t\t\tarray(\n\t\t\t\t\t\"user_assessment\" => array(\"id\", \"set_id\", \"question_and_answer_list\"),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"user_assessment.enrollment_id\" => $_GET['enrollment_id'],\n\t\t\t\t\t\"quiz_set.lesson_id\" => isset($_GET['lesson_id']) ? $_GET['lesson_id'] : NULL,\n\t\t\t\t)\n\t\t\t);\n\n\t\t}\n\t\t$this->load->view('index', $this->page_data);\n\t}", "public function run()\n {\n Model::unguard();\n \n $courses = [\n \t//certificate in computer science programme courses\n \t[\n 'title'=> 'Citizenship and leadership',\n 'code'=> 'GST 119',\n 'unit'=> 2,\n 'programme_id'=> 1,\n 'semester_id'=> 1\n \t],\n \t[\n 'title'=> 'Use of English',\n 'code'=> 'GST 111',\n 'unit'=> 2,\n 'programme_id'=> 1,\n 'semester_id'=> 1\n \t],\n \t[\n 'title'=> 'Elementary Mathematics',\n 'code'=> 'GST 112',\n 'unit'=> 2,\n 'programme_id'=> 1,\n 'semester_id'=> 1\n \t],\n \t[\n 'title'=> 'Operating System',\n 'code'=> 'CST 113',\n 'unit'=> 2,\n 'programme_id'=> 1,\n 'semester_id'=> 1\n \t],\n \t[\n 'title'=> 'Introduction to internet',\n 'code'=> 'CST 114',\n 'unit'=> 2,\n 'programme_id'=> 1,\n 'semester_id'=> 1\n \t],\n \t[\n 'title'=> 'Introduction to Computer',\n 'code'=> 'CST 115',\n 'unit'=> 2,\n 'programme_id'=> 1,\n 'semester_id'=> 1\n \t],\n \t[\n 'title'=> 'Microsoft Word',\n 'code'=> 'CST 116',\n 'unit'=> 2,\n 'programme_id'=> 1,\n 'semester_id'=> 1\n \t],\n \t[\n 'title'=> 'Microsoft Power Point',\n 'code'=> 'CST 117',\n 'unit'=> 2,\n 'programme_id'=> 1,\n 'semester_id'=> 1\n \t],\n \t[\n 'title'=> 'Microsoft Excel',\n 'code'=> 'CST 118',\n 'unit'=> 2,\n 'programme_id'=> 1,\n 'semester_id'=> 1\n \t],\n\n \t// diploma In computer science programme courses first semester\n\n \t[\n 'title'=> 'Networking',\n 'code'=> 'DCS 204',\n 'unit'=> 2,\n 'programme_id'=> 3,\n 'semester_id'=> 1\n \t],\n \t[\n 'title'=> 'Data Communication',\n 'code'=> 'DCS 205',\n 'unit'=> 2,\n 'programme_id'=> 3,\n 'semester_id'=> 1\n \t],\n \t[\n 'title'=> 'Spreadsheet',\n 'code'=> 'DCS 207',\n 'unit'=> 2,\n 'programme_id'=> 3,\n 'semester_id'=> 1\n \t],\n \t[\n 'title'=> 'Database Management',\n 'code'=> 'DCS 208',\n 'unit'=> 2,\n 'programme_id'=> 3,\n 'semester_id'=> 1\n \t],\n \t[\n 'title'=> 'Microsoft Power Point',\n 'code'=> 'DCS 210',\n 'unit'=> 2,\n 'programme_id'=> 3,\n 'semester_id'=> 1\n \t],\n\n \t// diploma In computer science programme courses second semester\n\n \t[\n 'title'=> 'Communication Skill',\n 'code'=> 'DCS 201',\n 'unit'=> 2,\n 'programme_id'=> 3,\n 'semester_id'=> 2\n \t],\n \t[\n 'title'=> 'Business Mathematics',\n 'code'=> 'DCS 202',\n 'unit'=> 2,\n 'programme_id'=> 3,\n 'semester_id'=> 2\n \t],\n \t[\n 'title'=> 'Microsoft Word',\n 'code'=> 'DCS 203',\n 'unit'=> 2,\n 'programme_id'=> 3,\n 'semester_id'=> 2\n \t],\n \t[\n 'title'=> 'Corel Draw',\n 'code'=> 'DCS 206',\n 'unit'=> 2,\n 'programme_id'=> 3,\n 'semester_id'=> 2\n \t],\n \t[\n 'title'=> 'Microsoft Publisher',\n 'code'=> 'DCS 209',\n 'unit'=> 2,\n 'programme_id'=> 3,\n 'semester_id'=> 2\n \t],\n // certificate In computer engineering programme courses\n\n [\n 'title'=> 'Hardware Assembling',\n 'code'=> 'CCE 111',\n 'unit'=> 2,\n 'programme_id'=> 2,\n 'semester_id'=> 1\n ],\n [\n 'title'=> 'Trouble shooting and Hardware Maintenace',\n 'code'=> 'CCE 112',\n 'unit'=> 2,\n 'programme_id'=> 2,\n 'semester_id'=> 1\n ],\n [\n 'title'=> 'Software Installation',\n 'code'=> 'CCE 113',\n 'unit'=> 2,\n 'programme_id'=> 2,\n 'semester_id'=> 1\n ],\n [\n 'title'=> 'Operating System',\n 'code'=> 'CCE 114',\n 'unit'=> 2,\n 'programme_id'=> 2,\n 'semester_id'=> 1\n ],\n ];\n foreach ($courses as $course) {\n \n \t$registeredCourse = Course::firstOrCreate([\n \t\t'code'=>$course['code'],\n \t\t'title'=>$course['title'],\n \t\t'unit'=>$course['unit'],\n \t\t'semester_id'=>$course['semester_id'],\n \t]);\n\n \t$registeredCourse->programmeCourses()->firstOrCreate([\n \t\t'programme_id'=>$course['programme_id']\n \t]);\n }\n }", "public function index($offset = 0)\n {\n $data['user'] = dUser();\n $data['title'] = 'Komplain Pelanggan';\n $this->template->load('user/complaint', $data);\n }", "public function actionIndex()\n {\n $searchModel = new CoursesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function indexAction() {\n if (in_array(0, $this->_rolesUser) || in_array(1, $this->_rolesUser)) $this->_redirect(\"/admintool/index/go\");\n \n // traductores\n if (in_array(2, $this->_rolesUser)) $this->_redirect(\"/admintool/index/translate\"); \n }", "public function principal()\n\t {\n\t\t require_once('../../site_media/html/cursos/cu_Admin.php');\n\t }", "public function indexAction() {\n $page = intval($this->getInput('page'));\n $perpage = $this->perpage;\n\n list($total, $users) = Admin_Service_User::getList($page, $perpage);\n list(, $groups) = Admin_Service_Group::getAllGroup();\n $groups = Common::resetKey($groups, 'groupid');\n\n\n \n $this->assign('users', $users);\n $this->assign('groups', $groups);\n $this->assign('status', $this->status);\n $this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'] . '/?'));\n $this->assign(\"meunOn\", \"sys_user\");\n }", "function MaintainMembers()\n{\n\tglobal $context, $txt;\n\n\t// Get membergroups - for deleting members and the like.\n\t$result = wesql::query('\n\t\tSELECT id_group, group_name\n\t\tFROM {db_prefix}membergroups'\n\t);\n\t$context['membergroups'] = array(\n\t\tarray(\n\t\t\t'id' => 0,\n\t\t\t'name' => $txt['maintain_members_ungrouped']\n\t\t),\n\t);\n\twhile ($row = wesql::fetch_assoc($result))\n\t{\n\t\t$context['membergroups'][] = array(\n\t\t\t'id' => $row['id_group'],\n\t\t\t'name' => $row['group_name']\n\t\t);\n\t}\n\twesql::free_result($result);\n\n\tif (isset($_GET['done']) && $_GET['done'] == 'recountposts')\n\t\t$context['maintenance_finished'] = $txt['maintain_recountposts'];\n}", "function user_students ($target_user = \"\") {\n if (!$target_user) {\n global $user;\n $target_user = $user;\n } else {\n $target_user = eto_user_load(array('name' => $target_user));\n }\n\n if (!$target_user) {\n drupal_not_found();\n exit;\n }\n\n if ($target_user->uid != $user->uid) {\n if (! user_acccess('administer the site')) {\n drupal_access_denied();\n exit;\n }\n }\n\n $title = \"My Students\";\n drupal_set_title($title);\n $output = \"<h2>$title</h2>\\n\";\n\n $students = sb_assignment_load ($target_user->uid, \"student_uid\");\n\n $schedule_url = sb_user_base($target_user) . \"/schedule\";\n \n $output .= l(\"+Add an appointment with a student\", $schedule_url);\n\n if ($students) {\n $output .= \"<ul>\\n\";\n foreach ($students as $uid => $name) {\n $u = eto_user_load($uid);\n $output .= \"<li>\" \n\t. theme('eto_user', $u, TRUE)\n\t. \"</li>\\n\";\n }\n $output .= \"</ul>\\n\";\n } else {\n $output .= \"<p>You have no students assigned yet.</p>\\n\";\n }\n\n return $output;\n}", "public function init() {\n $this->model = new Application_Model_Courses();\n # send loged in user data\n $this->user_model = new Application_Model_Users();\n $this->auth = Zend_Auth::getInstance()->getIdentity();\n $layout = $this->_helper->layout();\n if ($this->auth) {\n $this->user_model->id = $this->auth->id;\n $currunt_user = $this->user_model->getUser();\n if ($currunt_user[0]['is_active'] == 1)\n $layout->user = $currunt_user;\n else\n $this->redirect('user/login');\n }\n else\n $this->redirect('user/login');\n }", "public function frontpage_available_courses() {\r\n global $CFG;\r\n require_once($CFG->libdir. '/coursecatlib.php');\r\n\r\n $chelper = new coursecat_helper();\r\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->\r\n set_courses_display_options(array(\r\n 'recursive' => true,\r\n 'limit' => $CFG->frontpagecourselimit,\r\n 'viewmoreurl' => new moodle_url('/course/index.php'),\r\n 'viewmoretext' => new lang_string('fulllistofcourses')));\r\n\r\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\r\n $courses = coursecat::get(0)->get_courses($chelper->get_courses_display_options());\r\n $totalcount = coursecat::get(0)->get_courses_count($chelper->get_courses_display_options());\r\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\r\n // Print link to create a new course, for the 1st available category.\r\n return $this->add_new_course_button();\r\n }\r\n return $this->frontpage_courseboxes($chelper, $courses);\r\n }", "public function index()\n {\n $uni_courses=TrainingInstitute::all();\n return view('Backend.Institute.TrainingCentre.Courses.index',compact('uni_courses'));\n }", "public function index()\n\t{\n\t\tif(isset($_SESSION['userid']))\n\t\t{\n\t\t\tredirect('schedule');\n\t\t}\n\n\t\t// for testing purposes, use backdoor_login\n\t\t$this->backdoor_login();\n\n\t}", "function getPendingStudentDashboard() {\n $this->layout->setField('page_title', 'Test Lesson');\n \n //user for changing only dates no clan.\n $data['change_only_date'] = false;\n \n $userdetail = new Userdetail();\n \n //Get the User extra details exit.\n $userdetail->where('student_master_id', $this->session_data->id)->get();\n \n //Get User details\n $user = $userdetail->User->get();\n \n // Get user Clan details if exits.\n $clan = $userdetail->Clan->get();\n \n //get Clan time\n $time_0 = strtotime(date('Y-m-d H:i:s', strtotime($userdetail->first_lesson_date . date('H:i', $clan->lesson_from))));\n \n //get time before 2 hours of clan start\n $time_1 = strtotime('-2 hour', $time_0);\n \n //get Current time\n $time_2 = strtotime(get_current_date_time()->get_date_time_for_db());\n \n //check user Extra Detail exist\n if ($userdetail->result_count() == 1) {\n \n //set user extra detail to access in view part\n $data['userdetail'] = $userdetail;\n \n // if status is Accepted\n if ($userdetail->status == 'A') {\n \n //get already applied clan name, date, time\n $data['already_applied'] = 'Your request for the clan <strong>' . $clan->{$this->session_data->language . '_class_name'} . '</strong> of school <strong>' . $clan->School->{$this->session_data->language . '_school_name'} . '</strong> at academy <strong>' . $clan->School->Academy->{$this->session_data->language . '_academy_name'} . '</strong><br /> on ' . date(\"d-m-Y\", strtotime($userdetail->first_lesson_date)) . ' : ' . date('h.i a', $clan->lesson_from) . ' - ' . date('h.i a', $clan->lesson_to) . ' is accepted';\n \n //for div color\n $data['type'] = 'success';\n \n //check that is time left to change dates.\n if ($time_2 <= $time_1) {\n $data['clans'] = $clan;\n $data['change_only_date'] = true;\n } else {\n \n //if time less than 2 hours from stating clan\n if ($time_2 <= $time_0) {\n $data['clans'] = 'Get ready for the Class';\n $data['change_only_date'] = true;\n } else {\n \n //Now if clan started check attadence\n $attadence = new Attendance();\n $attadence->where(array('clan_date' => $userdetail->first_lesson_date, 'student_id' => $this->session_data->id))->get();\n \n //Check Data extis in attandence table & check he is present or not\n if ($attadence->result_count() == 1 && $attadence->attendance == 1) {\n redirect(base_url() . 'register/step_2', 'refresh');\n } else {\n \n //get already applied clan name, date, time\n $data['already_applied'] = 'Your missed the clan <strong>' . $clan->{$this->session_data->language . '_class_name'} . '</strong> of school <strong>' . $clan->School->{$this->session_data->language . '_school_name'} . '</strong> at academy <strong>' . $clan->School->Academy->{$this->session_data->language . '_academy_name'} . '</strong><br /> on ' . date(\"d-m-Y\", strtotime($userdetail->first_lesson_date)) . ' : ' . date('h.i a', $clan->lesson_from) . ' - ' . date('h.i a', $clan->lesson_to);\n \n //for div color\n $data['type'] = 'danger';\n }\n }\n }\n } else if ($userdetail->status == 'P' || $userdetail->status == 'U') {\n \n //get already applied clan name, date, time\n $data['already_applied'] = 'You have already applied for the clan <strong>' . $clan->{$this->session_data->language . '_class_name'} . '</strong> of school <strong>' . $clan->School->{$this->session_data->language . '_school_name'} . '</strong> at academy <strong>' . $clan->School->Academy->{$this->session_data->language . '_academy_name'} . '</strong><br /> on ' . date(\"d-m-Y\", strtotime($userdetail->first_lesson_date)) . ' : ' . date('h.i a', $clan->lesson_from) . ' - ' . date('h.i a', $clan->lesson_to);\n \n //for div color\n $data['type'] = 'info';\n }\n }\n \n $user = New User();\n $data['user_details'] = $user->where('id', $this->session_data->id)->get();\n \n $clan = new Clan();\n $cities_ids = $clan->getCitiesofClans();\n \n $cities = new City();\n $cities->where_in('id', $cities_ids)->get();\n foreach ($cities as $city) {\n $temp = array();\n $temp['id'] = $city->id;\n $temp['city_name'] = ucwords($city->{$this->session_data->language . '_name'}) . ', ' . ucwords($city->state->{$this->session_data->language . '_name'}) . ', ' . ucwords($city->state->country->{$this->session_data->language . '_name'});\n $data['cities'][] = $temp;\n }\n \n if (!isset($data['clans'])) {\n $data['clans'] = null;\n }\n \n $this->load->helper('captcha');\n $this->session->unset_userdata('captcha_string');\n $random_string = random_string('alnum', 6);\n $this->session->set_userdata('captcha_string', $random_string);\n \n $captcha_argument = array('word' => $random_string, 'img_path' => './assets/captcha/', 'img_url' => base_url() . 'assets/captcha/', 'img_width' => 150, 'img_height' => 50, 'expiration' => 7200);\n \n $data['captcha_details'] = create_captcha($captcha_argument);\n \n //Set Layout view\n $this->layout->view('dashboard/pending_student', $data);\n }", "public function index(){\n\t\t\n\t\tredirect(base_url().$this->distributor_url.\"/members/category/\");\n\t}" ]
[ "0.68680274", "0.6274302", "0.6100868", "0.60598963", "0.59770834", "0.5881778", "0.58591855", "0.58215386", "0.58184737", "0.57666564", "0.5724432", "0.5723957", "0.5684555", "0.5658282", "0.56508523", "0.5641878", "0.56413317", "0.5611441", "0.5608489", "0.56073153", "0.5606408", "0.5575593", "0.55492485", "0.55489105", "0.553724", "0.55325204", "0.5527205", "0.5516842", "0.55069304", "0.55022246", "0.54991657", "0.54864424", "0.5471648", "0.5468796", "0.5454168", "0.5448589", "0.5440042", "0.5426279", "0.54257447", "0.54244053", "0.54238206", "0.5422268", "0.54057974", "0.5384835", "0.5384365", "0.538019", "0.53787833", "0.53775954", "0.5373305", "0.5371508", "0.5370298", "0.5360684", "0.5357873", "0.5355499", "0.5351516", "0.5348582", "0.53379226", "0.53342736", "0.5333587", "0.5329638", "0.5328096", "0.53253996", "0.5325189", "0.5324232", "0.53183776", "0.5317241", "0.5313473", "0.53117216", "0.5311348", "0.5310142", "0.5309458", "0.53093934", "0.5304899", "0.53007084", "0.52965343", "0.52958786", "0.5294251", "0.5278779", "0.52746886", "0.52713984", "0.5259812", "0.52541995", "0.5253543", "0.52511626", "0.5245634", "0.524451", "0.5244361", "0.52397984", "0.5238725", "0.52358043", "0.5233171", "0.5227253", "0.52231497", "0.5221998", "0.5219866", "0.5219754", "0.5218879", "0.52178985", "0.5217787", "0.5215289", "0.52138615" ]
0.0
-1
/ | | Start Assessment management |
public function assessments() { $active_ses = Session::where('status', 'active')->first(); $assessments = Assessment::with(['session', 'course'])->where('sesid', $active_ses->sesid)->get(); $courses = Course::where('status', 'active')->get(); $data['active_session'] = $active_ses; $data['assessments'] = json_encode($assessments); $data['courses'] = $courses; return view('admin.assessments', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pastIntro() {\n // move progress forward and redirect to the runSurvey action\n $this->autoRender = false; // turn off autoRender\n $this->Session->write('Survey.progress', RIGHTS);\n $this->redirect(array('action' => 'runSurvey'));\n\n }", "protected function start()\n {\n $status = $this->autoTestController->start();\n\n PacklinkPrestaShopUtility::dieJson($status);\n }", "public function startAction() {\n session_unset();\n\n \t$br = new bookingRecord();\n \t$br->save();\n\n $this->View('booking_start');\n }", "public function startAssistant()\n {\n\n $employees = $this->admin->employees;\n\n $this->data['can_add_employee'] = 1;\n if ($this->admin->tariffJournal->type === 'free' && count($employees) >= 2){\n $this->data['can_add_employee'] = 0;\n }\n\n $this->data['employees'] = $employees;\n\n $employee = Employee::where('user_id', $this->admin->user_id)->first();\n\n if($employee) {\n\n $this->data['is_employee'] = EmployeeService::where('employee_id', $employee->id)->count() ? true : false;\n\n } else {\n\n $this->data['is_employee'] = false;\n\n }\n\n return view('admin.start_assistant', $this->data);\n }", "public function run()\n {\n $stage = new Stage();\n $stage->text = 'Waiting Approval';\n $stage->save();\n\n $stage = new Stage();\n $stage->text = 'Approved';\n $stage->save();\n }", "function startSurvey($respondent = null) {\n $this->autoRender = false; // turn off autoRender because we need total control over what view to render here\n $this->__clearEditSession(CLEAR_SURVEY); // clear any previous session variables\n $this->Session->write('Survey.type', 'user'); // write the survey type to the session\n $this->redirect(array('action' => 'runSurvey', 'respondentGUID' => $respondent)); // send to the main survey routine\n }", "public function user_can_start_application()\n\t {\n\t \t$response = $this->get('/');\n\t \t$response->assertSeeText('Service record request');\n\t \t$response->assertSeeText('Start now');\n\t }", "public function startjobAction(){\n\t\ttry{\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t\n\t\t\t$config = $sm->get('Config');\n\t\t\t\n\t\t\t$request = $this->getRequest();\n\t\t\tif($request->isPost()){\n\t\t\t\n\t\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\t$paymentMade = 0;\n\t\t\t\t\n\t\t\t\tif(!empty($posts['invoice_number'])){ // If no invoice is attached then start the job\n\t\t\t\t\t$xero = new \\Invoice\\Model\\Xero($sm);\n\t\t\t\t\t$invoice = $xero->getInvoiceById($posts['invoice_number']);\n\t\t\t\t\t\n\t\t\t\t\t$paymentMade = ($invoice->Invoices->Invoice->AmountPaid * 100) / $invoice->Invoices->Invoice->Total;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(empty($posts['invoice_number']) || $paymentMade < 40){ // If payment made more than 40% then start else wait for approval\t\t\t\t\t\n\t\t\t\t\techo 2;\n\t\t\t\t}else{\n\t\t\t\t\t$data = array('status' => 1);\n\t\t\t\t\t\n\t\t\t\t\t$jobPacketTable = $sm->get('Order\\Model\\JobPacketTable');\n\t\t\t\t\techo $response = $jobPacketTable->startJob($posts['start_job_id'], $data);\n\t\t\t\t}\n\t\t\t}\n\t\t\texit;\n\t\t}catch(Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n\t}", "function launch() {\n\n $session = \\Config\\Services::session();\n $model = new M_register();\n\n\n $id_profile = $session->get('sess_id_profile');\n\n $data = array(\n\n 'starter' => 1\n );\n return $model->model_prosesupdatestarter( $id_profile, $data );\n }", "public function run()\n {\n\n $assessment_th_options = array(\"plan detail\", \"location\", \"plan detail & location\", \"PEL\", \"Denki TH\");\n for ($i = 0; $i < count($assessment_th_options); $i++) {\n THassessment::create([\n 'assessment_th_name' => $assessment_th_options[$i],\n 'updated_by' => '38610'\n ]);\n }\n }", "function run()\n {\n $category = Request :: get(AssessmentManager :: PARAM_CATEGORY);\n \t$publications = Request :: get(AssessmentManager :: PARAM_ASSESSMENT_PUBLICATION);\n\n if ($publications && ! is_array($publications))\n {\n $publications = array($publications);\n }\n\n $locations = array();\n\n foreach ($publications as $publication)\n {\n \tif ($this->get_user()->is_platform_admin() || $publication->get_publisher() == $this->get_user_id())\n \t{ \n \t\t$locations[] = AssessmentRights :: get_location_by_identifier_from_assessments_subtree($publication, AssessmentRights :: TYPE_PUBLICATION);\n \t}\n }\n\n if(count($locations) == 0)\n {\n \tif ($this->get_user()->is_platform_admin())\n \t{\n \t\tif($category == 0)\n \t\t{\n \t\t\t$locations[] = AssessmentRights :: get_assessments_subtree_root();\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$locations[] = AssessmentRights :: get_location_by_identifier_from_assessments_subtree($category, AssessmentRights :: TYPE_CATEGORY);\n \t\t}\n \t}\n }\n \n $manager = new RightsEditorManager($this, $locations);\n\t $manager->exclude_users(array($this->get_user_id()));\n \t$manager->run();\n }", "public function start()\n {\n $model = $this->getModel();\n $model->started_at = date('Y-m-d H:i:s');\n $model->save(false);}", "public function run()\n {\n CourseSkill::create(['name' => 'Beginner',]);\n CourseSkill::create(['name' => 'InterMediate',]);\n CourseSkill::create(['name' => 'Advanced',]);\n }", "function run()\r\n {\r\n InternshipOrganizerAgreementManager :: launch($this);\r\n }", "function enterGdta() {\n $this->layout = 'survey'; // use the survey layout\n if (!$this->request->is('post')) {\n // if there is no data then setup an initial view\n $this->request->data['Survey']['mainGoal'] = $this->Session->check('Survey.mainGoal') ? $this->Session->read('Survey.mainGoal') : ''; // set the main goal if it exists in the session, otherwise make it blank\n $this->set(\"hierarchy\", ($this->Session->check('Survey.hierarcy')) ? $this->Session->read('Survey.hierarcy') : array()); // setup a blank array or use the session variable if it exists\n } else { // GDTA entry complete so move forward\n $goal = $this->request->data['Survey']['mainGoal'];\n $this->Session->write('Survey.mainGoal', $goal);\n $this->Session->write('Survey.progress', SUMMARY);\n $this->redirect(array('action' => 'runSurvey'));\n }\n }", "public function register_start()\n {\n\n echo \"Started a New Action \";\n $project = readline(\"On what project are you working on? \");\n $this->project = $project;\n date_default_timezone_set('Europe/Berlin');\n //Array that keeps the localtime \n $arrayt = localtime();\n //calculates seconds rn for further use\n $timeRN = $arrayt[0] + ($arrayt[1] * 60) + ($arrayt[2] * 60 * 60); //in seconds\n\n $dateRN = date('Y-m-d');\n if (file_exists($this->save)) {\n $json_already = file_get_contents($this->save);\n }\n $json = json_decode($json_already);\n\n $array[] = array(\n\n 'Time' => $dateRN,\n 'Starttime' => $timeRN,\n 'Endtime' => \"\",\n 'Project' => $this->project,\n 'Worked' => \"\"\n\n );\n\n $json[] = $array;\n $json_decoded = json_encode($json);\n\n file_put_contents($this->save, $json_decoded);\n }", "public function startjobrequestAction(){\n\t\ttry{\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t\n\t\t\t$config = $sm->get('Config');\n\t\t\t\n\t\t\t$request = $this->getRequest();\n\t\t\tif($request->isPost()){\n\t\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\t\n\t\t\t\t$jobPacketTable = $sm->get('Order\\Model\\JobPacketTable');\n\t\t\t\t$approval_code = time().rand(99999, 99999999);\n\n\t\t\t\tif($response = $jobPacketTable->startJob($posts['start_job_id'], array('approval_code' => $approval_code, 'status' => 3))){\n\t\t\t\t\n\t\t\t\t\t$orderTable = $sm->get('Order\\Model\\OrderTable');\n\t\t\t\t\n\t\t\t\t\t$jobDetails = (array)$orderTable->fetchJobDetails($posts['start_job_id']);\n\t\t\t\t\t\n\t\t\t\t\t$jobDetails['approval_code'] = $approval_code;\n\t\t\t\t\t$jobDetails['display_job_id'] = \\De\\Service\\CommonService::generateStockCode($jobDetails['job_id'], 'order');\n\n\t\t\t\t\t$alertTable = $sm->get('Alert\\Model\\AlertTable');\n\t\t\t\t\t$viewUrl = sprintf('/jobdetails/%s', $jobDetails['job_id']);\n\t\t\t\t\t$approvalUrl = sprintf('/approvejob/%s/%s', $jobDetails['job_id'], $jobDetails['approval_code']);\n\n\t\t\t\t\t$reason = $posts['start_comment'];\n\t\t\t\t\tif ($reason != '') {\n\t\t\t\t\t\t$reason = ' (' . $reason . ')';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$message = sprintf(\n\t\t\t\t\t\t\t'Job <a href=\"%s\">%s</a> needs approval%s. <a href=\"%s\">Click to approve</a>.',\n\t\t\t\t\t\t\t$viewUrl,\n\t\t\t\t\t\t\t$jobDetails['display_job_id'],\n\t\t\t\t\t\t\t$reason,\n\t\t\t\t\t\t\t$approvalUrl\n\t\t\t\t\t\t\t);\n\t\t\t\t\t/* TODO: don't hardcode role ID */\n\t\t\t\t\t$alertTable->createRoleAlert($identity['user_id'], 1, $message);\n\t\t\t\t\t\n\t\t\t\t\techo 3;\n\t\t\t\t}\n\t\t\t}\n\t\t\texit;\n\t\t}catch(Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n\t}", "function requestApproval() \t{\n\t\t$this->getMenu() ;\n\t\t$id = $this->input->post('id');\n\t\t$this->timesheetModel->saveTimesheetRequest($id);\n\t\tredirect ('/timesheet/');\n\t}", "public function testRequestEnrollment()\n {\n }", "public function start() {\n\t\t$this->writeTitle();\n\t\t\n\t\t$this->showAllTable();\n\t\t\n\t\t$this->addEntityForm();\n\t}", "public function actionStart() {\n\n Session::initNewBooking();\n Wizard2::initStepsClient();\n Wizard2::setActiveStep(Wizard2::VIEW_FIND_CARERS); //first step active\n\n $request = Yii::app()->request;\n $postCode = $request->getParam('postCode', '');\n\n $this->redirect(array('site/findCarers' /* , 'postCode' => $postCode */));\n }", "public function start_harvest(){\n $this->checkinit();\n $this->harvest_laststart = $this->dt();\n $this->save_flags();\n }", "function run()\r\n {\r\n $trail = BreadcrumbTrail :: get_instance();\r\n $trail->add_help('course_type general');\r\n\r\n $type = Request :: get(WeblcmsManager :: PARAM_TYPE);\r\n $course_type_ids = Request :: get(WeblcmsManager :: PARAM_COURSE_TYPE);\r\n\r\n if (! $this->get_user() || ! $this->get_user()->is_platform_admin())\r\n {\r\n $this->display_header();\r\n Display :: error_message(Translation :: get('NotAllowed', null ,Utilities:: COMMON_LIBRARIES));\r\n $this->display_footer();\r\n exit();\r\n }\r\n\r\n //else\r\n if (($type == 'course_type' && $course_type_ids) || ($type == 'all'))\r\n {\r\n $this->change_course_type_activity($course_type_ids);\r\n }\r\n\r\n else\r\n {\r\n $this->display_header();\r\n $this->display_error_message(Translation :: get('NoObjectsSelected', null ,Utilities:: COMMON_LIBRARIES));\r\n $this->display_footer();\r\n }\r\n\r\n }", "public function start() {\n\n // TODO: Maybe sometimes\n\n }", "public function actionStart($at=false,$in=false)\n {\n // Start the competition $in number of seconds from now\n }", "public function run()\n {\n $subjectStates = [\n [\n 'state' => 'Mandatory',\n 'description' => 'Must be taken by student to move onto next form',\n ],\n [\n 'state' => 'Optional',\n 'description' => 'Student can select this subject or an equivalent subject type',\n ]\n ];\n\n foreach ($subjectStates as $subjectState) {\n SubjectState::create($subjectState);\n };\n }", "function start($gameId){\n \n}", "public function start()\n\t{\n\t\t// reset first, will start automaticly after a full reset\n\t\t$this->data->directSet(\"resetNeeded\", 1);\n\t}", "public function start()\n\t{\n\t\t// Get contoller and action names\n\t\t$this->getControllerName();\n\t\t$this->getActionName();\n\n\t\t// Set Names of executing class and action names\n\t\t$this->class_Name = ucfirst($this->controllerName);\n\t\t$this->action_Name = ucfirst($this->actionName);\n\n\t\t// Set globals variable\n\t\t$this->setGlobalsData();\n\n\t\t// Run action\n\t\t$this->getControllerAction();\n\t}", "abstract public function start();", "abstract public function start();", "public function startWorking(){\r\n }", "public function start()\n {\n die(\"Must override this function in a driver\");\n }", "public function start()\n {\n // For example you can check Auth\n }", "function showStart() {\n $starturl = $this->action . '?mode=eligible';\n $extra = array('starturl' => $starturl);\n $output = $this->outputBoilerplate('start.html', $extra);\n return $output;\n }", "function start()\n {\n\t\t$GLOBALS['appshore_data']['api']['op'] = $_SESSION['customization']['applications']['tab_id']?$this->selectOp($_SESSION['customization']['applications']['tab_id']):'administration.customization_fields.edit'; \n\t\treturn execMethod($GLOBALS['appshore_data']['api']['op']);\t\t\n }", "function assessments_init(&$options, $memberInfo, &$args){\n\n\t\treturn TRUE;\n\t}", "public function actionStartImport()\n {\n $redirect = craft()->request->getRequiredParam('redirect');\n\n // start task\n $checkPendingTask = false;\n craft()->tobiasAx_import->startTask($checkPendingTask);\n\n // set CP notice\n craft()->userSession->setNotice(Craft::t('Started importing Tobias advertisements'));\n\n // redirect\n $this->redirect($redirect);\n $this->end();\n }", "public function emp_start()\n\t{//\t\t\tredirect('/');\n\t\t$data = array();\n\t\t$data['title'] = 'Employee Start';\n\t\t//$data['head_css'] = array(config_item('css_url') . 'jquery.ui.dialog.css');\n\t\t\n\t\t$this->load->library('javascript');\n\t\t$this->load->model('client_model');\n\t\t\n\t\t$client_id = $this->session->userdata('CLIENT_ID');\n\t\t$client_job_id = $this->session->userdata('CLIENT_JOB_ID');\n\t\t\n\t\tif (!$client_id && !$client_job_id)\n\t\t{\n\t\t\t//echo '<h1>failed, no client!</h1>';\n\t\t\tredirect('/');\n\t\t}\n\t\t$client = $this->client_model->get_by_id($client_id, $client_job_id);\n\t\t//dumpr($client);\n\t\n\t\tif ($client->first_name == \"\" || $client->surname == \"\")\n\t\t{\n\t\t\techo '<h1>failed, Client non-exist!</h1>';\n\t\t\t//redirect('/');\n\t\t}\n\t\t$data['first_name'] = $client->first_name;\n\t\t$data['surname'] = $client->surname;\n\t\t\n\t\t\n\t\t// assign those session variable to one variable.\n\t\t///////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t//$this->load->helper('t');\n\t\t\t//$text = 'I am a student.';\n\t\t\t//$toLang = 'ch'; //or any other language - http://code.google.com/apis/language/translate/v2/using_rest.html#language-params\n\t\t\t//echo t($text, $toLang);\n\t\t///////////////////////////////////////////////////////////////////////////////////////////\n\t\t\n\t\t//$data['lang'] = $this->session->userdata('language');\n\t\t\n\t\t$data['welcome'] = 'Welcome';\n\t\t///////////////////////////////////////////////////////////////////////////////////////////\n\t\t$this->refresh_data('employee/emp_start', $data);\n\t\t//$this->load->view('employee/emp_start', $data);\n\t}", "abstract function start();", "public function run()\n {\n $course = Course::find(1);\n $deadline = new Deadline;\n $deadline->course = $course->id;\n $deadline->name = \"Final Upload\";\n $deadline->filetypes = \"pdf, zip\";\n $date = new DateTime();\n $date->add(new DateInterval('P30D'));\n $deadline->date = $date;\n $deadline->save();\n $deadline = new Deadline;\n $deadline->course = $course->id;\n $deadline->name = \"Interim Report\";\n $deadline->filetypes = \"pdf, zip\";\n $date = new DateTime();\n $date->add(new DateInterval('P4D'));\n $deadline->date = $date;\n $deadline->save();\n\n }", "public function start()\n {\n }", "public function start()\n {\n }", "public function start()\n {\n }", "public function assessmentcreate(){\n\t\tif (getRole() == \"student\") {\n return view('permission');\n }\n\t\t$id = $institution_id = $subject_id = $category_id = 0;\n\t\t$inst_arr = $this->institution->getInstitutions();\n\t\t$id=Auth::user()->id;\n\t\t$user_institution=User::find($id);\n\t\t$user_institution_id=$user_institution['institution_id'];\n\t\t$subjects = $this->subject->getSubject();\n\t\t$category = $this->category->getCategory();\n\t\t$lesson = $this->lesson->getLesson ();\n\t\t$questions = $this->question->getQuestions();\n\t\t$question_type=$this->question_type->getQuestionType();\n\t\t\n\t\t$inst_questions_list=Question::where('institute_id',$user_institution_id)->get();\n\t\t// $inst_passages_list=Passage::where('institute_id',$user_institution_id)->get();\n\t\t$inst_passages_list=Passage::join('questions','questions.passage_id','=','passage.id')\n\t\t\t// ->whereNotNull('questions.passage_id')\n\t\t\t->where('questions.institute_id',$user_institution_id)\n\t\t\t->groupBy('questions.passage_id')\n\t\t\t->select('passage.title as title','passage.id as id')\n \t\t\t->get();\n//\t\t$inst_questions_list=[];\n \t\t\treturn view('resources::assessment.add',compact('inst_passages_list','inst_questions_list','inst_arr', 'id','institution_id','questions','subjects','category','lesson','question_type'));\n\t}", "public function run()\n {\n //\n Applicant::factory()->times(50)->create();\n }", "public function run()\n {\n $policies = array(\n '1' => '1.\tImprove access & equity in higher education',\n '2' => '2.\tImprove internal efficiency in higher education',\n '3' => '3.\tImprove quality & relevance of higher education',\n '4' => '4.\tImprove gender diversity in higher education',\n '5' => '5.\tImprove internationalization',\n '6' => '6.\tImprove capacity and resources mobilization',\n );\n\n $descriptions = array(\n '1.1' => '1.1\tIncrease capacity to enroll new students',\n '1.2' => '1.2\tIncrease enrollment in STEM study fields',\n '1.3' => '1.3\tIncrease participation of female students',\n '1.4' => '1.4\tIncrease participation of female students in STEM subjects',\n '1.5' => '1.5\tIncrease participation of persons with disabilities',\n '1.6' => '1.6\tIncrease participation of students from emerging regions',\n '1.7' => '1.7\tIncrease participation of students from economically poor households',\n\n '2.1' => '2.1\tReduce dropout rate of male and female students',\n '2.2' => '2.2\tReduce dropout rate of female students',\n '2.3' => '2.3\tReduce academic dismissal rate of male and female students',\n '2.4' => '2.4\tReduce academic dismissal rate of female students',\n '2.5' => '2.5\tIncrease graduation rate of male and female students',\n '2.6' => '2.6\tIncrease graduation rate of female students',\n '2.7' => '2.7\tIncrease graduation rate of students with disabilities',\n '2.8' => '2.8\tIncrease graduation rate of students from emerging regions',\n '2.9' => '2.9\tIncrease graduation rate of students from economically poor households',\n\n '3.1' => '3.1\tImprove quality of instruction in HEIs',\n '3.2' => '3.2\tImprove performance of students in exit examinations',\n '3.3' => '3.3\tImprove employability of students in HEIs',\n '3.4' => '3.4\tImprove quality, relevance and accessibility of higher education research and research outputs',\n\n '4.1' => '4.1\t Improve gender diversity of academic staff',\n '4.2' => '4.2\t Improve gender diversity of technical support staff',\n '4.3' => '4.3\t Improve gender diversity of professional staff in teaching hospitals',\n '4.4' => '4.4\t Improve gender diversity of administrative support staff',\n '4.5' => '4.5\t Improve gender diversity of staff appointed at senior management positions',\n '4.6' => '4.6\t Improve gender diversity of staff appointed at middle management positions',\n '4.7' => '4.7\t Improve gender diversity of staff appointed at lower management positions',\n\n '5.1' => '5.1\tIncrease the contribution of Ethiopian diaspora in academic activities',\n '5.2' => '5.2\tIncrease student exchange between Ethiopian and foreign universities',\n\n '6.1' => '6.1\tIncrease funds for research and development',\n '6.2' => '6.2\tIncrease resources mobilized from sources other than the government subsidy budget',\n '6.3' => '6.3\tIncrease efficiency in utilizing funds',\n '6.4' => '6.4\tDecrease dependency on expatriate academic staff',\n '6.5' => '6.5\tReduce staff attrition rate',\n );\n\n $kpis = InstitutionReportCard::getEnum('kpi');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.1', '1.1.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.1', '1.1.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.1', '1.1.3');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.1', '1.1.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.2', '1.2.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.2', '1.2.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.2', '1.2.3');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.3', '1.3.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.3', '1.3.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.3', '1.3.3');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.3', '1.3.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.4', '1.4.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.4', '1.4.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.4', '1.4.3');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.5', '1.5.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.5', '1.5.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.5', '1.5.3');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.5', '1.5.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.6', '1.6.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.6', '1.6.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.6', '1.6.3');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.6', '1.6.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.7', '1.7.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.7', '1.7.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.7', '1.7.3');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.7', '1.7.4');\n\n // break\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.1', '2.1.1', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.1', '2.1.2', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.1', '2.1.3', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.1', '2.1.4', true);\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.2', '2.2.1', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.2', '2.2.2', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.2', '2.2.3', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.2', '2.2.4', true);\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.3', '2.3.1', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.3', '2.3.2', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.3', '2.3.3', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.3', '2.3.4', true);\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.4', '2.4.1', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.4', '2.4.2', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.4', '2.4.3', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.4', '2.4.4', true);\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.5', '2.5.1');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.5', '2.5.2');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.5', '2.5.3');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.5', '2.5.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.6', '2.6.1');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.6', '2.6.2');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.6', '2.6.3');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.6', '2.6.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.7', '2.7.1');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.7', '2.7.2');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.7', '2.7.3');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.7', '2.7.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.8', '2.8.1');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.8', '2.8.2');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.8', '2.8.3');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.8', '2.8.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.9', '2.9.1');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.9', '2.9.2');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.9', '2.9.3');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.9', '2.9.4');\n\n // break\n\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.1', '3.1.1');\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.1', '3.1.2', true);\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.1', '3.1.3');\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.1', '3.1.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.2', '3.2.1');\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.3', '3.3.1');\n\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.4', '3.4.1');\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.4', '3.4.2');\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.4', '3.4.3');\n\n // break\n\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.1', '4.1.1');\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.2', '4.2.1');\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.3', '4.3.1');\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.4', '4.4.1');\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.5', '4.5.1');\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.6', '4.6.1');\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.7', '4.7.1');\n\n // break\n\n $this->saveKpi($policies, $descriptions, $kpis, '5', '5.1', '5.1.1');\n\n $this->saveKpi($policies, $descriptions, $kpis, '5', '5.2', '5.2.1');\n $this->saveKpi($policies, $descriptions, $kpis, '5', '5.2', '5.2.2');\n\n // break\n\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.1', '6.1.1');\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.2', '6.2.1');\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.3', '6.3.1', true);\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.4', '6.4.1', true);\n\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.5', '6.5.1', true);\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.5', '6.5.2', true);\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.5', '6.5.3', true);\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.5', '6.5.4', true);\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.5', '6.5.5', true);\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.5', '6.5.6', true);\n }", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function run()\n\t{\n\t\t/** Access policy for admin\n\t\t */\n\t\tApp\\Model\\Base\\Policy::create([\n\t\t\t'name' => 'Admin',\n\t\t\t'description' => 'Access policy for admin',\n\t\t]);\n\n\t\t/** Access policy for manager\n\t\t */\n\t\tApp\\Model\\Base\\Policy::create([\n\t\t\t'name' => 'Manager',\n\t\t\t'description' => 'Access policy for manager',\n\t\t]);\n\n\t\t/** Access policy for simple member\n\t\t */\n\t\tApp\\Model\\Base\\Policy::create([\n\t\t\t'name' => 'Member',\n\t\t\t'description' => 'Access policy for simple member',\n\t\t]);\n\t}", "public function start()\n {\n // TODO: Implement start() method.\n }", "public function run()\n {\n $instructor = new instructor();\n $instructor->firstname = \"kamal\";\n $instructor->lastname = \"perera\";\n $instructor->email = \"[email protected]\";\n $instructor->category_id = 1;\n $instructor->module_id = 1;\n $instructor->save();\n\n $instructor = new instructor();\n $instructor->firstname = \"amal\";\n $instructor->lastname = \"wasantha\";\n $instructor->email = \"[email protected]\";\n $instructor->category_id = 1;\n $instructor->module_id = 2;\n $instructor->save();\n\n $instructor = new instructor();\n $instructor->firstname = \"nimal\";\n $instructor->lastname = \"hettiarachchi\";\n $instructor->email = \"[email protected]\";\n $instructor->category_id = 2;\n $instructor->module_id = 1;\n $instructor->save();\n\n $instructor = new instructor();\n $instructor->firstname = \"shehan\";\n $instructor->lastname = \"devinda\";\n $instructor->email = \"[email protected]\";\n $instructor->category_id = 2;\n $instructor->module_id = 2;\n $instructor->save();\n }", "public function startClassByInstructor_post()\n {\n /* code goes here */\n }", "private function approve() {\n\n }", "public function run()\n {\n\t\t// Exercise segment\n\t\t$exercise = ExerciseFactory::create(\n\t\t\t1,\n\t\t\t'Ghoul Problem at Avans College',\n\t\t\t'Speak to the leader of the settlement.',\n\t\t\t'application/resources/assets/images/Icons/Settlement.png',\n\t\t\t'Preston, go fix your own shit. Im done with those quests',\n\t\t\t1,\n\t\t\t1\n\t\t);\n\n\t\t$exercise->save();\n }", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "protected function enjoyVacation()\n {\n echo \"Coding, eating, sleeping\";\n // TODO: Implement enjoyVacation() method.\n }", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function step_1()\n {\n }", "public function run()\n {\n factory(App\\Subject::class,'assessment',3)->create();\n factory(App\\Group::class,'assessment',3)->create();\n factory(App\\Student::class,'assessment',14)->create();\n factory(App\\Assessment::class,'assessment',40)->create();\n }", "public function runMaster() {\n\t\t$this->_runLifecycle('analyze');\n\t\t$this->_runLifecycle('resources');\n\t\t$this->_runLifecycle('authenticate');\n\t\t$this->_runLifecycle('authorize');\n\t\t$this->_runLifecycle('process');\n\t\t$this->_runLifecycle('output');\n\t\t$this->_runLifecycle('hangup');\n\t}", "public function youCanStartLectures()\n {\n // Arrange...\n $this->login();\n $lecture = factory(Lecture::class)->make();\n\n // Act...\n $this->json('post', 'lectures', $lecture->toArray());\n\n // Assert...\n $this->seeStatusCode(Response::HTTP_CREATED);\n $this->seeSuccessStructure([\n 'accessCode',\n 'endedAt',\n 'id',\n 'startedAt',\n 'subjectId'\n ])->seeInDatabase('lectures', [\n 'id' => $this->getSuccessData('id')\n ]);\n }", "public function start()\n {\n $this->status = 'in_progress';\n return $this->save();\n }", "public function run()\n {\n $instructors = [\n [\n \"name\" => \"Muhammad Kuswari\",\n \"job\" => \"Mahasiswa\",\n \"expertise\" => \"Fullstack Developer\",\n \"email\" => \"[email protected]\",\n \"about\" => \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam eleifend nunc eu turpis pharetra, ut tristique sapien.\"\n ],\n [\n \"name\" => \"Ricky Anwar\",\n \"job\" => \"Frontend Developer\",\n \"expertise\" => \"Frontend Developer Expert\",\n \"email\" => \"[email protected]\",\n \"about\" => \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam eleifend nunc eu turpis pharetra, ut tristique sapien.\",\n ]\n ];\n\n foreach ($instructors as $instructor) {\n Instructor::create($instructor);\n }\n }", "public function run()\n {\n Course::create(['id' => 173, 'modality_id' => 1, 'name' => 'Técnico em Agronegócio']);\n }", "public function testCreateChallengeActivity()\n {\n }", "public function start() {\n // Init stuff\n $this->combatantAID = $this->combatantA->id;\n $this->combatantBID = $this->combatantB->id;\n\n // Decide between pve and pvp\n if(get_class($this->combatantB) == \"Monster\") {\n $this->combatantB->call(\"getReadyForBattle\");\n $this->type = \"monster\";\n } else {\n $this->type = \"pvp\";\n }\n \n $this->state = \"ongoing\";\n $this->winnerType = 'undecided';\n \n $this->battleeffects = new BattleeffectList();\n \n \n if($this->type == \"pvp\") {\n // @todo Should players have first round battle messages?\n } else {\n $battleMsg = new Battlemessage(\n $this->combatantB->call(\"createFirstRoundCombatMessage\")\n );\n $this->log($this->combatantB, $battleMsg);\n }\n\n // Insert new DB record\n $this->insert();\n \n // Set ongoingBattleID for combattants\n $this->combatantA->ongoingBattleID = $this->id;\n if($this->type == \"pvp\") {\n $this->combatantB->ongoingBattleID = $this->id;\n // $this->combatantB->save();\n }\n \n $this->saveObjectState();\n }", "public function startQuiz(){\n if($this->session->get('userId') == null){\n echo \"sorry unauthorized!...\";\n return;\n }\n $this->answeredQuestions =[];\n $this->minId = 1;\n // jel ok da pretpostavim da je sve od 1 do maxa tu - msm da da\n $q = new Question();\n $this->maxId = $q->getMaxId();\n\n return view('quiz.php');\n }", "public function start() {\n $this->getPidFile()->write($this->getPidManager()->getCurrent());\n $this->getIpc()->setVar('pid', $this->getPidManager()->getCurrent());\n $this->_run();\n }", "public function take_action()\n {\n }", "public function take_action()\n {\n }", "public function start(): void {}", "public static function start()\n {\n self::registerDefault();\n\n $page = rex_request('page', 'string');\n $subpage = rex_request('subpage', 'string');\n $function = rex_request('function', 'string');\n\n if ($page === 'import_export' && $subpage === 'import' && $function === 'dbimport') {\n rex_register_extension('A1_AFTER_DB_IMPORT', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } elseif ($page === 'developer' && $function === 'update') {\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } else {\n self::synchronize(self::START_EARLY);\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(rex_developer_manager::START_LATE);\n });\n }\n }", "function Start(){\r\n\t\t\tglobal $email;\r\n\t\t\tglobal $errorCount;\r\n\t\t\t\r\n\t\t\t\t\t\t\tif (filter_var($email, FILTER_VALIDATE_EMAIL)){\r\n\t\t\t\t\t\t\t\t\tglobal $emailCheck;\r\n\t\t\t\t\t\t\t\t\t$emailCheck = true;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (empty($email)){\r\n\t\t\t\t\t\t\t\tdisplayNameRequired(\"E-mail\");\r\n\t\t\t\t\t\t\t\t++$errorCount;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\telse if (!empty($email) && (!filter_var($email, FILTER_VALIDATE_EMAIL))){\r\n\t\t\t\t\t\t\t\tdisplayNameRequired(\"E-mail\");\r\n\t\t\t\t\t\t\t\t++$errorCount;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\r\n\t\tif(isset($_POST['Submit'])){\r\n\t\t\t//RedirectUser(); <--- Slight bug with this function, will work on it\r\n\t\t\tSubmitContent();\r\n\t\t\tBeginNewEntry();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "function Sivent2($args=array())\n {\n $unit=$this->GetGETint(\"Unit\");\n\n $args[ \"SessionsTable\" ]=$unit.\"__Sessions\";\n $args[ \"SavePath\" ]=\"?Unit=\".$unit.\"&Action=Start\";\n \n parent::Application($args);\n\n $event=$this->CGI_GETint(\"Event\");\n if (!empty($event))\n {\n $args=$this->CGI_Query2Hash($this->URL_CommonArgs); \n $args[ \"Event\" ]=$event;\n\n $add=\"Event=\".$event;\n if (!empty($this->URL_CommonArgs)) { $add=\"&\".$add; }\n \n $this->URL_CommonArgs.=$add;\n }\n\n $this->App_CSS_Add();\n }", "public function prototypestep1Action(){\n\t\ttry{\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t\n\t\t\t$config = $sm->get('Config');\n\t\t\t\n\t\t\t$request = $this->getRequest();\n\t\t\tif($request->isPost()){\n\t\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\t\n\t\t\t\t//$orderTable = $sm->get('Order\\Model\\OrderTable');\n\t\t\t\t$jobPacketTable = $sm->get('Order\\Model\\JobPacketTable');\n\t\t\t\t\n\t\t\t\tif($jobPacketTable->checkMilestoneCanBeCompleted($posts['milestone_id'], $posts['steps_completed'])){\n\t\t\t\t\n\t\t\t\t\t//$order = (array)$orderTable->fetchJobDetails($posts['job_id']);\n\t\t\t\t\t\n\t\t\t\t\t$milestones_ref_id = $posts['milestone_id'];\n\t\t\t\t\t$milestone_type_id = $posts['milestone_type_id'];\n\t\t\t\t\t$attachments = isset($posts['multipleimagesHidden'])&& !empty($posts['multipleimagesHidden']) ? json_decode($posts['multipleimagesHidden']) : null;\n\t\t\t\t\t\n\t\t\t\t\tunset($posts['multipleimagesHidden']);\n\t\t\t\t\tunset($posts['milestone_type_id']);\n\t\t\t\t\tunset($posts['metal_type_opt']);\n\t\t\t\t\tunset($posts['supplier_name']);\n\t\t\t\t\t\n\t\t\t\t\t$posts['metal_types'] = implode(',', $posts['metal_types']);\n\t\t\t\t\t\n\t\t\t\t\tlist($d, $m, $y) = explode('/', $posts['exp_delivery_date']);\n\t\t\t\t\t$posts['exp_delivery_date'] = \"$y-$m-$d\";\n\t\t\t\t\t\n\t\t\t\t\t//list($d, $m, $y) = explode('/', $posts['date_delivered']);\n\t\t\t\t\t//$posts['date_delivered'] = \"$y-$m-$d\";\n\t\t\t\t\t\n\t\t\t\t\t$prototypetTable = $sm->get('Order\\Model\\PrototypeTable');\n\t\t\t\t\tif($prototypetTable->savePrototypeStep($posts)){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($attachments))\n\t\t\t\t\t\t\t$jobPacketTable->saveAttachedFiles($milestone_type_id, $milestones_ref_id, $posts['steps_completed'], $attachments);\n\t\t\t\t\t\t\n\t\t\t\t\t\techo 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo 0;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\techo 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\texit;\n\t\t}catch(Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n\t}", "public function start(): void;", "function addexperienceAction() {\n \t$step = 10;\n \t$id = $this->_getParam('id');\n \t$option = $this->_getParam('option');\n \t\n \t$eexp_id = $this->_getParam('sub');\n \t$sub_option = $this->_getParam('sub_option');\n \t\n \t$option = empty($option) ? 'add' : $option;\n \t\n \t$this->view->assign('id', $id);\n \t$this->view->assign('step', $step);\n \t\n \t$data = $this->_getParam('data');\n \t\n \tif($id == '') {\n \t\t$this->view->assign('msg', $this->_lable['url_invalid']['value']);\n \t\t$this->_helper->viewRenderer('step10');\n \t\theader(\"refresh:\" . $this->_lable['timewait']['value'] . \";url=\" . $this->_base_url. $this->_control .\"/step1/\");\n \t\treturn;\n \t}\n \t \n \t\n \t\n \techo '<pre>';\n \tprint_r($data);\n \techo '</pre>';\n \t\n \tif($eexp_id != '' && $sub_option == 'edit') { //update\n \t\t\n \t} else { //insert\n \t\t\n \t}\n \t\n }", "public function run()\n {\n \\App\\Models\\Assignment::create([\n\t 'name' => 'Program 1',\n\t 'description' => 'Hello World',\n 'due' => '2016-10-23',\n\t ]);\n\n \\App\\Models\\Assignment::create([\n\t 'name' => 'Program 2',\n\t 'description' => 'Variables',\n 'due' => '2016-11-23',\n\t ]);\n }", "public function start()\n {\n // Este módulo requiere a un usuario logueado\n $this -> setRequireUser( true );\n }", "function runningPlay() {\n\t\t// request information about the new challenge ...\n\t\t// ... and callback to function newChallenge() ...\n//\t\t$this->addCall('GetCurrentChallengeInfo', array(), '', 'newChallenge');\n\t}", "public function run()\n {\n \n\n \\DB::table('start_exams')->delete();\n \n \\DB::table('start_exams')->insert(array (\n 0 => \n array (\n 'id' => 3,\n 'course_id' => 1,\n 'created_at' => '2018-11-29 10:36:17',\n 'updated_at' => '2018-11-29 10:36:17',\n ),\n ));\n \n \n }", "public function run(){\n\t\t$professional = Professional::find(8);\n\n\t\t$platformsArr = array(1, 2, 3, 4);\n\t\t$creativeFieldsArr = array(3);\n\t\t$clientFocusesArr = array(1, 2, 3);\n\t\t$specializationsArr = array(1, 2, 6, 8, 12, 14);\n\n\t\t$professional -> platforms() -> attach($platformsArr);\n\t\t$professional -> creativeFields() -> attach($creativeFieldsArr);\n\t\t$professional -> clientFocuses() -> attach($clientFocusesArr);\n\t\t$professional -> specializations() -> attach($specializationsArr);\n\t}" ]
[ "0.5973055", "0.59558177", "0.5951293", "0.5883888", "0.5850319", "0.57963455", "0.57739466", "0.5765112", "0.574128", "0.5734414", "0.5726892", "0.5633923", "0.557905", "0.556689", "0.5550457", "0.5543055", "0.5539387", "0.5519423", "0.5507441", "0.54932594", "0.549164", "0.5460108", "0.54527545", "0.5418766", "0.54082334", "0.5408094", "0.5379728", "0.5350428", "0.5338159", "0.5336906", "0.5336906", "0.53190327", "0.5304301", "0.5301856", "0.5298239", "0.5298137", "0.52889615", "0.5288182", "0.5284481", "0.5280802", "0.52732", "0.52720064", "0.52720064", "0.52720064", "0.52657384", "0.5246852", "0.5246262", "0.5224521", "0.5224521", "0.5224521", "0.5224521", "0.5224521", "0.5224521", "0.5224521", "0.5224521", "0.5224521", "0.5224521", "0.5224521", "0.5224521", "0.52226675", "0.5209603", "0.52062255", "0.5193684", "0.51905143", "0.51904446", "0.5190168", "0.5189364", "0.51891387", "0.51891387", "0.5187698", "0.5187334", "0.5187334", "0.5187334", "0.5187334", "0.5187334", "0.5187334", "0.5185462", "0.5175615", "0.51749235", "0.5166553", "0.5164031", "0.51622826", "0.5158502", "0.5158123", "0.5157779", "0.5156313", "0.515165", "0.51480585", "0.51480585", "0.51478875", "0.5139197", "0.51379037", "0.5136741", "0.5133127", "0.51320577", "0.51202446", "0.512009", "0.5116663", "0.5113331", "0.5109495", "0.51086885" ]
0.0
-1
Get all test Under a perticular Assessment for the current active session
public function assessment($ass_id) { $assessment = Assessment::with('session', 'course')->where('assid', $ass_id)->first(); $query = sprintf("SELECT t.*,typ.ttypname, s.sesname,c.csid, " . "(SELECT COUNT(q.qid) FROM CBT_questions q WHERE q.tid = t.tid) AS question_count " . "FROM CBT_tests t " . "JOIN CBT_test_types typ ON t.ttypid = typ.ttypid " . "JOIN CBT_assessments ass ON t.assid = ass.assid " . "JOIN CBT_sessions s ON ass.sesid = s.sesid " . "JOIN CBT_courses c ON ass.csid = c.csid " . "WHERE ass.assid = ? "); $tests = DB::select($query, [$ass_id]); $used_test_type = array(); foreach($tests as $test){ array_push($used_test_type, $test->ttypid); } $test_type = Testtype::whereNotIn('ttypid',$used_test_type)->get(); if (!$assessment) { return view('errors.503'); } $test_type2 = Testtype::all(); $data['assessment'] = $assessment; $data['tests'] = json_encode($tests); $data['test_types'] = json_encode($test_type); $data['test_types2']= json_encode($test_type2); return view('admin.assessment', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTests();", "public function get_all_tests()\n\t{\n\t\treturn $this->db->get('test')->result();\n\t}", "public function getTests()\n {\n return $this->hasMany(Tests::className(), ['quest_id' => 'id']);\n }", "public function scenarios(): array;", "public function getTests()\n {\n return $this->hasMany(Test::className(), ['projectId' => 'id']);\n }", "public function getTests()\n\t{\n\t\t# code...\n\t\treturn $this->tests;\n\t}", "function getTests(){\n $listOfAvailableTests = parent::getTests();\n $url = get_instance()->uri->uri_string();\n $listOfSubTests = trim(Text::getSubstringAfter($url, '/subtests/'));\n if($listOfSubTests){\n $listOfSubTests = explode(',', $listOfSubTests);\n foreach($listOfSubTests as $key => &$subTest){\n $subTest = trim($subTest);\n if(!in_array($subTest, $listOfAvailableTests)){\n unset($listOfSubTests[$key]);\n echo \"Test '$subTest' does not exist as a test within \" . $this->getLabel() . \"<br/>\";\n }\n }\n $listOfSkippedTests = array_diff($listOfAvailableTests, $listOfSubTests);\n $this->reporter->paintSkip(count($listOfSkippedTests) . \" tests not run.\");\n $listOfAvailableTests = $listOfSubTests;\n }\n return $listOfAvailableTests;\n }", "public function getTests()\n {\n return array();\n }", "public function getTests()\n {\n return array();\n }", "public function getTestcases() {\n if ($this->graded_testcases === null) {\n $this->loadTestcases();\n }\n return $this->graded_testcases;\n }", "public static function get_tests()\n {\n }", "protected function get_tests() {\r\n return array(\r\n \"connect\",\r\n \"select\"\r\n );\r\n }", "public function getTestCases ()\n {\n return $this->_testCases;\n }", "function getTests($accountId) {\n $ret = array();\n $sql = \"select landingpage_collectionid from landingpage_collection lc,client c\n\t\t\twhere c.clientid_hash = '$accountId'\n\t\t\tand c.clientid = lc.clientid order by landingpage_collectionid desc\";\n $res = mysql_query($sql);\n trackMysqlError(__function__);\n //echo $sql;\n while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) {\n $ret[] = $row['landingpage_collectionid'];\n }\n return($ret);\n }", "public function test() {\n $results = [];\n $results[\"testAddUser\"] = $this->testAddUser();\n\n return $results;\n }", "private function testCollect() {\n $custom_data = array();\n\n // Collect all custom data provided by hook_insight_custom_data().\n $collections = \\Drupal::moduleHandler()->invokeAll('acquia_connector_spi_test');\n\n foreach ($collections as $test_name => $test_params) {\n $status = new TestStatusController();\n $result = $status->testValidate(array($test_name => $test_params));\n\n if ($result['result']) {\n $custom_data[$test_name] = $test_params;\n }\n }\n\n return $custom_data;\n }", "public function providertestRequest()\r\n {\r\n return array(array(\"list\",\"course\"),array(\"list\",\"teacher\"));\r\n }", "public function testGetSessionList()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->get($this->url('sessions'));\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n 'data' => [\n [\n 'name',\n 'school_id',\n 'start_date',\n 'end_date'\n ]\n ]\n ]);\n }", "function get_all_scheduled_tests()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('scheduled_tests')->result_array();\n }", "public function testGetAllAssociated()\n {\n $this->setUp();\n $users = new Users(self::$config);\n $admin = $users->get(1);\n $student = $users->get(3);\n $injuries = new Injuries(self::$config);\n\n $reports = $injuries->getAllAssociated($admin);\n\n $this->assertNotNull($reports);\n $this->assertEquals(5, count($reports));\n\n // There are 3 where this student is involved\n $reports = $injuries->getAllAssociated($student);\n\n $this->assertNotNull($reports);\n $this->assertEquals(3, count($reports));\n }", "public function test_can_get_all_true()\n {\n $this->seed();\n $user = User::where('email', '=', '[email protected]')->first();\n $token = JWTAuth::fromUser($user);\n $response = $this->json('GET','/api/treatments?token='.$token);\n\n $response->assertStatus(200);\n }", "public function index()\n {\n $assessment = Assessment::all();\n return $assessment;\n }", "public function getLabTests()\n {\n $labTests = null;\n\n try\n {\n $query = DB::table('labtest as lt')->select('lt.id', 'lt.test_name')->where('lt.test_status', '=', 1);\n $labTests = $query->get();\n }\n catch(QueryException $queryEx)\n {\n throw new HospitalException(null, ErrorEnum::LAB_LIST_ERROR, $queryEx);\n }\n catch(Exception $exc)\n {\n throw new HospitalException(null, ErrorEnum::LAB_LIST_ERROR, $exc);\n }\n\n return $labTests;\n }", "public function overviewallAction() {\n\n $this->validateUser();\n\n $testCase = new Yourdelivery_Model_Testing_TestCase();\n $this->view->testcases = $testCase->getTable()->fetchAll()->toArray();\n $this->view->exp = $testCase->getExpectations();\n }", "public function scenarios(){\n \n $scenarios = parent::scenarios();\n\n $attributes = [\n 'name',\n 'email',\n 'username',\n 'employee_no',\n 'status',\n 'created_at',\n 'updated_at',\n 'employee_application_status_id',\n 'visa_grant_date',\n 'visa_expiry_date',\n # employee application-related\n 'alias',\n 'mobile',\n 'datecreated',\n 'datesigned'\n ];\n\n $scenarios[self::SCENARIO_DEFAULT] = $attributes;\n $scenarios[self::SCENARIO_VISA_HOLDER_EXPIRE] = $attributes;\n $scenarios[self::SCENARIO_VISA_HOLDERS_ALL] = $attributes;\n $scenarios[self::SCENARIO_VISA_HOLDER_EXPIRE_30_DAYS] = $attributes;\n $scenarios[self::SCENARIO_VISA_HOLDER_EXPIRE_60_DAYS] = $attributes;\n $scenarios[self::SCENARIO_VISA_HOLDER_EXPIRE_90_DAYS] = $attributes;\n $scenarios[self::SCENARIO_NEW_APPLICANTS] = $attributes;\n $scenarios[self::SCENARIO_ON_BOARDING] = $attributes;\n $scenarios[self::SCENARIO_ON_BOARDING_CREATED] = $attributes;\n\n return $scenarios;\n }", "public function testShowAllIncidences()\n {\n //1. Preparar el test\n //2. Executar el codi que vull provar.\n //3. Comprovo: assert\n\n $incidences = factory(Incidence::class, 50) -> create();\n\n\n $response = $this->get('/incidences');\n $response->assertStatus(200);\n $response->assertSuccessful();\n $response->assertViewIs('list_events');\n\n\n //TODO faltaria contar que hi ha 50 al resultat\n\n// foreach ( $incidences as $incidence) {\n// $response->assertSeeText($incidence->title);\n// $response->assertSeeText($incidence->description);\n// }\n }", "public function selectAll() {\n\t\treturn $this->academic_session->all(['name', 'id']);\n\t}", "protected function getSampleSessions() {\n // Select a maximum of 20 random sessions that are on or have passed this unit\n $results = [];\n $rs = [];\n $rows = $this->db->select('session, id, position')\n ->from('survey_run_sessions')\n ->order('position', 'desc')->order('RAND')\n ->where(array('run_id' => $this->run->id, 'position >=' => $this->position))\n ->limit(20)->fetchAll();\n \n foreach ($rows as $row) {\n if (!isset($rs[$row['id']])) {\n $rs[$row['id']] = new RunSession($row['session'], $this->run, ['id' => $row['id']]);\n }\n\n $unitSession = (new UnitSession($rs[$row['id']], $this))->load();\n if ($unitSession->id) {\n $results[] = $unitSession;\n }\n }\n\n return $results;\n }", "public function getSuitesList(){\n return $this->_get(1);\n }", "public static function getAcceptanceTest($id){\n $db = DemoDB::getConnection();\n ProjectModel::createViewCurrentIteration($db);\n $sql= \"select description,is_satisfied\n from feature\n INNER Join acceptance_test on feature.id = acceptance_test.feature_id\n INNER join acceptance_test_status on acceptance_test.id = acceptance_test_status.acceptance_test_id\n where feature.id=:id;\";\n $stmt = $db->prepare($sql);\n $stmt->bindValue(\":id\", $id);\n $ok = $stmt->execute();\n if ($ok) {\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }\n }", "public function retrieve_model_test_list()\n\t{\n\t\n\t\t$this->db->select('a.*,b.class_name');\n\t\t$this->db->from('model_test_settings a');\n\t\t$this->db->join('class_add b','b.class_id = a.class_id');\n\t\t$this->db->where(array('a.status'=>1,'b.status'=>1)); \n\t\t$this->db->order_by('a.model_test_id','desc'); \n\t\t$query = $this->db->get();\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->result_array();\t\n\t\t}\n\t\treturn false;\n\t}", "public function getExperimentsList(){\n return $this->_get(1);\n }", "function test_all () {\n\n\t\t$this->layout = 'test';\n\n\t\t$tests_folder = new Folder('../tests');\n\n\t\t$results = array();\n\t\t$total_errors = 0;\n\t\tforeach ($tests_folder->findRecursive('.*\\.php') as $test) {\n\t\t\tif (preg_match('/^(.+)\\.php/i', basename($test), $r)) {\n\t\t\t\trequire_once($test);\n\t\t\t\t$test_name = Inflector::Camelize($r[1]);\n\t\t\t\tif (preg_match('/^(.+)Test$/i', $test_name, $r)) {\n\t\t\t\t\t$module_name = $r[1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$module_name = $test_name;\n\t\t\t\t}\n\t\t\t\t$suite = new TestSuite($test_name);\n\t\t\t\t$result = TestRunner::run($suite);\n\n\t\t\t\t$total_errors += $result['errors'];\n\n\t\t\t\t$results[] = array(\n\t\t\t\t\t'name'=>$module_name,\n\t\t\t\t\t'result'=>$result,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$this->set('success', !$total_errors);\n\t\t$this->set('results', $results);\n\t}", "public function providerTestAccess() {\n $data = [];\n $data[] = [TRUE, TRUE, AccessResult::allowed()];\n $data[] = [FALSE, TRUE, AccessResult::neutral()];\n $data[] = [TRUE, FALSE, AccessResult::neutral()];\n $data[] = [FALSE, FALSE, AccessResult::neutral()];\n\n return $data;\n }", "public function testGetSession()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->get($this->url('sessions/1'));\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n 'name',\n 'school_id',\n 'start_date',\n 'end_date'\n ]);\n }", "public function assessments() {\n $active_ses = Session::where('status', 'active')->first();\n $assessments = Assessment::with(['session', 'course'])->where('sesid', $active_ses->sesid)->get();\n $courses = Course::where('status', 'active')->get();\n\n $data['active_session'] = $active_ses;\n $data['assessments'] = json_encode($assessments);\n $data['courses'] = $courses;\n return view('admin.assessments', $data);\n }", "public function getSuites(): array\n {\n return $this->suites;\n }", "public function tests()\n {\n $this->authCheck();\n\n /*$testData = DB::table('diagnostic_tests')\n ->get();*/\n\n $testData = DB::table('diagnostic_tests')\n ->join('categories', 'diagnostic_tests.category_id', '=', 'categories.id')\n ->select('diagnostic_tests.*', 'categories.name as catName')\n ->get();\n \n $tests=view('admin.test_list')\n ->with('testData',$testData);\n\n return view('admin.master')\n ->with('main_content',$tests);\n\n }", "public function getTestResults()\n\t{\n\t\t/*\n\t\t * Wenn die Tests noch nicht ausgeführt wurden, dies nun tun\n\t\t */\n\t\tif ($this->_needRun === true)\n\t\t{\n\t\t\t$this->run();\n\t\t}\n\t\tforeach ($this->_testCases as $key => $testCase)\n\t\t{\n\t\t\t/*\n\t\t\t * Zusicherung nicht erfüllt\n\t\t\t*/\n\t\t\tif ($testCase['assert'] !== $testCase['result'])\n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": fehlgeschlagen \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" != \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_failedTests++;\n\t\t\t}\n\t\t\t/*\n\t\t\t * Zusicherung erfüllt\n\t\t\t*/\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": erfolgreich \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" == \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_passedTests++;\n\t\t\t}\n\t\t} \n\t\treturn $this->_testResults;\t\n\t}", "public function getInvestigatorsList() {\n return $this->_get(5);\n }", "public function getTestUserList()\n\t{\n\t\treturn $this->test_user_list;\n\t}", "public function _testMultipleInventories()\n {\n\n }", "public function listAll() {\n\t\treturn $this->academic_session->where('status', 1)->pluck('name', 'id')->prepend(trans('select.academic_session'), '');\n\t}", "public function getTests()\n {\n $tests = array();\n foreach ($this->benchmarks as $benchmark) {\n $tests += $benchmark->getTests();\n }\n\n return $tests;\n }", "function getTestCasesInsideACategory($testCategoryID, $theSubjectID, $roundID, $clientID) {\n global $definitions;\n\n $categoriesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n $categoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n $testCasesArray = array();\n\n //First, get the internal structure of testCategories\n $tcatTree = getItemsTree($categoriesItemTypeID, $clientID, $categoryParentPropertyID, $testCategoryID);\n\n $idsToRetrieve = array();\n\n //Store all testCategories ids found in a plain array\n foreach ($tcatTree as $tc) {\n for ($j = 0; $j < count($tc); $j++) {\n if (!(in_array($tc[$j]['parent'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['parent'];\n }\n if (!(in_array($tc[$j]['ID'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['ID'];\n }\n }\n }\n\n //Get the relations item\n $relations = getRelations($roundID, $theSubjectID, $clientID);\n\n if ((count($relations) - 1) == 0) {\n //Get the test cases ids inside an array\n $idsToSearch = explode(',', $relations[0]['testCasesIDs']);\n for ($i = 0; $i < count($idsToRetrieve); $i++) {\n //Get the test cases and filter\n $availableTestCases = array();\n $availableTestCases = getFilteredTestCasesInsideCategory($idsToRetrieve[$i], $idsToSearch, $clientID);\n //And add to results\n for ($j = 0; $j < count($availableTestCases); $j++) {\n $partRes = array();\n $partRes['ID'] = $availableTestCases[$j]['ID'];\n $testCasesArray[] = $partRes;\n }\n }\n }\n\n return $testCasesArray;\n}", "public function getContestsByGame($game);", "public function getTestomonials_get(){\n $user_id=$_GET['user_id'];\n $profile_type=$_GET['profile_type'];\n\t\t$result = $this->dashboard_model->getTestomonials($user_id,$profile_type);\n\t\treturn $this->response($result);\n }", "public function getInvestigatorsList() {\n return $this->_get(6);\n }", "public function getAllAssists(){\n return $this->stats[\"generic\"][\"stats\"][\"general\"][\"assists\"];\n }", "protected function getSessionSauce() {\r\n\t\tif (self::hasSessionSauce()) {\r\n\t\t\treturn array($this->sauceUser, $this->sauceKey);\r\n\t\t}\r\n\t\treturn array();\r\n\t}", "public function get_all_session()\n\t\t{\n\t\t\treturn parent::get_all_items('session_items');\n\t\t}", "public function all()\n {\n return $this->getCartSession();\n }", "public function getTests()\n {\n if (!$this->extensionInitialized) {\n $this->initExtensions();\n }\n return $this->tests;\n }", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "public function runTests() {\n $results = \"\";\n for ($i = 0; $i < sizeof($this->tests); $i++) {\n $results .= \"Test \" . ($i + 1) . \": \" . $this->tests[$i]->runTest() . \"<br>\";\n }\n return $results;\n }", "public function testGetSessionArray()\n {\n $expected = array('my_test_session' => 'session value', \n 'my_other_session' => 'session stuff');\n $this->assertEquals($expected, $this->_req->getSession());\n }", "public function getScenario(): TestScenario;", "public function getTestIterationData()\n {\n $cases = [];\n\n // Case #0 Standard iterator.\n $cases[] = [\n [\n 'hits' => [\n 'total' => 1,\n 'hits' => [\n [\n '_type' => 'content',\n '_id' => 'foo',\n '_score' => 0,\n '_source' => ['header' => 'Test header'],\n ],\n ],\n ],\n ],\n [\n [\n '_type' => 'content',\n '_id' => 'foo',\n '_score' => 0,\n '_source' => ['header' => 'Test header'],\n ],\n ],\n ];\n\n return $cases;\n }", "public function searchCurrentStudent_testRun() {\n\n $this->db->select('110431 as ein,grp.groupId,grp.groupName,sec.sectionName,se.session,pr.programName,stu.studentId,stu_info.applicationId,stu_info.firstName,\n stu_info.lastName,stu_info.dateOfBirth,stu_info.gender,stu_info.religion,stu_info.fatherName,stu_info.motherName,prg.programId,prg.sectionId,prg.sessionId');\n $this->db->from('student stu');\n $this->db->join('programoffer prg', 'prg.programOfferId=stu.programOfferId');\n $this->db->join('program pr', 'pr.programId=prg.programId', \"left join\");\n $this->db->join('session se', 'se.sessionId=prg.sessionId', \"left join\");\n $this->db->join('section sec', 'sec.sectionId=prg.sectionId', \"left join\");\n $this->db->join('group grp', 'grp.groupId=prg.groupId', \"left join\");\n $this->db->join('studentinfo stu_info', 'stu_info.applicationId=stu.applicationId');\n // $this->db->limit(10); \n $query = $this->db->get();\n $result = $query->result_array();\n if (!empty($result)) {\n return $result;\n }\n }", "function getAllTestCasesInsideAGroup($groupID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //get all categories inside group\n $onlyIds = getAllTestCategoriesInsideAGroup($groupID, $clientID);\n\n //Next, create a string with all the categories inside the group\n $toFilter = implode(',', $onlyIds);\n\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $toFilter, 'mode' => '<-IN');\n\n $allTestCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($allTestCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "function drush_test_list($groups) {\n foreach ($groups as $group_name => $group_tests) {\n foreach ($group_tests as $test_class => $test_info) {\n $rows[] = array('group' => $group_name, 'class' => $test_class, 'name' => $test_info['name']);\n }\n }\n return $rows;\n}", "public function test_admin_training_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/MemberSkills', 'training_programs']);\n $this->assertResponseCode(404);\n }", "public function test_getAll() {\n\t\t$this->testAction('/disease/index', array('method'=>'get'));\n\t\t// the result of the previous GET action was loaded into $this->vars\n\t\t// $this->vars is an array\n\t\t// the contents of this array is in form of \"categories\" => [inner array]\n\t\t// the inner array (we expect) to be greater than zero.\n\t\t$this->assertTrue(count($this->vars['diseases']) > 0);\n\t}", "public function getAll(\n $collectionInformation = null,\n $userId = null,\n $testId = null\n )\n {\n $test = null;\n if (!is_null($testId)) {\n $test = $this->testService->get($testId);\n }\n\n return $this->testAttemptRepository->findAllBy(\n $collectionInformation,\n $userId,\n $test\n );\n }", "public function getAll() {\n \n $this->start();\n return $_SESSION;\n \n }", "public function getTestCase($class);", "public function getSessionInActiveTabObservation()\n {\n $id = Yii::app()->user->idUser;\n $result = Yii::app()->db->createCommand(\n 'SELECT u.firstName, u.lastName, u.avatarPath, name, title, description, s.datePost,\n s.dateCreate, s.idSession, COUNT(DISTINCT(a.idArchive)) AS numArchive,s.active, s.idUserCreate\n FROM sessions AS s\n LEFT JOIN invited_session AS i ON s.idSession = i.idSession\n INNER JOIN users AS u ON s.idUserCreate = u.idUser\n INNER JOIN topics AS t ON s.idTopic = t.idTopic\n LEFT JOIN archive_session AS a ON s.idSession = a.idSession\n WHERE (i.idUserInvited = :idUserInvited OR s.idUserCreate = :idUserCreate) AND ((s.datePost+ INTERVAL 1 DAY) >= Now())\n AND (t.active = 1) AND s.active = 1 AND (i.isJoined = 1 OR s.idUserCreate = :idUserCreate)\n GROUP BY s.idSession\n ORDER BY s.active desc, s.datePost desc')\n ->bindValues(array(':idUserInvited' => $id, ':idUserCreate' => $id))\n ->queryAll();\n return $result;\n }", "public function testListPastWebinarQA()\n {\n }", "public function testListExperiments()\n {\n echo \"\\nTesting experiment listing...\";\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/experiments\";\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/experiments\";\n \n $response = $this->curl_get($url);\n //echo \"-------Response:\".$response;\n $result = json_decode($response);\n $total = $result->total;\n \n $this->assertTrue(($total > 0));\n \n }", "public function testGetSitesTestsAll()\n {\n $this->sitesController->shouldReceive('retrieve')->once()->andReturn('Get Site 10 Mocked');\n $this->testsController->shouldReceive('index')->once()->andReturn('All Tests Mocked');\n\n $output = $this->behatRoutes->getSitesTests(array(1, 'tests', null, null));\n $this->assertEquals('All Tests Mocked', $output);\n }", "public function getTestCasesProvider()\n {\n\n $oApplication = \\TestSuite\\Bootstrap::getServiceManager()->get('Application');\n $oApplication->bootstrap();\n $oRouteMatch = new \\Laminas\\Router\\RouteMatch([]);\n $oRouteMatch->setMatchedRouteName('test-route');\n $oApplication->getMvcEvent()->setRouteMatch($oRouteMatch);\n\n $aTestCases = [];\n foreach (new \\DirectoryIterator(__DIR__) as $oFileInfo) {\n // Ignore non php files and current class file\n if (\n !$oFileInfo->isFile()\n || $oFileInfo->getExtension() !== 'php'\n || ($sFilePath = $oFileInfo->getRealPath()) === __FILE__\n ) {\n continue;\n }\n\n if (false === ($aTestsConfig = include $sFilePath)) {\n throw new \\LogicException(sprintf(\n 'An error occured while including documentation test config file \"%s\"',\n $sFilePath\n ));\n }\n if (!is_array($aTestsConfig)) {\n throw new \\LogicException(sprintf(\n 'Documentation test config file \"%s\" expects returning an array, \"%s\" retrieved',\n $sFilePath,\n is_object($aTestsConfig) ? get_class($aTestsConfig) : gettype($aTestsConfig)\n ));\n }\n try {\n $aTestCases = array_merge($aTestCases, $this->parseTestsConfig($aTestsConfig));\n } catch (\\Exception $oException) {\n throw new \\LogicException(sprintf(\n 'An error occured while extracting test cases from documentation test config file \"%s\": %s',\n $sFilePath,\n $oException->getMessage()\n ), $oException->getCode(), $oException);\n }\n }\n return $aTestCases;\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM tbl_coverage';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function get_test_php_sessions()\n {\n }", "public function overviewAction() {\n\n if ($this->_user == 'user') {\n $this->_redirect('/');\n }\n\n $testCaseId = (integer) $this->getRequest()->getParam('id');\n if ($testCaseId <= 0) {\n $this->_redirect('testing_cms/overviewall');\n }\n try {\n $testCase = new Yourdelivery_Model_Testing_TestCase($testCaseId);\n } catch (Yourdelivery_Exception_Database_Inconsistency $exc) {\n $this->error('Requested site does not exists.');\n $this->_redirect('/testing_cms/');\n return;\n }\n $this->view->testCase = $testCase;\n $this->view->testCaseId = $testCaseId;\n\n $this->view->assign('missions', $testCase->getExpectations());\n }", "function runTests() {\n\t\tif(is_array($this->_aTests)){\n\t\t\tforeach($this->_aTests as $test){\n\t\t\t\t$this->_aResults[$test->sName] = array();\n\t\t\t\t$this->_aResults = $test->run($this->_aResults);\n\n\t\t\t}\n\t\t}\n\t}", "public function getAll() {\n return $_SESSION;\n }", "public function all()\n {\n return $_SESSION;\n }", "public function provideTestSearch()\n {\n $cases = array();\n \n $lengths = array(\n 1,\n 2,\n 10,\n IndexGenerator::getBlockSize(),\n );\n \n $steps = array(\n 1,\n 3,\n IndexGenerator::getBlockSize()\n );\n \n foreach ($lengths as $length) {\n foreach ($steps as $step) {\n $generator = new FixedSizeIndexGenerator();\n $generator->setIndexLength($length);\n $generator->setStepSize($step);\n $cases[] = array($generator);\n \n }\n }\n \n return $cases;\n }", "public function index()\n {\n $taken = DB::table('user_tests')->where('user_id', Auth::id())->get();\n $tests = Test::with('questions')\n ->where('public', 'yes')\n ->where('questions_number', '!=', '0')\n ->where('published', 'yes')\n ->get();\n\n $takenIds = $taken->pluck('result','test_id')->toArray();\n\n return view('home')->with(compact('tests', 'takenIds'));\n }", "public function index()\n {\n\n $center = Center::findOrFail(Session('center_id'));\n $tests = $center->tests;\n if(Input::get('test')) {\n $test_id = explode(',', Input::get('test'), 2)[0];\n $group_id = explode(',', Input::get('test'), 2)[1];\n\n $test = $center->tests()->findOrFail($test_id);\n $students = $test->groups()->findOrFail($group_id)->enrollers;\n return view('testResult.test-result',compact([\n 'tests' => $tests,\n 'test' => $test,\n 'students' => $students\n ]));\n }\n\n return view('testResult.test-result')->with([\n 'tests' => $tests,\n 'test' => null,\n 'students' => null\n ]);\n\n }", "protected function getCurrentTestCase() {\n return SimpleTest::getContext()->getTest();\n }", "public function getAudits();", "function ubc_di_get_assessment_results() {\n\t\tglobal $wpdb;\n\t\t$response = array();\n\t\tif ( current_user_can( 'manage_options' ) ) {\n\t\t\t$ubc_di_sites = get_posts( array(\n\t\t\t\t'post_type' => 'ubc_di_assess_result',\n\t\t\t\t'order' => 'DESC',\n\t\t\t\t'posts_per_page' => -1,\n\t\t\t) );\n\t\t} else {\n\t\t\t$ubc_di_sites = get_posts( array(\n\t\t\t\t'post_type' => 'ubc_di_assess_result',\n\t\t\t\t'order' => 'DESC',\n\t\t\t\t'posts_per_page' => -1,\n\t\t\t) );\n\t\t\t$temp_ubc_di_sites = array();\n\t\t\t$user_id = get_current_user_id();\n\t\t\tforeach ( $ubc_di_sites as $ubc_di_site ) {\n\t\t\t\t$ubc_di_asr_group_id = get_post_meta( $ubc_di_site->ID, 'ubc_di_assessment_result_group', true );\n\t\t\t\t$ubc_di_group_people = get_post_meta( $ubc_di_asr_group_id, 'ubc_di_group_people', true );\n\t\t\t\tif ( '' != $ubc_di_group_people ) {\n\t\t\t\t\tforeach ( $ubc_di_group_people as $ubc_di_group_person ) {\n\t\t\t\t\t\tif ( $user_id == $ubc_di_group_person ) {\n\t\t\t\t\t\t\t$temp_ubc_di_sites[] = $ubc_di_site;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$ubc_di_sites = $temp_ubc_di_sites;\n\t\t}\n\t\tforeach ( $ubc_di_sites as $ubc_di_site ) {\n\t\t\t$temp_array = $this->ubc_di_get_site_metadata( $ubc_di_site->ID );\n\t\t\tif ( null != $temp_array ) {\n\t\t\t\tarray_push( $response, $temp_array );\n\t\t\t}\n\t\t}\n\t\treturn $response;\n\t}", "public function testListEnrollmentRequests()\n {\n }", "public function testListExperts()\n {\n }", "private function collectCurrentTestUsers()\n {\n $usersDb = new Users();\n $testUsersCollection = $usersDb->findTestUsers();\n $this->testUserCollection = [];\n foreach ($testUsersCollection as $testUser) {\n $this->testUserCollection[] = $testUser;\n }\n }", "function listTestCategory() {\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->test_category_table);\n\t\t$this->db->where('status !=', 0);\n $query = $this->db->get();\n\t\treturn $query->result();\n\t}", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public static function all()\n {\n return $_SESSION;\n }", "public function test_shows_skills_list()\n {\n factory(Skill::class)->create(['name' => 'PHP']);\n factory(Skill::class)->create(['name' => 'JS']);\n factory(Skill::class)->create(['name' => 'SQL']);\n\n $this->get('/habilidades')\n \t\t ->assertStatus(200)\n \t\t ->assertSeeInOrder([\n \t\t \t'JS',\n \t\t \t'PHP',\n \t\t \t'SQL'\n \t\t ]);\n }", "public function actionTest()\n {\n $videoconference = \\lispa\\amos\\videoconference\\models\\Videoconf::findOne(1);\n // pr($videoconference->toArray(), 'videoconference');//exit;\n $users = $videoconference->getVideoconfUsersMms()->all();\n // $users = $videoconference->getVideoconfUsers();\n\n foreach ($users as $u) {\n pr($u->toArray(), '$u relazione'); //exit;\n $userProfile = \\lispa\\amos\\admin\\models\\UserProfile::findOne($u->user_id);\n // pr($userProfile->toArray(), '$userProfile');//exit;\n $user = $userProfile->getUser()->one();\n // pr($user->toArray(), '$user');//exit;\n $userEmail = $userProfile->getUser()->one()->email;\n // print \"Email: $userEmail;<br />\";\n }\n //pr($users->toArray(), '$users');exit;/****/\n }", "public function index()\n\t{\n $result = Test::all();\n return $result;\n\t}", "public function index()\n\t{\n\t\treturn Response::json(ParentTest::get());\n\t}", "public function index()\n {\n $medicaltests = MedicalTest::latest()->paginate(5);\n return response()->json($medicaltests);\n }", "private function getBasicAssessmentStatistics()\n {\n // get active runs, users, document groups, and rating options from database\n DatabaseUtils::setEntityManager($this->em);\n $active_run_names = DatabaseUtils::getActiveRuns()['run_names'];\n $active_user_names = DatabaseUtils::getActiveUsers()['active_user_names_without_admins'];\n $active_user_groups = DatabaseUtils::getActiveUsers()['active_user_groups_without_admins'];\n $active_doc_groups = DatabaseUtils::getDocumentGroups()['document_groups'];\n $active_doc_groups_short = DatabaseUtils::getDocumentGroups()['document_groups_short'];\n $rating_levels = DatabaseUtils::getRatingOptions();\n\n // calculate progress for users\n Progress::setEntityManager($this->em);\n $user_progress = $this->getProgressForUsers($active_user_names, $active_user_groups);\n\n // calculate number of total and finished DQCombinations (without multiple assessments)\n $progress_dq = $this->getProgressForDQCombinations();\n $total_assessments = $progress_dq['total'];\n $finished_assessments = $progress_dq['finished'];\n $assessment_prop = $progress_dq['proportion'];\n\n // calculate number of skipped documents\n $skipped = (float)$this->g_repo->assessmentByRating(Constants::SKIPPED)[0][\"col_\" . Constants::SKIPPED];\n\n // calculate progress for all document groups\n $progress_groups = $this->getProgressForDocGroups($active_doc_groups_short);\n $nr_evaluations = $progress_groups['nr_evaluations'];\n $doc_groups_assessments_total = $progress_groups['doc_groups_assessments_total'];\n $doc_groups_assessments = $progress_groups['doc_groups_assessments'];\n $doc_groups_assessments_complete = $progress_groups['doc_groups_assessments_complete'];\n\n // calculate progress for multiple assessments\n $mltple = $this->getProgressForMultipleAssessments(\n $active_doc_groups_short,\n $finished_assessments,\n $doc_groups_assessments_total,\n $doc_groups_assessments_complete\n );\n $total_incl_multiple = $mltple['total_incl_multiple'];\n $finished_incl_multiple = $mltple['finished_incl_multiple'];\n $finished_incl_multiple_prop = $mltple['finished_incl_multiple_prop'];\n\n // get ratings for all runs\n $run_ratings = $this->countRatingsForRuns(\n $this->g_repo,\n $rating_levels,\n $active_run_names\n );\n $run_data = $this->getNumbersForRuns($this->g_repo, $active_run_names);\n $run_nr_assessed = $run_data['assessed'];\n $run_nr_total = $run_data['total'];\n\n // calculate progress for different rating options in all runs\n /** @var $rel_lev RatingOption */\n $rating_for_different_levels = array();\n if ($rating_levels != null) {\n foreach ($rating_levels as $rel_lev) {\n $rating_for_different_levels[$rel_lev->getName()] =\n (float)$this->g_repo->assessmentByRating(\n $rel_lev->getName(),\n $rel_lev->getShortName()\n )[0][\"col_\" . $rel_lev->getShortName()];\n }\n }\n\n return array(\n 'run_names' => $active_run_names,\n 'user_names' => $active_user_names,\n 'doc_groups_names' => $active_doc_groups,\n 'doc_groups' => $active_doc_groups_short,\n 'user_progress' => $user_progress,\n 'total_assessments' => $total_assessments,\n 'finished_assessments' => $finished_assessments,\n 'assessment_prop' => $assessment_prop,\n 'skipped' => $skipped,\n 'nr_evaluations' => $nr_evaluations,\n 'doc_groups_assessments_total' => $doc_groups_assessments_total,\n 'doc_groups_assessments' => $doc_groups_assessments,\n 'doc_groups_assessments_complete' => $doc_groups_assessments_complete,\n 'total_incl_multiple' => $total_incl_multiple,\n 'finished_incl_multiple' => $finished_incl_multiple,\n 'finished_incl_multiple_prop' => $finished_incl_multiple_prop,\n 'rating_levels_in_runs' => $run_ratings,\n 'run_number_assessed' => $run_nr_assessed,\n 'run_number_total' => $run_nr_total,\n 'rating_for_different_levels' => $rating_for_different_levels\n );\n }", "public function actionTest()\n {\n $page_size = Yii::$app->request->get('per-page');\n $page_size = isset( $page_size ) ? intval($page_size) : 4;\n\n\n $provider = new ArrayDataProvider([\n 'allModels' => $this->getFakedModels(),\n 'pagination' => [\n // Should not hard coded\n 'pageSize' => $page_size,\n ],\n 'sort' => [\n 'attributes' => ['id'],\n ],\n ]);\n\n return $this->render('test', ['listDataProvider' => $provider]);\n }", "function test_test_run_complete() {\n if (drush_bootstrap_max(DRUSH_BOOTSTRAP_DRUPAL_FULL) == DRUSH_BOOTSTRAP_DRUPAL_FULL && module_exists('simpletest')) {\n // Retrieve all tests and groups.\n list($groups, $all_tests) = drush_test_get_all_tests();\n return array('values' => array_keys($groups) + $all_tests);\n }\n}", "public function provideTestCases()\n {\n return [\n ['time', ['time'], false],\n ['bar', null, true],\n ];\n }", "public function test_get_all_by_instanceid_1() {\n $course = $this->getDataGenerator()->create_course();\n $module = $this->getDataGenerator()->create_module('talkpoint', array(\n 'course' => $course->id,\n ));\n $talkpoints = $this->_cut->get_all_by_instanceid($module->id);\n $this->assertEquals(array(), $talkpoints);\n }", "public function test_get_list($params_api)\n {\n // Create data\n $this->user = new User_builder();\n $p_user['id'] = 'tester';\n $p_user['type'] = 'student';\n $p_user = $this->user->builder($p_user);\n $res_user = $this->user_model->create($p_user, ['return' => true]);\n $this->set_current_user($res_user->id);\n\n $this->master_area_pref = new Master_area_pref_builder();\n $this->master_area_pref_group = new Master_area_pref_builder();\n\n $p_master_area_pref_group = $this->master_area_pref_group->builder();\n $res_master_area_pref_group = $this->master_area_pref_group_model->create($p_master_area_pref_group, ['return' => true]);\n\n $p_master_area_pref['group_id'] = $res_master_area_pref_group->id;\n $p_master_area_pref = $this->master_area_pref->builder($p_master_area_pref);\n $this->master_area_pref_model->create($p_master_area_pref, ['return' => true]);\n\n // Call API\n $res = $this->api->get_list($params_api);\n\n $this->assertTrue($res['submit']);\n $this->assertTrue($res['success']);\n\n }" ]
[ "0.6597704", "0.6486891", "0.61930525", "0.5988241", "0.59317905", "0.5929864", "0.58788323", "0.5852424", "0.5852424", "0.5834095", "0.5829807", "0.5825781", "0.5814733", "0.57849073", "0.57668585", "0.566703", "0.5657829", "0.565402", "0.56132567", "0.55814844", "0.5543019", "0.5488428", "0.54823667", "0.54141897", "0.54112005", "0.5374367", "0.53620845", "0.53590995", "0.5350818", "0.5334006", "0.531876", "0.5301721", "0.5298098", "0.529567", "0.52826756", "0.5276093", "0.5273859", "0.527295", "0.52620184", "0.5261005", "0.5239623", "0.52361476", "0.5233871", "0.5229672", "0.5227786", "0.5226228", "0.5214316", "0.51924413", "0.517005", "0.5166994", "0.51628935", "0.5162789", "0.5158663", "0.5156192", "0.5149785", "0.5118016", "0.5090695", "0.50870544", "0.5086566", "0.50841373", "0.5082879", "0.50704515", "0.50703394", "0.5063209", "0.5060692", "0.5059681", "0.5059169", "0.5054921", "0.505246", "0.50493205", "0.50398", "0.503667", "0.5031732", "0.5026105", "0.502379", "0.5017935", "0.5013027", "0.50025034", "0.49905422", "0.49884346", "0.49842018", "0.49809417", "0.4978672", "0.4974867", "0.4974589", "0.49675673", "0.49666345", "0.4963845", "0.496384", "0.49636784", "0.4962494", "0.49615777", "0.49581674", "0.49578288", "0.49553213", "0.49548945", "0.49530104", "0.49492753", "0.49474946", "0.4934007" ]
0.5288083
34
/ | | Test Types management |
public function test_types() { $test_type = Testtype::all(); $data['test_type'] = $test_type; //dd($courses); return view('admin.test_type', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetTypes()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function get_test_type()\n{\n return do_test_get_test_type((int)getreq('type'));\n}", "public function testSystemMembersTypesPost()\n {\n\n }", "public function testTypes()\n {\n $this->innerField->getFormType()->willReturn('FormType');\n $this->innerField->getViewType()->willReturn('ViewType');\n $this->innerField->getStorageType()->willReturn('StorageType');\n\n $field = $this->createField([]);\n $this->assertEquals('FormType', $field->getFormType());\n $this->assertEquals('StorageType', $field->getStorageType());\n $this->assertEquals('ViewType', $field->getViewType());\n }", "public function setup_types()\n {\n }", "public function testGetUnitRelationshipTypes()\n {\n }", "public function getTestType()\n\t{\n\t\treturn $this->test_type;\n\t}", "#[@test]\n public function correctTypeNameSet() {\n $this->assertEquals('string', \n $this->xpath->query('string(/document/table/attribute[3]/@typename)'));\n $this->assertEquals('int', \n $this->xpath->query('string(/document/table/attribute[2]/@typename)'));\n }", "public function testGetRelatedBuildTypes()\n {\n }", "public function testResourceDataType()\n {\n }", "public function testSystemMembersTypesGet()\n {\n\n }", "public function testType()\n {\n $user = new User(null, null, null, \"student\");\n $this->assertEquals(\"student\", $user->getType());\n\n $user->setType(\"wrong\");\n $this->assertEquals(\"student\", $user->getType());\n\n $user->setType(\"admin\");\n $this->assertEquals(\"admin\", $user->getType());\n\n $user->setType(\"lecturer\");\n $this->assertEquals(\"lecturer\", $user->getType());\n\n $user->setType(\"student\");\n $this->assertEquals(\"student\", $user->getType());\n }", "public function testDataType()\n {\n $user = User::inRandomOrder()->first();\n $this -> assertInternalType('int',$user->id);\n $this -> assertInternalType('string', $user -> name);\n $this -> assertInternalType('string', $user -> email);\n $this -> assertInstanceOf('App\\User',$user);\n }", "public function testRegistrationFieldsWrongType(): void { }", "public function testGettingType()\n {\n $this->assertEquals('foo', $this->principal->getType());\n }", "public function testGetType0()\n{\n\n $actual = $this->global_->getType();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testSystemMembersTypesCountGet()\n {\n\n }", "public function testSystemMembersTypesIdGet()\n {\n\n }", "public function testTypeDetection() {\n\t\t$this->assertEqual('namespace', Inspector::type('lithium\\util'));\n\t\t$this->assertEqual('namespace', Inspector::type('lithium\\analysis'));\n\t\t$this->assertEqual('class', Inspector::type('lithium\\analysis\\Inspector'));\n\t\t$this->assertEqual('property', Inspector::type('Inspector::$_classes'));\n\t\t$this->assertEqual('method', Inspector::type('Inspector::type'));\n\t\t$this->assertEqual('method', Inspector::type('Inspector::type()'));\n\n\t\t$this->assertEqual('class', Inspector::type('\\lithium\\security\\Auth'));\n\t\t$this->assertEqual('class', Inspector::type('lithium\\security\\Auth'));\n\n\t\t$this->assertEqual('namespace', Inspector::type('\\lithium\\security\\auth'));\n\t\t$this->assertEqual('namespace', Inspector::type('lithium\\security\\auth'));\n\t}", "public function testContentTypesItem()\n {\n $this->contentTypeListTest('products');\n $this->contentTypeListTest('blogs');\n $this->contentTypeListTest('app_flows');\n $this->contentTypeListTest('lists');\n $this->contentTypeListTest('user_reviews');\n $this->contentTypeListTest('boards');\n }", "public function testSetupTypes()\n {\n $this->assertInstanceOf('CPC\\ServerMonitor\\Resource\\Memory', $this->Memory);\n $this->assertInternalType('array', $this->Memory->getData());\n }", "public function testMarketingCampaignsTypesIdSubTypesPost()\n {\n\n }", "protected function getTypes() {}", "#[@test]\n public function correctTypeSet() {\n $this->assertEquals('DB_ATTRTYPE_TEXT', \n $this->xpath->query('string(/document/table/attribute[3]/@type)'));\n }", "public function testContentTypesLists()\n {\n $this->contentTypeItemTest('products');\n $this->contentTypeItemTest('blogs');\n $this->contentTypeItemTest('app_flows');\n $this->contentTypeItemTest('lists');\n $this->contentTypeItemTest('user_reviews');\n $this->contentTypeItemTest('boards');\n }", "public function testGetMethodsForType()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function getTypeDescription(){\n\t\tif ( $this->test_service ) {\n\t\t\treturn $this->test_service->getTypeDescription();\n\t\t}\n\t}", "public function testModelReturnsCorrectTypeInformation()\r\n {\r\n $oModel = $this->_createMockModel();\r\n $this->assertEquals('Group', $oModel->getOrgUnitTypeID());\r\n $this->assertEquals('Group', $oModel->getOrgUnitTypeDesc());\r\n }", "public function testMarketingCampaignsTypesIdSubTypesSubTypeIdGet()\n {\n\n }", "public function testPayersPayerTypeGet()\n {\n }", "public function testGetType0()\n{\n\n $actual = $this->traitUse->getType();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testHandlersHandlerTypeCostsGet()\n {\n }", "public function testSystemMembersTypesIdPatch()\n {\n\n }", "public function test_listUnsupportedFileTypes() {\n\n }", "public function testGetType()\n {\n $filter = new MatchAllFilter();\n $result = $filter->getType();\n $this->assertEquals('match_all', $result);\n }", "public function testSystemMembersTypesIdPut()\n {\n\n }", "public function testTypeAssignment()\n\t{\n\t\t$this->assertSame( $this->type, $this->repo->type() );\n\t}", "public function get_desired_types();", "protected function testObjects() {\n }", "public static function setUpBeforeClass(): void\n {\n Type::addType(CommonNameType::NAME, 'Surfnet\\StepupMiddleware\\ApiBundle\\Doctrine\\Type\\CommonNameType');\n }", "public function testFindTemplates()\n {\n\n }", "public function testMarketingCampaignsTypesIdSubTypesGet()\n {\n\n }", "public function test_create__unknown_type()\n {\n\n (new ElementFactory())->create(['attributes' => ['type' => 'i am an unknown type', 'name' => '']]);\n }", "public function testGetRequestTypes()\r\n {\r\n $requestTypeController = new RequestTypeController();\r\n \r\n $requestypes = $requestTypeController->GetRequestTypes();\r\n \r\n $this->assertNotEquals(0, count($requestypes));\r\n }", "#[@test]\n public function typeForName() {\n $this->assertInstanceOf('lang.ArrayType', Type::forName('string[]'));\n }", "#[@test]\n public function integerType() {\n $this->testType(new Integer(0), 0, 0.0);\n }", "public function testGetType0()\n{\n\n $actual = $this->array_->getType();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testPolymorphic()\n {\n //$this->fail();\n }", "public function test_papi_get_property_type_custom() {\n\t\tadd_action('papi_include_properties', function() {\n\t\t\trequire_once(dirname(__FILE__) . '/../data/properties/class-papi-property-kvack.php');\n\t\t});\n\n\t\tdo_action('papi_include_properties');\n\n\t\t$this->assertTrue( _papi_get_property_type( 'kvack' ) instanceof Papi_Property_Kvack );\n\t}", "public function get_types()\n {\n }", "private function get_type() {\n\n\t}", "private function loadContentTypeFormForTestType() {\n $this->drupalLogin($this->user);\n $this->drupalGet(self::CONTENT_TYPE_PATH_PREFIX\n . self::TEST_CONTENT_TYPE_ID);\n $this->assertResponse(200);\n }", "public function testListServiceClasses()\n {\n\n }", "public function isTest();", "function do_test_get_test_type($testtype)\n{\n if ($testtype < 1) { \n $testtype = 1; \n }\n if ($testtype > 5) { \n $testtype = 5; \n }\n return $testtype;\n}", "public function testIsValidType()\n {\n $this->assertFalse(\n Method::invoke($this->type, 'isValidType', $this, 'test'),\n 'The value should not be valid.'\n );\n\n $this->assertTrue(\n Method::invoke($this->type, 'isValidType', $this, 1.23),\n 'The value should be valid.'\n );\n }", "public function test_mod_lti_create_tool_type() {\n $type = mod_lti_external::create_tool_type($this->getExternalTestFileUrl('/ims_cartridge_basic_lti_link.xml'), '', '');\n $this->assertEquals('Example tool', $type['name']);\n $this->assertEquals('Example tool description', $type['description']);\n $this->assertEquals('https://download.moodle.org/unittest/test.jpg', $type['urls']['icon']);\n $typeentry = lti_get_type($type['id']);\n $this->assertEquals('http://www.example.com/lti/provider.php', $typeentry->baseurl);\n $config = lti_get_type_config($type['id']);\n $this->assertTrue(isset($config['sendname']));\n $this->assertTrue(isset($config['sendemailaddr']));\n $this->assertTrue(isset($config['acceptgrades']));\n $this->assertTrue(isset($config['forcessl']));\n }", "public function setTestTypes(array $testTypes) {\n\t\t$this->testTypes = $testTypes;\n\t}", "public function setUp() : void\n {\n Type::registerType('hasharray', HashArrayType::class);\n $this->type = Type::getType('hasharray');\n }", "public static function get_tests()\n {\n }", "public function buildTestClasses(): void\n {\n $log = $this->config->getLogger();\n\n $this->beforeGeneration();\n\n $definition = $this->getDefinition();\n $types = $definition->getTypes();\n\n $log->startBreak('Test Class Generation');\n\n $this->writeClassFile(\n FileUtils::buildGenericFilePath(\n $this->config,\n $this->config->getTestsNamespace(PHPFHIR_TEST_TYPE_BASE, true),\n PHPFHIR_TEST_CLASSNAME_CONSTANTS\n ),\n TemplateBuilder::generateConstantsTestClass($this->config, $types)\n );\n\n $this->writeClassFile(\n FileUtils::buildGenericFilePath(\n $this->config,\n $this->config->getTestsNamespace(PHPFHIR_TEST_TYPE_BASE, true),\n PHPFHIR_TEST_CLASSNAME_TYPEMAP\n ),\n TemplateBuilder::generateTypeMapTestClass($this->config, $types)\n );\n\n $testTypes = [PHPFHIR_TEST_TYPE_UNIT];\n if (null !== $this->config->getTestEndpoint()) {\n $testTypes[] = PHPFHIR_TEST_TYPE_INTEGRATION;\n }\n foreach ($testTypes as $testType) {\n foreach ($types->getIterator() as $type) {\n if (PHPFHIR_TEST_TYPE_INTEGRATION === $testType && !$type->isDomainResource()) {\n continue;\n }\n $log->debug(\"Generated ${testType} test class for type {$type}...\");\n $classDefinition = TemplateBuilder::generateTypeTestClass($this->config, $types, $type, $testType);\n $filepath = FileUtils::buildTypeTestFilePath($this->config, $type, $testType);\n if (!(bool)file_put_contents($filepath, $classDefinition)) {\n throw new RuntimeException(\n sprintf(\n 'Unable to write Type %s class definition to file %s',\n $filepath,\n $type\n )\n );\n }\n }\n }\n\n\n $log->endBreak('Test Class Generation');\n }", "public function testGetType()\n {\n $urlResult = new \\MphpFlickrPhotosGetInfo\\Result\\UrlResult($this->getAdapter());\n $this->assertSame($this->getAdapter()->getType(), $urlResult->getType());\n }", "public function test_listCustomFields() {\n\n }", "public function testMarketingCampaignsTypesIdSubTypesCountGet()\n {\n\n }", "public function testAddTemplate()\n {\n\n }", "public function testSystemMembersTypesIdDelete()\n {\n\n }", "public function testGetType0()\n{\n\n $actual = $this->bitwiseOr->getType();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "function testEditCalendarEventType()\n\t{\n\t\tedit_event_type($this->eventtype_id,\"test_event_type1\",'calendar/testtype1','');\n\t\t// Test the forum was actually created\n\t\t$this->assertTrue('test_event_type1'==get_translated_text($GLOBALS['SITE_DB']->query_value('calendar_types','t_title ',array('id'=>$this->eventtype_id))));\n\t}", "public function testTypeCorrect()\n {\n $validator=new Validator();\n $result=$validator->type(\"2\");\n $this->assertTrue($result[0]);\n }", "public function test_listSettings() {\n\n }", "public function testGetTypeName()\n {\n $agg = new \\Netric\\EntityQuery\\Aggregation\\Terms(\"test\");\n $this->assertEquals(\"terms\", $agg->getTypeName());\n }", "function getType() ;", "function getType() ;", "function getType() ;", "public function test_it_can_add_clinic_types()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->admin, 'web-admin')\n ->visit(new AddClinicType)\n ->type('name', 'Đa khoa')\n ->press('Add')\n ->assertSee('List clinic types')\n ->assertSee('A new clinic type is added');\n $this->assertDatabaseHas('clinic_types', ['name' => 'Đa khoa']);\n });\n }", "function testCRUDUI() {\n $this->drupalLogin($this->rootUser);\n\n // Create a new profile type.\n $this->drupalGet('admin/config/people/profiles/types');\n $this->clickLink(t('Add profile type'));\n $this->assertUrl('admin/config/people/profiles/types/add');\n $id = Unicode::strtolower($this->randomMachineName());\n $label = $this->randomString();\n $edit = [\n 'id' => $id,\n 'label' => $label,\n ];\n $this->drupalPostForm(NULL, $edit, t('Save'));\n $this->assertUrl('admin/config/people/profiles/types');\n $this->assertRaw(format_string('%label profile type has been created.', ['%label' => $label]));\n $this->assertLinkByHref(\"admin/config/people/profiles/types/manage/$id\");\n $this->assertLinkByHref(\"admin/config/people/profiles/types/manage/$id/fields\");\n $this->assertLinkByHref(\"admin/config/people/profiles/types/manage/$id/display\");\n $this->assertLinkByHref(\"admin/config/people/profiles/types/manage/$id/delete\");\n\n // Edit the new profile type.\n $this->drupalGet(\"admin/config/people/profiles/types/manage/$id\");\n $this->assertRaw(format_string('Edit %label profile type', ['%label' => $label]));\n $edit = [\n 'registration' => 1,\n ];\n $this->drupalPostForm(NULL, $edit, t('Save'));\n $this->assertUrl('admin/config/people/profiles/types');\n $this->assertRaw(format_string('%label profile type has been updated.', ['%label' => $label]));\n\n // Add a field to the profile type.\n $this->drupalGet(\"admin/config/people/profiles/types/manage/$id/fields/add-field\");\n $field_name = Unicode::strtolower($this->randomMachineName());\n $field_label = $this->randomString();\n $edit = [\n 'new_storage_type' => 'string',\n 'label' => $field_label,\n 'field_name' => $field_name,\n ];\n $this->drupalPostForm(NULL, $edit, t('Save and continue'));\n $this->drupalPostForm(NULL, [], t('Save field settings'));\n $this->drupalPostForm(NULL, [], t('Save settings'));\n $this->assertUrl(\"admin/config/people/profiles/types/manage/$id/fields\", [\n 'query' => [\n 'field_config' => \"profile.$id.field_$field_name\",\n 'destinations[0]' => \"admin/config/people/profiles/types/manage/$id/fields/add-field\",\n ]\n ]);\n $this->assertRaw(format_string('Saved %label configuration.', ['%label' => $field_label]));\n\n // Rename the profile type ID.\n $this->drupalGet(\"admin/config/people/profiles/types/manage/$id\");\n $new_id = Unicode::strtolower($this->randomMachineName());\n $edit = [\n 'id' => $new_id,\n ];\n $this->drupalPostForm(NULL, $edit, t('Save'));\n $this->assertUrl('admin/config/people/profiles/types');\n $this->assertRaw(format_string('%label profile type has been updated.', ['%label' => $label]));\n $this->assertLinkByHref(\"admin/config/people/profiles/types/manage/$new_id\");\n $this->assertNoLinkByHref(\"admin/config/people/profiles/types/manage/$id\");\n $id = $new_id;\n\n // Verify that the field is still associated with it.\n $this->drupalGet(\"admin/config/people/profiles/types/manage/$id/fields\");\n // @todo D8 core: This assertion fails for an unknown reason. Database\n // contains the right values, so field_attach_rename_bundle() works\n // correctly. The pre-existing field does not appear on the Manage\n // fields page of the renamed bundle. Not even flushing all caches\n // helps. Can be reproduced manually.\n //$this->assertText(check_plain($field_label));\n }", "function testFileTypes()\r\n {\r\n $nautilus = $this->nautilus->uploadDir('/tmp');\r\n $image = array('name' => $this->testingImage,\r\n 'type' => 'image/jpeg',\r\n 'size' => 542,\r\n 'tmp_name' => $this->testingImage,\r\n 'error' => 0\r\n );\r\n\r\n /* should not accept gif*/\r\n $nautilus->fileTypes(array('gif'));\r\n $this->setExpectedException('Image\\ImageException',' This is not allowed file type!\r\n Please only upload ( gif ) file types');\r\n $upload = $nautilus->upload($image,'nautilus_test_image');\r\n\r\n\r\n /* should not accept png*/\r\n $nautilus->fileTypes(array('png'));\r\n $this->setExpectedException('Image\\ImageException',' This is not allowed file type!\r\n Please only upload ( png ) file types');\r\n $upload = $nautilus->upload($image,'nautilus_test_image');\r\n\r\n /* shouldn't accept this file */\r\n $nautilus->fileTypes(array('exe'));\r\n $this->setExpectedException('Image\\ImageException',' This is not allowed file type!\r\n Please only upload ( exe ) file types');\r\n $upload = $nautilus->upload($image,'nautilus_test_image');\r\n\r\n /* example file is actually jpeg, not jpg */\r\n $nautilus->fileTypes(array('png', 'jpeg'));\r\n $upload = $nautilus->upload($image,'nautilus_test_image');\r\n $this->assertEquals('uploads/nautilus_test_image.jpeg',$upload);\r\n }", "public function getTests();", "public function provideTestCases()\n {\n return [\n ['time', ['time'], false],\n ['bar', null, true],\n ];\n }", "public function testGetData_Types()\n {\n $this->assertInstanceOf('CPC\\ServerMonitor\\Resource\\Hostname', $this->Hostname);\n $this->assertInternalType('array', $this->Hostname->getData());\n }", "public function testAddNoteType()\n {\n $this->_instance->addNoteType($this->_objects['noteType']);\n \n // find our note type\n $testNoteType = $this->_instance->getNoteTypeByName($this->_objects['noteType']->name);\n \n $this->assertEquals($this->_objects['noteType']->name, $testNoteType->name);\n $this->assertEquals(1, $testNoteType->is_user_type, 'user type not set');\n }", "public function testSampleData()\n {\n $_SESSION['behat']['GenesisSqlExtension']['notQuotableKeywords'] = [];\n\n $types = [\n 'boolean' => 'false',\n 'integer' => self::INT_NUMBER,\n 'double' => self::INT_NUMBER,\n 'int' => self::INT_NUMBER,\n 'tinyint' => self::TINY_INT_NUMBER,\n 'string' => \"'behat-test-string-\" . self::TYPE_STRING_TIME . \"'\",\n 'text' => \"'behat-test-string-\" . self::TYPE_STRING_TIME . \"'\",\n 'varchar' => \"'behat-test-string-\" . self::TYPE_STRING_TIME . \"'\",\n 'character varying' => \"'behat-test-string-\" . self::TYPE_STRING_TIME . \"'\",\n 'tinytext' => \"'behat-test-string-\" . self::TYPE_STRING_TIME . \"'\",\n 'char' => \"'f'\",\n 'timestamp' => 'NOW()',\n 'timestamp with time zone' => 'NOW()',\n 'null' => null,\n 'longtext' => \"'behat-test-string-\" . self::TYPE_STRING_TIME . \"'\",\n 'randomness' => \"'behat-test-string-\" . self::TYPE_STRING_TIME . \"'\"\n ];\n\n // Assert\n foreach ($types as $type => $val) {\n // Execute\n $result = $this->testObject->sampleData($type);\n\n $this->assertEquals($val, $result);\n }\n }", "public function testSubscriptionsListByType()\n {\n }", "protected function getTestList() \n {\n $invalid = 'invalid';\n $description = 'text';\n $empty_description = '';\n $testlist = [];\n $testlist[] = new ArgumentTestConfig($this->empty_argument, $empty_description,CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n \n $testlist[] = new ArgumentTestConfig($this->argument_name, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid, $this->argument_name, $invalid, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_empty_need_optional, $empty_description, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n $testlist[] = new ArgumentTestConfig($this->argument_empty_need_required, $empty_description, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n $testlist[] = new ArgumentTestConfig($this->argument_empty_need_invalid, $empty_description, $invalid, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_string, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_string, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_string, $this->argument_name, $invalid, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_string, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_empty, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_array, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::ARRAY, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_array, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::ARRAY, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_array, $this->argument_name, $invalid, CreateModuleCommandArgument::ARRAY, $empty_description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_invalid, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, $invalid, $empty_description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_invalid, $this->argument_name, CreateModuleCommandArgument::REQUIRED, $invalid, $empty_description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_string_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_string_description, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_string_description, $this->argument_name, $invalid, CreateModuleCommandArgument::STRING, $description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_array_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::ARRAY, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_array_description, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::ARRAY, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_array_description, $this->argument_name, $invalid, CreateModuleCommandArgument::ARRAY, $description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_empty_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_empty_description_empty, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_invalid_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, $invalid, $description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_invalid_description, $this->argument_name, CreateModuleCommandArgument::REQUIRED, $invalid, $description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_invalid_description, $this->argument_name, $invalid, $invalid, $description, \\InvalidArgumentException::class);\n \n return $testlist;\n }", "public function testGetAllNames()\n {\n $map = $this->driver->getAllNames();\n $this->assertCount(1, $map);\n $types = array(\n 'http://rdfs.org/sioc/ns#Post' => 'Test\\\\Midgard\\\\CreatePHP\\\\Model',\n );\n $this->assertEquals($types, $map);\n }", "public function testContentTypeInAction(): void\n {\n $this->get('/tests_apps/set_type');\n $this->assertHeader('Content-Type', 'application/json');\n $this->assertContentType('json');\n $this->assertContentType('application/json');\n }", "protected function setUp()\n {\n $this->object = new PasselType;\n }", "public function test_mod_lti_get_tool_types() {\n // Create a tool proxy.\n $proxy = mod_lti_external::create_tool_proxy('Test proxy', $this->getExternalTestFileUrl('/test.html'), array(), array());\n\n // Create a tool type, associated with that proxy.\n $type = new stdClass();\n $data = new stdClass();\n $type->state = LTI_TOOL_STATE_CONFIGURED;\n $type->name = \"Test tool\";\n $type->description = \"Example description\";\n $type->toolproxyid = $proxy->id;\n $type->baseurl = $this->getExternalTestFileUrl('/test.html');\n $typeid = lti_add_type($type, $data);\n\n $types = mod_lti_external::get_tool_types($proxy->id);\n $this->assertEquals(1, count($types));\n $type = $types[0];\n $this->assertEquals('Test tool', $type['name']);\n $this->assertEquals('Example description', $type['description']);\n }", "function _elggx_lists_test($hook, $type, $value, $params) {\n\t$value[] = __DIR__ . '/tests/ElggxListsTest.php';\n\treturn $value;\n}", "public function getType() {}", "public function getType() {}", "#[@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 }", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}" ]
[ "0.7812697", "0.7206616", "0.71876675", "0.71266127", "0.7125313", "0.70985854", "0.69743365", "0.69560915", "0.68872887", "0.682527", "0.6753508", "0.66831833", "0.66440535", "0.664213", "0.6638611", "0.6609264", "0.65747106", "0.65471715", "0.64726734", "0.63892365", "0.6354075", "0.6311847", "0.6268113", "0.62406546", "0.6220838", "0.6179018", "0.6154929", "0.61527145", "0.61394656", "0.6136811", "0.613142", "0.6109954", "0.6099886", "0.6093061", "0.60749626", "0.6074083", "0.60497946", "0.6047275", "0.6021676", "0.6018998", "0.6012461", "0.6009964", "0.6007249", "0.6005494", "0.59904176", "0.5990259", "0.59852016", "0.59760255", "0.59707457", "0.5960835", "0.5960665", "0.5953426", "0.5942913", "0.5935021", "0.59245193", "0.5923566", "0.59161615", "0.5914179", "0.5908058", "0.5904776", "0.5899143", "0.5894977", "0.5892208", "0.5878245", "0.58679193", "0.5851614", "0.58492786", "0.5836846", "0.58289284", "0.5823531", "0.5816255", "0.581113", "0.58107823", "0.58106464", "0.578554", "0.578464", "0.5782538", "0.5776172", "0.5775492", "0.57722026", "0.57651645", "0.57574457", "0.57571894", "0.5750901", "0.57471794", "0.57461137", "0.57451504", "0.57434356", "0.5742694", "0.5727341", "0.5727341", "0.572646", "0.57260275", "0.57260275", "0.57260275", "0.57260275", "0.57260275", "0.57260275", "0.57260275", "0.57260275" ]
0.5780764
77
/ | | Examination Center |
public function exam_centers() { $center = Exam_centers::all(); $data['center'] = $center; return view('admin.exam_centres', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function examcenter() {\n $data['result'] = $this->commodel->get_list('admissionstudent_enterenceexamcenter');\n $this->logger->write_logmessage(\"view\",\" View Exam Center\", \"Exam Center details...\");\n $this->logger->write_dblogmessage(\"view\",\" View Exam Center\" , \"Exam Center record display successfully...\" );\n $this->load->view('enterenceadmin/examcenter',$data);\n }", "public function hcenter() {\n\t}", "function getCenter() {return $this->_center;}", "public function return_islamic_centers_for_Rating(){\n return IslamicCenter::return_islamic_centers_for_Rating();\n }", "public function getConfineArea() {\n return $this->_confine; \n }", "public function getOperatingCentre()\n {\n return $this->operatingCentre;\n }", "public function centreForTourismAndHospitality(){\n $name = 'CENTER FOR TOURISIM AND HOSPITALITY';\n $title = 'CTH';\n\t\t$students = DB::table('students')\n ->where('students.faculty', '=', 'CTH')->where('state', '=', 'Activated')\n ->whereNotIn('students.studentNo', function($q){\n $q->select('students_studentNo')->from('charge');\n })->paginate(15);\n return view('staff/faculty', compact('name','title','students'));\n\t}", "public function getCenter()\n {\n return $this->center;\n }", "public static function review_center () \n { \n $html = null;\n\n load::view( 'admin/review/center' );\n $html .= review_center::form();\n\n return $html;\n }", "public function getCentroArea() {\n return $this->_centro; \n }", "public function getIntro();", "public function getCodeCentre(): ?string {\n return $this->codeCentre;\n }", "public function getCodeCentre(): ?string {\n return $this->codeCentre;\n }", "public function illustrationScore()\n {\n return $this->setRightOperand(PVar::ILLUSTRATION_SCORE);\n }", "public function show(ExpenceHead $expenceHead)\n {\n\n }", "public function gagnerExperience()\n {\n }", "public function getIndiceAem() {\n return $this->indiceAem;\n }", "public function concentration() {\n\t\t$pageTitle = 'Concentration';\n\t\t// $stylesheet = '';\n\n\t\tinclude_once SYSTEM_PATH.'/view/header.php';\n\t\tinclude_once SYSTEM_PATH.'/view/academic-help/concentration.php';\n\t\tinclude_once SYSTEM_PATH.'/view/footer.php';\n\t}", "public function Emprunter()\n {\n // section -64--88-56-1-313d700b:16f04d7fd4a:-8000:00000000000009BA begin\n // section -64--88-56-1-313d700b:16f04d7fd4a:-8000:00000000000009BA end\n }", "function listYLineDiagramCenter($yleft, $ytop)\n{\n $result = array();\n $sum = $yleft + 25;\n for ($i=0; $i < 6; $i++) {;\n $result[] = array('ymargin_left_center' => $sum, 'ymargin_top_center' => $ytop);\n $sum += 50;\n }\n\n return $result;\n}", "public function getExam()\n {\n return Mage::registry('current_exam');\n }", "public static function help_inner () \n { \n $html = null;\n\n $top = __( 'Instruction Manual', 'label' );\n $inner = self::help_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'help', $top, $inner, $bottom );\n\n return $html;\n }", "public function getMedicalExaminationTitle(){\n return is_object($this->doc) ? ($this->doc->gte(Carbon::now()->startOfDay()) ? 'Medical examination is valid.' : 'Medical examination expired.') : 'Medical examination not supplied.';\n }", "function showIntro() {\n if (! $_SESSION[\"eligible\"]) {\n return $this->showStart();\n }\n $nexturl = $this->action . '?mode=details';\n $safety = $this->action . '?mode=safety';\n $extra = array('next' => $nexturl, 'safetyurl' => $safety);\n $output = $this->outputBoilerplate('introduction.html', $extra);\n return $output;\n }", "function get_center_name($centerId){\n\t\t\t$sql=\"SELECT exam_center_name FROM exam_center_setup WHERE exam_center_id=:Id\";\n\t\t\t$stmt = $this->dbConn->prepare($sql);\n\t\t\t$stmt->bindParam(\":Id\",$centerId);\n\t\t\tif ($stmt->execute()) {\n\t\t\t\t$result= $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\treturn $result['exam_center_name'];\n\t\t\t}\n\t\t\telse{\n\t\t\t\tdie();\n\t\t\t\t}\n\t\t}", "public function showParticipatedChallenge() {\n\n if (Auth::guest()) {\n $response = array(\"status\" => false,\n \"error\" => \"unauthorized\");\n } else {\n\n $freelancer = Freelancer::find(Auth::user()->user_id);\n $challenges = $freelancer->challenges()->orderBy('updated_at', 'desc')->get();\n foreach ($challenges as $challenge) {\n\n $average = $freelancer->get_average_marks($challenge->challenge_id);\n $challenge->markAverage = $average == -1 ? '-' : number_format($average, 2);\n }\n }\n // dd($challenge);\n return view('challenges.indexWithMark', compact('challenges', 'criterions', 'freelancer'));\n }", "public function show(exam $exam)\n {\n //\n }", "function exam_marks() {\n if ($this->session->userdata('parent_login') != 1)\n redirect(base_url(), 'refresh');\n $year = $this->db->get_where('settings', array('type' => 'running_year'))->row()->description;\n\n $student_id = $this->session->userdata('parent_id');\n $page_data['student_id'] = $student_id;\n $page_data['teacher_id'] = $this->parents_model->get_student_id('teacher_id', $student_id);\n $page_data['exams'] = $this->parents_model->get_student_exams();\n foreach ($page_data['exams'] as $data) {\n $this->parents_model->create_exam_positions($page_data['teacher_id'], $data['exam_id'], $year);\n }$page_data['student'] = $this->db->get_where('student', array('student_id' => $student_id))->row()->name;\n $page_data['page_name'] = 'exam_marks';\n $image = $this->db->get_where('student', array('student_id' => $student_id))->row()->image;\n $image_url = $this->crud_model->get_image_url('student', $image);\n $page_data['parent_page_title'] = \"<img src='$image_url'\" . 'class=\"img-circle\"' . 'width=\"40\"' . \"/>\" . $page_data['student'];\n $page_data['page_title'] = $page_data['student'];\n $page_data['year'] = $year;\n $this->load->view('backend/index', $page_data);\n }", "public function execute(&$component, $input) {\n\t\t$nb_centers = SQLQuery::create()->select(\"ExamCenter\")->count(\"nb_centers\")->executeSingleValue();\n\n\t\tif ($nb_centers == 0) {\n\t\t\techo \"<center><i class='problem' style='padding:5px'>No exam center yet</i></center>\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// overview on exam centers\n\t\techo \"<div class='page_section_title2'>Exam Centers</div>\";\n\t\techo \"<div style='padding:0px 5px'>\";\n\t\techo $nb_centers.\" exam center\".($nb_centers>1?\"s\":\"\").\"<ul>\";\n\t\t$q = SQLQuery::create()->select(\"ExamSession\");\n\t\tPNApplication::$instance->calendar->joinCalendarEvent($q, \"ExamSession\", \"event\");\n\t\tPNApplication::$instance->calendar->whereEventInThePast($q, true);\n\t\t$nb_sessions_done = $q->count()->executeSingleValue(); \n\t\t$q = SQLQuery::create()->select(\"ExamSession\");\n\t\tPNApplication::$instance->calendar->joinCalendarEvent($q, \"ExamSession\", \"event\");\n\t\tPNApplication::$instance->calendar->whereEventInTheFuture($q, true);\n\t\t$nb_sessions_future = $q->count()->executeSingleValue();\n\t\techo \"<li>\".$nb_sessions_done.\" session\".($nb_sessions_done>1?\"s\":\"\").\" already done</li>\"; \n\t\techo \"<li>\".$nb_sessions_future.\" session\".($nb_sessions_future>1?\"s\":\"\").\" scheduled not yet done</li>\"; \n\t\techo \"</ul>\";\n\t\techo \"</div>\";\n\t\t\n\t\t// overview on linked information sessions\n\t\techo \"<div class='page_section_title2'>Information Sessions</div>\";\n\t\techo \"<div style='padding:0px 5px'>\";\n\t\t$total_nb_is = SQLQuery::create()->select(\"InformationSession\")->count(\"nb\")->executeSingleValue();\n\t\t$is_not_linked = SQLQuery::create()\n\t\t\t->select(\"InformationSession\")\n\t\t\t->join(\"InformationSession\", \"ExamCenterInformationSession\", array(\"id\"=>\"information_session\"))\n\t\t\t->whereNull(\"ExamCenterInformationSession\", \"exam_center\")\n\t\t\t->field(\"InformationSession\", \"id\")\n\t\t\t->executeSingleField();\n\t\tif (count($is_not_linked) == 0) {\n\t\t\techo \"<div class='ok'>All (\".$total_nb_is.\") linked to an exam center</div>\";\n\t\t} else {\n\t\t\techo \"<a href='#' class='need_action' onclick=\\\"popupFrame(null,'Link Information Sessions to Exam Centers','/dynamic/selection/page/exam/link_is_with_exam_center?onsaved=saved',null,null,null,function(frame,pop){frame.saved=loadExamCenterStatus;});return false;\\\">\".count($is_not_linked).\" not linked to an exam center</a><br/>\";\n\t\t}\n\t\techo \"</div>\";\n\t\t\n\t\t// overview on applicants\n\t\techo \"<div class='page_section_title2'>Applicants</div>\";\n\t\techo \"<div style='padding:0px 5px'>\";\n\t\t$nb_applicants_no_exam_center = SQLQuery::create()->select(\"Applicant\")->whereNotValue(\"Applicant\",\"automatic_exclusion_step\",\"Application Form\")->whereNull(\"Applicant\",\"exam_center\")->count(\"nb\")->executeSingleValue();\n\t\t$nb_applicants_ok = SQLQuery::create()->select(\"Applicant\")->whereNotValue(\"Applicant\",\"automatic_exclusion_step\",\"Application Form\")->whereNotNull(\"Applicant\",\"exam_center\")->whereNotNull(\"Applicant\", \"exam_session\")->count(\"nb\")->executeSingleValue();\n\t\t\n\t\t$applicants_no_schedule = SQLQuery::create()\n\t\t\t->select(\"Applicant\")\n\t\t\t->whereNotNull(\"Applicant\",\"exam_center\")\n\t\t\t->whereNull(\"Applicant\", \"exam_session\")\n\t\t\t->whereNotValue(\"Applicant\",\"automatic_exclusion_step\",\"Application Form\")\n\t\t\t->groupBy(\"Applicant\", \"exam_center\")\n\t\t\t->countOneField(\"Applicant\", \"people\", \"nb\")\n\t\t\t->join(\"Applicant\", \"ExamCenter\", array(\"exam_center\"=>\"id\"))\n\t\t\t->field(\"ExamCenter\", \"name\", \"center_name\")\n\t\t\t->field(\"ExamCenter\", \"id\", \"center_id\")\n\t\t\t->execute();\n\t\t$nb_applicants_no_schedule = 0;\n\t\tforeach ($applicants_no_schedule as $center) $nb_applicants_no_schedule += $center[\"nb\"];\n\n\t\t$total_applicants = $nb_applicants_ok + $nb_applicants_no_schedule + $nb_applicants_no_exam_center;\n\t\techo $total_applicants.\" applicant(s)<ul style='padding-left:20px'>\";\n\t\techo \"<li>\";\n\t\tif ($nb_applicants_no_exam_center == 0)\n\t\t\techo \"<span class='ok'>All are assigned to an exam center</span>\";\n\t\telse {\n\t\t\techo \"<a class='problem' href='#' onclick='applicantsNotLinkedToExamCenter();return false;'>\".$nb_applicants_no_exam_center.\" not assigned to an exam center</a>\";\n\t\t\t?>\n\t\t\t<script type='text/javascript'>\n\t\t\tfunction applicantsNotLinkedToExamCenter() {\n\t\t\t\tpostData('/dynamic/selection/page/applicant/list', {\n\t\t\t\t\ttitle: \"Applicants without Exam Center\",\n\t\t\t\t\tfilters: [\n\t\t\t\t\t\t{category:\"Selection\",name:\"Excluded\",force:true,data:{values:[0]}},\n\t\t\t\t\t\t{category:\"Selection\",name:\"Exam Center\",force:true,data:{values:['NULL']}}\n\t\t\t\t\t]\n\t\t\t\t});\n\t\t\t}\n\t\t\t</script>\n\t\t\t<?php \n\t\t}\n\t\techo \"</li>\";\n\t\tif ($nb_applicants_no_schedule > 0 || $total_applicants > $nb_applicants_no_exam_center) {\n\t\t\techo \"<li>\";\n\t\t\tif ($nb_applicants_no_schedule == 0)\n\t\t\t\techo \"<span class='ok'>All \".($nb_applicants_no_exam_center > 0 ? \"assigned \": \"\").\"have a schedule</span>\";\n\t\t\telse {\n\t\t\t\techo \"<a class='problem' href='#' onclick='applicantsNoSchedule(this);return false;'>\".$nb_applicants_no_schedule.\" don't have a schedule</a>\";\n\t\t\t\t?>\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\tfunction applicantsNoSchedule(link) {\n\t\t\t\t\trequire(\"context_menu.js\",function() {\n\t\t\t\t\t\tvar menu = new context_menu();\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tforeach ($applicants_no_schedule as $center) {\n\t\t\t\t\t\t\techo \"menu.addIconItem(null,\".json_encode($center[\"nb\"].\" applicant(s) in \".$center[\"center_name\"]).\",function() {\";\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\twindow.top.popupFrame('/static/selection/exam/exam_center_16.png','Exam Center','/dynamic/selection/page/exam/center_profile?onsaved=saved&id=<?php echo $center[\"center_id\"];?>',null,95,95,function(frame,pop) {\n\t\t\t\t\t\t\t\tframe.saved = function() { if (window.refreshPage) window.refreshPage(); else window.loadExamCenterStatus(); };\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\techo \"});\\n\";\n\t\t\t\t\t\t} \n\t\t\t\t\t\t?>\n\t\t\t\t\t\tmenu.showBelowElement(link);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t\t<?php \n\t\t\t}\n\t\t}\n\t\techo \"</li>\";\n\t\techo \"</ul>\";\n\t\techo \"</div>\";\n\t}", "function annotation_user_outline($course, $user, $mod, $annotation) {\n\n $return = new stdClass();\n $return->time = 0;\n $return->info = '';\n return $return;\n}", "public function + aire()\n {\n // section -64--88--103-1-2c9bd139:16deeff2ef5:-8000:00000000000009A4 begin\n // section -64--88--103-1-2c9bd139:16deeff2ef5:-8000:00000000000009A4 end\n }", "function call_center_view($call_info, $view_mode = 'full') {\n drupal_set_title(entity_label('call_center', $call_info));\n $ev = entity_view('call_center', array(entity_id('call_center', $call_info) => $call_info), $view_mode);\n return $ev;\n}", "function getArea(){}", "function GetCurrentExam()\n {\n if(isset($_SESSION[GetExamIdentifier()]))\n {\n return $_SESSION[GetExamIdentifier()];\n }\n \n return FALSE;\n }", "function etherpadlite_user_outline($course, $user, $mod, $etherpadlite) {\n return null;\n}", "public function setInstructorAndAdminName()\n {\n // Add medal stamp image.\n $this->Image('C:\\xampp\\htdocs\\Nexus\\resource\\img\\fpdf\\medal-stamp.png', 121, 162, 40, 40);\n\n // Set the font.\n $this->AddFont('BebasNeue-Regular', '', 'BebasNeue-Regular.php');\n $this->SetFont('BebasNeue-Regular', '', 18);\n\n // Line break.\n $this->Ln(26);\n\n $this->SetLeftMargin(17);\n\n $this->Cell(90, 30, $this->aAdminDetails['instructorName'], 0, 0, 'C');\n $this->Cell(224, 30, $this->aAdminDetails['adminName'], 0, 0, 'C');\n\n // Line break.\n $this->Ln(1);\n\n $this->Cell(90, 30, '____________________________________', 0, 0, 'C');\n $this->Cell(223, 30, '____________________________________', 0, 0, 'C');\n\n $this->AddFont('Calibri', '', 'Calibri.php');\n $this->SetFont('Calibri', '', 12);\n\n // Line break.\n $this->Ln(23);\n \n // Set the font.\n $this->Cell(87, 0, 'Instructor', 0, 0, 'C');\n $this->Cell(232, 0, 'Administrator', 0, 0, 'C');\n }", "public function setCenter($center) \n {\n $this->center = $center;\n }", "function getAlignment() {return $this->readAlignment();}", "abstract protected function getArea();", "public function show(DonationCentre $donationCentre)\n {\n //\n }", "function cicleinscription_user_outline($course, $user, $mod, $cicleinscription) {\n\n $return = new stdClass();\n $return->time = 0;\n $return->info = '';\n \n return $return;\n}", "public function show(Exam $exam)\n {\n \n }", "public function getAceite();", "public function setCodeCentre(?string $codeCentre): Assurances {\n $this->codeCentre = $codeCentre;\n return $this;\n }", "public function show(Exam $exam)\n {\n //\n }", "public function getCentroArmazenagemSaida()\n {\n return $this->centro_armazenagem_saida;\n }", "function postDisplay( $pMid ) {\n\t}", "public function intro_staff() {\n //[U_23]\n //1. get agent_id\n //2. get agent's staff\n //$this->Service_agent->get_list($status);\n\n //$this->smarty->assign($sample, $sample);\n\n $bc_element['item'] = array('agent_index', 'agent_detail_current');\n $bc_element['client_id'] = $client_id;//client_idを入れる\n $bc_element['agent_name'] = $agent['name'];//会社名を入れる\n $this->_bread_crumb['base_url'] = base_url();\n $this->_bread_crumb['content'] = get_breadcrumb('agent_detail',$bc_element);\n\n $this->smarty->display($this->template_path().\"/user/agent/intro_staff.html\");\n }", "function displayPage()\r\n{\r\n global $dam,$interim,$student;\r\n extract($interim);\r\n extract($student);\r\n\r\n echo '<h1>Interim '.$ID.'</h1>';\r\n echo '<center>';\r\n if($dam->userCanEditInterim('')) echo '<a href=\"./editinterim.php?interimid='.$ID.'\">[Edit this interim]</a> ';\r\n if($dam->userCanDeleteInterim('',$ID)) echo '<a href=\"./deleteinterim.php?interimid='.$ID.'\">[Delete this interim]</a> ';\r\n echo '<a href=\"./viewinterimpf.php?id='.$ID.'\" target=\"_blank\">[Click here for printer-friendly version]</a> ';\r\n echo '<a href=\"sendInterimEmail.php?interimid='.$ID.'\">[Email interim report]</a>';//createEmailLink();\r\n echo '<br /><br /></center>';\r\n\r\n echo '<table width=\"100%\" border=\"0\">';\r\n echo '<tr><td align=\"left\" width=\"25%\"><b>Student ID: </b></td><td align=\"left\">'.$StudentID.'</td></tr>\r\n <tr><td align=\"left\" width=\"25%\"><b>Student Name: </b></td><td align=\"left\"><a href=\"./viewstudent.php?id='.$StudentID.'\">'.$FIRST_NAME.' '.$MIDDLE_NAME.' '.$LAST_NAME.'</a></td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Class Year: </b></td><td align=\"left\">'.$CLASS_YEAR.'</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Course Number & Title: </b></td><td align=\"left\">'.$CourseNumberTitle.'</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Instructor: </b></td><td align=\"left\">'.$Instructor.'</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Date: </b></td><td align=\"left\">'.readableDate($Date).'</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\">&nbsp;</td><td>&nbsp;</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Problem: </b></td><td align=\"left\">';\r\n\r\n $problems = explode(';',$Problem);\r\n for($i = 0; $i < count($problems); $i++){\r\n echo $problems[$i].'<br />';\r\n }\r\n\r\n echo '</td></tr><tr><td align=\"left\" width=\"25%\">&nbsp;</td><td>&nbsp;</td></tr>';\r\n\r\n echo '<tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Comments: </b></td><td align=\"left\">'.stripslashes($Comments).'</td></tr>\r\n <tr><td align=\"left\" width=\"25%\">&nbsp;</td><td>&nbsp;</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Recommended Action: </b></td><td align=\"left\">';\r\n\r\n $actions = explode(';',$RecommendAction);\r\n for($i = 0; $i < count($actions); $i++){\r\n if(strcmp($actions[$i],\"Conference with a Dean []\") == 0) echo 'Conference with a Dean<br />';\r\n else echo $actions[$i].'<br />';\r\n }\r\n\r\n echo '</td></tr><tr valign=\"top\"><td align=\"left\" width=\"25%\">&nbsp;</td><td>&nbsp;</td></tr>';\r\n\r\n echo '<tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Other Recommended Action: </b></td><td align=\"left\">'.stripslashes($OtherAction).'</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Date Processed: </b></td><td align=\"left\">'.readableDate($DateProcessed).'</td></tr>';\r\n\r\n echo '</table>'; \r\n}", "public function Sciences_director()\r\n\t{\r\n\t\t$this->load->view('inc/header');\r\n $this->load->view('site/sciences_department');\r\n $this->load->view('inc/footer');\r\n\t}", "public function intro() {\n\n\t}", "function career_view()\n {\n $ob = new model();\n $show_career=$ob->career_view_sql();\n return $show_career;\n }", "private function writeHcenter(): void\n {\n $record = 0x0083; // Record identifier\n $length = 0x0002; // Bytes to follow\n\n $fHCenter = $this->phpSheet->getPageSetup()->getHorizontalCentered() ? 1 : 0; // Horizontal centering\n\n $header = pack('vv', $record, $length);\n $data = pack('v', $fHCenter);\n\n $this->append($header . $data);\n }", "public function getAwardData($ExEc = NULL){\r\n $this->db->select('A.*,D.name as designationname');\r\n $this->db->from('ci_awards_details as A');\r\n $this->db->join('designations D', 'D.id=A.in_designation', 'LEFT');\r\n if(!empty($ExEc)){\r\n $this->db->where('A.emp_id', $ExEc);\r\n }\r\n return $this->db->get()->result(); \r\n }", "function addCentreDB($insert_arr=array()) {\r\n\t\t$this->db->insert('dipp_test_centre', $insert_arr);\r\n\t\treturn $this->db->insert_id();\r\n\t}", "public function show(ExamTerm $examTerm)\n {\n //\n }", "public function show(Exam $exam)\n {\n //\n }", "public function show(Exam $exam)\n {\n //\n }", "public function show(Exam $exam)\n {\n //\n }", "public function show(Exam $exam)\n {\n //\n }", "public function actionCenter()\n {\n $model = Center::find()->all();\n\n if (Yii::$app->request->post())\n {\n $centers = Center::find()->where(['id_provincia' => Yii::$app->request->post('Provincia')['provinciaid']] )->all();\n return $this->render('centers', ['centers' => $centers]);\n } else\n {\n return $this->render('centers', ['centers' => null]);\n }\n }", "function roshine_user_outline($course, $user, $mod, $roshine) {\n\n $return = new stdClass();\n $return->time = 0;\n $return->info = 'This is an outline.';\n return $return;\n}", "public function getDisplay();", "public function viewcentrollno(){\n\t\t$centerlist = $this->commodel->get_distinctrecord('admissionstudent_centerallocation','ca_centername','');\n\t\tif(!empty($centerlist)){\n\t\t\tforeach($centerlist as $row){\n\t\t\t\t$center = $row->ca_centername;\n\t\t\t\tif(!empty($center)){\n\t\t\t\t\t$whdata = array('ca_centername' => $center);\n\t\t\t\t\t$prglist = $this->commodel->get_distinctrecord('admissionstudent_centerallocation','ca_prgid',$whdata);\n\t\t\t\t\tif(!empty($prglist)){\n\t\t\t\t\t\tforeach($prglist as $row1){\n\t\t\t\t\t\t\t$prgid = $row1->ca_prgid;\n\t\t\t\t\t\t\tif(!empty($prgid)){\n\t\t\t\t\t\t\t\t$whdata1 = array('ca_centername' => $center,'ca_prgid' => $prgid,'ca_rollno' => NULL); \n\t\t\t\t\t\t\t\t$asmidlist = $this->commodel->get_listspficemore('admissionstudent_centerallocation','ca_asmid',$whdata1);\n\t\t\t\t\t\t\t\tif(!empty($asmidlist)){\n\t\t\t\t\t\t\t\t\tforeach($asmidlist as $row2){\n\t\t\t\t\t\t\t\t\t\t$Sid = $row2->ca_asmid;\t\t\n\t\t\t\t\t\t\t\t\t\tif(!empty($Sid)){\n\t\t\t\t\t\t\t\t\t\t\t$this->generat_rollnumber($prgid,$Sid);\n\t\t\t\t\t\t\t\t\t\t}//sid empty check\n\t\t\t\t\t\t\t\t\t}//asm id foreach\n\t\t\t\t\t\t\t\t}//asm id list check empty\n\t\t\t\t\t\t\t}//prg id check empty \t\t\t\t\t\n\t\t\t\t\t\t}//program name foreach\n\t\t\t\t\t}//check program list empty\n\t\t\t\t}//check center name empty\n\t\t\t}//exm center foreach \n\t\t}//exm centerlist empty check\n\t\t$prgname = $this->commodel->get_distinctrecord('admissionstudent_centerallocation','ca_prgid','');\n\t\t$data['prgname'] = $prgname;\n\t\t$data['examcenter'] = $centerlist;\n\n\t\t$this->load->view('enterenceadmin/gen_rollnumber',$data);\n \t}", "public function getCadence(){\n return $this->cadence;\n }", "public function intro() {\n\n }", "public function town_cine()\n\t{\n\t\t//(3/9) - \"Microsoft Frontpage 2003 - 4 Town-Up from Kraenk.rar.par2\" - 181,98 MB - yEnc\n\t\tif (preg_match('/^[\\[(]\\d+\\/\\d+[\\])] - \"([A-Z0-9].{2,}?)' . $this->e0 .\n\t\t\t\t\t ' - \\d+[.,]\\d+ [kKmMgG][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}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "function renderSpaceInfo() {\n\t\treturn \"<br><b>\" . t3lib_div::_GP('title') . \"</b> \" . $GLOBALS['LANG']->getLL('information');\n\t}", "function getOverview() ;", "function begin_frame ($caption=\"\", $center=false, $padding=10)\r\n{\r\n $tdextra = \"\";\r\n\r\n if ($caption)\r\n {\r\n print(\"<h2>$caption</h2>\");\r\n }\r\n\r\n if ($center)\r\n {\r\n $tdextra .= \" align='center'\";\r\n }\r\n\r\n print(\"<table border='1' width='100%' cellspacing='0' cellpadding='$padding'><tr><td $tdextra>\\n\");\r\n}", "function output_question_screen($member_id,$dx,$dy)\n{\n\tlist($realm,$x,$y)=get_loc_details($member_id);\n\t$x+=$dx;\n\t$y+=$dy;\n\t$question=$GLOBALS['SITE_DB']->query_value('w_rooms','password_question',array('location_x'=>$x,'location_y'=>$y,'location_realm'=>$realm));\n\n\t$title=get_page_title('W_PROTECTED_ROOM');\n\n\treturn do_template('W_QUESTION_SCREEN',array('_GUID'=>'15c560f0f0ae3570f31beac8684e1e0d','DX'=>strval($dx),'DY'=>strval($dy),'QUESTION'=>$question,'TITLE'=>$title));\n}", "public function getAlign() {}", "public function getSecurityMarks()\n {\n return $this->security_marks;\n }", "public function help(){\n\t\t$list = array();foreach($this->getEncryptionKeys() as $k=>$v){$list[]=$k;}\n\t\treturn \"Supported Encryped sections: \". rtrim(implode(',', $list), ',');\n\t}", "public function getCentro($atributo){\r\n return $this-> $atributo;\r\n }", "function showAccessDenied($day=null, $month=null, $year=null, $area=null, $room=null)\n{\n global $HTTP_REFERER;\n\n print_header($day, $month, $year, $area, isset($room) ? $room : null);\n\n echo \"<h1>\" . get_vocab(\"accessdenied\") . \"</h1>\\n\";\n echo \"<p>\" . get_vocab(\"norights\") . \"</p>\\n\";\n echo \"<p>\\n\";\n echo \"<a href=\\\"\" . htmlspecialchars($HTTP_REFERER) . \"\\\">\\n\" . get_vocab(\"returnprev\") . \"</a>\\n\";\n echo \"</p>\\n\";\n\n // Print footer and exit\n print_footer(TRUE);\n}", "protected function calculateDisplayRange() {}", "public function getNotes()\n {\n return \"Tutorial Map\";\n }", "public function show(ExpenceManagement $expenceManagement) {\n\t\t//\n\t}", "public function actionIndex()\n {\n $userId = Yii::$app->user->id;\n $searchModel = new ExaminationSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->query->AndWhere(['user_id' => $userId]);\n $dataProvider->query->orderBy('create_at DESC');\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function access();", "public function index()\n\t{\n\t\n\t\t$data['meta_title'] = \"Clinical\";\n\t\t$data['page'] = \"clinical\";\n\t\t$this->load->view('tpl', $data);\n\t}", "public function setHCenter($value) {\n\t}", "public static function confirmation_center () \n { \n $html = null;\n\n load::view( 'admin/confirmation/center' );\n $html .= confirmation_center::form();\n\n return $html;\n }", "public function display() {\n\t}", "function __construct() \n\t{\n\t\t//Modificar aka segun la forma del papel del reporte \n\t\tparent::__construct('P','mm','A4'); \n\t\t//parent::__construct('P','mm','Letter'); \n\t}", "public function alimentar()\n {\n }", "public function getBusinessCenter() :string\n {\n return $this->businessCenter;\n }", "public function display() {}", "public function display() {}", "public function getAccessibilityAssessment()\n {\n return $this->accessibilityAssessment;\n }", "abstract public function displayHelp();", "function getStudentMiddleName() {\n\t\treturn $this->getData('studentMiddleName');\n\t}", "public function media_center()\n {\n $lang = $this->data['lang'];\n $user_id = $this->user_id;\n\n $this->data['page'] = 'media_center' ;\n\n $body = 'media_center' ;\n\n $this->load_pages($body,$this->data); \n }", "function i4_lms_display_coordinators() {\n ?>\n <h3>Current Course Coordinators</h3>\n <?php\n $this->i4_lms_get_coordinators();\n }", "function &addTable($alignment = 'left') {\t \r\n\r\n\t}", "function area_check_center($x, $y){\n\t\t\t$part1 = pow($x, 2) * ( asin($y/$x) - (1/2) * sin(2 * asin( $y/$x )));// Area of the segment of the larger circle\n\t\t\t$part2 = (1/2) * pi() * pow($y, 2);// Area of the smaller semi-circle\n\t\t\treturn $part1 + $part2;\n\t\t}", "public function display()\n {\n }", "public function display()\n {\n }", "public function biography();" ]
[ "0.60756505", "0.5868545", "0.570762", "0.53841984", "0.52177703", "0.52071834", "0.5203397", "0.5188887", "0.5149242", "0.50735646", "0.5058717", "0.50174075", "0.50174075", "0.5000207", "0.49794102", "0.49238387", "0.48777232", "0.48601595", "0.48596692", "0.48465842", "0.4840406", "0.48246118", "0.48241454", "0.4821242", "0.4816029", "0.47896865", "0.47830418", "0.4778449", "0.47641194", "0.47504723", "0.4736883", "0.4732234", "0.47254676", "0.4719826", "0.4715782", "0.47136995", "0.47134155", "0.47120357", "0.47065154", "0.46990424", "0.46979675", "0.4695869", "0.46897295", "0.46868086", "0.46855313", "0.46636108", "0.4658352", "0.4649088", "0.4639941", "0.46370894", "0.46293795", "0.46289405", "0.4619961", "0.46109807", "0.46066126", "0.46064997", "0.46048775", "0.46048775", "0.46048775", "0.46048775", "0.46008322", "0.45966867", "0.45876524", "0.4585808", "0.4579486", "0.45786354", "0.45778582", "0.45705438", "0.45686767", "0.45630053", "0.45568353", "0.45514706", "0.45495272", "0.4548131", "0.4543396", "0.45385286", "0.45324284", "0.452719", "0.45249662", "0.4522502", "0.45187116", "0.45180595", "0.4516743", "0.45131096", "0.45121908", "0.45102504", "0.450968", "0.4509273", "0.4508781", "0.4508781", "0.4508208", "0.45066166", "0.4506599", "0.4497034", "0.44879237", "0.44825217", "0.44825056", "0.44820574", "0.44820574", "0.44817597" ]
0.5875832
1
controller method to be called
function __construct() { //parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function controller()\n\t{\n\t\n\t}", "public function indexAction() {\r\n \r\n }", "public function indexAction() \n {\n \t\n }", "public function indexAction()\n {\n //for real application\n }", "public function indexAction ()\r\n {\r\n\r\n }", "protected function indexAction() {}", "public function indexAction()\n {\n\n }", "public function indexAction()\n {\n\n }", "public function indexAction()\n {\n\n }", "public function indexAction()\n {\n\n }", "public function indexAction()\n {\n\n }", "public function indexAction()\n {\n\n }", "public function indexAction()\n {\n\n }", "public function indexAction()\n {\n \n }", "public function indexAction()\n {\n \n }", "public function indexAction()\n {\n }", "public function indexAction()\n {\n }", "public function indexAction()\n {\n }", "public function indexAction()\n {\n }", "public function indexAction()\n {\n }", "public function indexAction()\n {\n }", "public function requestAction()\n {\n }", "public function indexAction() {\r\n }", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {\n\n\n\n\n }", "public function indexAction() {\n \n }", "public function indexAction() {\n\n }", "public function indexAction() {\n\n }", "public function indexAction()\n\t{\n\n\t}", "public function indexAction() {\n }", "public function indexAction() {\n }", "public function indexAction(){\r\n\t\t\t\r\n\t\t}", "protected function indexAction()\n {\n }", "public function actionView()\n {\n \n }", "public function indexAction()\n {}", "public function indexAction(){\t\t\n\t}", "protected function viewAction()\n {\n }", "public function indexAction(){}", "public function indexAction() {\n\t}", "public function indexAction() {\n\t}", "public function indexAction() {\n\n\t}", "public function actionView() {}", "public function actionView() {}", "public function contactController()\n\t{\n\t}", "public function listAction()\n {\n // some logic\n }", "public function indexAction(){\n\n}", "public function getControllerAction() {}", "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 }", "public function indexAction()\n {\n // action body\n }", "public function run()\n \t{\n \t\t$controller = $this->factoryController();\n\n \t\t$action = $this->_currentAction;\n\n \t\t$controller->$action();\n \t}", "public function indexAction() {\n ;\n }", "protected function callActionMethod() {}", "public function singleIndexAction() {}", "public function indexAction()\n {\n\n \n }", "public function AController() {\r\n\t}", "abstract public function getControllerAction();", "public function GetControllerAction ();", "protected static function runController()\n {\n $msg = new MoovicoRequestMessage(self::$route);\n self::$response = self::doRunController($msg);\n }", "public function showAction(){\n\n }", "private function _callControllerMethod()\r\n {\r\n \r\n \r\n $length = count($this->_url);\r\n if($length > 1)\r\n {\r\n if(!method_exists($this->_controller, $this->_url[1]))\r\n {\r\n $this->_error();\r\n }\r\n }\r\n switch ($length) {\r\n case 5:\r\n //controller->method(param1,param2,param3)\r\n $this->_controller->{$this->_url[1]}($this->_url[2],$this->_url[3],$this->_url[4]);\r\n break;\r\n case 4:\r\n //controller->method(param1,param2)\r\n $this->_controller->{$this->_url[1]}($this->_url[2],$this->_url[3]);\r\n\r\n break;\r\n case 3:\r\n //controller->method(param1)\r\n $this->_controller->{$this->_url[1]}($this->_url[2]);\r\n\r\n break;\r\n case 2:\r\n\r\n //controller->method(param1,param2,param3)\r\n $this->_controller->{$this->_url[1]}();\r\n break;\r\n \r\n default:\r\n $this->_controller->index();\r\n break;\r\n }\r\n\r\n }", "public final function run()\n\t{\n\t\t$controllerClass = ucfirst(App::request()->getControllerName());\n\t\t$actionName = App::request()->getActionName().Request::ACTION_SUFFIX;\n\n\t\t$this->_execute($controllerClass, $actionName);\n\t}", "function Controller()\n\t{\t\t\n\t\t$this->method = \"showView\";\n\t\tif (array_key_exists(\"method\", $_REQUEST))\n\t\t\t$this->method = $_REQUEST[\"method\"];\n\t\t\t\t\n\t\t$this->icfTemplating = new IcfTemplating();\n\t\t$this->tpl =& $this->icfTemplating->getTpl();\n\t\t$this->text =& $this->icfTemplating->getText();\t\t\n\t\t$this->controllerMessageArray = array();\n\t\t$this->pageTitle = \"\";\n\t\t$this->dateFormat = DateFormatFactory::getDateFormat();\n\t\t$this->controllerData =& $this->newControllerData();\n\t}", "private function _callControllerMethod()\n {\n $length = count($this->_url);\n\n // Make sure the method we are calling exists\n if ($length > 1) {\n if (!method_exists($this->_controller, $this->_url[1])) {\n //! error\n }\n }\n //var_dump($this->_controller);\n // Determine what to load\n switch ($length) {\n /*case 3:\n //Controller->Method(Param1, Param2)\n $this->_controller->{$this->_url[1]}($this->_url[2]);\n break;\n*/\n case 2:\n //Controller->Method(Param1, Param2)\n //$this->_controller->{$this->_url[1]}();\n $this->_controller->index($this->_url[1]);\n break;\n\n default:\n $this->_controller->index();\n break;\n }\n }", "public function action_index()\n {\n }", "private function callControllerMethod() {\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (isset($this->url[1])) {\r\n\t\t\t\tif (method_exists($this->controller, $this->url[1])) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$parameters = array();\r\n\t\t\t\t\tfor ($i = 2; $i < count($this->url); $i++)\r\n\t\t\t\t\t\tarray_push($parameters, $this->url[$i]);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t$countParam = count($parameters);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($countParam == 0)\r\n\t\t\t\t\t\t$this->controller->{$this->url[1]}();\r\n\t\t\t\t\telse if ($countParam == 1)\r\n\t\t\t\t\t\t$this->controller->{$this->url[1]}($parameters[0]);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$this->controller->{$this->url[1]}($parameters);\r\n\t\t\t\t\t\t\r\n\t\t\t\t} else { //Method not found.\r\n\t\t\t\t\t$this->error();\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t} else { //No method is specified.\r\n\t\t\t\t$this->controller->index(); \r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t} catch (QueryException $e) {\r\n\t\t\t$this->error($e->getMessage() . \" ( \" . $e->getFile() . \": line \" . $e->getLine() . \")\");\r\n\t\t\t\r\n\t\t} catch (Exception $e) {\r\n\t\t\t$msg = $e->getMessage();\r\n\t\t\tif ($msg == \"\")\r\n\t\t\t\t$msg = \"An error occuring during execution\";\r\n\t\t\t\r\n\t\t\t$this->error($msg . \" ( \" . $e->getFile() . \": line \" . $e->getLine() . \")\");\r\n\t\t}\r\n\t}", "public function getController( );", "public function index()\n\t{\t\n\t}", "public function routeController()\n { }", "function Execute()\n\t\t{\n\t\t\t$controller = new $this->CONTROLLER();\n\t\t\t$controller->Initialise($this->get, $this->post, $this->files);\n\t\t\t$controller->StartFilters();\n\t\t\t$controller->{$this->ACTION}();\n\t\t\t$controller->StopFilters();\n\t\t}", "public function run() \n\t{\n\t\tcall_user_func_array(array(new $this->controller, $this->action), $this->params);\t\t\n\t}", "public function run()\n {\n if (isset($_SERVER[\"PATH_INFO\"]))\n {\n $requestPath = $_SERVER[\"PATH_INFO\"];\n }\n else\n {\n $requestPath =\"/\";\n }\n\n $router = Router::getInstance();\n $requestRoute = $router->getRoute($requestPath);\n\n $controllerName=$requestRoute[\"controller\"].\"Controller\";\n $controller = new $controllerName();\n $methodName=$requestRoute[\"method\"].\"Action\";\n\n if (method_exists($controller, $methodName))\n {\n $this->viewData = array_merge($this->viewData, (array)$controller->$methodName());\n $this->renderResponse();\n }\n else\n {\n throw new ErrorException(\"methode \\\" $methodName\\\" inconnue dans \\\" $controllerName\\\"\") ;\n }\n\n\n }", "public function action() {\n // $this->view->page();\n }", "public function actionIndex()\n {\n\n }", "public function index()\n {\t\t\n \n }", "public function index()\n {\t\t\n \n }", "public function & GetController ();", "public function index()\r\n {\r\n \r\n }", "public function index()\r\n {\r\n \r\n }", "public function index()\r\n {\r\n \r\n }", "public function actionIndex() {}", "public function actionIndex() {}", "public function run()\n\t\t{\n\t\t\tswitch ($_GET['act']) {\n\t\t\t\tcase 'create':\n\t\t\t\t\t//Crear\n\t\t\t\t\tif(BaseCtrl::isAdmin())\n\t\t\t\t\t\t$this->create();\n\t\t\t\t\telse{\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>NO_PERMITIDO,'data'=>NULL,'mensaje'=>'No tienes permisos suficientes'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//CARGAR VISTA DE NO PERMITIDO\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'lists':\n\t\t\t\t\t//Listar \n\t\t\t\t\t$this->lists();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'listsDetails':\n\t\t\t\t\t//Crear \n\t\t\t\t\t$this->listsDetails();\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'get':\n\t\t\t\t\t//Obtener una Recepcion\n\t\t\t\t\t$this->getRecepcion();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'getFolio':\n\t\t\t\t\t$this->getFolio();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\techo $this->json_encode(array('error'=>SERVICIO_INEXISTENTE,'data'=>NULL,'mensaje'=>'Este recepcion no está disponible'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA DE SERVICIO INEXISTENTE\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "function callControllerAction() {\n $santitizedUrl = ''; \n if (!empty($_GET['route'])) {\n $santitizedUrl = trim($_GET['route']);\n }\n\n $route = $this->getMatchingRoute($santitizedUrl);\n if ($route != null) {\n $actionValues = explode('/', ltrim(str_replace($route->getUrl(), '', $santitizedUrl), '/'));\n $controllerName = $route->getControllerName();\n $controllerName = $controllerName . 'Controller'; \n $controller = new $controllerName;\n $action = $route->getActionName();\n $controller->$action($actionValues);\n } else {\n // If we've entered this else section, we've effectively been unable to match\n // the specified url to a registered route. Normally we would throw a 404\n // error and return a user friendly message stating so, however, I'm leaving\n // that as an exersize for the reader\n }\n \n }", "function controller()\n\t\t{\t\n\t\t\t$this->admin_page_header();\n\t\t\t$this->admin_menu();\n\t\t}", "public function action();", "protected function initializeController() {}", "public function index(){\n\t \n\t\t\t\t\t}", "public function Index()\n\t{\t\n\t}", "public function run()\n\t{\n\t\t$_controller = $this->getController();\n\t\t\n\t\tif ( ! ( $_controller instanceof IXLRest ) )\n\t\t{\n\t\t\t$_controller->missingAction( $this->getId() );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\tCall the controllers dispatch method...\n\t\t$_controller->dispatchRequest( $this );\n\t}", "public function index() {\r\n \r\n }", "public function index()\r\n\t{\r\n\t\t\r\n\t}" ]
[ "0.7452228", "0.7194964", "0.7183156", "0.7167601", "0.7166042", "0.71482813", "0.7127504", "0.7127452", "0.7127452", "0.7127452", "0.7127452", "0.7127452", "0.7127452", "0.70873666", "0.70873666", "0.7076862", "0.7076862", "0.7076862", "0.7076862", "0.7076862", "0.7076862", "0.707347", "0.7072096", "0.7065832", "0.7065832", "0.7065832", "0.7065832", "0.7065832", "0.7065832", "0.7065832", "0.7065832", "0.7065832", "0.7064793", "0.7063672", "0.70070535", "0.69827616", "0.6982407", "0.6982407", "0.6971", "0.6957159", "0.6957159", "0.6950415", "0.6924271", "0.6919316", "0.6916635", "0.69155246", "0.69065356", "0.6894362", "0.6890585", "0.6890585", "0.68797016", "0.6867761", "0.6867761", "0.68599284", "0.68262047", "0.680442", "0.6774005", "0.6758645", "0.67103124", "0.6709003", "0.669289", "0.6682495", "0.6675477", "0.6673084", "0.6662119", "0.6648691", "0.6594035", "0.65905434", "0.6582697", "0.65774524", "0.6551181", "0.65456665", "0.6541425", "0.65384734", "0.6528891", "0.6526239", "0.65157706", "0.65134025", "0.6504735", "0.65022594", "0.64993525", "0.6495361", "0.6492251", "0.6491469", "0.6491469", "0.6486258", "0.64786524", "0.64786524", "0.64786524", "0.64663434", "0.64663434", "0.6461475", "0.64595693", "0.64405954", "0.6437794", "0.643055", "0.64215654", "0.64196616", "0.6415789", "0.64156175", "0.64136267" ]
0.0
-1
this is just the same method as in Router.php, with show_404() replaced by $this>error_404();
function _validate_request($segments) { //return parent::_validate_request($segments); $o_segments=$segments; // Does the requested controller exist in the root folder? if (file_exists(APPPATH.'controllers/'.$segments[0].EXT)) { return $segments; } // Is the controller in a sub-folder? if (is_dir(APPPATH.'controllers/'.$segments[0])) { // Set the directory and remove it from the segment array $this->set_directory($segments[0]); $segments = array_slice($segments, 1); //search multi-level deep folders while(count($segments) > 0 && is_dir(APPPATH.'controllers/'.$this->directory.$segments[0])) { echo "X"; // Set the directory and remove it from the segment array $this->set_directory($this->directory . $segments[0]); $segments = array_slice($segments, 1); } if (count($segments) > 0) { // Does the requested controller exist in the sub-folder? if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$segments[0].EXT)) { return parent::_validate_request($o_segments); } } else { $this->set_class($this->default_controller); $this->set_method('index'); // Does the default controller exist in the sub-folder? if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$this->default_controller.EXT)) { $this->directory = ''; return array(); } } return $segments; } // Can't find the requested controller... return $this->error_404(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show404();", "public function Error404() {\n\t\t$this -> Render();\n\t}", "public function Error404()\n\t{\n\t\t$this->Render();\n\t}", "function notfound() {\n\t\t$this->fw->render('404');\n\t}", "private function route_not_found() {\r\n\t\t\t// Also when in debug mode - show comprehensive messages\r\n\t\t\tdie(\"404 Page not found\");\r\n\t\t}", "public function error404()\n {\n $this->whenError();\n $viewData['status'] = 404;\n $viewData['title'] = 'Not Found';\n $viewData['msg'] = 'Sorry but the page you are looking for does not exist, have been removed.';\n\n $this->pageError($viewData);\n }", "public function error404()\n {\n }", "public function force404();", "public function force404();", "static function showError404()\n {\n header(\"HTTP/1.0 404 Not Found\");\n include(\"views/layout/404.php\");\n exit();\n }", "public function handle_404()\n {\n }", "function error_404()\n\t{\n\t\t$this->output->set_status_header('404');\n\t\t$this->template->set_template('error');\n\t\t$this->template->write('title', 'HappyPerks');\n\t\t$data = $this->template->write_view('content', '404/error', isset($data) ? $data : NULL,true);\n\t\tprx($data);\n\t\t// $this->template->render();\n\n\t}", "function show_404() \r\n\t{\r\n\t\t//$this->set_title('Página no encontrada');\r\n\t\t//$this->view('404');\r\n\t\t$this->CI->output->set_status_header('404');\r\n\t\t//$this->CI->load->view('errors/404');\r\n\t\tshow_404($this->CI->uri->uri_string());\r\n\t}", "public function show_404() \n\t{\n\t\trequire $this->load->view('404', 'error');\n\t\texit;\n\t}", "public function show_404()\r\n\t{\r\n\t\t$this->CI =& get_instance();\r\n\t\techo $this->CI->template->load_page('_errors/error_404', array(), true, false);\r\n\t\texit;\r\n\t}", "public function show404() {\n\t\t$heading = '404 Страница не найдена';\n\t\t$message = 'Запрошенная страница не найдена.';\n\t\tExceptions::showError($heading, $message, 'error404', 404);\n\t\texit;\n\t}", "function show_404($page = '', $log_error = TRUE)\n\t{\n\t\t// Load Router and Core classes.\n \t$RTR =& load_class('Router', 'core');\n\n \t// Redirect to not found\n \theader(\"Location: \" . $RTR->config->config['base_url'] . 'app_access/not_found');\n \texit;\n }", "public static function displayError404() {\n\n\t\t\tself::display('Main/Status/Error404', 'STATUS_TITLE_404', STATUS_CODE_404);\n\t\t}", "function show_404($page = '', $log_error = TRUE) {\n $_error =& load_class('Exceptions', 'core');\n $_error->show_404($page, $log_error);\n exit;\n}", "public static function http404() {\n\t\tself::$global['CONTEXT']=$_SERVER['REQUEST_URI'];\n\t\tself::error(\n\t\t\tself::resolve(self::TEXT_NotFound),404,debug_backtrace(FALSE)\n\t\t);\n\t}", "public function action_404()\n\t{\n\t\t//return Response::forge(ViewModel::forge('welcome/404'), 404);\n\t}", "public function is_404();", "function pageNotFound()\n {\n $this->global['pageTitle'] = 'Garuda Informatics : 404 - Page Not Found';\n \n $this->loadViews(\"404\", $this->global, NULL, NULL);\n }", "private static function pageNotFound()\n {\n if (self::$notFound && is_callable(self::$notFound)) {\n call_user_func(self::$notFound);\n } else {\n header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');\n throw new ExceptionHandler(\"Hata\", \"Controller bulunamadı\");\n }\n }", "public function error404Action()\n\t{\n\t\t$method = '_notFound' . ENVIRONMENT;\n\n\t\t// Try to call the internal method for the environment\n\t\tif (method_exists($this, $method))\n\t\t{\n\t\t\treturn $this->$method();\n\t\t}\n\n\t\t// If the method for the current environment does not exist\n\t\t// We just output the 404 production view :)\n\t\t$this->setViewFileName('Error/404-production');\n\t}", "public function error404()\n\t{\n\t\t//envoie une entête 404 (pour notifier les clients que ça a foiré)\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\tView::show(\"errors/404.php\", \"Oups ! Perdu ?\");\n\t}", "function not_found() {\n\treturn show_template('404');\n}", "function _404() {\n die();\n }", "public function action_404()\n\t{\n\t\t$this->template->title = '404 Not Found';\n\t\t$this->template->header_title = site_title($this->template->title);\n\t\t$this->template->content = View::forge('error/404');\n\t\t$this->response->status = 404;\n\t}", "private function spawn404Error()\n {\n Utils_Request::sendHttpStatusCode(Utils_Request::CLIENT_NOT_FOUND);\n try {\n FrontDispatcher::instance()->setConfig($this->_config)->render('404');\n }\n catch (Exception $e) {\n die('Cannot render 404 page!');\n }\n }", "public function error404() {\n\t\t$this->render('error400');\n\t}", "private function _404error()\n\t{\n\t\trequire $this->_controllerPath.'_404Controller.php';\n\t\t$this->_controller = new _404Controller();\n\t\treturn false;\n\t}", "public function error_404()\n\t{\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\tmeta::set_title('This Page will be Forever Missed');\n\t\t$this->template\n\t\t\t->set('title', 'Missing Page')\n\t\t\t->set('content', View::factory('errors/404'));\n\t}", "function lb_show_404_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'page_404',\n\t\t)\n\t);\n}", "static function show_404($page = '')\n\t{ \t\n\t\tself::initCoreComponent('SHIN_Exceptions');\n\t\tself::$_exceptions->show_404($page);\n\t\texit;\n\t}", "public function action_404()\n\t{\n\t\treturn Response::forge(ViewModel::forge('welcome/404'), 404);\n\t}", "function lb_show_404_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'page-404',\n\t\t)\n\t);\n}", "function p404()\n{\n\thttp_response_code(404);\n\tView\\Json::render(['error'=>'page not found']);\n}", "public function set_404()\n {\n }", "function drupal_fast_404(){}", "public function action_404(){\n\t\t$this->template->title = 'けんさく';\n\t\t$this->template->content = View::forge('util/404');\n\t\t$this->template->breadcrumb = array(array(\"url\" => \"/util/404\", \"name\" => \"404 Not Found\"));\n\t}", "public function error404(){\n\t\t$this->loadErrorView('Cette page n\\'existe pas', 'Error 404', 404); \n\t}", "public static function _notFound() {\n self::response(false)\n ->status(404)\n ->write(\n '<h1>404 Not Found</h1>'.\n '<h3>The page you have requested could not be found.</h3>'.\n str_repeat(' ', 512)\n )\n ->send();\n }", "public function show404()\n {\n header(\"HTTP/1.1 404 Not Found\");\n $this->title .= 'ошибка 404'; \n $this->content = System::template('client/v_404.php');\n }", "public function is_404()\n {\n }", "public function action_404()\r\n\t{\r\n\t\treturn Response::forge(Presenter::forge('welcome/404'), 404);\r\n\t}", "function error_404() {\n header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');\n exit(); //don't do any additional php, we are done\n }", "public function error404(): void {\n $this->template->set( _ROOT_TPL_ . 'error404.html');\n\n $tplVars = [\n 'HDR_ERROR' => $this->locale['ERR_404'], \n 'TXT_ERROR' => $this->locale['TXT_SOMETHING_WRONG']\n ];\n\n $this->template->setVars( $tplVars );\n\n $this->content->html = $this->template->parse();\n }", "function error_404() {\n\t\theader($_SERVER[\"SERVER_PROTOCOL\"] . \" 404 Not Found\");\n\t\texit();\n\t}", "public function action_404()\n\t{\n\t\treturn Response::forge(Presenter::forge('welcome/404'), 404);\n\t}", "public function action_404()\r\n {\r\n return Response::forge(Presenter::forge('welcome/404'), 404);\r\n }", "public function error404Action() \n {\n return '404 Page not found';\n }", "public function pageNotFound404()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'faq');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | 404 Page Not found')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/page_not_found');\n }", "public function action_404() {\n $this->template->content = View :: factory('error/404');\n }", "protected function response_404()\n {\n $this->log->write_log('debug', $this->TAG . ': response_404: ');\n $this->response_error(VALUE_STATUS_CODE_ERROR, 'Page not found / wrong method', 404);\n }", "public function notFound()\n {\n Controller::getController('PageNotFoundController')->run();\n }", "public function NotFound() {\r\n\t\t$this->PrepareController();\r\n\t\t$this->View = 'notfound';\r\n\t\t$this->Render();\r\n }", "function maybe_redirect_404()\n {\n }", "public function notFound()\r\n {\r\n\r\n $this->render('Page Not Found', '404.view');\r\n }", "public function actionNotfound()\n {\n $this->actionSlug = 'notfound';\n $this->actionParams = [];\n $this->breadcrumbs=[];\n $this->beforeAction();\n $this->breadcrumbs[] = ['title' => 404];\n header(\"HTTP/1.x 404 Not Found\");\n header(\"Status: 404 Not Found\");\n echo $this->render('404');\n exit;\n }", "public static function error404() {\n header('This is not the page you are looking for', true, 404);\n $html404 = sprintf(\"<title>Error 404: Not Found</title>\\n\" .\n \"<main><div class=\\\"container\\\"><div class=\\\"row\\\"><div class=\\\"col-lg-10 offset-lg-1\\\">\" .\n \"<div class=\\\"row wow fadeIn\\\" data-wow-delay=\\\"0.4s\\\"><div class=\\\"col-lg-12\\\"><div class=\\\"divider-new\\\">\" .\n \"<h2 class=\\\"h2-responsive\\\">Error 404</h2>\" .\n \"</div></div>\" .\n \"<div class=\\\"col-lg-12 text-center\\\">\" .\n \"<p>The page <i>%s</i> does not exist.</p>\" .\n \"</div></div></div></div></div></main>\", $_SERVER[\"REQUEST_URI\"]);\n echo $html404;\n }", "public function Error()\r\n\t{\r\n\r\n $this->load->view('404');\r\n\r\n\t}", "public function nf404()\n {\n return view('main.404');\n }", "public function RenderError404PlainText ();", "public function show404() {\n header(\"HTTP/1.0 404 Not Found\");\n throw new Exception('404 Not Found');\n }", "public function indexAction(){\n $this->view->render('404');\n\t}", "public function notFound()\n {\n http_response_code(404);\n error_log('404 page not found: '.$this->getRequest());\n kodexy()->loadView('system/notFound');\n $this->completeRequest();\n }", "public static function ErrorPage404()\n {\n header('HTTP/1.1 404 Not Found');\n header(\"Status: 404 Not Found\");\n header('Location: '.$_SERVER['HTTP_HOST'].'404');\n }", "public function _remap () {\n show_404();\n }", "public static function respond404()\n {\n header($_SERVER['SERVER_PROTOCOL'].\" 404 Not Found\", true, 404); //.replace = true\n $view = new NWTemplate();\n $view->display('404.tpl');\n }", "function page_not_found()\n{\n header(\"HTTP/1.0 404 Not Found\");\n include __DIR__ . \"/../view/404.php\";\n die();\n}", "function notFound()\n{\n error404('<h1>404 Not Found</h1>The page that you have requested could not be found.');\n}", "public function notFoundPageHandler() {\n $valid = true;\n $url_route = !empty($this->request->get['_route_']) ? $this->request->get['_route_'] : '';\n\n // Check non alias\n $url_base = $this->request->server['HTTPS'] ? $this->config->get('config_ssl') : $this->config->get('config_url');\n $url_request = ($this->request->server['HTTPS'] ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n if (!$url_route) {\n $url_route = urldecode(str_replace($url_base, '', $url_request));\n }\n\n\n // Blacklist 404 that start with this word\n $blacklist = array('admin/', 'asset/', 'assets/', 'image/', 'cache/', 'view/');\n foreach ($blacklist as $block) {\n if (strpos($url_route, $block) !== false) {\n $valid = false;\n break;\n }\n }\n\n if ($valid) {\n $route = $this->{$this->callModel}->MissingPageWorker($url_route, $this->storeId);\n\n if ($route) {\n // Info: Chrome and Firefox cache a 301 redirect with no expiry date\n $this->response->redirect($url_base . ltrim($route, '/'), 301);\n }\n }\n }", "public function ooops()\r\n\t{\r\n\t\t$this->template->view('utilities/404.php');\r\n\t}", "private function notFound()\n {\n $this->method = 'error404';\n header('X-PHP-Response-Code: 404', true, 404);\n }", "public function render404(): void\n {\n header('HTTP/1.0 404 Not Found');\n header('Location: /404');\n die();\n }", "public function handler404()\n {\n $this->getResponse()->setStatusCode(404);\n return;\n }", "public static function error404()\r\n\t{\r\n\t\theader(\"HTTP/1.1 404 Not Found\");\r\n\t\theader(\"Status: 404 Not Found\");\r\n\t\texit();\r\n\t}", "public function my404() {\n $is_backend = 0;\n $show_header = 1;\n if(superadmin_logged_in() && $this->uri->segment(1) =='backend') {\n $is_backend = 1;\n $show_header = 0;\n }\n $this->output->set_status_header('404'); \n $data['title'] = 'Page Not Found';\n $data['show_header'] = $show_header;\n $data['template'] = 'frontend/my404';\n if($is_backend) {\n $this->load->view('template/backend/superadmin_template',$data);\n }\n else {\n $this->load->view('template/frontend/template',$data);\n }\n }", "function render404() {\r\n header(\"HTTP/1.0 404 Not Found\");\r\n echo \"Seite nicht gefunden!\";\r\n exit();\r\n }", "private function pageNotFound()\n {\n $this->theme->setTitle(\"Sidan saknas\");\n $this->views->add('error/404', [\n 'title' => 'Sidan saknas',\n ], 'main-wide');\n }", "public function notFound()\n {\n }", "public function notfoundAction()\n {\n $this->render('error/notfound');\n }", "public function redirect404(){\n\n\t\t$this->page = new PageGenerator($this->app);\n\t\t$this->page->setContentFile(__DIR__ . '/../Errors/404');\n\t\t\n\t\t$this->addHeader('HTTP/1.0 404 Not Found');\n\t\t\n\t\t$this->send();\n\t\t\n\t}", "public function page404() {\n\n view('pages.404');\n\n }", "function myNotFound()\n{\n global $app, $globalSettings;\n $app->render('error.html', [\n 'page' => mkPage(getMessageString('not_found1')),\n 'title' => getMessageString('not_found1'),\n 'error' => getMessageString('not_found2')]);\n}", "public static function error404(){\n \t\t// header(\"Status: 404 Not Found\");\n \t\theader('Location: /');\n }", "function display404()\n{\n global $page, $uri, $version, $baseRoot, $domain, $langue, $trad, $accepted_lang, $title_page, $desc_page, $share_img, $userfileRoot, $id_tracker, $analytics_label;\n $section = '404';\n header(\"HTTP/1.0 404 Not Found\"); \n include('includes/header.php');\n include('pages/404.php');\n include('includes/footer.php');\n exit();\n}", "public function notFound() {\n\t\t\theader('HTTP/1.0 404 Not Found');\n\t\t\t$this->render('error/404.twig.html');\n\t\t}", "function page_404(){\n$content = array(\n\t\t\t\t 'contents' => buddyexpressdesk_print('page:notfound:msg'),\n\t\t\t\t 'title' => buddyexpressdesk_print('page:notfound:code'),\n\t\t\t);\nreturn buddyexpressdesk_view_page(buddyexpressdesk_print('site:home'), buddyexpressdesk_layout_view('page_article', $content));\n}", "public function throw404()\n\t{\n\t\t// Change WP Query\n\t\tglobal $wp_query;\n\t\t$wp_query->set_404();\n\t\tstatus_header(404);\n\n\t\t// Disable that pesky Admin Bar\n\t\tadd_filter('show_admin_bar', '__return_false', 900); \n\t\tremove_action( 'admin_footer', 'wp_admin_bar_render', 10); \n\t\tremove_action('wp_head', 'wp_admin_bar_header', 10);\n\t\tremove_action('wp_head', '_admin_bar_bump_cb', 10);\n\t\twp_dequeue_script( 'admin-bar' );\n\t\twp_dequeue_style( 'admin-bar' );\n\n\t\t// Template\n\t\t$four_tpl = apply_filters('LD_404', get_404_template());\n\n\t\t// Handle the admin bar\n\t\t@define('APP_REQUEST', TRUE);\n\t\t@define('DOING_AJAX', TRUE);\n\t\t\n\t\tif ( empty($four_tpl) OR ! file_exists($four_tpl) )\n\t\t{\n\t\t\t// We're gonna try and get TwentyTen's one\n\t\t\t$twenty_ten_tpl = apply_filters('LD_404_FALLBACK', WP_CONTENT_DIR . '/themes/twentyfourteen/404.php');\n\t\t\t\n\t\t\tif (file_exists($twenty_ten_tpl))\n\t\t\t\trequire($twenty_ten_tpl);\n\t\t\telse\n\t\t\t\twp_die('404 - File not found!', '', array('response' => 404));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Their theme has a template!\n\t\t\trequire( $four_tpl );\n\t\t}\n\t\t\n\t\t// Either way, it's gonna stop right here.\n\t\texit;\n\t}", "public function Page404(){\n\t\t$data = array(\n\t\t\t'aplikasi'\t\t=> $this->app_name,\n\t\t\t'title_page' \t=> 'Page 404',\n\t\t\t'title' \t\t=> '',\n\t\t\t// 'c'\t\t\t\t=> $c\n\t\t);\n\t\t$this->load->view('layout/V_404', $data);\n\t}", "function sysError404(){\n\tsysError( \"Please check the address and try again.\", \"The page you requested was not found.\", \"Page Not Found\" );\t\n\texit();\n}", "public function notFound(){\n \n View::renderTemplate('pageNotFound.html');\n \n }", "public function actionError()\n\t{\n\t\tif($error = Yii::app()->errorHandler->error)\n\t\t{\n if($error['code']==404)\n\t\t\t$this->render('pages/404');\n else\n $this->redirect('/');\n\t\t}\n\t}", "static function http404()\n {\n header('HTTP/1.1 404 Not Found');\n exit;\n }", "public function for_404() {\n\t\t$indexable = $this->repository->find_for_system_page( '404' );\n\n\t\tif ( ! $indexable ) {\n\t\t\treturn false;\n\t\t}\n\n\n\t\treturn $this->build_meta( $this->context_memoizer->get( $indexable, 'Error_Page' ) );\n\t}", "protected function redirectNotFound()\n {\n return Response::view('errors.404', array('pageTitle'=> Lang::get('messages.Error')), 404);\n }", "public static function show_404($message = '')\n {\n $response = static::page_404($message);\n $response->process();\n }", "function show_404() {\n\t\tredirect( 'users', 'location' );\n\t\texit();\n\t}", "public function errorAction() {\n\t\tZend_Layout::getMvcInstance ()->setLayout ( \"light\" );\n\t\t$errors = $this->_getParam ( 'error_handler' );\n\t\tif ($errors->exception->getCode () == 404 || in_array ( $errors->type, array (\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE,\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER,\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION \n\t\t) )) {\n\t\t\t$this->getResponse ()->setHttpResponseCode ( 404 );\n\t\t\t$this->_helper->viewRenderer ( '404' );\n\t\t}\n\t\t\n\t\t\n\t\t$this->view->content = $errors->exception->getMessage ();\n\t}" ]
[ "0.841485", "0.81049204", "0.7965665", "0.79397845", "0.7917678", "0.7912211", "0.7893199", "0.78261954", "0.78261954", "0.7819912", "0.7810099", "0.7810018", "0.77717143", "0.7755731", "0.7754626", "0.77360284", "0.77076334", "0.77025104", "0.7658947", "0.7653913", "0.7644243", "0.7636081", "0.7610445", "0.7599049", "0.7586688", "0.7584946", "0.7573863", "0.7560291", "0.754814", "0.75447774", "0.7517801", "0.75174606", "0.7515678", "0.7515031", "0.75025576", "0.7500561", "0.74915546", "0.7482521", "0.74687433", "0.7462825", "0.74532306", "0.7451311", "0.7450218", "0.7446225", "0.74457085", "0.74363285", "0.7428306", "0.7424473", "0.7423644", "0.74104923", "0.7407357", "0.7395676", "0.73797387", "0.73675823", "0.73670405", "0.7354088", "0.73505247", "0.7348195", "0.7326419", "0.7320518", "0.7313337", "0.72986984", "0.7296", "0.7294076", "0.72843975", "0.7278964", "0.72472346", "0.72464836", "0.7239345", "0.7236251", "0.72341913", "0.7233628", "0.7222522", "0.7222", "0.7220523", "0.72063047", "0.7202678", "0.7198114", "0.719417", "0.71827203", "0.7166092", "0.7153213", "0.71496105", "0.7149404", "0.71443397", "0.7141509", "0.7141036", "0.7124933", "0.7121918", "0.71195495", "0.7116415", "0.71112263", "0.7099079", "0.7094073", "0.7060756", "0.7059089", "0.7048095", "0.7041463", "0.70355886", "0.7030601", "0.70279664" ]
0.0
-1
Validate the Font Awesome power transforms.
public static function validatePowerTransforms($element, FormStateInterface $form_state) { $values = $form_state->getValue($element['#parents']); if (!empty($values['type']) && empty($values['value'])) { $form_state->setError($element, t('Missing value for Font Awesome Power Transform %value. Please see @iconLink for information on correct values.', [ '%value' => $values['type'], '@iconLink' => Link::fromTextAndUrl(t('the Font Awesome icon list'), Url::fromUri('https://fontawesome.com/how-to-use/svg-with-js'))->toString(), ])); } elseif (empty($values['type']) && !empty($values['value'])) { $form_state->setError($element, t('Missing type value for Font Awesome Power Transform. Please see @iconLink for information on correct values.', [ '@iconLink' => Link::fromTextAndUrl(t('the Font Awesome icon list'), Url::fromUri('https://fontawesome.com/how-to-use/svg-with-js'))->toString(), ])); } if (!empty($values['value']) && !is_numeric($values['value'])) { $form_state->setError($element, t("Invalid value for Font Awesome Power Transform %value. Please see @iconLink for information on correct values.", [ '%value' => $values['type'], '@iconLink' => Link::fromTextAndUrl(t('the Font Awesome icon list'), Url::fromUri('https://fontawesome.com/how-to-use/svg-with-js'))->toString(), ])); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isXfaForm() {}", "public static function validateIconName($element, FormStateInterface $form_state) {\n // Load the configuration settings.\n $configuration_settings = \\Drupal::config('fontawesome.settings');\n // Check if we need to bypass.\n if ($configuration_settings->get('bypass_validation')) {\n return;\n }\n\n $value = $element['#value'];\n if (strlen($value) == 0) {\n $form_state->setValueForElement($element, '');\n return;\n }\n\n // Load the icon data so we can check for a valid icon.\n $iconData = \\Drupal::service('fontawesome.font_awesome_manager')->getIconMetadata($value);\n\n if (!isset($iconData['name'])) {\n $form_state->setError($element, t(\"Invalid icon name %value. Please see @iconLink for correct icon names, or turn off validation in the Font Awesome settings if you are trying to use custom icon names.\", [\n '%value' => $value,\n '@iconLink' => Link::fromTextAndUrl(t('the Font Awesome icon list'), Url::fromUri('https://fontawesome.com/icons'))->toString(),\n ]));\n }\n }", "function check_fa4_styles() {\n\n\t\tglobal $wp_styles;\n\t\tforeach ( $wp_styles->queue as $style ) {\n\t\t\tif ( strstr( $wp_styles->registered[ $style ]->src, 'font-awesome.min.css' ) ) {\n\t\t\t\tupdate_option( 'hestia_load_shim', 'yes' );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function enqueue_font_awesome() {\n\t\tglobal $hestia_load_fa;\n\n\t\tif ( $hestia_load_fa !== true ) {\n\t\t\treturn false;\n\t\t}\n\n\t\twp_enqueue_style( 'font-awesome-5-all', get_template_directory_uri() . '/assets/font-awesome/css/all.min.css', array(), HESTIA_VENDOR_VERSION );\n\t\tif ( $this->should_load_shim() ) {\n\t\t\twp_enqueue_style( 'font-awesome-4-shim', get_template_directory_uri() . '/assets/font-awesome/css/v4-shims.min.css', array(), HESTIA_VENDOR_VERSION );\n\t\t}\n\n\t\treturn true;\n\t}", "function gotravel_mikado_is_font_option_valid($option_name) {\n\t\treturn $option_name !== '-1' && $option_name !== '';\n\t}", "function TS_VCSC_IconFontsRequired() {\r\n\t\t\tif (($this->TS_VCSC_PluginFontSummary == \"true\") || ($this->TS_VCSC_VisualComposer_Loading == \"true\") || ($this->TS_VCSC_VCFrontEditMode == \"true\") || ($this->TS_VCSC_Icons_Compliant_Loading == \"true\") || ($this->TS_VCSC_IconicumMenuGenerator == \"true\")) {\r\n\t\t\t\t$this->TS_VCSC_IconFontsArrays(false);\r\n\t\t\t}\r\n\t\t}", "function maybe_enqueue_font_awesome( $field )\n\t{\n\t\tif( 'font-awesome' == $field['type'] && $field['enqueue_fa'] ) {\n\t\t\tadd_action( 'wp_footer', array( $this, 'frontend_enqueue_scripts' ) );\n\t\t}\n\n\t\treturn $field;\n\t}", "protected function isTrueTypeFontWorking() {}", "public static function fontawesome_bwc($icon){\n $old_to_new = array(\n 'address-book-o' => 'address-book', 'address-card-o' => 'address-card', 'area-chart' => 'chart-area', 'arrow-circle-o-down' => 'arrow-alt-circle-down', 'arrow-circle-o-left' => 'arrow-alt-circle-left', 'arrow-circle-o-right' => 'arrow-alt-circle-right', 'arrow-circle-o-up' => 'arrow-alt-circle-up', 'arrows' => 'arrows-alt', 'arrows-alt' => 'expand-arrows-alt', 'arrows-h' => 'arrows-alt-h', 'arrows-v' => 'arrows-alt-v', 'asl-interpreting' => 'american-sign-language-interpreting', 'automobile' => 'car', 'bank' => 'university', 'bar-chart' => 'chart-bar', 'bar-chart-o' => 'chart-bar', 'bathtub' => 'bath', 'battery' => 'battery-full', 'battery-0' => 'battery-empty', 'battery-1' => 'battery-quarter', 'battery-2' => 'battery-half', 'battery-3' => 'battery-three-quarters', 'battery-4' => 'battery-full', 'bell-o' => 'bell', 'bell-slash-o' => 'bell-slash', 'bitbucket-square' => 'bitbucket', 'bitcoin' => 'btc', 'bookmark-o' => 'bookmark', 'building-o' => 'building', 'cab' => 'taxi', 'calendar' => 'calendar-alt', 'calendar-check-o' => 'calendar-check', 'calendar-minus-o' => 'calendar-minus', 'calendar-o' => 'calendar', 'calendar-plus-o' => 'calendar-plus', 'calendar-times-o' => 'calendar-times', 'caret-square-o-down' => 'caret-square-down', 'caret-square-o-left' => 'caret-square-left', 'caret-square-o-right' => 'caret-square-right', 'caret-square-o-up' => 'caret-square-up', 'cc' => 'closed-captioning', 'chain' => 'link', 'chain-broken' => 'unlink', 'check-circle-o' => 'check-circle', 'check-square-o' => 'check-square', 'circle-o' => 'circle', 'circle-o-notch' => 'circle-notch', 'circle-thin' => 'circle', 'clock-o' => 'clock', 'close' => 'times', 'cloud-download' => 'cloud-download-alt', 'cloud-upload' => 'cloud-upload-alt', 'cny' => 'yen-sign', 'code-fork' => 'code-branch', 'comment-o' => 'comment', 'commenting' => 'comment-dots', 'commenting-o' => 'comment-dots', 'comments-o' => 'comments', 'credit-card-alt' => 'credit-card', 'cutlery' => 'utensils', 'dashboard' => 'tachometer-alt', 'deafness' => 'deaf', 'dedent' => 'outdent', 'diamond' => 'gem', 'dollar' => 'dollar-sign', 'dot-circle-o' => 'dot-circle', 'drivers-license' => 'id-card', 'drivers-license-o' => 'id-card', 'eercast' => 'sellcast', 'envelope-o' => 'envelope', 'envelope-open-o' => 'envelope-open', 'eur' => 'euro-sign', 'euro' => 'euro-sign', 'exchange' => 'exchange-alt', 'external-link' => 'external-link-alt', 'external-link-square' => 'external-link-square-alt', 'eyedropper' => 'eye-dropper', 'fa' => 'font-awesome', 'facebook' => 'facebook-f', 'facebook-official' => 'facebook', 'feed' => 'rss', 'file-archive-o' => 'file-archive', 'file-audio-o' => 'file-audio', 'file-code-o' => 'file-code', 'file-excel-o' => 'file-excel', 'file-image-o' => 'file-image', 'file-movie-o' => 'file-video', 'file-o' => 'file', 'file-pdf-o' => 'file-pdf', 'file-photo-o' => 'file-image', 'file-picture-o' => 'file-image', 'file-powerpoint-o' => 'file-powerpoint', 'file-sound-o' => 'file-audio', 'file-text' => 'file-alt', 'file-text-o' => 'file-alt', 'file-video-o' => 'file-video', 'file-word-o' => 'file-word', 'file-zip-o' => 'file-archive', 'files-o' => 'copy', 'flag-o' => 'flag', 'flash' => 'bolt', 'floppy-o' => 'save', 'folder-o' => 'folder', 'folder-open-o' => 'folder-open', 'frown-o' => 'frown', 'futbol-o' => 'futbol', 'gbp' => 'pound-sign', 'ge' => 'empire', 'gear' => 'cog', 'gears' => 'cogs', 'gittip' => 'gratipay', 'glass' => 'glass-martini', 'google-plus' => 'google-plus-g', 'google-plus-circle' => 'google-plus', 'google-plus-official' => 'google-plus', 'group' => 'users', 'hand-grab-o' => 'hand-rock', 'hand-lizard-o' => 'hand-lizard', 'hand-o-down' => 'hand-point-down', 'hand-o-left' => 'hand-point-left', 'hand-o-right' => 'hand-point-right', 'hand-o-up' => 'hand-point-up', 'hand-paper-o' => 'hand-paper', 'hand-peace-o' => 'hand-peace', 'hand-pointer-o' => 'hand-pointer', 'hand-rock-o' => 'hand-rock', 'hand-scissors-o' => 'hand-scissors', 'hand-spock-o' => 'hand-spock', 'hand-stop-o' => 'hand-paper', 'handshake-o' => 'handshake', 'hard-of-hearing' => 'deaf', 'hdd-o' => 'hdd', 'header' => 'heading', 'heart-o' => 'heart', 'hospital-o' => 'hospital', 'hotel' => 'bed', 'hourglass-1' => 'hourglass-start', 'hourglass-2' => 'hourglass-half', 'hourglass-3' => 'hourglass-end', 'hourglass-o' => 'hourglass', 'id-card-o' => 'id-card', 'ils' => 'shekel-sign', 'inr' => 'rupee-sign', 'institution' => 'university', 'intersex' => 'transgender', 'jpy' => 'yen-sign', 'keyboard-o' => 'keyboard', 'krw' => 'won-sign', 'legal' => 'gavel', 'lemon-o' => 'lemon', 'level-down' => 'level-down-alt', 'level-up' => 'level-up-alt', 'life-bouy' => 'life-ring', 'life-buoy' => 'life-ring', 'life-saver' => 'life-ring', 'lightbulb-o' => 'lightbulb', 'line-chart' => 'chart-line', 'linkedin' => 'linkedin-in', 'linkedin-square' => 'linkedin', 'long-arrow-down' => 'long-arrow-alt-down', 'long-arrow-left' => 'long-arrow-alt-left', 'long-arrow-right' => 'long-arrow-alt-right', 'long-arrow-up' => 'long-arrow-alt-up', 'mail-forward' => 'share', 'mail-reply' => 'reply', 'mail-reply-all' => 'reply-all', 'map-marker' => 'map-marker-alt', 'map-o' => 'map', 'meanpath' => 'font-awesome', 'meh-o' => 'meh', 'minus-square-o' => 'minus-square', 'mobile' => 'mobile-alt', 'mobile-phone' => 'mobile-alt', 'money' => 'money-bill-alt', 'moon-o' => 'moon', 'mortar-board' => 'graduation-cap', 'navicon' => 'bars', 'newspaper-o' => 'newspaper', 'paper-plane-o' => 'paper-plane', 'paste' => 'clipboard', 'pause-circle-o' => 'pause-circle', 'pencil' => 'pencil-alt', 'pencil-square' => 'pen-square', 'pencil-square-o' => 'edit', 'photo' => 'image', 'picture-o' => 'image', 'pie-chart' => 'chart-pie', 'play-circle-o' => 'play-circle', 'plus-square-o' => 'plus-square', 'question-circle-o' => 'question-circle', 'ra' => 'rebel', 'refresh' => 'sync', 'remove' => 'times', 'reorder' => 'bars', 'repeat' => 'redo', 'resistance' => 'rebel', 'rmb' => 'yen-sign', 'rotate-left' => 'undo', 'rotate-right' => 'redo', 'rouble' => 'ruble-sign', 'rub' => 'ruble-sign', 'ruble' => 'ruble-sign', 'rupee' => 'rupee-sign', 's15' => 'bath', 'scissors' => 'cut', 'send' => 'paper-plane', 'send-o' => 'paper-plane', 'share-square-o' => 'share-square', 'shekel' => 'shekel-sign', 'sheqel' => 'shekel-sign', 'shield' => 'shield-alt', 'sign-in' => 'sign-in-alt', 'sign-out' => 'sign-out-alt', 'signing' => 'sign-language', 'sliders' => 'sliders-h', 'smile-o' => 'smile', 'snowflake-o' => 'snowflake', 'soccer-ball-o' => 'futbol', 'sort-alpha-asc' => 'sort-alpha-down', 'sort-alpha-desc' => 'sort-alpha-up', 'sort-amount-asc' => 'sort-amount-down', 'sort-amount-desc' => 'sort-amount-up', 'sort-asc' => 'sort-up', 'sort-desc' => 'sort-down', 'sort-numeric-asc' => 'sort-numeric-down', 'sort-numeric-desc' => 'sort-numeric-up', 'spoon' => 'utensil-spoon', 'square-o' => 'square', 'star-half-empty' => 'star-half', 'star-half-full' => 'star-half', 'star-half-o' => 'star-half', 'star-o' => 'star', 'sticky-note-o' => 'sticky-note', 'stop-circle-o' => 'stop-circle', 'sun-o' => 'sun', 'support' => 'life-ring', 'tablet' => 'tablet-alt', 'tachometer' => 'tachometer-alt', 'television' => 'tv', 'thermometer' => 'thermometer-full', 'thermometer-0' => 'thermometer-empty', 'thermometer-1' => 'thermometer-quarter', 'thermometer-2' => 'thermometer-half', 'thermometer-3' => 'thermometer-three-quarters', 'thermometer-4' => 'thermometer-full', 'thumb-tack' => 'thumbtack', 'thumbs-o-down' => 'thumbs-down', 'thumbs-o-up' => 'thumbs-up', 'ticket' => 'ticket-alt', 'times-circle-o' => 'times-circle', 'times-rectangle' => 'window-close', 'times-rectangle-o' => 'window-close', 'toggle-down' => 'caret-square-down', 'toggle-left' => 'caret-square-left', 'toggle-right' => 'caret-square-right', 'toggle-up' => 'caret-square-up', 'trash' => 'trash-alt', 'trash-o' => 'trash-alt', 'try' => 'lira-sign', 'turkish-lira' => 'lira-sign', 'unsorted' => 'sort', 'usd' => 'dollar-sign', 'user-circle-o' => 'user-circle', 'user-o' => 'user', 'vcard' => 'address-card', 'vcard-o' => 'address-card', 'video-camera' => 'video', 'vimeo' => 'vimeo-v', 'volume-control-phone' => 'phone-volume', 'warning' => 'exclamation-triangle', 'wechat' => 'weixin', 'wheelchair-alt' => 'accessible-icon', 'window-close-o' => 'window-close', 'won' => 'won-sign', 'y-combinator-square' => 'hacker-news', 'yc' => 'y-combinator', 'yc-square' => 'hacker-news', 'yen' => 'yen-sign', 'youtube-play' => 'youtube',\n );\n // Return new if found\n if(isset($old_to_new[$icon])){\n return $old_to_new[$icon];\n } \n // Otherwise just return original\n return $icon;\n }", "function demo_plugin_font_awesome() {\n\t\twp_enqueue_style( 'load-fa', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css' );\n\t\twp_enqueue_style( 'load-select2-css', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/css/select2.min.css' );\n\t\twp_enqueue_script( 'load-select2-js', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.min.js' );\n\t\twp_enqueue_style( 'load-datatables-css', 'https://cdn.datatables.net/1.10.16/css/jquery.dataTables.css' );\n\t\twp_enqueue_script( 'load-datatables-js', 'https://cdn.datatables.net/1.10.16/js/jquery.dataTables.js' );\n\t\twp_enqueue_script( 'load-datepicker-js', 'https://code.jquery.com/ui/1.12.1/jquery-ui.js' );\n\t\twp_enqueue_style( 'load-datepicker-css', 'https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css' );\n\t}", "function font_awesome()\n{\n wp_enqueue_style(\"font_awesome\", \"//use.fontawesome.com/releases/v5.6.3/css/all.css\");\n}", "public function icons() {\n\n\t\t$solid_icons = array(\n\t\t\t\"fas-f641\" => \"fas fa-ad\",\n\t\t\t\"fas-f2b9\" => \"fas fa-address-book\",\n\t\t\t\"fas-f2bb\" => \"fas fa-address-card\",\n\t\t\t\"fas-f042\" => \"fas fa-adjust\",\n\t\t\t\"fas-f5d0\" => \"fas fa-air-freshener\",\n\t\t\t\"fas-f037\" => \"fas fa-align-center\",\n\t\t\t\"fas-f039\" => \"fas fa-align-justify\",\n\t\t\t\"fas-f036\" => \"fas fa-align-left\",\n\t\t\t\"fas-f038\" => \"fas fa-align-right\",\n\t\t\t\"fas-f461\" => \"fas fa-allergies\",\n\t\t\t\"fas-f0f9\" => \"fas fa-ambulance\",\n\t\t\t\"fas-f2a3\" => \"fas fa-american-sign-language-interpreting\",\n\t\t\t\"fas-f13d\" => \"fas fa-anchor\",\n\t\t\t\"fas-f103\" => \"fas fa-angle-double-down\",\n\t\t\t\"fas-f100\" => \"fas fa-angle-double-left\",\n\t\t\t\"fas-f101\" => \"fas fa-angle-double-right\",\n\t\t\t\"fas-f102\" => \"fas fa-angle-double-up\",\n\t\t\t\"fas-f107\" => \"fas fa-angle-down\",\n\t\t\t\"fas-f104\" => \"fas fa-angle-left\",\n\t\t\t\"fas-f105\" => \"fas fa-angle-right\",\n\t\t\t\"fas-f106\" => \"fas fa-angle-up\",\n\t\t\t\"fas-f556\" => \"fas fa-angry\",\n\t\t\t\"fas-f644\" => \"fas fa-ankh\",\n\t\t\t\"fas-f5d1\" => \"fas fa-apple-alt\",\n\t\t\t\"fas-f187\" => \"fas fa-archive\",\n\t\t\t\"fas-f557\" => \"fas fa-archway\",\n\t\t\t\"fas-f358\" => \"fas fa-arrow-alt-circle-down\",\n\t\t\t\"fas-f359\" => \"fas fa-arrow-alt-circle-left\",\n\t\t\t\"fas-f35a\" => \"fas fa-arrow-alt-circle-right\",\n\t\t\t\"fas-f35b\" => \"fas fa-arrow-alt-circle-up\",\n\t\t\t\"fas-f0ab\" => \"fas fa-arrow-circle-down\",\n\t\t\t\"fas-f0a8\" => \"fas fa-arrow-circle-left\",\n\t\t\t\"fas-f0a9\" => \"fas fa-arrow-circle-right\",\n\t\t\t\"fas-f0aa\" => \"fas fa-arrow-circle-up\",\n\t\t\t\"fas-f063\" => \"fas fa-arrow-down\",\n\t\t\t\"fas-f060\" => \"fas fa-arrow-left\",\n\t\t\t\"fas-f061\" => \"fas fa-arrow-right\",\n\t\t\t\"fas-f062\" => \"fas fa-arrow-up\",\n\t\t\t\"fas-f0b2\" => \"fas fa-arrows-alt\",\n\t\t\t\"fas-f337\" => \"fas fa-arrows-alt-h\",\n\t\t\t\"fas-f338\" => \"fas fa-arrows-alt-v\",\n\t\t\t\"fas-f2a2\" => \"fas fa-assistive-listening-systems\",\n\t\t\t\"fas-f069\" => \"fas fa-asterisk\",\n\t\t\t\"fas-f1fa\" => \"fas fa-at\",\n\t\t\t\"fas-f558\" => \"fas fa-atlas\",\n\t\t\t\"fas-f5d2\" => \"fas fa-atom\",\n\t\t\t\"fas-f29e\" => \"fas fa-audio-description\",\n\t\t\t\"fas-f559\" => \"fas fa-award\",\n\t\t\t\"fas-f77c\" => \"fas fa-baby\",\n\t\t\t\"fas-f77d\" => \"fas fa-baby-carriage\",\n\t\t\t\"fas-f55a\" => \"fas fa-backspace\",\n\t\t\t\"fas-f04a\" => \"fas fa-backward\",\n\t\t\t\"fas-f7e5\" => \"fas fa-bacon\",\n\t\t\t\"fas-f666\" => \"fas fa-bahai\",\n\t\t\t\"fas-f24e\" => \"fas fa-balance-scale\",\n\t\t\t\"fas-f515\" => \"fas fa-balance-scale-left\",\n\t\t\t\"fas-f516\" => \"fas fa-balance-scale-right\",\n\t\t\t\"fas-f05e\" => \"fas fa-ban\",\n\t\t\t\"fas-f462\" => \"fas fa-band-aid\",\n\t\t\t\"fas-f02a\" => \"fas fa-barcode\",\n\t\t\t\"fas-f0c9\" => \"fas fa-bars\",\n\t\t\t\"fas-f433\" => \"fas fa-baseball-ball\",\n\t\t\t\"fas-f434\" => \"fas fa-basketball-ball\",\n\t\t\t\"fas-f2cd\" => \"fas fa-bath\",\n\t\t\t\"fas-f244\" => \"fas fa-battery-empty\",\n\t\t\t\"fas-f240\" => \"fas fa-battery-full\",\n\t\t\t\"fas-f242\" => \"fas fa-battery-half\",\n\t\t\t\"fas-f243\" => \"fas fa-battery-quarter\",\n\t\t\t\"fas-f241\" => \"fas fa-battery-three-quarters\",\n\t\t\t\"fas-f236\" => \"fas fa-bed\",\n\t\t\t\"fas-f0fc\" => \"fas fa-beer\",\n\t\t\t\"fas-f0f3\" => \"fas fa-bell\",\n\t\t\t\"fas-f1f6\" => \"fas fa-bell-slash\",\n\t\t\t\"fas-f55b\" => \"fas fa-bezier-curve\",\n\t\t\t\"fas-f647\" => \"fas fa-bible\",\n\t\t\t\"fas-f206\" => \"fas fa-bicycle\",\n\t\t\t\"fas-f84a\" => \"fas fa-biking\",\n\t\t\t\"fas-f1e5\" => \"fas fa-binoculars\",\n\t\t\t\"fas-f780\" => \"fas fa-biohazard\",\n\t\t\t\"fas-f1fd\" => \"fas fa-birthday-cake\",\n\t\t\t\"fas-f517\" => \"fas fa-blender\",\n\t\t\t\"fas-f6b6\" => \"fas fa-blender-phone\",\n\t\t\t\"fas-f29d\" => \"fas fa-blind\",\n\t\t\t\"fas-f781\" => \"fas fa-blog\",\n\t\t\t\"fas-f032\" => \"fas fa-bold\",\n\t\t\t\"fas-f0e7\" => \"fas fa-bolt\",\n\t\t\t\"fas-f1e2\" => \"fas fa-bomb\",\n\t\t\t\"fas-f5d7\" => \"fas fa-bone\",\n\t\t\t\"fas-f55c\" => \"fas fa-bong\",\n\t\t\t\"fas-f02d\" => \"fas fa-book\",\n\t\t\t\"fas-f6b7\" => \"fas fa-book-dead\",\n\t\t\t\"fas-f7e6\" => \"fas fa-book-medical\",\n\t\t\t\"fas-f518\" => \"fas fa-book-open\",\n\t\t\t\"fas-f5da\" => \"fas fa-book-reader\",\n\t\t\t\"fas-f02e\" => \"fas fa-bookmark\",\n\t\t\t\"fas-f84c\" => \"fas fa-border-all\",\n\t\t\t\"fas-f850\" => \"fas fa-border-none\",\n\t\t\t\"fas-f853\" => \"fas fa-border-style\",\n\t\t\t\"fas-f436\" => \"fas fa-bowling-ball\",\n\t\t\t\"fas-f466\" => \"fas fa-box\",\n\t\t\t\"fas-f49e\" => \"fas fa-box-open\",\n\t\t\t\"fas-f95b\" => \"fas fa-box-tissue\",\n\t\t\t\"fas-f468\" => \"fas fa-boxes\",\n\t\t\t\"fas-f2a1\" => \"fas fa-braille\",\n\t\t\t\"fas-f5dc\" => \"fas fa-brain\",\n\t\t\t\"fas-f7ec\" => \"fas fa-bread-slice\",\n\t\t\t\"fas-f0b1\" => \"fas fa-briefcase\",\n\t\t\t\"fas-f469\" => \"fas fa-briefcase-medical\",\n\t\t\t\"fas-f519\" => \"fas fa-broadcast-tower\",\n\t\t\t\"fas-f51a\" => \"fas fa-broom\",\n\t\t\t\"fas-f55d\" => \"fas fa-brush\",\n\t\t\t\"fas-f188\" => \"fas fa-bug\",\n\t\t\t\"fas-f1ad\" => \"fas fa-building\",\n\t\t\t\"fas-f0a1\" => \"fas fa-bullhorn\",\n\t\t\t\"fas-f140\" => \"fas fa-bullseye\",\n\t\t\t\"fas-f46a\" => \"fas fa-burn\",\n\t\t\t\"fas-f207\" => \"fas fa-bus\",\n\t\t\t\"fas-f55e\" => \"fas fa-bus-alt\",\n\t\t\t\"fas-f64a\" => \"fas fa-business-time\",\n\t\t\t\"fas-f1ec\" => \"fas fa-calculator\",\n\t\t\t\"fas-f133\" => \"fas fa-calendar\",\n\t\t\t\"fas-f073\" => \"fas fa-calendar-alt\",\n\t\t\t\"fas-f274\" => \"fas fa-calendar-check\",\n\t\t\t\"fas-f783\" => \"fas fa-calendar-day\",\n\t\t\t\"fas-f272\" => \"fas fa-calendar-minus\",\n\t\t\t\"fas-f271\" => \"fas fa-calendar-plus\",\n\t\t\t\"fas-f273\" => \"fas fa-calendar-times\",\n\t\t\t\"fas-f784\" => \"fas fa-calendar-week\",\n\t\t\t\"fas-f030\" => \"fas fa-camera\",\n\t\t\t\"fas-f083\" => \"fas fa-camera-retro\",\n\t\t\t\"fas-f6bb\" => \"fas fa-campground\",\n\t\t\t\"fas-f786\" => \"fas fa-candy-cane\",\n\t\t\t\"fas-f55f\" => \"fas fa-cannabis\",\n\t\t\t\"fas-f46b\" => \"fas fa-capsules\",\n\t\t\t\"fas-f1b9\" => \"fas fa-car\",\n\t\t\t\"fas-f5de\" => \"fas fa-car-alt\",\n\t\t\t\"fas-f5df\" => \"fas fa-car-battery\",\n\t\t\t\"fas-f5e1\" => \"fas fa-car-crash\",\n\t\t\t\"fas-f5e4\" => \"fas fa-car-side\",\n\t\t\t\"fas-f8ff\" => \"fas fa-caravan\",\n\t\t\t\"fas-f0d7\" => \"fas fa-caret-down\",\n\t\t\t\"fas-f0d9\" => \"fas fa-caret-left\",\n\t\t\t\"fas-f0da\" => \"fas fa-caret-right\",\n\t\t\t\"fas-f150\" => \"fas fa-caret-square-down\",\n\t\t\t\"fas-f191\" => \"fas fa-caret-square-left\",\n\t\t\t\"fas-f152\" => \"fas fa-caret-square-right\",\n\t\t\t\"fas-f151\" => \"fas fa-caret-square-up\",\n\t\t\t\"fas-f0d8\" => \"fas fa-caret-up\",\n\t\t\t\"fas-f787\" => \"fas fa-carrot\",\n\t\t\t\"fas-f218\" => \"fas fa-cart-arrow-down\",\n\t\t\t\"fas-f217\" => \"fas fa-cart-plus\",\n\t\t\t\"fas-f788\" => \"fas fa-cash-register\",\n\t\t\t\"fas-f6be\" => \"fas fa-cat\",\n\t\t\t\"fas-f0a3\" => \"fas fa-certificate\",\n\t\t\t\"fas-f6c0\" => \"fas fa-chair\",\n\t\t\t\"fas-f51b\" => \"fas fa-chalkboard\",\n\t\t\t\"fas-f51c\" => \"fas fa-chalkboard-teacher\",\n\t\t\t\"fas-f5e7\" => \"fas fa-charging-station\",\n\t\t\t\"fas-f1fe\" => \"fas fa-chart-area\",\n\t\t\t\"fas-f080\" => \"fas fa-chart-bar\",\n\t\t\t\"fas-f201\" => \"fas fa-chart-line\",\n\t\t\t\"fas-f200\" => \"fas fa-chart-pie\",\n\t\t\t\"fas-f00c\" => \"fas fa-check\",\n\t\t\t\"fas-f058\" => \"fas fa-check-circle\",\n\t\t\t\"fas-f560\" => \"fas fa-check-double\",\n\t\t\t\"fas-f14a\" => \"fas fa-check-square\",\n\t\t\t\"fas-f7ef\" => \"fas fa-cheese\",\n\t\t\t\"fas-f439\" => \"fas fa-chess\",\n\t\t\t\"fas-f43a\" => \"fas fa-chess-bishop\",\n\t\t\t\"fas-f43c\" => \"fas fa-chess-board\",\n\t\t\t\"fas-f43f\" => \"fas fa-chess-king\",\n\t\t\t\"fas-f441\" => \"fas fa-chess-knight\",\n\t\t\t\"fas-f443\" => \"fas fa-chess-pawn\",\n\t\t\t\"fas-f445\" => \"fas fa-chess-queen\",\n\t\t\t\"fas-f447\" => \"fas fa-chess-rook\",\n\t\t\t\"fas-f13a\" => \"fas fa-chevron-circle-down\",\n\t\t\t\"fas-f137\" => \"fas fa-chevron-circle-left\",\n\t\t\t\"fas-f138\" => \"fas fa-chevron-circle-right\",\n\t\t\t\"fas-f139\" => \"fas fa-chevron-circle-up\",\n\t\t\t\"fas-f078\" => \"fas fa-chevron-down\",\n\t\t\t\"fas-f053\" => \"fas fa-chevron-left\",\n\t\t\t\"fas-f054\" => \"fas fa-chevron-right\",\n\t\t\t\"fas-f077\" => \"fas fa-chevron-up\",\n\t\t\t\"fas-f1ae\" => \"fas fa-child\",\n\t\t\t\"fas-f51d\" => \"fas fa-church\",\n\t\t\t\"fas-f111\" => \"fas fa-circle\",\n\t\t\t\"fas-f1ce\" => \"fas fa-circle-notch\",\n\t\t\t\"fas-f64f\" => \"fas fa-city\",\n\t\t\t\"fas-f7f2\" => \"fas fa-clinic-medical\",\n\t\t\t\"fas-f328\" => \"fas fa-clipboard\",\n\t\t\t\"fas-f46c\" => \"fas fa-clipboard-check\",\n\t\t\t\"fas-f46d\" => \"fas fa-clipboard-list\",\n\t\t\t\"fas-f017\" => \"fas fa-clock\",\n\t\t\t\"fas-f24d\" => \"fas fa-clone\",\n\t\t\t\"fas-f20a\" => \"fas fa-closed-captioning\",\n\t\t\t\"fas-f0c2\" => \"fas fa-cloud\",\n\t\t\t\"fas-f381\" => \"fas fa-cloud-download-alt\",\n\t\t\t\"fas-f73b\" => \"fas fa-cloud-meatball\",\n\t\t\t\"fas-f6c3\" => \"fas fa-cloud-moon\",\n\t\t\t\"fas-f73c\" => \"fas fa-cloud-moon-rain\",\n\t\t\t\"fas-f73d\" => \"fas fa-cloud-rain\",\n\t\t\t\"fas-f740\" => \"fas fa-cloud-showers-heavy\",\n\t\t\t\"fas-f6c4\" => \"fas fa-cloud-sun\",\n\t\t\t\"fas-f743\" => \"fas fa-cloud-sun-rain\",\n\t\t\t\"fas-f382\" => \"fas fa-cloud-upload-alt\",\n\t\t\t\"fas-f561\" => \"fas fa-cocktail\",\n\t\t\t\"fas-f121\" => \"fas fa-code\",\n\t\t\t\"fas-f126\" => \"fas fa-code-branch\",\n\t\t\t\"fas-f0f4\" => \"fas fa-coffee\",\n\t\t\t\"fas-f013\" => \"fas fa-cog\",\n\t\t\t\"fas-f085\" => \"fas fa-cogs\",\n\t\t\t\"fas-f51e\" => \"fas fa-coins\",\n\t\t\t\"fas-f0db\" => \"fas fa-columns\",\n\t\t\t\"fas-f075\" => \"fas fa-comment\",\n\t\t\t\"fas-f27a\" => \"fas fa-comment-alt\",\n\t\t\t\"fas-f651\" => \"fas fa-comment-dollar\",\n\t\t\t\"fas-f4ad\" => \"fas fa-comment-dots\",\n\t\t\t\"fas-f7f5\" => \"fas fa-comment-medical\",\n\t\t\t\"fas-f4b3\" => \"fas fa-comment-slash\",\n\t\t\t\"fas-f086\" => \"fas fa-comments\",\n\t\t\t\"fas-f653\" => \"fas fa-comments-dollar\",\n\t\t\t\"fas-f51f\" => \"fas fa-compact-disc\",\n\t\t\t\"fas-f14e\" => \"fas fa-compass\",\n\t\t\t\"fas-f066\" => \"fas fa-compress\",\n\t\t\t\"fas-f422\" => \"fas fa-compress-alt\",\n\t\t\t\"fas-f78c\" => \"fas fa-compress-arrows-alt\",\n\t\t\t\"fas-f562\" => \"fas fa-concierge-bell\",\n\t\t\t\"fas-f563\" => \"fas fa-cookie\",\n\t\t\t\"fas-f564\" => \"fas fa-cookie-bite\",\n\t\t\t\"fas-f0c5\" => \"fas fa-copy\",\n\t\t\t\"fas-f1f9\" => \"fas fa-copyright\",\n\t\t\t\"fas-f4b8\" => \"fas fa-couch\",\n\t\t\t\"fas-f09d\" => \"fas fa-credit-card\",\n\t\t\t\"fas-f125\" => \"fas fa-crop\",\n\t\t\t\"fas-f565\" => \"fas fa-crop-alt\",\n\t\t\t\"fas-f654\" => \"fas fa-cross\",\n\t\t\t\"fas-f05b\" => \"fas fa-crosshairs\",\n\t\t\t\"fas-f520\" => \"fas fa-crow\",\n\t\t\t\"fas-f521\" => \"fas fa-crown\",\n\t\t\t\"fas-f7f7\" => \"fas fa-crutch\",\n\t\t\t\"fas-f1b2\" => \"fas fa-cube\",\n\t\t\t\"fas-f1b3\" => \"fas fa-cubes\",\n\t\t\t\"fas-f0c4\" => \"fas fa-cut\",\n\t\t\t\"fas-f1c0\" => \"fas fa-database\",\n\t\t\t\"fas-f2a4\" => \"fas fa-deaf\",\n\t\t\t\"fas-f747\" => \"fas fa-democrat\",\n\t\t\t\"fas-f108\" => \"fas fa-desktop\",\n\t\t\t\"fas-f655\" => \"fas fa-dharmachakra\",\n\t\t\t\"fas-f470\" => \"fas fa-diagnoses\",\n\t\t\t\"fas-f522\" => \"fas fa-dice\",\n\t\t\t\"fas-f6cf\" => \"fas fa-dice-d20\",\n\t\t\t\"fas-f6d1\" => \"fas fa-dice-d6\",\n\t\t\t\"fas-f523\" => \"fas fa-dice-five\",\n\t\t\t\"fas-f524\" => \"fas fa-dice-four\",\n\t\t\t\"fas-f525\" => \"fas fa-dice-one\",\n\t\t\t\"fas-f526\" => \"fas fa-dice-six\",\n\t\t\t\"fas-f527\" => \"fas fa-dice-three\",\n\t\t\t\"fas-f528\" => \"fas fa-dice-two\",\n\t\t\t\"fas-f566\" => \"fas fa-digital-tachograph\",\n\t\t\t\"fas-f5eb\" => \"fas fa-directions\",\n\t\t\t\"fas-f7fa\" => \"fas fa-disease\",\n\t\t\t\"fas-f529\" => \"fas fa-divide\",\n\t\t\t\"fas-f567\" => \"fas fa-dizzy\",\n\t\t\t\"fas-f471\" => \"fas fa-dna\",\n\t\t\t\"fas-f6d3\" => \"fas fa-dog\",\n\t\t\t\"fas-f155\" => \"fas fa-dollar-sign\",\n\t\t\t\"fas-f472\" => \"fas fa-dolly\",\n\t\t\t\"fas-f474\" => \"fas fa-dolly-flatbed\",\n\t\t\t\"fas-f4b9\" => \"fas fa-donate\",\n\t\t\t\"fas-f52a\" => \"fas fa-door-closed\",\n\t\t\t\"fas-f52b\" => \"fas fa-door-open\",\n\t\t\t\"fas-f192\" => \"fas fa-dot-circle\",\n\t\t\t\"fas-f4ba\" => \"fas fa-dove\",\n\t\t\t\"fas-f019\" => \"fas fa-download\",\n\t\t\t\"fas-f568\" => \"fas fa-drafting-compass\",\n\t\t\t\"fas-f6d5\" => \"fas fa-dragon\",\n\t\t\t\"fas-f5ee\" => \"fas fa-draw-polygon\",\n\t\t\t\"fas-f569\" => \"fas fa-drum\",\n\t\t\t\"fas-f56a\" => \"fas fa-drum-steelpan\",\n\t\t\t\"fas-f6d7\" => \"fas fa-drumstick-bite\",\n\t\t\t\"fas-f44b\" => \"fas fa-dumbbell\",\n\t\t\t\"fas-f793\" => \"fas fa-dumpster\",\n\t\t\t\"fas-f794\" => \"fas fa-dumpster-fire\",\n\t\t\t\"fas-f6d9\" => \"fas fa-dungeon\",\n\t\t\t\"fas-f044\" => \"fas fa-edit\",\n\t\t\t\"fas-f7fb\" => \"fas fa-egg\",\n\t\t\t\"fas-f052\" => \"fas fa-eject\",\n\t\t\t\"fas-f141\" => \"fas fa-ellipsis-h\",\n\t\t\t\"fas-f142\" => \"fas fa-ellipsis-v\",\n\t\t\t\"fas-f0e0\" => \"fas fa-envelope\",\n\t\t\t\"fas-f2b6\" => \"fas fa-envelope-open\",\n\t\t\t\"fas-f658\" => \"fas fa-envelope-open-text\",\n\t\t\t\"fas-f199\" => \"fas fa-envelope-square\",\n\t\t\t\"fas-f52c\" => \"fas fa-equals\",\n\t\t\t\"fas-f12d\" => \"fas fa-eraser\",\n\t\t\t\"fas-f796\" => \"fas fa-ethernet\",\n\t\t\t\"fas-f153\" => \"fas fa-euro-sign\",\n\t\t\t\"fas-f362\" => \"fas fa-exchange-alt\",\n\t\t\t\"fas-f12a\" => \"fas fa-exclamation\",\n\t\t\t\"fas-f06a\" => \"fas fa-exclamation-circle\",\n\t\t\t\"fas-f071\" => \"fas fa-exclamation-triangle\",\n\t\t\t\"fas-f065\" => \"fas fa-expand\",\n\t\t\t\"fas-f424\" => \"fas fa-expand-alt\",\n\t\t\t\"fas-f31e\" => \"fas fa-expand-arrows-alt\",\n\t\t\t\"fas-f35d\" => \"fas fa-external-link-alt\",\n\t\t\t\"fas-f360\" => \"fas fa-external-link-square-alt\",\n\t\t\t\"fas-f06e\" => \"fas fa-eye\",\n\t\t\t\"fas-f1fb\" => \"fas fa-eye-dropper\",\n\t\t\t\"fas-f070\" => \"fas fa-eye-slash\",\n\t\t\t\"fas-f863\" => \"fas fa-fan\",\n\t\t\t\"fas-f049\" => \"fas fa-fast-backward\",\n\t\t\t\"fas-f050\" => \"fas fa-fast-forward\",\n\t\t\t\"fas-f905\" => \"fas fa-faucet\",\n\t\t\t\"fas-f1ac\" => \"fas fa-fax\",\n\t\t\t\"fas-f52d\" => \"fas fa-feather\",\n\t\t\t\"fas-f56b\" => \"fas fa-feather-alt\",\n\t\t\t\"fas-f182\" => \"fas fa-female\",\n\t\t\t\"fas-f0fb\" => \"fas fa-fighter-jet\",\n\t\t\t\"fas-f15b\" => \"fas fa-file\",\n\t\t\t\"fas-f15c\" => \"fas fa-file-alt\",\n\t\t\t\"fas-f1c6\" => \"fas fa-file-archive\",\n\t\t\t\"fas-f1c7\" => \"fas fa-file-audio\",\n\t\t\t\"fas-f1c9\" => \"fas fa-file-code\",\n\t\t\t\"fas-f56c\" => \"fas fa-file-contract\",\n\t\t\t\"fas-f6dd\" => \"fas fa-file-csv\",\n\t\t\t\"fas-f56d\" => \"fas fa-file-download\",\n\t\t\t\"fas-f1c3\" => \"fas fa-file-excel\",\n\t\t\t\"fas-f56e\" => \"fas fa-file-export\",\n\t\t\t\"fas-f1c5\" => \"fas fa-file-image\",\n\t\t\t\"fas-f56f\" => \"fas fa-file-import\",\n\t\t\t\"fas-f570\" => \"fas fa-file-invoice\",\n\t\t\t\"fas-f571\" => \"fas fa-file-invoice-dollar\",\n\t\t\t\"fas-f477\" => \"fas fa-file-medical\",\n\t\t\t\"fas-f478\" => \"fas fa-file-medical-alt\",\n\t\t\t\"fas-f1c1\" => \"fas fa-file-pdf\",\n\t\t\t\"fas-f1c4\" => \"fas fa-file-powerpoint\",\n\t\t\t\"fas-f572\" => \"fas fa-file-prescription\",\n\t\t\t\"fas-f573\" => \"fas fa-file-signature\",\n\t\t\t\"fas-f574\" => \"fas fa-file-upload\",\n\t\t\t\"fas-f1c8\" => \"fas fa-file-video\",\n\t\t\t\"fas-f1c2\" => \"fas fa-file-word\",\n\t\t\t\"fas-f575\" => \"fas fa-fill\",\n\t\t\t\"fas-f576\" => \"fas fa-fill-drip\",\n\t\t\t\"fas-f008\" => \"fas fa-film\",\n\t\t\t\"fas-f0b0\" => \"fas fa-filter\",\n\t\t\t\"fas-f577\" => \"fas fa-fingerprint\",\n\t\t\t\"fas-f06d\" => \"fas fa-fire\",\n\t\t\t\"fas-f7e4\" => \"fas fa-fire-alt\",\n\t\t\t\"fas-f134\" => \"fas fa-fire-extinguisher\",\n\t\t\t\"fas-f479\" => \"fas fa-first-aid\",\n\t\t\t\"fas-f578\" => \"fas fa-fish\",\n\t\t\t\"fas-f6de\" => \"fas fa-fist-raised\",\n\t\t\t\"fas-f024\" => \"fas fa-flag\",\n\t\t\t\"fas-f11e\" => \"fas fa-flag-checkered\",\n\t\t\t\"fas-f74d\" => \"fas fa-flag-usa\",\n\t\t\t\"fas-f0c3\" => \"fas fa-flask\",\n\t\t\t\"fas-f579\" => \"fas fa-flushed\",\n\t\t\t\"fas-f07b\" => \"fas fa-folder\",\n\t\t\t\"fas-f65d\" => \"fas fa-folder-minus\",\n\t\t\t\"fas-f07c\" => \"fas fa-folder-open\",\n\t\t\t\"fas-f65e\" => \"fas fa-folder-plus\",\n\t\t\t\"fas-f031\" => \"fas fa-font\",\n\t\t\t\"fas-f44e\" => \"fas fa-football-ball\",\n\t\t\t\"fas-f04e\" => \"fas fa-forward\",\n\t\t\t\"fas-f52e\" => \"fas fa-frog\",\n\t\t\t\"fas-f119\" => \"fas fa-frown\",\n\t\t\t\"fas-f57a\" => \"fas fa-frown-open\",\n\t\t\t\"fas-f662\" => \"fas fa-funnel-dollar\",\n\t\t\t\"fas-f1e3\" => \"fas fa-futbol\",\n\t\t\t\"fas-f11b\" => \"fas fa-gamepad\",\n\t\t\t\"fas-f52f\" => \"fas fa-gas-pump\",\n\t\t\t\"fas-f0e3\" => \"fas fa-gavel\",\n\t\t\t\"fas-f3a5\" => \"fas fa-gem\",\n\t\t\t\"fas-f22d\" => \"fas fa-genderless\",\n\t\t\t\"fas-f6e2\" => \"fas fa-ghost\",\n\t\t\t\"fas-f06b\" => \"fas fa-gift\",\n\t\t\t\"fas-f79c\" => \"fas fa-gifts\",\n\t\t\t\"fas-f79f\" => \"fas fa-glass-cheers\",\n\t\t\t\"fas-f000\" => \"fas fa-glass-martini\",\n\t\t\t\"fas-f57b\" => \"fas fa-glass-martini-alt\",\n\t\t\t\"fas-f7a0\" => \"fas fa-glass-whiskey\",\n\t\t\t\"fas-f530\" => \"fas fa-glasses\",\n\t\t\t\"fas-f0ac\" => \"fas fa-globe\",\n\t\t\t\"fas-f57c\" => \"fas fa-globe-africa\",\n\t\t\t\"fas-f57d\" => \"fas fa-globe-americas\",\n\t\t\t\"fas-f57e\" => \"fas fa-globe-asia\",\n\t\t\t\"fas-f7a2\" => \"fas fa-globe-europe\",\n\t\t\t\"fas-f450\" => \"fas fa-golf-ball\",\n\t\t\t\"fas-f664\" => \"fas fa-gopuram\",\n\t\t\t\"fas-f19d\" => \"fas fa-graduation-cap\",\n\t\t\t\"fas-f531\" => \"fas fa-greater-than\",\n\t\t\t\"fas-f532\" => \"fas fa-greater-than-equal\",\n\t\t\t\"fas-f57f\" => \"fas fa-grimace\",\n\t\t\t\"fas-f580\" => \"fas fa-grin\",\n\t\t\t\"fas-f581\" => \"fas fa-grin-alt\",\n\t\t\t\"fas-f582\" => \"fas fa-grin-beam\",\n\t\t\t\"fas-f583\" => \"fas fa-grin-beam-sweat\",\n\t\t\t\"fas-f584\" => \"fas fa-grin-hearts\",\n\t\t\t\"fas-f585\" => \"fas fa-grin-squint\",\n\t\t\t\"fas-f586\" => \"fas fa-grin-squint-tears\",\n\t\t\t\"fas-f587\" => \"fas fa-grin-stars\",\n\t\t\t\"fas-f588\" => \"fas fa-grin-tears\",\n\t\t\t\"fas-f589\" => \"fas fa-grin-tongue\",\n\t\t\t\"fas-f58a\" => \"fas fa-grin-tongue-squint\",\n\t\t\t\"fas-f58b\" => \"fas fa-grin-tongue-wink\",\n\t\t\t\"fas-f58c\" => \"fas fa-grin-wink\",\n\t\t\t\"fas-f58d\" => \"fas fa-grip-horizontal\",\n\t\t\t\"fas-f7a4\" => \"fas fa-grip-lines\",\n\t\t\t\"fas-f7a5\" => \"fas fa-grip-lines-vertical\",\n\t\t\t\"fas-f58e\" => \"fas fa-grip-vertical\",\n\t\t\t\"fas-f7a6\" => \"fas fa-guitar\",\n\t\t\t\"fas-f0fd\" => \"fas fa-h-square\",\n\t\t\t\"fas-f805\" => \"fas fa-hamburger\",\n\t\t\t\"fas-f6e3\" => \"fas fa-hammer\",\n\t\t\t\"fas-f665\" => \"fas fa-hamsa\",\n\t\t\t\"fas-f4bd\" => \"fas fa-hand-holding\",\n\t\t\t\"fas-f4be\" => \"fas fa-hand-holding-heart\",\n\t\t\t\"fas-f95c\" => \"fas fa-hand-holding-medical\",\n\t\t\t\"fas-f4c0\" => \"fas fa-hand-holding-usd\",\n\t\t\t\"fas-f4c1\" => \"fas fa-hand-holding-water\",\n\t\t\t\"fas-f258\" => \"fas fa-hand-lizard\",\n\t\t\t\"fas-f806\" => \"fas fa-hand-middle-finger\",\n\t\t\t\"fas-f256\" => \"fas fa-hand-paper\",\n\t\t\t\"fas-f25b\" => \"fas fa-hand-peace\",\n\t\t\t\"fas-f0a7\" => \"fas fa-hand-point-down\",\n\t\t\t\"fas-f0a5\" => \"fas fa-hand-point-left\",\n\t\t\t\"fas-f0a4\" => \"fas fa-hand-point-right\",\n\t\t\t\"fas-f0a6\" => \"fas fa-hand-point-up\",\n\t\t\t\"fas-f25a\" => \"fas fa-hand-pointer\",\n\t\t\t\"fas-f255\" => \"fas fa-hand-rock\",\n\t\t\t\"fas-f257\" => \"fas fa-hand-scissors\",\n\t\t\t\"fas-f95d\" => \"fas fa-hand-sparkles\",\n\t\t\t\"fas-f259\" => \"fas fa-hand-spock\",\n\t\t\t\"fas-f4c2\" => \"fas fa-hands\",\n\t\t\t\"fas-f4c4\" => \"fas fa-hands-helping\",\n\t\t\t\"fas-f95e\" => \"fas fa-hands-wash\",\n\t\t\t\"fas-f2b5\" => \"fas fa-handshake\",\n\t\t\t\"fas-f95f\" => \"fas fa-handshake-alt-slash\",\n\t\t\t\"fas-f960\" => \"fas fa-handshake-slash\",\n\t\t\t\"fas-f6e6\" => \"fas fa-hanukiah\",\n\t\t\t\"fas-f807\" => \"fas fa-hard-hat\",\n\t\t\t\"fas-f292\" => \"fas fa-hashtag\",\n\t\t\t\"fas-f8c0\" => \"fas fa-hat-cowboy\",\n\t\t\t\"fas-f8c1\" => \"fas fa-hat-cowboy-side\",\n\t\t\t\"fas-f6e8\" => \"fas fa-hat-wizard\",\n\t\t\t\"fas-f0a0\" => \"fas fa-hdd\",\n\t\t\t\"fas-f961\" => \"fas fa-head-side-cough\",\n\t\t\t\"fas-f962\" => \"fas fa-head-side-cough-slash\",\n\t\t\t\"fas-f963\" => \"fas fa-head-side-mask\",\n\t\t\t\"fas-f964\" => \"fas fa-head-side-virus\",\n\t\t\t\"fas-f1dc\" => \"fas fa-heading\",\n\t\t\t\"fas-f025\" => \"fas fa-headphones\",\n\t\t\t\"fas-f58f\" => \"fas fa-headphones-alt\",\n\t\t\t\"fas-f590\" => \"fas fa-headset\",\n\t\t\t\"fas-f004\" => \"fas fa-heart\",\n\t\t\t\"fas-f7a9\" => \"fas fa-heart-broken\",\n\t\t\t\"fas-f21e\" => \"fas fa-heartbeat\",\n\t\t\t\"fas-f533\" => \"fas fa-helicopter\",\n\t\t\t\"fas-f591\" => \"fas fa-highlighter\",\n\t\t\t\"fas-f6ec\" => \"fas fa-hiking\",\n\t\t\t\"fas-f6ed\" => \"fas fa-hippo\",\n\t\t\t\"fas-f1da\" => \"fas fa-history\",\n\t\t\t\"fas-f453\" => \"fas fa-hockey-puck\",\n\t\t\t\"fas-f7aa\" => \"fas fa-holly-berry\",\n\t\t\t\"fas-f015\" => \"fas fa-home\",\n\t\t\t\"fas-f6f0\" => \"fas fa-horse\",\n\t\t\t\"fas-f7ab\" => \"fas fa-horse-head\",\n\t\t\t\"fas-f0f8\" => \"fas fa-hospital\",\n\t\t\t\"fas-f47d\" => \"fas fa-hospital-alt\",\n\t\t\t\"fas-f47e\" => \"fas fa-hospital-symbol\",\n\t\t\t\"fas-f80d\" => \"fas fa-hospital-user\",\n\t\t\t\"fas-f593\" => \"fas fa-hot-tub\",\n\t\t\t\"fas-f80f\" => \"fas fa-hotdog\",\n\t\t\t\"fas-f594\" => \"fas fa-hotel\",\n\t\t\t\"fas-f254\" => \"fas fa-hourglass\",\n\t\t\t\"fas-f253\" => \"fas fa-hourglass-end\",\n\t\t\t\"fas-f252\" => \"fas fa-hourglass-half\",\n\t\t\t\"fas-f251\" => \"fas fa-hourglass-start\",\n\t\t\t\"fas-f6f1\" => \"fas fa-house-damage\",\n\t\t\t\"fas-f965\" => \"fas fa-house-user\",\n\t\t\t\"fas-f6f2\" => \"fas fa-hryvnia\",\n\t\t\t\"fas-f246\" => \"fas fa-i-cursor\",\n\t\t\t\"fas-f810\" => \"fas fa-ice-cream\",\n\t\t\t\"fas-f7ad\" => \"fas fa-icicles\",\n\t\t\t\"fas-f86d\" => \"fas fa-icons\",\n\t\t\t\"fas-f2c1\" => \"fas fa-id-badge\",\n\t\t\t\"fas-f2c2\" => \"fas fa-id-card\",\n\t\t\t\"fas-f47f\" => \"fas fa-id-card-alt\",\n\t\t\t\"fas-f7ae\" => \"fas fa-igloo\",\n\t\t\t\"fas-f03e\" => \"fas fa-image\",\n\t\t\t\"fas-f302\" => \"fas fa-images\",\n\t\t\t\"fas-f01c\" => \"fas fa-inbox\",\n\t\t\t\"fas-f03c\" => \"fas fa-indent\",\n\t\t\t\"fas-f275\" => \"fas fa-industry\",\n\t\t\t\"fas-f534\" => \"fas fa-infinity\",\n\t\t\t\"fas-f129\" => \"fas fa-info\",\n\t\t\t\"fas-f05a\" => \"fas fa-info-circle\",\n\t\t\t\"fas-f033\" => \"fas fa-italic\",\n\t\t\t\"fas-f669\" => \"fas fa-jedi\",\n\t\t\t\"fas-f595\" => \"fas fa-joint\",\n\t\t\t\"fas-f66a\" => \"fas fa-journal-whills\",\n\t\t\t\"fas-f66b\" => \"fas fa-kaaba\",\n\t\t\t\"fas-f084\" => \"fas fa-key\",\n\t\t\t\"fas-f11c\" => \"fas fa-keyboard\",\n\t\t\t\"fas-f66d\" => \"fas fa-khanda\",\n\t\t\t\"fas-f596\" => \"fas fa-kiss\",\n\t\t\t\"fas-f597\" => \"fas fa-kiss-beam\",\n\t\t\t\"fas-f598\" => \"fas fa-kiss-wink-heart\",\n\t\t\t\"fas-f535\" => \"fas fa-kiwi-bird\",\n\t\t\t\"fas-f66f\" => \"fas fa-landmark\",\n\t\t\t\"fas-f1ab\" => \"fas fa-language\",\n\t\t\t\"fas-f109\" => \"fas fa-laptop\",\n\t\t\t\"fas-f5fc\" => \"fas fa-laptop-code\",\n\t\t\t\"fas-f966\" => \"fas fa-laptop-house\",\n\t\t\t\"fas-f812\" => \"fas fa-laptop-medical\",\n\t\t\t\"fas-f599\" => \"fas fa-laugh\",\n\t\t\t\"fas-f59a\" => \"fas fa-laugh-beam\",\n\t\t\t\"fas-f59b\" => \"fas fa-laugh-squint\",\n\t\t\t\"fas-f59c\" => \"fas fa-laugh-wink\",\n\t\t\t\"fas-f5fd\" => \"fas fa-layer-group\",\n\t\t\t\"fas-f06c\" => \"fas fa-leaf\",\n\t\t\t\"fas-f094\" => \"fas fa-lemon\",\n\t\t\t\"fas-f536\" => \"fas fa-less-than\",\n\t\t\t\"fas-f537\" => \"fas fa-less-than-equal\",\n\t\t\t\"fas-f3be\" => \"fas fa-level-down-alt\",\n\t\t\t\"fas-f3bf\" => \"fas fa-level-up-alt\",\n\t\t\t\"fas-f1cd\" => \"fas fa-life-ring\",\n\t\t\t\"fas-f0eb\" => \"fas fa-lightbulb\",\n\t\t\t\"fas-f0c1\" => \"fas fa-link\",\n\t\t\t\"fas-f195\" => \"fas fa-lira-sign\",\n\t\t\t\"fas-f03a\" => \"fas fa-list\",\n\t\t\t\"fas-f022\" => \"fas fa-list-alt\",\n\t\t\t\"fas-f0cb\" => \"fas fa-list-ol\",\n\t\t\t\"fas-f0ca\" => \"fas fa-list-ul\",\n\t\t\t\"fas-f124\" => \"fas fa-location-arrow\",\n\t\t\t\"fas-f023\" => \"fas fa-lock\",\n\t\t\t\"fas-f3c1\" => \"fas fa-lock-open\",\n\t\t\t\"fas-f309\" => \"fas fa-long-arrow-alt-down\",\n\t\t\t\"fas-f30a\" => \"fas fa-long-arrow-alt-left\",\n\t\t\t\"fas-f30b\" => \"fas fa-long-arrow-alt-right\",\n\t\t\t\"fas-f30c\" => \"fas fa-long-arrow-alt-up\",\n\t\t\t\"fas-f2a8\" => \"fas fa-low-vision\",\n\t\t\t\"fas-f59d\" => \"fas fa-luggage-cart\",\n\t\t\t\"fas-f604\" => \"fas fa-lungs\",\n\t\t\t\"fas-f967\" => \"fas fa-lungs-virus\",\n\t\t\t\"fas-f0d0\" => \"fas fa-magic\",\n\t\t\t\"fas-f076\" => \"fas fa-magnet\",\n\t\t\t\"fas-f674\" => \"fas fa-mail-bulk\",\n\t\t\t\"fas-f183\" => \"fas fa-male\",\n\t\t\t\"fas-f279\" => \"fas fa-map\",\n\t\t\t\"fas-f59f\" => \"fas fa-map-marked\",\n\t\t\t\"fas-f5a0\" => \"fas fa-map-marked-alt\",\n\t\t\t\"fas-f041\" => \"fas fa-map-marker\",\n\t\t\t\"fas-f3c5\" => \"fas fa-map-marker-alt\",\n\t\t\t\"fas-f276\" => \"fas fa-map-pin\",\n\t\t\t\"fas-f277\" => \"fas fa-map-signs\",\n\t\t\t\"fas-f5a1\" => \"fas fa-marker\",\n\t\t\t\"fas-f222\" => \"fas fa-mars\",\n\t\t\t\"fas-f227\" => \"fas fa-mars-double\",\n\t\t\t\"fas-f229\" => \"fas fa-mars-stroke\",\n\t\t\t\"fas-f22b\" => \"fas fa-mars-stroke-h\",\n\t\t\t\"fas-f22a\" => \"fas fa-mars-stroke-v\",\n\t\t\t\"fas-f6fa\" => \"fas fa-mask\",\n\t\t\t\"fas-f5a2\" => \"fas fa-medal\",\n\t\t\t\"fas-f0fa\" => \"fas fa-medkit\",\n\t\t\t\"fas-f11a\" => \"fas fa-meh\",\n\t\t\t\"fas-f5a4\" => \"fas fa-meh-blank\",\n\t\t\t\"fas-f5a5\" => \"fas fa-meh-rolling-eyes\",\n\t\t\t\"fas-f538\" => \"fas fa-memory\",\n\t\t\t\"fas-f676\" => \"fas fa-menorah\",\n\t\t\t\"fas-f223\" => \"fas fa-mercury\",\n\t\t\t\"fas-f753\" => \"fas fa-meteor\",\n\t\t\t\"fas-f2db\" => \"fas fa-microchip\",\n\t\t\t\"fas-f130\" => \"fas fa-microphone\",\n\t\t\t\"fas-f3c9\" => \"fas fa-microphone-alt\",\n\t\t\t\"fas-f539\" => \"fas fa-microphone-alt-slash\",\n\t\t\t\"fas-f131\" => \"fas fa-microphone-slash\",\n\t\t\t\"fas-f610\" => \"fas fa-microscope\",\n\t\t\t\"fas-f068\" => \"fas fa-minus\",\n\t\t\t\"fas-f056\" => \"fas fa-minus-circle\",\n\t\t\t\"fas-f146\" => \"fas fa-minus-square\",\n\t\t\t\"fas-f7b5\" => \"fas fa-mitten\",\n\t\t\t\"fas-f10b\" => \"fas fa-mobile\",\n\t\t\t\"fas-f3cd\" => \"fas fa-mobile-alt\",\n\t\t\t\"fas-f0d6\" => \"fas fa-money-bill\",\n\t\t\t\"fas-f3d1\" => \"fas fa-money-bill-alt\",\n\t\t\t\"fas-f53a\" => \"fas fa-money-bill-wave\",\n\t\t\t\"fas-f53b\" => \"fas fa-money-bill-wave-alt\",\n\t\t\t\"fas-f53c\" => \"fas fa-money-check\",\n\t\t\t\"fas-f53d\" => \"fas fa-money-check-alt\",\n\t\t\t\"fas-f5a6\" => \"fas fa-monument\",\n\t\t\t\"fas-f186\" => \"fas fa-moon\",\n\t\t\t\"fas-f5a7\" => \"fas fa-mortar-pestle\",\n\t\t\t\"fas-f678\" => \"fas fa-mosque\",\n\t\t\t\"fas-f21c\" => \"fas fa-motorcycle\",\n\t\t\t\"fas-f6fc\" => \"fas fa-mountain\",\n\t\t\t\"fas-f8cc\" => \"fas fa-mouse\",\n\t\t\t\"fas-f245\" => \"fas fa-mouse-pointer\",\n\t\t\t\"fas-f7b6\" => \"fas fa-mug-hot\",\n\t\t\t\"fas-f001\" => \"fas fa-music\",\n\t\t\t\"fas-f6ff\" => \"fas fa-network-wired\",\n\t\t\t\"fas-f22c\" => \"fas fa-neuter\",\n\t\t\t\"fas-f1ea\" => \"fas fa-newspaper\",\n\t\t\t\"fas-f53e\" => \"fas fa-not-equal\",\n\t\t\t\"fas-f481\" => \"fas fa-notes-medical\",\n\t\t\t\"fas-f247\" => \"fas fa-object-group\",\n\t\t\t\"fas-f248\" => \"fas fa-object-ungroup\",\n\t\t\t\"fas-f613\" => \"fas fa-oil-can\",\n\t\t\t\"fas-f679\" => \"fas fa-om\",\n\t\t\t\"fas-f700\" => \"fas fa-otter\",\n\t\t\t\"fas-f03b\" => \"fas fa-outdent\",\n\t\t\t\"fas-f815\" => \"fas fa-pager\",\n\t\t\t\"fas-f1fc\" => \"fas fa-paint-brush\",\n\t\t\t\"fas-f5aa\" => \"fas fa-paint-roller\",\n\t\t\t\"fas-f53f\" => \"fas fa-palette\",\n\t\t\t\"fas-f482\" => \"fas fa-pallet\",\n\t\t\t\"fas-f1d8\" => \"fas fa-paper-plane\",\n\t\t\t\"fas-f0c6\" => \"fas fa-paperclip\",\n\t\t\t\"fas-f4cd\" => \"fas fa-parachute-box\",\n\t\t\t\"fas-f1dd\" => \"fas fa-paragraph\",\n\t\t\t\"fas-f540\" => \"fas fa-parking\",\n\t\t\t\"fas-f5ab\" => \"fas fa-passport\",\n\t\t\t\"fas-f67b\" => \"fas fa-pastafarianism\",\n\t\t\t\"fas-f0ea\" => \"fas fa-paste\",\n\t\t\t\"fas-f04c\" => \"fas fa-pause\",\n\t\t\t\"fas-f28b\" => \"fas fa-pause-circle\",\n\t\t\t\"fas-f1b0\" => \"fas fa-paw\",\n\t\t\t\"fas-f67c\" => \"fas fa-peace\",\n\t\t\t\"fas-f304\" => \"fas fa-pen\",\n\t\t\t\"fas-f305\" => \"fas fa-pen-alt\",\n\t\t\t\"fas-f5ac\" => \"fas fa-pen-fancy\",\n\t\t\t\"fas-f5ad\" => \"fas fa-pen-nib\",\n\t\t\t\"fas-f14b\" => \"fas fa-pen-square\",\n\t\t\t\"fas-f303\" => \"fas fa-pencil-alt\",\n\t\t\t\"fas-f5ae\" => \"fas fa-pencil-ruler\",\n\t\t\t\"fas-f968\" => \"fas fa-people-arrows\",\n\t\t\t\"fas-f4ce\" => \"fas fa-people-carry\",\n\t\t\t\"fas-f816\" => \"fas fa-pepper-hot\",\n\t\t\t\"fas-f295\" => \"fas fa-percent\",\n\t\t\t\"fas-f541\" => \"fas fa-percentage\",\n\t\t\t\"fas-f756\" => \"fas fa-person-booth\",\n\t\t\t\"fas-f095\" => \"fas fa-phone\",\n\t\t\t\"fas-f879\" => \"fas fa-phone-alt\",\n\t\t\t\"fas-f3dd\" => \"fas fa-phone-slash\",\n\t\t\t\"fas-f098\" => \"fas fa-phone-square\",\n\t\t\t\"fas-f87b\" => \"fas fa-phone-square-alt\",\n\t\t\t\"fas-f2a0\" => \"fas fa-phone-volume\",\n\t\t\t\"fas-f87c\" => \"fas fa-photo-video\",\n\t\t\t\"fas-f4d3\" => \"fas fa-piggy-bank\",\n\t\t\t\"fas-f484\" => \"fas fa-pills\",\n\t\t\t\"fas-f818\" => \"fas fa-pizza-slice\",\n\t\t\t\"fas-f67f\" => \"fas fa-place-of-worship\",\n\t\t\t\"fas-f072\" => \"fas fa-plane\",\n\t\t\t\"fas-f5af\" => \"fas fa-plane-arrival\",\n\t\t\t\"fas-f5b0\" => \"fas fa-plane-departure\",\n\t\t\t\"fas-f969\" => \"fas fa-plane-slash\",\n\t\t\t\"fas-f04b\" => \"fas fa-play\",\n\t\t\t\"fas-f144\" => \"fas fa-play-circle\",\n\t\t\t\"fas-f1e6\" => \"fas fa-plug\",\n\t\t\t\"fas-f067\" => \"fas fa-plus\",\n\t\t\t\"fas-f055\" => \"fas fa-plus-circle\",\n\t\t\t\"fas-f0fe\" => \"fas fa-plus-square\",\n\t\t\t\"fas-f2ce\" => \"fas fa-podcast\",\n\t\t\t\"fas-f681\" => \"fas fa-poll\",\n\t\t\t\"fas-f682\" => \"fas fa-poll-h\",\n\t\t\t\"fas-f2fe\" => \"fas fa-poo\",\n\t\t\t\"fas-f75a\" => \"fas fa-poo-storm\",\n\t\t\t\"fas-f619\" => \"fas fa-poop\",\n\t\t\t\"fas-f3e0\" => \"fas fa-portrait\",\n\t\t\t\"fas-f154\" => \"fas fa-pound-sign\",\n\t\t\t\"fas-f011\" => \"fas fa-power-off\",\n\t\t\t\"fas-f683\" => \"fas fa-pray\",\n\t\t\t\"fas-f684\" => \"fas fa-praying-hands\",\n\t\t\t\"fas-f5b1\" => \"fas fa-prescription\",\n\t\t\t\"fas-f485\" => \"fas fa-prescription-bottle\",\n\t\t\t\"fas-f486\" => \"fas fa-prescription-bottle-alt\",\n\t\t\t\"fas-f02f\" => \"fas fa-print\",\n\t\t\t\"fas-f487\" => \"fas fa-procedures\",\n\t\t\t\"fas-f542\" => \"fas fa-project-diagram\",\n\t\t\t\"fas-f96a\" => \"fas fa-pump-medical\",\n\t\t\t\"fas-f96b\" => \"fas fa-pump-soap\",\n\t\t\t\"fas-f12e\" => \"fas fa-puzzle-piece\",\n\t\t\t\"fas-f029\" => \"fas fa-qrcode\",\n\t\t\t\"fas-f128\" => \"fas fa-question\",\n\t\t\t\"fas-f059\" => \"fas fa-question-circle\",\n\t\t\t\"fas-f458\" => \"fas fa-quidditch\",\n\t\t\t\"fas-f10d\" => \"fas fa-quote-left\",\n\t\t\t\"fas-f10e\" => \"fas fa-quote-right\",\n\t\t\t\"fas-f687\" => \"fas fa-quran\",\n\t\t\t\"fas-f7b9\" => \"fas fa-radiation\",\n\t\t\t\"fas-f7ba\" => \"fas fa-radiation-alt\",\n\t\t\t\"fas-f75b\" => \"fas fa-rainbow\",\n\t\t\t\"fas-f074\" => \"fas fa-random\",\n\t\t\t\"fas-f543\" => \"fas fa-receipt\",\n\t\t\t\"fas-f8d9\" => \"fas fa-record-vinyl\",\n\t\t\t\"fas-f1b8\" => \"fas fa-recycle\",\n\t\t\t\"fas-f01e\" => \"fas fa-redo\",\n\t\t\t\"fas-f2f9\" => \"fas fa-redo-alt\",\n\t\t\t\"fas-f25d\" => \"fas fa-registered\",\n\t\t\t\"fas-f87d\" => \"fas fa-remove-format\",\n\t\t\t\"fas-f3e5\" => \"fas fa-reply\",\n\t\t\t\"fas-f122\" => \"fas fa-reply-all\",\n\t\t\t\"fas-f75e\" => \"fas fa-republican\",\n\t\t\t\"fas-f7bd\" => \"fas fa-restroom\",\n\t\t\t\"fas-f079\" => \"fas fa-retweet\",\n\t\t\t\"fas-f4d6\" => \"fas fa-ribbon\",\n\t\t\t\"fas-f70b\" => \"fas fa-ring\",\n\t\t\t\"fas-f018\" => \"fas fa-road\",\n\t\t\t\"fas-f544\" => \"fas fa-robot\",\n\t\t\t\"fas-f135\" => \"fas fa-rocket\",\n\t\t\t\"fas-f4d7\" => \"fas fa-route\",\n\t\t\t\"fas-f09e\" => \"fas fa-rss\",\n\t\t\t\"fas-f143\" => \"fas fa-rss-square\",\n\t\t\t\"fas-f158\" => \"fas fa-ruble-sign\",\n\t\t\t\"fas-f545\" => \"fas fa-ruler\",\n\t\t\t\"fas-f546\" => \"fas fa-ruler-combined\",\n\t\t\t\"fas-f547\" => \"fas fa-ruler-horizontal\",\n\t\t\t\"fas-f548\" => \"fas fa-ruler-vertical\",\n\t\t\t\"fas-f70c\" => \"fas fa-running\",\n\t\t\t\"fas-f156\" => \"fas fa-rupee-sign\",\n\t\t\t\"fas-f5b3\" => \"fas fa-sad-cry\",\n\t\t\t\"fas-f5b4\" => \"fas fa-sad-tear\",\n\t\t\t\"fas-f7bf\" => \"fas fa-satellite\",\n\t\t\t\"fas-f7c0\" => \"fas fa-satellite-dish\",\n\t\t\t\"fas-f0c7\" => \"fas fa-save\",\n\t\t\t\"fas-f549\" => \"fas fa-school\",\n\t\t\t\"fas-f54a\" => \"fas fa-screwdriver\",\n\t\t\t\"fas-f70e\" => \"fas fa-scroll\",\n\t\t\t\"fas-f7c2\" => \"fas fa-sd-card\",\n\t\t\t\"fas-f002\" => \"fas fa-search\",\n\t\t\t\"fas-f688\" => \"fas fa-search-dollar\",\n\t\t\t\"fas-f689\" => \"fas fa-search-location\",\n\t\t\t\"fas-f010\" => \"fas fa-search-minus\",\n\t\t\t\"fas-f00e\" => \"fas fa-search-plus\",\n\t\t\t\"fas-f4d8\" => \"fas fa-seedling\",\n\t\t\t\"fas-f233\" => \"fas fa-server\",\n\t\t\t\"fas-f61f\" => \"fas fa-shapes\",\n\t\t\t\"fas-f064\" => \"fas fa-share\",\n\t\t\t\"fas-f1e0\" => \"fas fa-share-alt\",\n\t\t\t\"fas-f1e1\" => \"fas fa-share-alt-square\",\n\t\t\t\"fas-f14d\" => \"fas fa-share-square\",\n\t\t\t\"fas-f20b\" => \"fas fa-shekel-sign\",\n\t\t\t\"fas-f3ed\" => \"fas fa-shield-alt\",\n\t\t\t\"fas-f96c\" => \"fas fa-shield-virus\",\n\t\t\t\"fas-f21a\" => \"fas fa-ship\",\n\t\t\t\"fas-f48b\" => \"fas fa-shipping-fast\",\n\t\t\t\"fas-f54b\" => \"fas fa-shoe-prints\",\n\t\t\t\"fas-f290\" => \"fas fa-shopping-bag\",\n\t\t\t\"fas-f291\" => \"fas fa-shopping-basket\",\n\t\t\t\"fas-f07a\" => \"fas fa-shopping-cart\",\n\t\t\t\"fas-f2cc\" => \"fas fa-shower\",\n\t\t\t\"fas-f5b6\" => \"fas fa-shuttle-van\",\n\t\t\t\"fas-f4d9\" => \"fas fa-sign\",\n\t\t\t\"fas-f2f6\" => \"fas fa-sign-in-alt\",\n\t\t\t\"fas-f2a7\" => \"fas fa-sign-language\",\n\t\t\t\"fas-f2f5\" => \"fas fa-sign-out-alt\",\n\t\t\t\"fas-f012\" => \"fas fa-signal\",\n\t\t\t\"fas-f5b7\" => \"fas fa-signature\",\n\t\t\t\"fas-f7c4\" => \"fas fa-sim-card\",\n\t\t\t\"fas-f0e8\" => \"fas fa-sitemap\",\n\t\t\t\"fas-f7c5\" => \"fas fa-skating\",\n\t\t\t\"fas-f7c9\" => \"fas fa-skiing\",\n\t\t\t\"fas-f7ca\" => \"fas fa-skiing-nordic\",\n\t\t\t\"fas-f54c\" => \"fas fa-skull\",\n\t\t\t\"fas-f714\" => \"fas fa-skull-crossbones\",\n\t\t\t\"fas-f715\" => \"fas fa-slash\",\n\t\t\t\"fas-f7cc\" => \"fas fa-sleigh\",\n\t\t\t\"fas-f1de\" => \"fas fa-sliders-h\",\n\t\t\t\"fas-f118\" => \"fas fa-smile\",\n\t\t\t\"fas-f5b8\" => \"fas fa-smile-beam\",\n\t\t\t\"fas-f4da\" => \"fas fa-smile-wink\",\n\t\t\t\"fas-f75f\" => \"fas fa-smog\",\n\t\t\t\"fas-f48d\" => \"fas fa-smoking\",\n\t\t\t\"fas-f54d\" => \"fas fa-smoking-ban\",\n\t\t\t\"fas-f7cd\" => \"fas fa-sms\",\n\t\t\t\"fas-f7ce\" => \"fas fa-snowboarding\",\n\t\t\t\"fas-f2dc\" => \"fas fa-snowflake\",\n\t\t\t\"fas-f7d0\" => \"fas fa-snowman\",\n\t\t\t\"fas-f7d2\" => \"fas fa-snowplow\",\n\t\t\t\"fas-f96e\" => \"fas fa-soap\",\n\t\t\t\"fas-f696\" => \"fas fa-socks\",\n\t\t\t\"fas-f5ba\" => \"fas fa-solar-panel\",\n\t\t\t\"fas-f0dc\" => \"fas fa-sort\",\n\t\t\t\"fas-f15d\" => \"fas fa-sort-alpha-down\",\n\t\t\t\"fas-f881\" => \"fas fa-sort-alpha-down-alt\",\n\t\t\t\"fas-f15e\" => \"fas fa-sort-alpha-up\",\n\t\t\t\"fas-f882\" => \"fas fa-sort-alpha-up-alt\",\n\t\t\t\"fas-f160\" => \"fas fa-sort-amount-down\",\n\t\t\t\"fas-f884\" => \"fas fa-sort-amount-down-alt\",\n\t\t\t\"fas-f161\" => \"fas fa-sort-amount-up\",\n\t\t\t\"fas-f885\" => \"fas fa-sort-amount-up-alt\",\n\t\t\t\"fas-f0dd\" => \"fas fa-sort-down\",\n\t\t\t\"fas-f162\" => \"fas fa-sort-numeric-down\",\n\t\t\t\"fas-f886\" => \"fas fa-sort-numeric-down-alt\",\n\t\t\t\"fas-f163\" => \"fas fa-sort-numeric-up\",\n\t\t\t\"fas-f887\" => \"fas fa-sort-numeric-up-alt\",\n\t\t\t\"fas-f0de\" => \"fas fa-sort-up\",\n\t\t\t\"fas-f5bb\" => \"fas fa-spa\",\n\t\t\t\"fas-f197\" => \"fas fa-space-shuttle\",\n\t\t\t\"fas-f891\" => \"fas fa-spell-check\",\n\t\t\t\"fas-f717\" => \"fas fa-spider\",\n\t\t\t\"fas-f110\" => \"fas fa-spinner\",\n\t\t\t\"fas-f5bc\" => \"fas fa-splotch\",\n\t\t\t\"fas-f5bd\" => \"fas fa-spray-can\",\n\t\t\t\"fas-f0c8\" => \"fas fa-square\",\n\t\t\t\"fas-f45c\" => \"fas fa-square-full\",\n\t\t\t\"fas-f698\" => \"fas fa-square-root-alt\",\n\t\t\t\"fas-f5bf\" => \"fas fa-stamp\",\n\t\t\t\"fas-f005\" => \"fas fa-star\",\n\t\t\t\"fas-f699\" => \"fas fa-star-and-crescent\",\n\t\t\t\"fas-f089\" => \"fas fa-star-half\",\n\t\t\t\"fas-f5c0\" => \"fas fa-star-half-alt\",\n\t\t\t\"fas-f69a\" => \"fas fa-star-of-david\",\n\t\t\t\"fas-f621\" => \"fas fa-star-of-life\",\n\t\t\t\"fas-f048\" => \"fas fa-step-backward\",\n\t\t\t\"fas-f051\" => \"fas fa-step-forward\",\n\t\t\t\"fas-f0f1\" => \"fas fa-stethoscope\",\n\t\t\t\"fas-f249\" => \"fas fa-sticky-note\",\n\t\t\t\"fas-f04d\" => \"fas fa-stop\",\n\t\t\t\"fas-f28d\" => \"fas fa-stop-circle\",\n\t\t\t\"fas-f2f2\" => \"fas fa-stopwatch\",\n\t\t\t\"fas-f96f\" => \"fas fa-stopwatch-20\",\n\t\t\t\"fas-f54e\" => \"fas fa-store\",\n\t\t\t\"fas-f54f\" => \"fas fa-store-alt\",\n\t\t\t\"fas-f970\" => \"fas fa-store-alt-slash\",\n\t\t\t\"fas-f971\" => \"fas fa-store-slash\",\n\t\t\t\"fas-f550\" => \"fas fa-stream\",\n\t\t\t\"fas-f21d\" => \"fas fa-street-view\",\n\t\t\t\"fas-f0cc\" => \"fas fa-strikethrough\",\n\t\t\t\"fas-f551\" => \"fas fa-stroopwafel\",\n\t\t\t\"fas-f12c\" => \"fas fa-subscript\",\n\t\t\t\"fas-f239\" => \"fas fa-subway\",\n\t\t\t\"fas-f0f2\" => \"fas fa-suitcase\",\n\t\t\t\"fas-f5c1\" => \"fas fa-suitcase-rolling\",\n\t\t\t\"fas-f185\" => \"fas fa-sun\",\n\t\t\t\"fas-f12b\" => \"fas fa-superscript\",\n\t\t\t\"fas-f5c2\" => \"fas fa-surprise\",\n\t\t\t\"fas-f5c3\" => \"fas fa-swatchbook\",\n\t\t\t\"fas-f5c4\" => \"fas fa-swimmer\",\n\t\t\t\"fas-f5c5\" => \"fas fa-swimming-pool\",\n\t\t\t\"fas-f69b\" => \"fas fa-synagogue\",\n\t\t\t\"fas-f021\" => \"fas fa-sync\",\n\t\t\t\"fas-f2f1\" => \"fas fa-sync-alt\",\n\t\t\t\"fas-f48e\" => \"fas fa-syringe\",\n\t\t\t\"fas-f0ce\" => \"fas fa-table\",\n\t\t\t\"fas-f45d\" => \"fas fa-table-tennis\",\n\t\t\t\"fas-f10a\" => \"fas fa-tablet\",\n\t\t\t\"fas-f3fa\" => \"fas fa-tablet-alt\",\n\t\t\t\"fas-f490\" => \"fas fa-tablets\",\n\t\t\t\"fas-f3fd\" => \"fas fa-tachometer-alt\",\n\t\t\t\"fas-f02b\" => \"fas fa-tag\",\n\t\t\t\"fas-f02c\" => \"fas fa-tags\",\n\t\t\t\"fas-f4db\" => \"fas fa-tape\",\n\t\t\t\"fas-f0ae\" => \"fas fa-tasks\",\n\t\t\t\"fas-f1ba\" => \"fas fa-taxi\",\n\t\t\t\"fas-f62e\" => \"fas fa-teeth\",\n\t\t\t\"fas-f62f\" => \"fas fa-teeth-open\",\n\t\t\t\"fas-f769\" => \"fas fa-temperature-high\",\n\t\t\t\"fas-f76b\" => \"fas fa-temperature-low\",\n\t\t\t\"fas-f7d7\" => \"fas fa-tenge\",\n\t\t\t\"fas-f120\" => \"fas fa-terminal\",\n\t\t\t\"fas-f034\" => \"fas fa-text-height\",\n\t\t\t\"fas-f035\" => \"fas fa-text-width\",\n\t\t\t\"fas-f00a\" => \"fas fa-th\",\n\t\t\t\"fas-f009\" => \"fas fa-th-large\",\n\t\t\t\"fas-f00b\" => \"fas fa-th-list\",\n\t\t\t\"fas-f630\" => \"fas fa-theater-masks\",\n\t\t\t\"fas-f491\" => \"fas fa-thermometer\",\n\t\t\t\"fas-f2cb\" => \"fas fa-thermometer-empty\",\n\t\t\t\"fas-f2c7\" => \"fas fa-thermometer-full\",\n\t\t\t\"fas-f2c9\" => \"fas fa-thermometer-half\",\n\t\t\t\"fas-f2ca\" => \"fas fa-thermometer-quarter\",\n\t\t\t\"fas-f2c8\" => \"fas fa-thermometer-three-quarters\",\n\t\t\t\"fas-f165\" => \"fas fa-thumbs-down\",\n\t\t\t\"fas-f164\" => \"fas fa-thumbs-up\",\n\t\t\t\"fas-f08d\" => \"fas fa-thumbtack\",\n\t\t\t\"fas-f3ff\" => \"fas fa-ticket-alt\",\n\t\t\t\"fas-f00d\" => \"fas fa-times\",\n\t\t\t\"fas-f057\" => \"fas fa-times-circle\",\n\t\t\t\"fas-f043\" => \"fas fa-tint\",\n\t\t\t\"fas-f5c7\" => \"fas fa-tint-slash\",\n\t\t\t\"fas-f5c8\" => \"fas fa-tired\",\n\t\t\t\"fas-f204\" => \"fas fa-toggle-off\",\n\t\t\t\"fas-f205\" => \"fas fa-toggle-on\",\n\t\t\t\"fas-f7d8\" => \"fas fa-toilet\",\n\t\t\t\"fas-f71e\" => \"fas fa-toilet-paper\",\n\t\t\t\"fas-f972\" => \"fas fa-toilet-paper-slash\",\n\t\t\t\"fas-f552\" => \"fas fa-toolbox\",\n\t\t\t\"fas-f7d9\" => \"fas fa-tools\",\n\t\t\t\"fas-f5c9\" => \"fas fa-tooth\",\n\t\t\t\"fas-f6a0\" => \"fas fa-torah\",\n\t\t\t\"fas-f6a1\" => \"fas fa-torii-gate\",\n\t\t\t\"fas-f722\" => \"fas fa-tractor\",\n\t\t\t\"fas-f25c\" => \"fas fa-trademark\",\n\t\t\t\"fas-f637\" => \"fas fa-traffic-light\",\n\t\t\t\"fas-f941\" => \"fas fa-trailer\",\n\t\t\t\"fas-f238\" => \"fas fa-train\",\n\t\t\t\"fas-f7da\" => \"fas fa-tram\",\n\t\t\t\"fas-f224\" => \"fas fa-transgender\",\n\t\t\t\"fas-f225\" => \"fas fa-transgender-alt\",\n\t\t\t\"fas-f1f8\" => \"fas fa-trash\",\n\t\t\t\"fas-f2ed\" => \"fas fa-trash-alt\",\n\t\t\t\"fas-f829\" => \"fas fa-trash-restore\",\n\t\t\t\"fas-f82a\" => \"fas fa-trash-restore-alt\",\n\t\t\t\"fas-f1bb\" => \"fas fa-tree\",\n\t\t\t\"fas-f091\" => \"fas fa-trophy\",\n\t\t\t\"fas-f0d1\" => \"fas fa-truck\",\n\t\t\t\"fas-f4de\" => \"fas fa-truck-loading\",\n\t\t\t\"fas-f63b\" => \"fas fa-truck-monster\",\n\t\t\t\"fas-f4df\" => \"fas fa-truck-moving\",\n\t\t\t\"fas-f63c\" => \"fas fa-truck-pickup\",\n\t\t\t\"fas-f553\" => \"fas fa-tshirt\",\n\t\t\t\"fas-f1e4\" => \"fas fa-tty\",\n\t\t\t\"fas-f26c\" => \"fas fa-tv\",\n\t\t\t\"fas-f0e9\" => \"fas fa-umbrella\",\n\t\t\t\"fas-f5ca\" => \"fas fa-umbrella-beach\",\n\t\t\t\"fas-f0cd\" => \"fas fa-underline\",\n\t\t\t\"fas-f0e2\" => \"fas fa-undo\",\n\t\t\t\"fas-f2ea\" => \"fas fa-undo-alt\",\n\t\t\t\"fas-f29a\" => \"fas fa-universal-access\",\n\t\t\t\"fas-f19c\" => \"fas fa-university\",\n\t\t\t\"fas-f127\" => \"fas fa-unlink\",\n\t\t\t\"fas-f09c\" => \"fas fa-unlock\",\n\t\t\t\"fas-f13e\" => \"fas fa-unlock-alt\",\n\t\t\t\"fas-f093\" => \"fas fa-upload\",\n\t\t\t\"fas-f007\" => \"fas fa-user\",\n\t\t\t\"fas-f406\" => \"fas fa-user-alt\",\n\t\t\t\"fas-f4fa\" => \"fas fa-user-alt-slash\",\n\t\t\t\"fas-f4fb\" => \"fas fa-user-astronaut\",\n\t\t\t\"fas-f4fc\" => \"fas fa-user-check\",\n\t\t\t\"fas-f2bd\" => \"fas fa-user-circle\",\n\t\t\t\"fas-f4fd\" => \"fas fa-user-clock\",\n\t\t\t\"fas-f4fe\" => \"fas fa-user-cog\",\n\t\t\t\"fas-f4ff\" => \"fas fa-user-edit\",\n\t\t\t\"fas-f500\" => \"fas fa-user-friends\",\n\t\t\t\"fas-f501\" => \"fas fa-user-graduate\",\n\t\t\t\"fas-f728\" => \"fas fa-user-injured\",\n\t\t\t\"fas-f502\" => \"fas fa-user-lock\",\n\t\t\t\"fas-f0f0\" => \"fas fa-user-md\",\n\t\t\t\"fas-f503\" => \"fas fa-user-minus\",\n\t\t\t\"fas-f504\" => \"fas fa-user-ninja\",\n\t\t\t\"fas-f82f\" => \"fas fa-user-nurse\",\n\t\t\t\"fas-f234\" => \"fas fa-user-plus\",\n\t\t\t\"fas-f21b\" => \"fas fa-user-secret\",\n\t\t\t\"fas-f505\" => \"fas fa-user-shield\",\n\t\t\t\"fas-f506\" => \"fas fa-user-slash\",\n\t\t\t\"fas-f507\" => \"fas fa-user-tag\",\n\t\t\t\"fas-f508\" => \"fas fa-user-tie\",\n\t\t\t\"fas-f235\" => \"fas fa-user-times\",\n\t\t\t\"fas-f0c0\" => \"fas fa-users\",\n\t\t\t\"fas-f509\" => \"fas fa-users-cog\",\n\t\t\t\"fas-f2e5\" => \"fas fa-utensil-spoon\",\n\t\t\t\"fas-f2e7\" => \"fas fa-utensils\",\n\t\t\t\"fas-f5cb\" => \"fas fa-vector-square\",\n\t\t\t\"fas-f221\" => \"fas fa-venus\",\n\t\t\t\"fas-f226\" => \"fas fa-venus-double\",\n\t\t\t\"fas-f228\" => \"fas fa-venus-mars\",\n\t\t\t\"fas-f492\" => \"fas fa-vial\",\n\t\t\t\"fas-f493\" => \"fas fa-vials\",\n\t\t\t\"fas-f03d\" => \"fas fa-video\",\n\t\t\t\"fas-f4e2\" => \"fas fa-video-slash\",\n\t\t\t\"fas-f6a7\" => \"fas fa-vihara\",\n\t\t\t\"fas-f974\" => \"fas fa-virus\",\n\t\t\t\"fas-f975\" => \"fas fa-virus-slash\",\n\t\t\t\"fas-f976\" => \"fas fa-viruses\",\n\t\t\t\"fas-f897\" => \"fas fa-voicemail\",\n\t\t\t\"fas-f45f\" => \"fas fa-volleyball-ball\",\n\t\t\t\"fas-f027\" => \"fas fa-volume-down\",\n\t\t\t\"fas-f6a9\" => \"fas fa-volume-mute\",\n\t\t\t\"fas-f026\" => \"fas fa-volume-off\",\n\t\t\t\"fas-f028\" => \"fas fa-volume-up\",\n\t\t\t\"fas-f772\" => \"fas fa-vote-yea\",\n\t\t\t\"fas-f729\" => \"fas fa-vr-cardboard\",\n\t\t\t\"fas-f554\" => \"fas fa-walking\",\n\t\t\t\"fas-f555\" => \"fas fa-wallet\",\n\t\t\t\"fas-f494\" => \"fas fa-warehouse\",\n\t\t\t\"fas-f773\" => \"fas fa-water\",\n\t\t\t\"fas-f83e\" => \"fas fa-wave-square\",\n\t\t\t\"fas-f496\" => \"fas fa-weight\",\n\t\t\t\"fas-f5cd\" => \"fas fa-weight-hanging\",\n\t\t\t\"fas-f193\" => \"fas fa-wheelchair\",\n\t\t\t\"fas-f1eb\" => \"fas fa-wifi\",\n\t\t\t\"fas-f72e\" => \"fas fa-wind\",\n\t\t\t\"fas-f410\" => \"fas fa-window-close\",\n\t\t\t\"fas-f2d0\" => \"fas fa-window-maximize\",\n\t\t\t\"fas-f2d1\" => \"fas fa-window-minimize\",\n\t\t\t\"fas-f2d2\" => \"fas fa-window-restore\",\n\t\t\t\"fas-f72f\" => \"fas fa-wine-bottle\",\n\t\t\t\"fas-f4e3\" => \"fas fa-wine-glass\",\n\t\t\t\"fas-f5ce\" => \"fas fa-wine-glass-alt\",\n\t\t\t\"fas-f159\" => \"fas fa-won-sign\",\n\t\t\t\"fas-f0ad\" => \"fas fa-wrench\",\n\t\t\t\"fas-f497\" => \"fas fa-x-ray\",\n\t\t\t\"fas-f157\" => \"fas fa-yen-sign\",\n\t\t\t\"fas-f6ad\" => \"fas fa-yin-y\"\n\t\t);\n\n\t\t$regular_icons = array(\t\n\t\t\t\"far-f2b9\" => \"far fa-address-book\",\n\t\t\t\"far-f2bb\" => \"far fa-address-card\",\n\t\t\t\"far-f556\" => \"far fa-angry\",\n\t\t\t\"far-f358\" => \"far fa-arrow-alt-circle-down\",\n\t\t\t\"far-f359\" => \"far fa-arrow-alt-circle-left\",\n\t\t\t\"far-f35a\" => \"far fa-arrow-alt-circle-right\",\n\t\t\t\"far-f35b\" => \"far fa-arrow-alt-circle-up\",\n\t\t\t\"far-f0f3\" => \"far fa-bell\",\n\t\t\t\"far-f1f6\" => \"far fa-bell-slash\",\n\t\t\t\"far-f02e\" => \"far fa-bookmark\",\n\t\t\t\"far-f1ad\" => \"far fa-building\",\n\t\t\t\"far-f133\" => \"far fa-calendar\",\n\t\t\t\"far-f073\" => \"far fa-calendar-alt\",\n\t\t\t\"far-f274\" => \"far fa-calendar-check\",\n\t\t\t\"far-f272\" => \"far fa-calendar-minus\",\n\t\t\t\"far-f271\" => \"far fa-calendar-plus\",\n\t\t\t\"far-f273\" => \"far fa-calendar-times\",\n\t\t\t\"far-f150\" => \"far fa-caret-square-down\",\n\t\t\t\"far-f191\" => \"far fa-caret-square-left\",\n\t\t\t\"far-f152\" => \"far fa-caret-square-right\",\n\t\t\t\"far-f151\" => \"far fa-caret-square-up\",\n\t\t\t\"far-f080\" => \"far fa-chart-bar\",\n\t\t\t\"far-f058\" => \"far fa-check-circle\",\n\t\t\t\"far-f14a\" => \"far fa-check-square\",\n\t\t\t\"far-f111\" => \"far fa-circle\",\n\t\t\t\"far-f328\" => \"far fa-clipboard\",\n\t\t\t\"far-f017\" => \"far fa-clock\",\n\t\t\t\"far-f24d\" => \"far fa-clone\",\n\t\t\t\"far-f20a\" => \"far fa-closed-captioning\",\n\t\t\t\"far-f075\" => \"far fa-comment\",\n\t\t\t\"far-f27a\" => \"far fa-comment-alt\",\n\t\t\t\"far-f4ad\" => \"far fa-comment-dots\",\n\t\t\t\"far-f086\" => \"far fa-comments\",\n\t\t\t\"far-f14e\" => \"far fa-compass\",\n\t\t\t\"far-f0c5\" => \"far fa-copy\",\n\t\t\t\"far-f1f9\" => \"far fa-copyright\",\n\t\t\t\"far-f09d\" => \"far fa-credit-card\",\n\t\t\t\"far-f567\" => \"far fa-dizzy\",\n\t\t\t\"far-f192\" => \"far fa-dot-circle\",\n\t\t\t\"far-f044\" => \"far fa-edit\",\n\t\t\t\"far-f0e0\" => \"far fa-envelope\",\n\t\t\t\"far-f2b6\" => \"far fa-envelope-open\",\n\t\t\t\"far-f06e\" => \"far fa-eye\",\n\t\t\t\"far-f070\" => \"far fa-eye-slash\",\n\t\t\t\"far-f15b\" => \"far fa-file\",\n\t\t\t\"far-f15c\" => \"far fa-file-alt\",\n\t\t\t\"far-f1c6\" => \"far fa-file-archive\",\n\t\t\t\"far-f1c7\" => \"far fa-file-audio\",\n\t\t\t\"far-f1c9\" => \"far fa-file-code\",\n\t\t\t\"far-f1c3\" => \"far fa-file-excel\",\n\t\t\t\"far-f1c5\" => \"far fa-file-image\",\n\t\t\t\"far-f1c1\" => \"far fa-file-pdf\",\n\t\t\t\"far-f1c4\" => \"far fa-file-powerpoint\",\n\t\t\t\"far-f1c8\" => \"far fa-file-video\",\n\t\t\t\"far-f1c2\" => \"far fa-file-word\",\n\t\t\t\"far-f024\" => \"far fa-flag\",\n\t\t\t\"far-f579\" => \"far fa-flushed\",\n\t\t\t\"far-f07b\" => \"far fa-folder\",\n\t\t\t\"far-f07c\" => \"far fa-folder-open\",\n\t\t\t\"far-f119\" => \"far fa-frown\",\n\t\t\t\"far-f57a\" => \"far fa-frown-open\",\n\t\t\t\"far-f1e3\" => \"far fa-futbol\",\n\t\t\t\"far-f3a5\" => \"far fa-gem\",\n\t\t\t\"far-f57f\" => \"far fa-grimace\",\n\t\t\t\"far-f580\" => \"far fa-grin\",\n\t\t\t\"far-f581\" => \"far fa-grin-alt\",\n\t\t\t\"far-f582\" => \"far fa-grin-beam\",\n\t\t\t\"far-f583\" => \"far fa-grin-beam-sweat\",\n\t\t\t\"far-f584\" => \"far fa-grin-hearts\",\n\t\t\t\"far-f585\" => \"far fa-grin-squint\",\n\t\t\t\"far-f586\" => \"far fa-grin-squint-tears\",\n\t\t\t\"far-f587\" => \"far fa-grin-stars\",\n\t\t\t\"far-f588\" => \"far fa-grin-tears\",\n\t\t\t\"far-f589\" => \"far fa-grin-tongue\",\n\t\t\t\"far-f58a\" => \"far fa-grin-tongue-squint\",\n\t\t\t\"far-f58b\" => \"far fa-grin-tongue-wink\",\n\t\t\t\"far-f58c\" => \"far fa-grin-wink\",\n\t\t\t\"far-f258\" => \"far fa-hand-lizard\",\n\t\t\t\"far-f256\" => \"far fa-hand-paper\",\n\t\t\t\"far-f25b\" => \"far fa-hand-peace\",\n\t\t\t\"far-f0a7\" => \"far fa-hand-point-down\",\n\t\t\t\"far-f0a5\" => \"far fa-hand-point-left\",\n\t\t\t\"far-f0a4\" => \"far fa-hand-point-right\",\n\t\t\t\"far-f0a6\" => \"far fa-hand-point-up\",\n\t\t\t\"far-f25a\" => \"far fa-hand-pointer\",\n\t\t\t\"far-f255\" => \"far fa-hand-rock\",\n\t\t\t\"far-f257\" => \"far fa-hand-scissors\",\n\t\t\t\"far-f259\" => \"far fa-hand-spock\",\n\t\t\t\"far-f2b5\" => \"far fa-handshake\",\n\t\t\t\"far-f0a0\" => \"far fa-hdd\",\n\t\t\t\"far-f004\" => \"far fa-heart\",\n\t\t\t\"far-f0f8\" => \"far fa-hospital\",\n\t\t\t\"far-f254\" => \"far fa-hourglass\",\n\t\t\t\"far-f2c1\" => \"far fa-id-badge\",\n\t\t\t\"far-f2c2\" => \"far fa-id-card\",\n\t\t\t\"far-f03e\" => \"far fa-image\",\n\t\t\t\"far-f302\" => \"far fa-images\",\n\t\t\t\"far-f11c\" => \"far fa-keyboard\",\n\t\t\t\"far-f596\" => \"far fa-kiss\",\n\t\t\t\"far-f597\" => \"far fa-kiss-beam\",\n\t\t\t\"far-f598\" => \"far fa-kiss-wink-heart\",\n\t\t\t\"far-f599\" => \"far fa-laugh\",\n\t\t\t\"far-f59a\" => \"far fa-laugh-beam\",\n\t\t\t\"far-f59b\" => \"far fa-laugh-squint\",\n\t\t\t\"far-f59c\" => \"far fa-laugh-wink\",\n\t\t\t\"far-f094\" => \"far fa-lemon\",\n\t\t\t\"far-f1cd\" => \"far fa-life-ring\",\n\t\t\t\"far-f0eb\" => \"far fa-lightbulb\",\n\t\t\t\"far-f022\" => \"far fa-list-alt\",\n\t\t\t\"far-f279\" => \"far fa-map\",\n\t\t\t\"far-f11a\" => \"far fa-meh\",\n\t\t\t\"far-f5a4\" => \"far fa-meh-blank\",\n\t\t\t\"far-f5a5\" => \"far fa-meh-rolling-eyes\",\n\t\t\t\"far-f146\" => \"far fa-minus-square\",\n\t\t\t\"far-f3d1\" => \"far fa-money-bill-alt\",\n\t\t\t\"far-f186\" => \"far fa-moon\",\n\t\t\t\"far-f1ea\" => \"far fa-newspaper\",\n\t\t\t\"far-f247\" => \"far fa-object-group\",\n\t\t\t\"far-f248\" => \"far fa-object-ungroup\",\n\t\t\t\"far-f1d8\" => \"far fa-paper-plane\",\n\t\t\t\"far-f28b\" => \"far fa-pause-circle\",\n\t\t\t\"far-f144\" => \"far fa-play-circle\",\n\t\t\t\"far-f0fe\" => \"far fa-plus-square\",\n\t\t\t\"far-f059\" => \"far fa-question-circle\",\n\t\t\t\"far-f25d\" => \"far fa-registered\",\n\t\t\t\"far-f5b3\" => \"far fa-sad-cry\",\n\t\t\t\"far-f5b4\" => \"far fa-sad-tear\",\n\t\t\t\"far-f0c7\" => \"far fa-save\",\n\t\t\t\"far-f14d\" => \"far fa-share-square\",\n\t\t\t\"far-f118\" => \"far fa-smile\",\n\t\t\t\"far-f5b8\" => \"far fa-smile-beam\",\n\t\t\t\"far-f4da\" => \"far fa-smile-wink\",\n\t\t\t\"far-f2dc\" => \"far fa-snowflake\",\n\t\t\t\"far-f0c8\" => \"far fa-square\",\n\t\t\t\"far-f005\" => \"far fa-star\",\n\t\t\t\"far-f089\" => \"far fa-star-half\",\n\t\t\t\"far-f249\" => \"far fa-sticky-note\",\n\t\t\t\"far-f28d\" => \"far fa-stop-circle\",\n\t\t\t\"far-f185\" => \"far fa-sun\",\n\t\t\t\"far-f5c2\" => \"far fa-surprise\",\n\t\t\t\"far-f165\" => \"far fa-thumbs-down\",\n\t\t\t\"far-f164\" => \"far fa-thumbs-up\",\n\t\t\t\"far-f057\" => \"far fa-times-circle\",\n\t\t\t\"far-f5c8\" => \"far fa-tired\",\n\t\t\t\"far-f2ed\" => \"far fa-trash-alt\",\n\t\t\t\"far-f007\" => \"far fa-user\",\n\t\t\t\"far-f2bd\" => \"far fa-user-circle\",\n\t\t\t\"far-f410\" => \"far fa-window-close\",\n\t\t\t\"far-f2d0\" => \"far fa-window-maximize\",\n\t\t\t\"far-f2d1\" => \"far fa-window-minimize\",\n\t\t\t\"far-f2d2\" => \"far fa-window-rest\"\n\t\t);\n\n\t\t$brand_icons = array(\n\t\t\t\"fab-f26e\" => \"fab fa-500px\",\n\t\t\t\"fab-f368\" => \"fab fa-accessible-icon\",\n\t\t\t\"fab-f369\" => \"fab fa-accusoft\",\n\t\t\t\"fab-f6af\" => \"fab fa-acquisitions-incorporated\",\n\t\t\t\"fab-f170\" => \"fab fa-adn\",\n\t\t\t\"fab-f778\" => \"fab fa-adobe\",\n\t\t\t\"fab-f36a\" => \"fab fa-adversal\",\n\t\t\t\"fab-f36b\" => \"fab fa-affiliatetheme\",\n\t\t\t\"fab-f834\" => \"fab fa-airbnb\",\n\t\t\t\"fab-f36c\" => \"fab fa-algolia\",\n\t\t\t\"fab-f642\" => \"fab fa-alipay\",\n\t\t\t\"fab-f270\" => \"fab fa-amazon\",\n\t\t\t\"fab-f42c\" => \"fab fa-amazon-pay\",\n\t\t\t\"fab-f36d\" => \"fab fa-amilia\",\n\t\t\t\"fab-f17b\" => \"fab fa-android\",\n\t\t\t\"fab-f209\" => \"fab fa-angellist\",\n\t\t\t\"fab-f36e\" => \"fab fa-angrycreative\",\n\t\t\t\"fab-f420\" => \"fab fa-angular\",\n\t\t\t\"fab-f36f\" => \"fab fa-app-store\",\n\t\t\t\"fab-f370\" => \"fab fa-app-store-ios\",\n\t\t\t\"fab-f371\" => \"fab fa-apper\",\n\t\t\t\"fab-f179\" => \"fab fa-apple\",\n\t\t\t\"fab-f415\" => \"fab fa-apple-pay\",\n\t\t\t\"fab-f77a\" => \"fab fa-artstation\",\n\t\t\t\"fab-f372\" => \"fab fa-asymmetrik\",\n\t\t\t\"fab-f77b\" => \"fab fa-atlassian\",\n\t\t\t\"fab-f373\" => \"fab fa-audible\",\n\t\t\t\"fab-f41c\" => \"fab fa-autoprefixer\",\n\t\t\t\"fab-f374\" => \"fab fa-avianex\",\n\t\t\t\"fab-f421\" => \"fab fa-aviato\",\n\t\t\t\"fab-f375\" => \"fab fa-aws\",\n\t\t\t\"fab-f2d5\" => \"fab fa-bandcamp\",\n\t\t\t\"fab-f835\" => \"fab fa-battle-net\",\n\t\t\t\"fab-f1b4\" => \"fab fa-behance\",\n\t\t\t\"fab-f1b5\" => \"fab fa-behance-square\",\n\t\t\t\"fab-f378\" => \"fab fa-bimobject\",\n\t\t\t\"fab-f171\" => \"fab fa-bitbucket\",\n\t\t\t\"fab-f379\" => \"fab fa-bitcoin\",\n\t\t\t\"fab-f37a\" => \"fab fa-bity\",\n\t\t\t\"fab-f27e\" => \"fab fa-black-tie\",\n\t\t\t\"fab-f37b\" => \"fab fa-blackberry\",\n\t\t\t\"fab-f37c\" => \"fab fa-blogger\",\n\t\t\t\"fab-f37d\" => \"fab fa-blogger-b\",\n\t\t\t\"fab-f293\" => \"fab fa-bluetooth\",\n\t\t\t\"fab-f294\" => \"fab fa-bluetooth-b\",\n\t\t\t\"fab-f836\" => \"fab fa-bootstrap\",\n\t\t\t\"fab-f15a\" => \"fab fa-btc\",\n\t\t\t\"fab-f837\" => \"fab fa-buffer\",\n\t\t\t\"fab-f37f\" => \"fab fa-buromobelexperte\",\n\t\t\t\"fab-f8a6\" => \"fab fa-buy-n-large\",\n\t\t\t\"fab-f20d\" => \"fab fa-buysellads\",\n\t\t\t\"fab-f785\" => \"fab fa-canadian-maple-leaf\",\n\t\t\t\"fab-f42d\" => \"fab fa-cc-amazon-pay\",\n\t\t\t\"fab-f1f3\" => \"fab fa-cc-amex\",\n\t\t\t\"fab-f416\" => \"fab fa-cc-apple-pay\",\n\t\t\t\"fab-f24c\" => \"fab fa-cc-diners-club\",\n\t\t\t\"fab-f1f2\" => \"fab fa-cc-discover\",\n\t\t\t\"fab-f24b\" => \"fab fa-cc-jcb\",\n\t\t\t\"fab-f1f1\" => \"fab fa-cc-mastercard\",\n\t\t\t\"fab-f1f4\" => \"fab fa-cc-paypal\",\n\t\t\t\"fab-f1f5\" => \"fab fa-cc-stripe\",\n\t\t\t\"fab-f1f0\" => \"fab fa-cc-visa\",\n\t\t\t\"fab-f380\" => \"fab fa-centercode\",\n\t\t\t\"fab-f789\" => \"fab fa-centos\",\n\t\t\t\"fab-f268\" => \"fab fa-chrome\",\n\t\t\t\"fab-f838\" => \"fab fa-chromecast\",\n\t\t\t\"fab-f383\" => \"fab fa-cloudscale\",\n\t\t\t\"fab-f384\" => \"fab fa-cloudsmith\",\n\t\t\t\"fab-f385\" => \"fab fa-cloudversify\",\n\t\t\t\"fab-f1cb\" => \"fab fa-codepen\",\n\t\t\t\"fab-f284\" => \"fab fa-codiepie\",\n\t\t\t\"fab-f78d\" => \"fab fa-confluence\",\n\t\t\t\"fab-f20e\" => \"fab fa-connectdevelop\",\n\t\t\t\"fab-f26d\" => \"fab fa-contao\",\n\t\t\t\"fab-f89e\" => \"fab fa-cotton-bureau\",\n\t\t\t\"fab-f388\" => \"fab fa-cpanel\",\n\t\t\t\"fab-f25e\" => \"fab fa-creative-commons\",\n\t\t\t\"fab-f4e7\" => \"fab fa-creative-commons-by\",\n\t\t\t\"fab-f4e8\" => \"fab fa-creative-commons-nc\",\n\t\t\t\"fab-f4e9\" => \"fab fa-creative-commons-nc-eu\",\n\t\t\t\"fab-f4ea\" => \"fab fa-creative-commons-nc-jp\",\n\t\t\t\"fab-f4eb\" => \"fab fa-creative-commons-nd\",\n\t\t\t\"fab-f4ec\" => \"fab fa-creative-commons-pd\",\n\t\t\t\"fab-f4ed\" => \"fab fa-creative-commons-pd-alt\",\n\t\t\t\"fab-f4ee\" => \"fab fa-creative-commons-remix\",\n\t\t\t\"fab-f4ef\" => \"fab fa-creative-commons-sa\",\n\t\t\t\"fab-f4f0\" => \"fab fa-creative-commons-sampling\",\n\t\t\t\"fab-f4f1\" => \"fab fa-creative-commons-sampling-plus\",\n\t\t\t\"fab-f4f2\" => \"fab fa-creative-commons-share\",\n\t\t\t\"fab-f4f3\" => \"fab fa-creative-commons-zero\",\n\t\t\t\"fab-f6c9\" => \"fab fa-critical-role\",\n\t\t\t\"fab-f13c\" => \"fab fa-css3\",\n\t\t\t\"fab-f38b\" => \"fab fa-css3-alt\",\n\t\t\t\"fab-f38c\" => \"fab fa-cuttlefish\",\n\t\t\t\"fab-f38d\" => \"fab fa-d-and-d\",\n\t\t\t\"fab-f6ca\" => \"fab fa-d-and-d-beyond\",\n\t\t\t\"fab-f952\" => \"fab fa-dailymotion\",\n\t\t\t\"fab-f210\" => \"fab fa-dashcube\",\n\t\t\t\"fab-f1a5\" => \"fab fa-delicious\",\n\t\t\t\"fab-f38e\" => \"fab fa-deploydog\",\n\t\t\t\"fab-f38f\" => \"fab fa-deskpro\",\n\t\t\t\"fab-f6cc\" => \"fab fa-dev\",\n\t\t\t\"fab-f1bd\" => \"fab fa-deviantart\",\n\t\t\t\"fab-f790\" => \"fab fa-dhl\",\n\t\t\t\"fab-f791\" => \"fab fa-diaspora\",\n\t\t\t\"fab-f1a6\" => \"fab fa-digg\",\n\t\t\t\"fab-f391\" => \"fab fa-digital-ocean\",\n\t\t\t\"fab-f392\" => \"fab fa-discord\",\n\t\t\t\"fab-f393\" => \"fab fa-discourse\",\n\t\t\t\"fab-f394\" => \"fab fa-dochub\",\n\t\t\t\"fab-f395\" => \"fab fa-docker\",\n\t\t\t\"fab-f396\" => \"fab fa-draft2digital\",\n\t\t\t\"fab-f17d\" => \"fab fa-dribbble\",\n\t\t\t\"fab-f397\" => \"fab fa-dribbble-square\",\n\t\t\t\"fab-f16b\" => \"fab fa-dropbox\",\n\t\t\t\"fab-f1a9\" => \"fab fa-drupal\",\n\t\t\t\"fab-f399\" => \"fab fa-dyalog\",\n\t\t\t\"fab-f39a\" => \"fab fa-earlybirds\",\n\t\t\t\"fab-f4f4\" => \"fab fa-ebay\",\n\t\t\t\"fab-f282\" => \"fab fa-edge\",\n\t\t\t\"fab-f430\" => \"fab fa-elementor\",\n\t\t\t\"fab-f5f1\" => \"fab fa-ello\",\n\t\t\t\"fab-f423\" => \"fab fa-ember\",\n\t\t\t\"fab-f1d1\" => \"fab fa-empire\",\n\t\t\t\"fab-f299\" => \"fab fa-envira\",\n\t\t\t\"fab-f39d\" => \"fab fa-erlang\",\n\t\t\t\"fab-f42e\" => \"fab fa-ethereum\",\n\t\t\t\"fab-f2d7\" => \"fab fa-etsy\",\n\t\t\t\"fab-f839\" => \"fab fa-evernote\",\n\t\t\t\"fab-f23e\" => \"fab fa-expeditedssl\",\n\t\t\t\"fab-f09a\" => \"fab fa-facebook\",\n\t\t\t\"fab-f39e\" => \"fab fa-facebook-f\",\n\t\t\t\"fab-f39f\" => \"fab fa-facebook-messenger\",\n\t\t\t\"fab-f082\" => \"fab fa-facebook-square\",\n\t\t\t\"fab-f6dc\" => \"fab fa-fantasy-flight-games\",\n\t\t\t\"fab-f797\" => \"fab fa-fedex\",\n\t\t\t\"fab-f798\" => \"fab fa-fedora\",\n\t\t\t\"fab-f799\" => \"fab fa-figma\",\n\t\t\t\"fab-f269\" => \"fab fa-firefox\",\n\t\t\t\"fab-f907\" => \"fab fa-firefox-browser\",\n\t\t\t\"fab-f2b0\" => \"fab fa-first-order\",\n\t\t\t\"fab-f50a\" => \"fab fa-first-order-alt\",\n\t\t\t\"fab-f3a1\" => \"fab fa-firstdraft\",\n\t\t\t\"fab-f16e\" => \"fab fa-flickr\",\n\t\t\t\"fab-f44d\" => \"fab fa-flipboard\",\n\t\t\t\"fab-f417\" => \"fab fa-fly\",\n\t\t\t\"fab-f2b4\" => \"fab fa-font-awesome\",\n\t\t\t\"fab-f35c\" => \"fab fa-font-awesome-alt\",\n\t\t\t\"fab-f425\" => \"fab fa-font-awesome-flag\",\n\t\t\t\"fab-f280\" => \"fab fa-fonticons\",\n\t\t\t\"fab-f3a2\" => \"fab fa-fonticons-fi\",\n\t\t\t\"fab-f286\" => \"fab fa-fort-awesome\",\n\t\t\t\"fab-f3a3\" => \"fab fa-fort-awesome-alt\",\n\t\t\t\"fab-f211\" => \"fab fa-forumbee\",\n\t\t\t\"fab-f180\" => \"fab fa-foursquare\",\n\t\t\t\"fab-f2c5\" => \"fab fa-free-code-camp\",\n\t\t\t\"fab-f3a4\" => \"fab fa-freebsd\",\n\t\t\t\"fab-f50b\" => \"fab fa-fulcrum\",\n\t\t\t\"fab-f50c\" => \"fab fa-galactic-republic\",\n\t\t\t\"fab-f50d\" => \"fab fa-galactic-senate\",\n\t\t\t\"fab-f265\" => \"fab fa-get-pocket\",\n\t\t\t\"fab-f260\" => \"fab fa-gg\",\n\t\t\t\"fab-f261\" => \"fab fa-gg-circle\",\n\t\t\t\"fab-f1d3\" => \"fab fa-git\",\n\t\t\t\"fab-f841\" => \"fab fa-git-alt\",\n\t\t\t\"fab-f1d2\" => \"fab fa-git-square\",\n\t\t\t\"fab-f09b\" => \"fab fa-github\",\n\t\t\t\"fab-f113\" => \"fab fa-github-alt\",\n\t\t\t\"fab-f092\" => \"fab fa-github-square\",\n\t\t\t\"fab-f3a6\" => \"fab fa-gitkraken\",\n\t\t\t\"fab-f296\" => \"fab fa-gitlab\",\n\t\t\t\"fab-f426\" => \"fab fa-gitter\",\n\t\t\t\"fab-f2a5\" => \"fab fa-glide\",\n\t\t\t\"fab-f2a6\" => \"fab fa-glide-g\",\n\t\t\t\"fab-f3a7\" => \"fab fa-gofore\",\n\t\t\t\"fab-f3a8\" => \"fab fa-goodreads\",\n\t\t\t\"fab-f3a9\" => \"fab fa-goodreads-g\",\n\t\t\t\"fab-f1a0\" => \"fab fa-google\",\n\t\t\t\"fab-f3aa\" => \"fab fa-google-drive\",\n\t\t\t\"fab-f3ab\" => \"fab fa-google-play\",\n\t\t\t\"fab-f2b3\" => \"fab fa-google-plus\",\n\t\t\t\"fab-f0d5\" => \"fab fa-google-plus-g\",\n\t\t\t\"fab-f0d4\" => \"fab fa-google-plus-square\",\n\t\t\t\"fab-f1ee\" => \"fab fa-google-wallet\",\n\t\t\t\"fab-f184\" => \"fab fa-gratipay\",\n\t\t\t\"fab-f2d6\" => \"fab fa-grav\",\n\t\t\t\"fab-f3ac\" => \"fab fa-gripfire\",\n\t\t\t\"fab-f3ad\" => \"fab fa-grunt\",\n\t\t\t\"fab-f3ae\" => \"fab fa-gulp\",\n\t\t\t\"fab-f1d4\" => \"fab fa-hacker-news\",\n\t\t\t\"fab-f3af\" => \"fab fa-hacker-news-square\",\n\t\t\t\"fab-f5f7\" => \"fab fa-hackerrank\",\n\t\t\t\"fab-f452\" => \"fab fa-hips\",\n\t\t\t\"fab-f3b0\" => \"fab fa-hire-a-helper\",\n\t\t\t\"fab-f427\" => \"fab fa-hooli\",\n\t\t\t\"fab-f592\" => \"fab fa-hornbill\",\n\t\t\t\"fab-f3b1\" => \"fab fa-hotjar\",\n\t\t\t\"fab-f27c\" => \"fab fa-houzz\",\n\t\t\t\"fab-f13b\" => \"fab fa-html5\",\n\t\t\t\"fab-f3b2\" => \"fab fa-hubspot\",\n\t\t\t\"fab-f913\" => \"fab fa-ideal\",\n\t\t\t\"fab-f2d8\" => \"fab fa-imdb\",\n\t\t\t\"fab-f16d\" => \"fab fa-instagram\",\n\t\t\t\"fab-f955\" => \"fab fa-instagram-square\",\n\t\t\t\"fab-f7af\" => \"fab fa-intercom\",\n\t\t\t\"fab-f26b\" => \"fab fa-internet-explorer\",\n\t\t\t\"fab-f7b0\" => \"fab fa-invision\",\n\t\t\t\"fab-f208\" => \"fab fa-ioxhost\",\n\t\t\t\"fab-f83a\" => \"fab fa-itch-io\",\n\t\t\t\"fab-f3b4\" => \"fab fa-itunes\",\n\t\t\t\"fab-f3b5\" => \"fab fa-itunes-note\",\n\t\t\t\"fab-f4e4\" => \"fab fa-java\",\n\t\t\t\"fab-f50e\" => \"fab fa-jedi-order\",\n\t\t\t\"fab-f3b6\" => \"fab fa-jenkins\",\n\t\t\t\"fab-f7b1\" => \"fab fa-jira\",\n\t\t\t\"fab-f3b7\" => \"fab fa-joget\",\n\t\t\t\"fab-f1aa\" => \"fab fa-joomla\",\n\t\t\t\"fab-f3b8\" => \"fab fa-js\",\n\t\t\t\"fab-f3b9\" => \"fab fa-js-square\",\n\t\t\t\"fab-f1cc\" => \"fab fa-jsfiddle\",\n\t\t\t\"fab-f5fa\" => \"fab fa-kaggle\",\n\t\t\t\"fab-f4f5\" => \"fab fa-keybase\",\n\t\t\t\"fab-f3ba\" => \"fab fa-keycdn\",\n\t\t\t\"fab-f3bb\" => \"fab fa-kickstarter\",\n\t\t\t\"fab-f3bc\" => \"fab fa-kickstarter-k\",\n\t\t\t\"fab-f42f\" => \"fab fa-korvue\",\n\t\t\t\"fab-f3bd\" => \"fab fa-laravel\",\n\t\t\t\"fab-f202\" => \"fab fa-lastfm\",\n\t\t\t\"fab-f203\" => \"fab fa-lastfm-square\",\n\t\t\t\"fab-f212\" => \"fab fa-leanpub\",\n\t\t\t\"fab-f41d\" => \"fab fa-less\",\n\t\t\t\"fab-f3c0\" => \"fab fa-line\",\n\t\t\t\"fab-f08c\" => \"fab fa-linkedin\",\n\t\t\t\"fab-f0e1\" => \"fab fa-linkedin-in\",\n\t\t\t\"fab-f2b8\" => \"fab fa-linode\",\n\t\t\t\"fab-f17c\" => \"fab fa-linux\",\n\t\t\t\"fab-f3c3\" => \"fab fa-lyft\",\n\t\t\t\"fab-f3c4\" => \"fab fa-magento\",\n\t\t\t\"fab-f59e\" => \"fab fa-mailchimp\",\n\t\t\t\"fab-f50f\" => \"fab fa-mandalorian\",\n\t\t\t\"fab-f60f\" => \"fab fa-markdown\",\n\t\t\t\"fab-f4f6\" => \"fab fa-mastodon\",\n\t\t\t\"fab-f136\" => \"fab fa-maxcdn\",\n\t\t\t\"fab-f8ca\" => \"fab fa-mdb\",\n\t\t\t\"fab-f3c6\" => \"fab fa-medapps\",\n\t\t\t\"fab-f23a\" => \"fab fa-medium\",\n\t\t\t\"fab-f3c7\" => \"fab fa-medium-m\",\n\t\t\t\"fab-f3c8\" => \"fab fa-medrt\",\n\t\t\t\"fab-f2e0\" => \"fab fa-meetup\",\n\t\t\t\"fab-f5a3\" => \"fab fa-megaport\",\n\t\t\t\"fab-f7b3\" => \"fab fa-mendeley\",\n\t\t\t\"fab-f91a\" => \"fab fa-microblog\",\n\t\t\t\"fab-f3ca\" => \"fab fa-microsoft\",\n\t\t\t\"fab-f3cb\" => \"fab fa-mix\",\n\t\t\t\"fab-f289\" => \"fab fa-mixcloud\",\n\t\t\t\"fab-f956\" => \"fab fa-mixer\",\n\t\t\t\"fab-f3cc\" => \"fab fa-mizuni\",\n\t\t\t\"fab-f285\" => \"fab fa-modx\",\n\t\t\t\"fab-f3d0\" => \"fab fa-monero\",\n\t\t\t\"fab-f3d2\" => \"fab fa-napster\",\n\t\t\t\"fab-f612\" => \"fab fa-neos\",\n\t\t\t\"fab-f5a8\" => \"fab fa-nimblr\",\n\t\t\t\"fab-f419\" => \"fab fa-node\",\n\t\t\t\"fab-f3d3\" => \"fab fa-node-js\",\n\t\t\t\"fab-f3d4\" => \"fab fa-npm\",\n\t\t\t\"fab-f3d5\" => \"fab fa-ns8\",\n\t\t\t\"fab-f3d6\" => \"fab fa-nutritionix\",\n\t\t\t\"fab-f263\" => \"fab fa-odnoklassniki\",\n\t\t\t\"fab-f264\" => \"fab fa-odnoklassniki-square\",\n\t\t\t\"fab-f510\" => \"fab fa-old-republic\",\n\t\t\t\"fab-f23d\" => \"fab fa-opencart\",\n\t\t\t\"fab-f19b\" => \"fab fa-openid\",\n\t\t\t\"fab-f26a\" => \"fab fa-opera\",\n\t\t\t\"fab-f23c\" => \"fab fa-optin-monster\",\n\t\t\t\"fab-f8d2\" => \"fab fa-orcid\",\n\t\t\t\"fab-f41a\" => \"fab fa-osi\",\n\t\t\t\"fab-f3d7\" => \"fab fa-page4\",\n\t\t\t\"fab-f18c\" => \"fab fa-pagelines\",\n\t\t\t\"fab-f3d8\" => \"fab fa-palfed\",\n\t\t\t\"fab-f3d9\" => \"fab fa-patreon\",\n\t\t\t\"fab-f1ed\" => \"fab fa-paypal\",\n\t\t\t\"fab-f704\" => \"fab fa-penny-arcade\",\n\t\t\t\"fab-f3da\" => \"fab fa-periscope\",\n\t\t\t\"fab-f3db\" => \"fab fa-phabricator\",\n\t\t\t\"fab-f3dc\" => \"fab fa-phoenix-framework\",\n\t\t\t\"fab-f511\" => \"fab fa-phoenix-squadron\",\n\t\t\t\"fab-f457\" => \"fab fa-php\",\n\t\t\t\"fab-f2ae\" => \"fab fa-pied-piper\",\n\t\t\t\"fab-f1a8\" => \"fab fa-pied-piper-alt\",\n\t\t\t\"fab-f4e5\" => \"fab fa-pied-piper-hat\",\n\t\t\t\"fab-f1a7\" => \"fab fa-pied-piper-pp\",\n\t\t\t\"fab-f91e\" => \"fab fa-pied-piper-square\",\n\t\t\t\"fab-f0d2\" => \"fab fa-pinterest\",\n\t\t\t\"fab-f231\" => \"fab fa-pinterest-p\",\n\t\t\t\"fab-f0d3\" => \"fab fa-pinterest-square\",\n\t\t\t\"fab-f3df\" => \"fab fa-playstation\",\n\t\t\t\"fab-f288\" => \"fab fa-product-hunt\",\n\t\t\t\"fab-f3e1\" => \"fab fa-pushed\",\n\t\t\t\"fab-f3e2\" => \"fab fa-python\",\n\t\t\t\"fab-f1d6\" => \"fab fa-qq\",\n\t\t\t\"fab-f459\" => \"fab fa-quinscape\",\n\t\t\t\"fab-f2c4\" => \"fab fa-quora\",\n\t\t\t\"fab-f4f7\" => \"fab fa-r-project\",\n\t\t\t\"fab-f7bb\" => \"fab fa-raspberry-pi\",\n\t\t\t\"fab-f2d9\" => \"fab fa-ravelry\",\n\t\t\t\"fab-f41b\" => \"fab fa-react\",\n\t\t\t\"fab-f75d\" => \"fab fa-reacteurope\",\n\t\t\t\"fab-f4d5\" => \"fab fa-readme\",\n\t\t\t\"fab-f1d0\" => \"fab fa-rebel\",\n\t\t\t\"fab-f3e3\" => \"fab fa-red-river\",\n\t\t\t\"fab-f1a1\" => \"fab fa-reddit\",\n\t\t\t\"fab-f281\" => \"fab fa-reddit-alien\",\n\t\t\t\"fab-f1a2\" => \"fab fa-reddit-square\",\n\t\t\t\"fab-f7bc\" => \"fab fa-redhat\",\n\t\t\t\"fab-f18b\" => \"fab fa-renren\",\n\t\t\t\"fab-f3e6\" => \"fab fa-replyd\",\n\t\t\t\"fab-f4f8\" => \"fab fa-researchgate\",\n\t\t\t\"fab-f3e7\" => \"fab fa-resolving\",\n\t\t\t\"fab-f5b2\" => \"fab fa-rev\",\n\t\t\t\"fab-f3e8\" => \"fab fa-rocketchat\",\n\t\t\t\"fab-f3e9\" => \"fab fa-rockrms\",\n\t\t\t\"fab-f267\" => \"fab fa-safari\",\n\t\t\t\"fab-f83b\" => \"fab fa-salesforce\",\n\t\t\t\"fab-f41e\" => \"fab fa-sass\",\n\t\t\t\"fab-f3ea\" => \"fab fa-schlix\",\n\t\t\t\"fab-f28a\" => \"fab fa-scribd\",\n\t\t\t\"fab-f3eb\" => \"fab fa-searchengin\",\n\t\t\t\"fab-f2da\" => \"fab fa-sellcast\",\n\t\t\t\"fab-f213\" => \"fab fa-sellsy\",\n\t\t\t\"fab-f3ec\" => \"fab fa-servicestack\",\n\t\t\t\"fab-f214\" => \"fab fa-shirtsinbulk\",\n\t\t\t\"fab-f957\" => \"fab fa-shopify\",\n\t\t\t\"fab-f5b5\" => \"fab fa-shopware\",\n\t\t\t\"fab-f215\" => \"fab fa-simplybuilt\",\n\t\t\t\"fab-f3ee\" => \"fab fa-sistrix\",\n\t\t\t\"fab-f512\" => \"fab fa-sith\",\n\t\t\t\"fab-f7c6\" => \"fab fa-sketch\",\n\t\t\t\"fab-f216\" => \"fab fa-skyatlas\",\n\t\t\t\"fab-f17e\" => \"fab fa-skype\",\n\t\t\t\"fab-f198\" => \"fab fa-slack\",\n\t\t\t\"fab-f3ef\" => \"fab fa-slack-hash\",\n\t\t\t\"fab-f1e7\" => \"fab fa-slideshare\",\n\t\t\t\"fab-f2ab\" => \"fab fa-snapchat\",\n\t\t\t\"fab-f2ac\" => \"fab fa-snapchat-ghost\",\n\t\t\t\"fab-f2ad\" => \"fab fa-snapchat-square\",\n\t\t\t\"fab-f1be\" => \"fab fa-soundcloud\",\n\t\t\t\"fab-f7d3\" => \"fab fa-sourcetree\",\n\t\t\t\"fab-f3f3\" => \"fab fa-speakap\",\n\t\t\t\"fab-f83c\" => \"fab fa-speaker-deck\",\n\t\t\t\"fab-f1bc\" => \"fab fa-spotify\",\n\t\t\t\"fab-f5be\" => \"fab fa-squarespace\",\n\t\t\t\"fab-f18d\" => \"fab fa-stack-exchange\",\n\t\t\t\"fab-f16c\" => \"fab fa-stack-overflow\",\n\t\t\t\"fab-f842\" => \"fab fa-stackpath\",\n\t\t\t\"fab-f3f5\" => \"fab fa-staylinked\",\n\t\t\t\"fab-f1b6\" => \"fab fa-steam\",\n\t\t\t\"fab-f1b7\" => \"fab fa-steam-square\",\n\t\t\t\"fab-f3f6\" => \"fab fa-steam-symbol\",\n\t\t\t\"fab-f3f7\" => \"fab fa-sticker-mule\",\n\t\t\t\"fab-f428\" => \"fab fa-strava\",\n\t\t\t\"fab-f429\" => \"fab fa-stripe\",\n\t\t\t\"fab-f42a\" => \"fab fa-stripe-s\",\n\t\t\t\"fab-f3f8\" => \"fab fa-studiovinari\",\n\t\t\t\"fab-f1a4\" => \"fab fa-stumbleupon\",\n\t\t\t\"fab-f1a3\" => \"fab fa-stumbleupon-circle\",\n\t\t\t\"fab-f2dd\" => \"fab fa-superpowers\",\n\t\t\t\"fab-f3f9\" => \"fab fa-supple\",\n\t\t\t\"fab-f7d6\" => \"fab fa-suse\",\n\t\t\t\"fab-f8e1\" => \"fab fa-swift\",\n\t\t\t\"fab-f83d\" => \"fab fa-symfony\",\n\t\t\t\"fab-f4f9\" => \"fab fa-teamspeak\",\n\t\t\t\"fab-f2c6\" => \"fab fa-telegram\",\n\t\t\t\"fab-f3fe\" => \"fab fa-telegram-plane\",\n\t\t\t\"fab-f1d5\" => \"fab fa-tencent-weibo\",\n\t\t\t\"fab-f69d\" => \"fab fa-the-red-yeti\",\n\t\t\t\"fab-f5c6\" => \"fab fa-themeco\",\n\t\t\t\"fab-f2b2\" => \"fab fa-themeisle\",\n\t\t\t\"fab-f731\" => \"fab fa-think-peaks\",\n\t\t\t\"fab-f513\" => \"fab fa-trade-federation\",\n\t\t\t\"fab-f181\" => \"fab fa-trello\",\n\t\t\t\"fab-f262\" => \"fab fa-tripadvisor\",\n\t\t\t\"fab-f173\" => \"fab fa-tumblr\",\n\t\t\t\"fab-f174\" => \"fab fa-tumblr-square\",\n\t\t\t\"fab-f1e8\" => \"fab fa-twitch\",\n\t\t\t\"fab-f099\" => \"fab fa-twitter\",\n\t\t\t\"fab-f081\" => \"fab fa-twitter-square\",\n\t\t\t\"fab-f42b\" => \"fab fa-typo3\",\n\t\t\t\"fab-f402\" => \"fab fa-uber\",\n\t\t\t\"fab-f7df\" => \"fab fa-ubuntu\",\n\t\t\t\"fab-f403\" => \"fab fa-uikit\",\n\t\t\t\"fab-f8e8\" => \"fab fa-umbraco\",\n\t\t\t\"fab-f404\" => \"fab fa-uniregistry\",\n\t\t\t\"fab-f949\" => \"fab fa-unity\",\n\t\t\t\"fab-f405\" => \"fab fa-untappd\",\n\t\t\t\"fab-f7e0\" => \"fab fa-ups\",\n\t\t\t\"fab-f287\" => \"fab fa-usb\",\n\t\t\t\"fab-f7e1\" => \"fab fa-usps\",\n\t\t\t\"fab-f407\" => \"fab fa-ussunnah\",\n\t\t\t\"fab-f408\" => \"fab fa-vaadin\",\n\t\t\t\"fab-f237\" => \"fab fa-viacoin\",\n\t\t\t\"fab-f2a9\" => \"fab fa-viadeo\",\n\t\t\t\"fab-f2aa\" => \"fab fa-viadeo-square\",\n\t\t\t\"fab-f409\" => \"fab fa-viber\",\n\t\t\t\"fab-f40a\" => \"fab fa-vimeo\",\n\t\t\t\"fab-f194\" => \"fab fa-vimeo-square\",\n\t\t\t\"fab-f27d\" => \"fab fa-vimeo-v\",\n\t\t\t\"fab-f1ca\" => \"fab fa-vine\",\n\t\t\t\"fab-f189\" => \"fab fa-vk\",\n\t\t\t\"fab-f40b\" => \"fab fa-vnv\",\n\t\t\t\"fab-f41f\" => \"fab fa-vuejs\",\n\t\t\t\"fab-f83f\" => \"fab fa-waze\",\n\t\t\t\"fab-f5cc\" => \"fab fa-weebly\",\n\t\t\t\"fab-f18a\" => \"fab fa-weibo\",\n\t\t\t\"fab-f1d7\" => \"fab fa-weixin\",\n\t\t\t\"fab-f232\" => \"fab fa-whatsapp\",\n\t\t\t\"fab-f40c\" => \"fab fa-whatsapp-square\",\n\t\t\t\"fab-f40d\" => \"fab fa-whmcs\",\n\t\t\t\"fab-f266\" => \"fab fa-wikipedia-w\",\n\t\t\t\"fab-f17a\" => \"fab fa-windows\",\n\t\t\t\"fab-f5cf\" => \"fab fa-wix\",\n\t\t\t\"fab-f730\" => \"fab fa-wizards-of-the-coast\",\n\t\t\t\"fab-f514\" => \"fab fa-wolf-pack-battalion\",\n\t\t\t\"fab-f19a\" => \"fab fa-wordpress\",\n\t\t\t\"fab-f411\" => \"fab fa-wordpress-simple\",\n\t\t\t\"fab-f297\" => \"fab fa-wpbeginner\",\n\t\t\t\"fab-f2de\" => \"fab fa-wpexplorer\",\n\t\t\t\"fab-f298\" => \"fab fa-wpforms\",\n\t\t\t\"fab-f3e4\" => \"fab fa-wpressr\",\n\t\t\t\"fab-f412\" => \"fab fa-xbox\",\n\t\t\t\"fab-f168\" => \"fab fa-xing\",\n\t\t\t\"fab-f169\" => \"fab fa-xing-square\",\n\t\t\t\"fab-f23b\" => \"fab fa-y-combinator\",\n\t\t\t\"fab-f19e\" => \"fab fa-yahoo\",\n\t\t\t\"fab-f840\" => \"fab fa-yammer\",\n\t\t\t\"fab-f413\" => \"fab fa-yandex\",\n\t\t\t\"fab-f414\" => \"fab fa-yandex-international\",\n\t\t\t\"fab-f7e3\" => \"fab fa-yarn\",\n\t\t\t\"fab-f1e9\" => \"fab fa-yelp\",\n\t\t\t\"fab-f2b1\" => \"fab fa-yoast\",\n\t\t\t\"fab-f167\" => \"fab fa-youtube\",\n\t\t\t\"fab-f431\" => \"fab fa-youtube-square\",\n\t\t\t\"fab-f63f\" => \"fab fa-zhihu\"\n\t\t);\n\n\t\t$icons = array_merge( $solid_icons, $regular_icons, $brand_icons );\n\n\t\t$icons = apply_filters( \"megamenu_fontawesome_5_icons\", $icons );\n\n\t\treturn $icons;\n\n\t}", "protected function checkTranslatedShortcut() {}", "function theme_options_validate($input) {\n $options = get_option('theme_options');\n $options['theme-w3css'] = trim($input['theme-w3css']);\n // if (!preg_match('/^[a-z\\-]{32}$/i', $options['theme-w3css']) ) {\n // $options['theme-w3css'] = '';\n // }\n return $options;\n}", "public function admin_enqueue_fontawesomeBlock(){\n\t\t}", "function validarFormulario()\n\t\t{\n\t\t}", "public function update_font_awesome_classes( $class ) {\n\t\t\t$exceptions = array(\n\t\t\t\t'icon-envelope' => 'fa-envelope-o',\n\t\t\t\t'icon-star-empty' => 'fa-star-o',\n\t\t\t\t'icon-ok' => 'fa-check',\n\t\t\t\t'icon-zoom-in' => 'fa-search-plus',\n\t\t\t\t'icon-zoom-out' => 'fa-search-minus',\n\t\t\t\t'icon-off' => 'fa-power-off',\n\t\t\t\t'icon-trash' => 'fa-trash-o',\n\t\t\t\t'icon-share' => 'fa-share-square-o',\n\t\t\t\t'icon-check' => 'fa-check-square-o',\n\t\t\t\t'icon-move' => 'fa-arrows',\n\t\t\t\t'icon-file' => 'fa-file-o',\n\t\t\t\t'icon-time' => 'fa-clock-o',\n\t\t\t\t'icon-download-alt' => 'fa-download',\n\t\t\t\t'icon-download' => 'fa-arrow-circle-o-down',\n\t\t\t\t'icon-upload' => 'fa-arrow-circle-o-up',\n\t\t\t\t'icon-play-circle' => 'fa-play-circle-o',\n\t\t\t\t'icon-indent-left' => 'fa-dedent',\n\t\t\t\t'icon-indent-right' => 'fa-indent',\n\t\t\t\t'icon-facetime-video' => 'fa-video-camera',\n\t\t\t\t'icon-picture' => 'fa-picture-o',\n\t\t\t\t'icon-plus-sign' => 'fa-plus-circle',\n\t\t\t\t'icon-minus-sign' => 'fa-minus-circle',\n\t\t\t\t'icon-remove-sign' => 'fa-times-circle',\n\t\t\t\t'icon-ok-sign' => 'fa-check-circle',\n\t\t\t\t'icon-question-sign' => 'fa-question-circle',\n\t\t\t\t'icon-info-sign' => 'fa-info-circle',\n\t\t\t\t'icon-screenshot' => 'fa-crosshairs',\n\t\t\t\t'icon-remove-circle' => 'fa-times-circle-o',\n\t\t\t\t'icon-ok-circle' => 'fa-check-circle-o',\n\t\t\t\t'icon-ban-circle' => 'fa-ban',\n\t\t\t\t'icon-share-alt' => 'fa-share',\n\t\t\t\t'icon-resize-full' => 'fa-expand',\n\t\t\t\t'icon-resize-small' => 'fa-compress',\n\t\t\t\t'icon-exclamation-sign' => 'fa-exclamation-circle',\n\t\t\t\t'icon-eye-open' => 'fa-eye',\n\t\t\t\t'icon-eye-close' => 'fa-eye-slash',\n\t\t\t\t'icon-warning-sign' => 'fa-warning',\n\t\t\t\t'icon-folder-close' => 'fa-folder',\n\t\t\t\t'icon-resize-vertical' => 'fa-arrows-v',\n\t\t\t\t'icon-resize-horizontal' => 'fa-arrows-h',\n\t\t\t\t'icon-twitter-sign' => 'fa-twitter-square',\n\t\t\t\t'icon-facebook-sign' => 'fa-facebook-square',\n\t\t\t\t'icon-thumbs-up' => 'fa-thumbs-o-up',\n\t\t\t\t'icon-thumbs-down' => 'fa-thumbs-o-down',\n\t\t\t\t'icon-heart-empty' => 'fa-heart-o',\n\t\t\t\t'icon-signout' => 'fa-sign-out',\n\t\t\t\t'icon-linkedin-sign' => 'fa-linkedin-square',\n\t\t\t\t'icon-pushpin' => 'fa-thumb-tack',\n\t\t\t\t'icon-signin' => 'fa-sign-in',\n\t\t\t\t'icon-github-sign' => 'fa-github-square',\n\t\t\t\t'icon-upload-alt' => 'fa-upload',\n\t\t\t\t'icon-lemon' => 'fa-lemon-o',\n\t\t\t\t'icon-check-empty' => 'fa-square-o',\n\t\t\t\t'icon-bookmark-empty' => 'fa-bookmark-o',\n\t\t\t\t'icon-phone-sign' => 'fa-phone-square',\n\t\t\t\t'icon-hdd' => 'fa-hdd-o',\n\t\t\t\t'icon-hand-right' => 'fa-hand-o-right',\n\t\t\t\t'icon-hand-left' => 'fa-hand-o-left',\n\t\t\t\t'icon-hand-up' => 'fa-hand-o-up',\n\t\t\t\t'icon-hand-down' => 'fa-hand-o-down',\n\t\t\t\t'icon-circle-arrow-left' => 'fa-arrow-circle-left',\n\t\t\t\t'icon-circle-arrow-right' => 'fa-arrow-circle-right',\n\t\t\t\t'icon-circle-arrow-up' => 'fa-arrow-circle-up',\n\t\t\t\t'icon-circle-arrow-down' => 'fa-arrow-circle-down',\n\t\t\t\t'icon-fullscreen' => 'fa-arrows-alt',\n\t\t\t\t'icon-beaker' => 'fa-flask',\n\t\t\t\t'icon-paper-clip' => 'fa-paperclip',\n\t\t\t\t'icon-sign-blank' => 'fa-square',\n\t\t\t\t'icon-pinterest-sign' => 'fa-pinterest-square',\n\t\t\t\t'icon-google-plus-sign' => 'fa-google-plus-square',\n\t\t\t\t'icon-envelope-alt' => 'fa-envelope',\n\t\t\t\t'icon-comment-alt' => 'fa-comment-o',\n\t\t\t\t'icon-comments-alt' => 'fa-comments-o'\n\t\t\t);\n\n\t\t\tif( in_array( $class, array_keys( $exceptions ) ) ){\n\t\t\t\t$class = $exceptions[ $class ];\n\t\t\t}\n\n\t\t\t$class = str_replace( 'icon-', 'fa-', $class );\n\n\t\t\treturn $class;\n\t\t}", "private function validate_icon_data( $data ) {\n\n\t\t\t$validate = array_diff( $this->default_icon_data, array( 'icon_base', 'icon_prefix' ) );\n\n\t\t\tforeach ( $validate as $key => $field ) {\n\n\t\t\t\tif ( empty( $data[ $key ] ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}", "function validate() {\n // @todo Remove module_load_include() call when moving to Drupal core.\n module_load_include('inc', 'fapitng', '/includes/fapitng.validate');\n foreach ($this->validate_callbacks as $callback => $info) {\n if (!call_user_func_array($callback, array_merge(array($this->value), $info['arguments']))) {\n $this->errors[] = $info['message'];\n }\n }\n if ($this->errors) {\n $this->request['invalid_elements'][$this->id] = $this;\n }\n $this->validateInputElements($this->children);\n\n if (!empty($this->request['invalid_elements'])) {\n $this->request['rebuild'] = TRUE;\n return FALSE;\n }\n return TRUE;\n }", "function pagely_load_font_awesome() {\n\t\n\twp_enqueue_style( 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css', false, false, false ); \n}", "private function getFa() \n {\n $allStates = [\n 'S0' => 0,\n 'S1' => 1, \n 'S2' => 2,\n ];\n \n $initialState = 'S0';\n \n $allowableInputAlphabets = range('0','9');\n\n $acceptableFinalStates = ['S0', 'S1', 'S2'];\n\n $fa = new fa($allStates, $allowableInputAlphabets, $initialState, $acceptableFinalStates, 'transitionFunc');\n \n return $fa;\n }", "function __construct()\n\t{\n\t\t$this->name = 'font-awesome';\n\t\t$this->label = __('Font Awesome Icon');\n\t\t$this->category = __(\"Content\",'acf'); // Basic, Content, Choice, etc\n\t\t$this->defaults = array(\n\t\t\t'enqueue_fa' \t=>\t0,\n\t\t\t'allow_null' \t=>\t0,\n\t\t\t'save_format'\t=> 'element',\n\t\t\t'default_value'\t=>\t'',\n\t\t\t'choices'\t\t=>\t$this->get_icons()\n\t\t);\n\n\t\t$this->settings = array(\n\t\t\t'path' => apply_filters('acf/helpers/get_path', __FILE__),\n\t\t\t'dir' => apply_filters('acf/helpers/get_dir', __FILE__),\n\t\t\t'version' => '1.5'\n\t\t);\n\n\t\tadd_filter('acf/load_field', array( $this, 'maybe_enqueue_font_awesome' ) );\n\n \tparent::__construct();\n\t}", "public function use_pro() {\n\t\tif ( defined( \"MEGAMENU_PRO_USE_FONTAWESOME5_PRO\" ) ) {\n\t\t\treturn MEGAMENU_PRO_USE_FONTAWESOME5_PRO;\n\t\t}\n\n\t\tif ( function_exists( 'FortAwesome\\fa' ) && fa()->pro() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function studeon_vc_iconpicker_type_fontawesome($icons) {\n\t\t$list = studeon_get_list_icons();\n\t\tif (!is_array($list) || count($list) == 0) return $icons;\n\t\t$rez = array();\n\t\tforeach ($list as $icon)\n\t\t\t$rez[] = array($icon => str_replace('icon-', '', $icon));\n\t\treturn array_merge( $icons, array(esc_html__('Theme Icons', 'studeon') => $rez) );\n\t}", "protected function areFieldChangeFunctionsValid() {}", "public function getXfa() {}", "private function ValidateTranslationFields()\t\n\t{\n\t\t// check for required fields\t\t\n\t\tforeach($this->arrTranslations as $key => $val){\t\t\t\n\t\t\tif(strlen($val['image_text']) > 2048){\n\t\t\t\t$this->error = str_replace('_FIELD_', '<b>'._DESCRIPTION.'</b>', _FIELD_LENGTH_EXCEEDED);\n\t\t\t\t$this->error = str_replace('_LENGTH_', 2048, $this->error);\n\t\t\t\t$this->errorField = 'image_text_'.$key;\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\n\t\t}\t\t\n\t\treturn true;\t\t\n\t}", "public function input_admin_enqueue_scripts() {\n\t\t// Min version ?\n\t\t$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG === true ? '' : '.min';\n\n\t\twp_localize_script( 'acf-input-svg-icon', 'svg_icon_format_data', $this->parse_svg() );\n\t\twp_register_style( 'acf-input-svg-icon', ACF_SVG_ICON_URL . 'assets/css/style' . $suffix . '.css', array( 'select2' ), ACF_SVG_ICON_VER );\n\n\t\twp_enqueue_script( 'acf-input-svg-icon' );\n\t\twp_enqueue_style( 'acf-input-svg-icon' );\n\t}", "public function validate()\r\n\t{\r\n\t\tLumine_Validator_PHPValidator::clearValidations($this);\r\n\t\t// adicionando as regras \r\n\t\tLumine_Validator_PHPValidator::addValidation($this, 'nomeImagensUteis', Lumine_Validator::REQUIRED_STRING, 'Informe o nome da Imagem');\r\n\t\t\r\n\t\treturn parent::validate();\r\n\t}", "public function isMenuItemValidSetValidHrefAndTitleExpectTrue() {}", "public function valid()\n {\n\n $allowedValues = $this->getTransformAllowableValues();\n if (!in_array($this->container['transform'], $allowedValues)) {\n return false;\n }\n $allowedValues = $this->getWrapTextAllowableValues();\n if (!in_array($this->container['wrapText'], $allowedValues)) {\n return false;\n }\n $allowedValues = $this->getAnchoringTypeAllowableValues();\n if (!in_array($this->container['anchoringType'], $allowedValues)) {\n return false;\n }\n $allowedValues = $this->getCenterTextAllowableValues();\n if (!in_array($this->container['centerText'], $allowedValues)) {\n return false;\n }\n $allowedValues = $this->getTextVerticalTypeAllowableValues();\n if (!in_array($this->container['textVerticalType'], $allowedValues)) {\n return false;\n }\n $allowedValues = $this->getAutofitTypeAllowableValues();\n if (!in_array($this->container['autofitType'], $allowedValues)) {\n return false;\n }\n return true;\n }", "private function validateForm(): void\n {\n if (!$this->form->isSubmitted()) {\n return;\n }\n\n /** @var $fileFile \\SpoonFormFile */\n $fileFile = $this->form->getField('file');\n $zip = null;\n $zipFiles = null;\n\n // Validate the file. Check if the file field is filled and if it's a zip.\n if ($fileFile->isFilled(BL::err('FieldIsRequired')) &&\n $fileFile->isAllowedExtension(['zip'], sprintf(BL::getError('ExtensionNotAllowed'), 'zip'))\n ) {\n // Create ziparchive instance\n $zip = new ZipArchive();\n\n // Try and open it\n if ($zip->open($fileFile->getTempFileName()) === true) {\n // zip file needs to contain some files\n if ($zip->numFiles > 0) {\n $infoXml = $this->findInfoFileInZip($zip);\n\n // Throw error if info.xml is not found\n if ($infoXml === null) {\n $fileFile->addError(\n sprintf(BL::getError('NoInformationFile'), $fileFile->getFileName())\n );\n\n return;\n }\n\n // Parse xml\n try {\n // Load info.xml\n $infoXml = @new \\SimpleXMLElement($infoXml, LIBXML_NOCDATA, false);\n\n // Convert xml to useful array\n $this->info = BackendExtensionsModel::processThemeXml($infoXml);\n\n // Empty data (nothing useful)\n if (empty($this->info)) {\n $fileFile->addError(BL::getMessage('InformationFileIsEmpty'));\n\n return;\n }\n\n // Define the theme name, based on the info.xml file.\n $this->themeName = $this->info['name'];\n } catch (Exception $e) {\n // Warning that the information file is corrupt\n $fileFile->addError(BL::getMessage('InformationFileCouldNotBeLoaded'));\n\n return;\n }\n\n // Wow wow, you are trying to upload an already existing theme\n if (BackendExtensionsModel::existsTheme($this->themeName)) {\n $fileFile->addError(sprintf(BL::getError('ThemeAlreadyExists'), $this->themeName));\n\n return;\n }\n\n $zipFiles = $this->getValidatedFilesList($zip);\n } else {\n // Empty zip file\n $fileFile->addError(BL::getError('FileIsEmpty'));\n }\n } else {\n // Something went very wrong, probably corrupted\n $fileFile->addError(BL::getError('CorruptedFile'));\n\n return;\n }\n }\n\n // Passed all validation\n if ($zip !== null && $this->form->isCorrect()) {\n // Unpack the zip. If the files were not found inside a parent directory, we create the theme directory.\n $themePath = FRONTEND_PATH . '/Themes';\n if ($this->parentFolderName === null) {\n $themePath .= \"/{$this->themeName}\";\n }\n $zip->extractTo($themePath, $zipFiles);\n\n // Rename the original name of the parent folder from the zip to the correct theme foldername.\n $fs = new Filesystem();\n $parentZipFolderPath = $themePath . '/' . $this->parentFolderName;\n if ($this->parentFolderName !== $this->themeName &&\n $this->parentFolderName !== null &&\n $fs->exists($parentZipFolderPath)\n ) {\n $fs->rename($parentZipFolderPath, \"$themePath/{$this->themeName}\");\n }\n\n // Run installer\n BackendExtensionsModel::installTheme($this->themeName);\n\n // Redirect with fireworks\n $this->redirect(\n BackendModel::createUrlForAction('Themes') . '&report=theme-installed&var=' . $this->themeName\n );\n }\n }", "public static function validate() {}", "private function sanitize_font( $file ) {\r\n\t\tif ( ! is_string( $file ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$file = trim( $file );\r\n\r\n\t\tif ( empty( $file ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$ext = strtolower( pathinfo( wp_parse_url( $file, PHP_URL_PATH ), PATHINFO_EXTENSION ) );\r\n\r\n\t\tif ( ! in_array( $ext, $this->font_formats, true ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn $file;\r\n\t}", "private function checkRequirements()\n {\n if (!function_exists('mime_content_type') && !function_exists('finfo_file') && version_compare(PHP_VERSION, '5.3.0') < 0){\n add_action('admin_notices', array($this, 'displayFunctionMissingNotice'));\n return TRUE;\n }\n return TRUE;\n }", "public function validateEditAngle($data)\n {\n self::$rules = [\n 'name' => 'required',\n 'result' => 'required',\n ];\n $this->validate($data);\n }", "public function rules()\n {\n return [\n 'icon' => 'required|file|image|max:512',\n 'icon_round_type' => 'required|in:' . IconRoundType::getValidationIn(),\n ];\n }", "protected function areFieldChangeFunctionsValid()\n {\n return $this->fieldChangeFunc && $this->fieldChangeFuncHash && $this->fieldChangeFuncHash === GeneralUtility::hmac($this->fieldChangeFunc);\n }", "protected function areFieldChangeFunctionsValid()\n {\n return $this->fieldChangeFunc && $this->fieldChangeFuncHash && $this->fieldChangeFuncHash === GeneralUtility::hmac($this->fieldChangeFunc);\n }", "function validaAlfa ($Cad) {\n// prueba si la entrada es una cadena alfabetica\nreturn preg_match(\"/^[a-z]+$/i\", $Cad );\n}", "function theme_add_bootstrap_fontawesome() {\n\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() . '/css/bootstrap.min.css' );\n\twp_enqueue_style( 'style-css', get_stylesheet_directory_uri() . '/style.css' );\n\twp_enqueue_style( 'fontawesome-css', get_stylesheet_directory_uri() . '/css/font-awesome.min.css' );\n\twp_enqueue_script( 'bootstrap-js', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array(), '3.0.0', true );\n}", "function pdfbulletin_settings_form_validate(&$form, &$form_state) {\n // @todo SERIOUSLY\n}", "function validar_atributos_edit()\n {\n $nomberExito = $this->validar_Nombre();\n $fechaExito = $this->validar_Fecha();\n $validadoExito = $this->validar_Validado();\n\n if (is_array($nomberExito)) {\n return $this->feedback;\n }\n if (is_array($fechaExito)) {\n return $this->feedback;\n }\n if (is_array($validadoExito)) {\n return $this->feedback;\n }\n\n return true;\n }", "protected function checkPDF(): void\n {\n if ('application/pdf' === $this->mimeType ||\n 'pdf' === $this->fileExtension\n ) {\n $this->iconClass = self::ICON_PDF;\n }\n }", "function us_is_fallback_icon( $icon_name ) {\r\n\t\treturn in_array( $icon_name, array(\r\n\t\t\t'angle-down',\r\n\t\t\t'angle-left',\r\n\t\t\t'angle-right',\r\n\t\t\t'angle-up',\r\n\t\t\t'bars',\r\n\t\t\t'check',\r\n\t\t\t'comments',\r\n\t\t\t'copy',\r\n\t\t\t'envelope',\r\n\t\t\t'map-marker-alt',\r\n\t\t\t'mobile',\r\n\t\t\t'phone',\r\n\t\t\t'play',\r\n\t\t\t'quote-left',\r\n\t\t\t'search',\r\n\t\t\t'search-plus',\r\n\t\t\t'shopping-cart',\r\n\t\t\t'star',\r\n\t\t\t'tags',\r\n\t\t\t'times',\r\n\t\t) );\r\n\t}", "function enqueue_font_awesome(){\n\twp_enqueue_style('font-awesome', get_stylesheet_directory_uri() . '/library/css/font-awesome.css');\n}", "function inscription_jesa_manage_validate($form, &$form_state) {\n \n}", "function valid_unicode($i)\n {\n }", "function opensky_form_islandora_scholar_pdf_upload_form_alter (&$form, &$form_state, $form_id) {\n // remove $form['upload_document']['usage']\n unset ($form['upload_document']['usage']);\n\n // now change the validation function\n module_load_include ('inc', 'opensky', 'includes/utilities');\n\n // insert opensky validate before islandora_scholar_pdf_upload_form_validate\n // (didn't work)\n // array_splice ($form['hidden_next']['#validate'], 0, 0, 'opensky_pdf_upload_form_validate'); \n \n // replace islandora_scholar_pdf_upload_form_validate with opensky version\n $form['hidden_next']['#validate'][0] = 'opensky_pdf_upload_form_validate'; \n}", "function ajb_options_validate( $input ) {\n\tfor ( $j=1; $j<=5; $j++) {\n\t\t// home page CSS must be safe text with the allowed tags for posts\n\t\t$input['button_' . $j . '_link'] = wp_filter_post_kses( $input['button_' . $j . '_link'] );\n\t}\n\n\treturn $input;\n}", "public function _validacion_busqueda_producto(){\n\t\t$this->form_validation->set_rules('textdescripcion', 'Texto de busqueda', 'required'); //callback_username_check\n\t\n\n if ($this->form_validation->run() == FALSE)\n {\n // $this->form_validation->set_message('_validacion_producto', 'The {field} field can not be the word \"test\"');\n\t\t\t\t\t return false;\n }else{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t}", "function btrProject_import_translations_form_validate($form, &$form_state) {\n bcl::uploadfile_validate();\n}", "public function validate(){\n\t\t$valid = true;\n\t\t$ref = new ReflectionObject($this);\n\t\tforeach($ref->getProperties() as $prop){\n\t\t\tif(isset($this->_atributosMetadata[$prop->getName()])){\n\t\t\t\t$propMetadata = $this->_atributosMetadata[$prop->getName()];\n\t\t\t\tif($propMetadata->needValidate){\n\t\t\t\t\t$propMetadata->Validate($prop->getValue($this));\n\t\t\t\t\tif($propMetadata->isValid){\n\t\t\t\t\t\t$valid = $valid && $propMetadata->isValid; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $valid;\t\t\n\t}", "function acf_validate_setting($name = '')\n{\n}", "public function validation()\n {\n $validator = new Validation();\n\n $validator->add(\n 'userid',\n new Callback(\n [\n \"message\" => \"Такая услуга не существует\",\n \"callback\" => function ($image) {\n $user = Users::findFirstByUserid($image->getUserId());\n if ($user)\n return true;\n return false;\n }\n ]\n )\n );\n\n $validator->add(\n 'imagepath',\n new Callback(\n [\n \"message\" => \"Формат не поддерживается\",\n \"callback\" => function ($image) {\n $format = pathinfo($image->getImagePath(), PATHINFO_EXTENSION);\n\n if ($format == 'jpeg' || 'jpg')\n return true;\n elseif ($format == 'png')\n return true;\n elseif ($format == 'gif')\n return true;\n else {\n return false;\n }\n }\n ]\n )\n );\n return $this->validate($validator);\n }", "function checkOblig(&$falta, &$f, $oblig) {\r\n# versio obligatoris en formulari\r\n foreach (explode(\"#\", $oblig) as $cm) {\r\n if (!$f[$cm])\r\n $falta[$cm][] = 'oblig';\r\n }\r\n return count($falta);\r\n}", "function check_element_validity($key,$opt){\n\n if (preg_match(STARTCHARRGX, $key) === 1 ) { //check first character\n preg_match(STARTCHARRGX,$key,$matches);\n if ($matches[0] == \"_\") {\n return false;\n }\n return true;\n }\n if ( preg_match(INVALIDCHARSRGX, $key) === 1) { //check other chars validity\n return true;\n }\n return false;\n }", "function alpha_extra($str) {\n $this->CI->form_validation->set_message('alpha_extra', 'The %s may only contain alpha-numeric characters, spaces, periods, underscores & dashes.');\n return ( ! preg_match(\"/^([\\.\\s-a-z0-9_-])+$/i\", $str)) ? FALSE : TRUE;\n }", "function font_awesome($icon){\n\treturn \"<span class='fa fa-fw $icon'></span>\";\n}", "public function isButtonValidValidSetupExpectTrue() {}", "function hejtiger_custom_fonts() {\n\n \n \n wp_enqueue_style( 'googleFonts' , 'http://fonts.googleapis.com/css?family=Muli:300,400|Nunito');\n\n wp_enqueue_style( 'font-awesome', 'https://use.fontawesome.com/releases/v5.6.3/css/all.css' );\n }", "function TS_VCSC_IconFontsEnqueue($forceload = false) {\r\n\t\t\tforeach ($this->TS_VCSC_Installed_Icon_Fonts as $Icon_Font => $iconfont) {\r\n\t\t\t\t$default = ($iconfont == \"Awesome\" ? 1 : 0); \r\n\t\t\t\tif (!$forceload) {\r\n\t\t\t\t\tif ((get_option('ts_vcsc_extend_settings_tinymce' . $iconfont, $default) == 1) && ($iconfont != \"Custom\") && ($iconfont != \"Dashicons\")) {\r\n\t\t\t\t\t\twp_enqueue_style('ts-font-' . strtolower($iconfont));\r\n\t\t\t\t\t} else if ((get_option('ts_vcsc_extend_settings_tinymce' . $iconfont, $default) == 1) && ($iconfont != \"Custom\") && ($iconfont == \"Dashicons\")) {\r\n\t\t\t\t\t\twp_enqueue_style('dashicons');\r\n\t\t\t\t\t\twp_enqueue_style('ts-font-' . strtolower($iconfont));\r\n\t\t\t\t\t} else if ((get_option('ts_vcsc_extend_settings_tinymce' . $iconfont, $default) == 1) && ($iconfont == \"Custom\")) {\r\n\t\t\t\t\t\twp_enqueue_style('ts-font-' . strtolower($iconfont) . 'vcsc');\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif ((get_option('ts_vcsc_extend_settings_tinymce' . $iconfont, $default) == 1) && (get_option('ts_vcsc_extend_settings_load' . $iconfont, 0) == 1) && ($iconfont != \"Custom\") && ($iconfont != \"Dashicons\")) {\r\n\t\t\t\t\t\twp_enqueue_style('ts-font-' . strtolower($iconfont));\r\n\t\t\t\t\t} else if ((get_option('ts_vcsc_extend_settings_tinymce' . $iconfont, $default) == 1) && (get_option('ts_vcsc_extend_settings_load' . $iconfont, 0) == 1) && ($iconfont != \"Custom\") && ($iconfont == \"Dashicons\")) {\r\n\t\t\t\t\t\twp_enqueue_style('dashicons');\r\n\t\t\t\t\t\twp_enqueue_style('ts-font-' . strtolower($iconfont));\r\n\t\t\t\t\t} else if ((get_option('ts_vcsc_extend_settings_tinymce' . $iconfont, $default) == 1) && (get_option('ts_vcsc_extend_settings_load' . $iconfont, 0) == 1) && ($iconfont == \"Custom\")) {\r\n\t\t\t\t\t\t$Custom_Font_CSS = get_option('ts_vcsc_extend_settings_tinymceCustomPath', '');\r\n\t\t\t\t\t\twp_enqueue_style('ts-font-' . strtolower($iconfont) . 'vcsc');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Enqueue Internal WP Bakery Page Builder Fonts\r\n\t\t\tif ($this->TS_VCSC_EditorIconFontsInternal == \"true\") {\r\n\t\t\t\tforeach ($this->TS_VCSC_Composer_Font_Settings as $Icon_Font => $iconfont) {\r\n\t\t\t\t\tif (!$forceload) {\r\n\t\t\t\t\t\tif (get_option('ts_vcsc_extend_settings_tinymce' . $iconfont['setting'], 0) == 1) {\r\n\t\t\t\t\t\t\twp_enqueue_style(strtolower($iconfont['handle']));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif ((get_option('ts_vcsc_extend_settings_tinymce' . $iconfont['setting'], 0) == 1) && (get_option('ts_vcsc_extend_settings_load' . $iconfont['setting'], 0) == 1)) {\r\n\t\t\t\t\t\t\twp_enqueue_style(strtolower($iconfont['handle']));\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}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "protected function _validate() {\n\t}", "private function isFaxRequired()\n {\n return $this->eavConfig->getAttribute('customer_address', 'fax')->getIsRequired();\n }", "public function rules()\n {\n return [\n 'name' => 'required|max:10|not_regex:\"青姦\"|not_regex:\"アナル\"|not_regex:\"淫売\"|not_regex:\"ウンコ\"|not_regex:\"ウンチ\"|not_regex:\"オッパイ\"|not_regex:\"ガイジ\"|not_regex:\"外人\"|not_regex:\"ガキ\"|not_regex:\"クンニ\"|not_regex:\"クリトリス\"|not_regex:\"強姦\"|not_regex:\"殺す\"|not_regex:\"コロシ\"|not_regex:\"殺し\"|not_regex:\"黒人\"|not_regex:\"死ね\"|not_regex:\"シ\"|not_regex:\"障害者\"|not_regex:\"処女\"|not_regex:\"心障児\"|not_regex:\"心障者\"|not_regex:\"セックス\"|not_regex:\"精神異常\"|not_regex:\"精神分裂病\"|not_regex:\"精薄\"|not_regex:\"知恵遅れ\"|not_regex:\"痴呆症\"|not_regex:\"チョン\"|not_regex:\"チンコ\"|not_regex:\"チンポ\"|not_regex:\"低脳\"|not_regex:\"低脳児\"|not_regex:\"パイパン\"|not_regex:\"ブス\"|not_regex:\"部落\"|not_regex:\"浮浪児\"|not_regex:\"フェラ\"|not_regex:\"浮浪者\"|not_regex:\"レイプ\"|not_regex:\"マンコ\"|not_regex:\"ファック\"|not_regex:\"fuck\"|not_regex:\"あおかん\"|not_regex:\"あなる\"|not_regex:\"いんばい\"|not_regex:\"うんこ\"|not_regex:\"うんち\"|not_regex:\"おっぱい\"|not_regex:\"がいじ\"|not_regex:\"がいじん\"|not_regex:\"がき\"|not_regex:\"くんに\"|not_regex:\"くりとりす\"|not_regex:\"ごうかん\"|not_regex:\"ころす\"|not_regex:\"ころし\"|not_regex:\"ころし\"|not_regex:\"こくじん\"|not_regex:\"しね\"|not_regex:\"しね\"|not_regex:\"しょうがいしゃ\"|not_regex:\"しょじょ\"|not_regex:\"しんしょうじ\"|not_regex:\"しんしょうしゃ\"|not_regex:\"せっくす\"|not_regex:\"せいしんいじょう\"|not_regex:\"せいしんぶんれつびょう\"|not_regex:\"せいはく\"|not_regex:\"ちえおくれ\"|not_regex:\"ちほうしょう\"|not_regex:\"ちょん\"|not_regex:\"ちんこ\"|not_regex:\"ちんぽ\"|not_regex:\"ていのう\"|not_regex:\"ていのうじ\"|not_regex:\"ぱいぱん\"|not_regex:\"ぶす\"|not_regex:\"ぶらく\"|not_regex:\"ふろうじ\"|not_regex:\"ふぇら\"|not_regex:\"ふろうしゃ\"|not_regex:\"れいぷ\"|not_regex:\"まんこ\"|not_regex:\"ふぁっく\"',\n \n 'year' => 'required|integer|numeric|min:0|max:4',\n\n 'message' => 'required|max:200|not_regex:\"青姦\"|not_regex:\"アナル\"|not_regex:\"淫売\"|not_regex:\"ウンコ\"|not_regex:\"ウンチ\"|not_regex:\"オッパイ\"|not_regex:\"ガイジ\"|not_regex:\"外人\"|not_regex:\"ガキ\"|not_regex:\"クンニ\"|not_regex:\"クリトリス\"|not_regex:\"強姦\"|not_regex:\"殺す\"|not_regex:\"コロシ\"|not_regex:\"殺し\"|not_regex:\"黒人\"|not_regex:\"死ね\"|not_regex:\"シ\"|not_regex:\"障害者\"|not_regex:\"処女\"|not_regex:\"心障児\"|not_regex:\"心障者\"|not_regex:\"セックス\"|not_regex:\"精神異常\"|not_regex:\"精神分裂病\"|not_regex:\"精薄\"|not_regex:\"知恵遅れ\"|not_regex:\"痴呆症\"|not_regex:\"チョン\"|not_regex:\"チンコ\"|not_regex:\"チンポ\"|not_regex:\"低脳\"|not_regex:\"低脳児\"|not_regex:\"パイパン\"|not_regex:\"ブス\"|not_regex:\"部落\"|not_regex:\"浮浪児\"|not_regex:\"フェラ\"|not_regex:\"浮浪者\"|not_regex:\"レイプ\"|not_regex:\"マンコ\"|not_regex:\"ファック\"|not_regex:\"fuck\"|not_regex:\"あおかん\"|not_regex:\"あなる\"|not_regex:\"いんばい\"|not_regex:\"うんこ\"|not_regex:\"うんち\"|not_regex:\"おっぱい\"|not_regex:\"がいじ\"|not_regex:\"がいじん\"|not_regex:\"がき\"|not_regex:\"くんに\"|not_regex:\"くりとりす\"|not_regex:\"ごうかん\"|not_regex:\"ころす\"|not_regex:\"ころし\"|not_regex:\"ころし\"|not_regex:\"こくじん\"|not_regex:\"しね\"|not_regex:\"しね\"|not_regex:\"しょうがいしゃ\"|not_regex:\"しょじょ\"|not_regex:\"しんしょうじ\"|not_regex:\"しんしょうしゃ\"|not_regex:\"せっくす\"|not_regex:\"せいしんいじょう\"|not_regex:\"せいしんぶんれつびょう\"|not_regex:\"せいはく\"|not_regex:\"ちえおくれ\"|not_regex:\"ちほうしょう\"|not_regex:\"ちょん\"|not_regex:\"ちんこ\"|not_regex:\"ちんぽ\"|not_regex:\"ていのう\"|not_regex:\"ていのうじ\"|not_regex:\"ぱいぱん\"|not_regex:\"ぶす\"|not_regex:\"ぶらく\"|not_regex:\"ふろうじ\"|not_regex:\"ふぇら\"|not_regex:\"ふろうしゃ\"|not_regex:\"れいぷ\"|not_regex:\"まんこ\"|not_regex:\"ふぁっく\"',\n\n 'category_id' => 'required|integer',\n 'good' => 'required|integer|numeric|min:1|max:5',\n 'difficulty' => 'required|integer|numeric|min:1|max:5',\n\n 'report' => 'required|max:200|not_regex:\"青姦\"|not_regex:\"アナル\"|not_regex:\"淫売\"|not_regex:\"ウンコ\"|not_regex:\"ウンチ\"|not_regex:\"オッパイ\"|not_regex:\"ガイジ\"|not_regex:\"外人\"|not_regex:\"ガキ\"|not_regex:\"クンニ\"|not_regex:\"クリトリス\"|not_regex:\"強姦\"|not_regex:\"殺す\"|not_regex:\"コロシ\"|not_regex:\"殺し\"|not_regex:\"黒人\"|not_regex:\"死ね\"|not_regex:\"シ\"|not_regex:\"障害者\"|not_regex:\"処女\"|not_regex:\"心障児\"|not_regex:\"心障者\"|not_regex:\"セックス\"|not_regex:\"精神異常\"|not_regex:\"精神分裂病\"|not_regex:\"精薄\"|not_regex:\"知恵遅れ\"|not_regex:\"痴呆症\"|not_regex:\"チョン\"|not_regex:\"チンコ\"|not_regex:\"チンポ\"|not_regex:\"低脳\"|not_regex:\"低脳児\"|not_regex:\"パイパン\"|not_regex:\"ブス\"|not_regex:\"部落\"|not_regex:\"浮浪児\"|not_regex:\"フェラ\"|not_regex:\"浮浪者\"|not_regex:\"レイプ\"|not_regex:\"マンコ\"|not_regex:\"ファック\"|not_regex:\"fuck\"|not_regex:\"あおかん\"|not_regex:\"あなる\"|not_regex:\"いんばい\"|not_regex:\"うんこ\"|not_regex:\"うんち\"|not_regex:\"おっぱい\"|not_regex:\"がいじ\"|not_regex:\"がいじん\"|not_regex:\"がき\"|not_regex:\"くんに\"|not_regex:\"くりとりす\"|not_regex:\"ごうかん\"|not_regex:\"ころす\"|not_regex:\"ころし\"|not_regex:\"ころし\"|not_regex:\"こくじん\"|not_regex:\"しね\"|not_regex:\"しね\"|not_regex:\"しょうがいしゃ\"|not_regex:\"しょじょ\"|not_regex:\"しんしょうじ\"|not_regex:\"しんしょうしゃ\"|not_regex:\"せっくす\"|not_regex:\"せいしんいじょう\"|not_regex:\"せいしんぶんれつびょう\"|not_regex:\"せいはく\"|not_regex:\"ちえおくれ\"|not_regex:\"ちほうしょう\"|not_regex:\"ちょん\"|not_regex:\"ちんこ\"|not_regex:\"ちんぽ\"|not_regex:\"ていのう\"|not_regex:\"ていのうじ\"|not_regex:\"ぱいぱん\"|not_regex:\"ぶす\"|not_regex:\"ぶらく\"|not_regex:\"ふろうじ\"|not_regex:\"ふぇら\"|not_regex:\"ふろうしゃ\"|not_regex:\"れいぷ\"|not_regex:\"まんこ\"|not_regex:\"ふぁっく\"',\n\n 'test' => 'required|max:200|not_regex:\"青姦\"|not_regex:\"アナル\"|not_regex:\"淫売\"|not_regex:\"ウンコ\"|not_regex:\"ウンチ\"|not_regex:\"オッパイ\"|not_regex:\"ガイジ\"|not_regex:\"外人\"|not_regex:\"ガキ\"|not_regex:\"クンニ\"|not_regex:\"クリトリス\"|not_regex:\"強姦\"|not_regex:\"殺す\"|not_regex:\"コロシ\"|not_regex:\"殺し\"|not_regex:\"黒人\"|not_regex:\"死ね\"|not_regex:\"シ\"|not_regex:\"障害者\"|not_regex:\"処女\"|not_regex:\"心障児\"|not_regex:\"心障者\"|not_regex:\"セックス\"|not_regex:\"精神異常\"|not_regex:\"精神分裂病\"|not_regex:\"精薄\"|not_regex:\"知恵遅れ\"|not_regex:\"痴呆症\"|not_regex:\"チョン\"|not_regex:\"チンコ\"|not_regex:\"チンポ\"|not_regex:\"低脳\"|not_regex:\"低脳児\"|not_regex:\"パイパン\"|not_regex:\"ブス\"|not_regex:\"部落\"|not_regex:\"浮浪児\"|not_regex:\"フェラ\"|not_regex:\"浮浪者\"|not_regex:\"レイプ\"|not_regex:\"マンコ\"|not_regex:\"ファック\"|not_regex:\"fuck\"|not_regex:\"あおかん\"|not_regex:\"あなる\"|not_regex:\"いんばい\"|not_regex:\"うんこ\"|not_regex:\"うんち\"|not_regex:\"おっぱい\"|not_regex:\"がいじ\"|not_regex:\"がいじん\"|not_regex:\"がき\"|not_regex:\"くんに\"|not_regex:\"くりとりす\"|not_regex:\"ごうかん\"|not_regex:\"ころす\"|not_regex:\"ころし\"|not_regex:\"ころし\"|not_regex:\"こくじん\"|not_regex:\"しね\"|not_regex:\"しね\"|not_regex:\"しょうがいしゃ\"|not_regex:\"しょじょ\"|not_regex:\"しんしょうじ\"|not_regex:\"しんしょうしゃ\"|not_regex:\"せっくす\"|not_regex:\"せいしんいじょう\"|not_regex:\"せいしんぶんれつびょう\"|not_regex:\"せいはく\"|not_regex:\"ちえおくれ\"|not_regex:\"ちほうしょう\"|not_regex:\"ちょん\"|not_regex:\"ちんこ\"|not_regex:\"ちんぽ\"|not_regex:\"ていのう\"|not_regex:\"ていのうじ\"|not_regex:\"ぱいぱん\"|not_regex:\"ぶす\"|not_regex:\"ぶらく\"|not_regex:\"ふろうじ\"|not_regex:\"ふぇら\"|not_regex:\"ふろうしゃ\"|not_regex:\"れいぷ\"|not_regex:\"まんこ\"|not_regex:\"ふぁっく\"',\n\n //\n ];\n }", "function opensky_pdf_upload_form_validate(&$form, &$form_state) {\n error_log ('islandora_scholar_pdf_upload_form_validate ...');\n if ($form_state['values']['upload_pdf_checkbox']) {\n if (empty($form_state['values']['file'])) {\n form_set_error('file', t('A file must be uploaded!'));\n }\n if (empty($form_state['values']['version'])) {\n form_set_error('version', t('A document version must be selected!'));\n }\n\n /*\n // OpenSky - comment block\n if (empty($form_state['values']['usage'])) {\n form_set_error('usage', t('A usage permission must be selected!'));\n }\n // end opensky comment\n */\n\n if (empty($form_state['values']['certifying']['certify'])) {\n form_set_error('certifying', t('You must certify that you have the right to upload this PDF!'));\n }\n } \n}", "function validate(){\n }", "function validar() {\n leerClase('Formulario');\n Formulario::validar('login' , $this->login , 'texto', 'El Nombre de Usuario');\n Formulario::validar('clave', $this->clave, 'texto', 'Contraseña');\n \n }", "public function valid(){ }", "function validaValor($cadena)\n{\n\tif(eregi('^[a-zA-Z0-9._αινσϊρ‘!Ώ? -]{1,40}$', $cadena)) return TRUE;\n\telse return FALSE;\n}", "public function validate()\n {\n $loader = new FileLoader(new Filesystem, 'lang');\n $translator = new Translator($loader, 'en');\n $validation = new Factory($translator, new Container);\n\n $rules = $this->rules();\n\n $this->_applyCustomValidationRules($validation);\n\n $validation->validate($this->attributes, $rules, $this->messages);\n }", "public function validateExtensions($attribute){\n $infoFile = $this->$attribute;\n if (!in_array(pathinfo($infoFile['file']['name'], PATHINFO_EXTENSION), ['png', 'jpg', 'jpeg'])) {\n $this->addError($attribute, \\Yii::t('app', 'extensions',['attribute' => $this->attributeLabels()[$attribute]]));\n }\n }", "private function filter_prado_fx($name) {\n\t\treturn strncasecmp($name,'fx',2)===0;\n\t}", "public function looksValid()\r\n\t{\r\n return true;\r\n\t}", "public function getFontName() {}", "public function getFontName() {}", "public function getFontName() {}", "public function getFontName() {}", "public function getFontName() {}", "public function getFontName() {}", "public function getFontName() {}", "public function getFontName() {}", "function enqueue_font_awesome_stylesheets(){\n wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');\n}", "function _kalatheme_font_icon($name, $bundle = NULL, $attr = array(), $resolvePrefix = TRUE){\n if($bundle === NULL){\n $bundle = theme_get_setting('icon_font_library');\n }\n // Find the icon prefix\n if($resolvePrefix){\n switch($bundle){\n case('font_awesome'):\n $name = 'fa-' . $name;\n break;\n case('bootstrap_glyphicons'):\n $name = 'glyphicon-' . $name;\n break;\n }\n }\n\n $output = NULL;\n if (module_exists('icon')){\n $output = theme('icon', array(\n 'bundle' => $bundle,\n 'icon' => $name,\n 'attributes' => $attr\n ));\n }\n if($output === NULL){\n $attr = array();\n $attr += array('aria-hidden' => 'true' );\n $attr['class'] = array();\n\n if($bundle === 'font_awesome'){\n $attr['class'][] = 'fa';\n }\n elseif($bundle === 'bootstrap_glyphicons'){\n $attr['class'][] = 'glyphicon';\n }\n\n\n $attr['class'][] = $name;\n $output = '<span '. drupal_attributes($attr) . '></span>';\n }\n return $output;\n}", "function pluginValidaciones(){\n \t$url_acutal = basename($_SERVER['PHP_SELF']);\n \tif (\n strcasecmp($url_acutal, \"nuevo_usuario.php\") == 0 ||\n strcasecmp($url_acutal, \"establecimientos.php\") == 0 ||\n strcasecmp($url_acutal, \"modificacion_usuario.php\") == 0 ||\n strcasecmp($url_acutal, \"login.php\") == 0\n ){\n\n \t\techo \"\\n\";\n \t\techo \"<!-- plugin de validacion de datos --> \\n\";\n \t\techo '<script type=\"text/javascript\" src=\"assets/js/plugins/validador/jquery.validate.js\"></script>' . \"\\n\";\n \t\techo '<script type=\"text/javascript\" src=\"assets/js/plugins/validador/additional-methods.js\"></script>' . \"\\n\";\n \t\techo '<link href=\"assets/css/validate.css\" rel=\"stylesheet\" type=\"text/css\">' . \"\\n\";\n\n\n \t}\n }", "function theme_options_validate( $input ) {\n\n\t// Say our text option must be safe text with no HTML tags\n\t$input['sometext'] = wp_filter_nohtml_kses( $input['sometext'] );\n\n\n\n\treturn $input;\n}", "function bootstrap_blog_sanitize_google_fonts( $input, $setting ) {\n $choices = $setting->manager->get_control( $setting->id )->choices;\n \n // If the input is a valid key, return it; otherwise, return the default.\n return ( array_key_exists( $input, $choices ) ? $input : $setting->default );\n\n}", "function theme_options_validate( $input ) {\n\tglobal $select_options, $radio_options;\n\n\t// [header]\n\t$input['gacode'] = wp_filter_nohtml_kses( $input['gacode'] );\n\n\t// [footer] Year(s) and sitename in the copyright\n\t$input['copyrightyear'] = wp_filter_nohtml_kses( $input['copyrightyear'] );\n\t$input['copyrightname'] = wp_filter_nohtml_kses( $input['copyrightname'] );\n\n\t// Our checkbox value is either 0 or 1\n\tif ( ! isset( $input['option1'] ) )\n\t\t$input['option1'] = null;\n\t$input['option1'] = ( $input['option1'] == 1 ? 1 : 0 );\n\n\t// Say our text option must be safe text with no HTML tags\n\t$input['sometext'] = wp_filter_nohtml_kses( $input['sometext'] );\n\n\t// Our select option must actually be in our array of select options\n\tif ( ! array_key_exists( $input['selectinput'], $select_options ) )\n\t\t$input['selectinput'] = null;\n\n\t// Our radio option must actually be in our array of radio options\n\tif ( ! isset( $input['radioinput'] ) )\n\t\t$input['radioinput'] = null;\n\tif ( ! array_key_exists( $input['radioinput'], $radio_options ) )\n\t\t$input['radioinput'] = null;\n\n\t// Say our textarea option must be safe text with the allowed tags for posts\n\t$input['sometextarea'] = wp_filter_post_kses( $input['sometextarea'] );\n\n\treturn $input;\n}", "public function validateTeknik($tek) {\n\t\t\n\t}", "public function get_icon()\n\t{\n\t\treturn 'fab fa-algolia';\n\t}", "public function beforeValidate($options = array()) {\n\t\tunset($this->validate['logo']['required']['on']);\n\n\t\treturn true;\n\t}", "function comprobar_nombre()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->nombre) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"nombre\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"nombre vacio\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\tif (strlen($this->nombre) < 3)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"nombre\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"]);\n\n\t\t$correcto = false;\n\t}\n\n\t//si los atributos estan vacios\n\tif (strlen($this->nombre) > 31)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"nombre\", \"codigoincidencia\" => \"00002\" ,\"mensajeerror\" => \"nombre demasiado largo, maximo 10 caracteres\"]);\n\n\t\t$correcto = false;\t\t}\n\n\t//si los atributos son alfabeticos\n\tif (ctype_alpha($this->nombre))\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"nombre\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"nombre no valido, solo se admiten caracteres\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\treturn $correcto;\n}" ]
[ "0.60326743", "0.5958138", "0.5934675", "0.56425655", "0.54771394", "0.54528016", "0.539618", "0.51538515", "0.50936645", "0.5065235", "0.5027622", "0.49419186", "0.4885704", "0.48843855", "0.48750663", "0.48740023", "0.485638", "0.48540446", "0.47822866", "0.47736126", "0.4768062", "0.47541466", "0.47154555", "0.4714215", "0.47117516", "0.46806416", "0.4674886", "0.46744716", "0.46701622", "0.4668283", "0.46363473", "0.45966187", "0.4596453", "0.45929995", "0.4592887", "0.45750982", "0.4571741", "0.4563497", "0.4563497", "0.4552691", "0.45482793", "0.4542918", "0.45369375", "0.45242253", "0.4521629", "0.452017", "0.45174798", "0.45133245", "0.45115027", "0.45043638", "0.45015594", "0.4482351", "0.44822457", "0.44719967", "0.44695312", "0.4447407", "0.44457424", "0.44453216", "0.44361106", "0.44338694", "0.4430057", "0.44167408", "0.44082743", "0.44082743", "0.44082743", "0.44082743", "0.44082743", "0.44082743", "0.44082743", "0.44082743", "0.4404551", "0.43905276", "0.43898132", "0.43880004", "0.43877566", "0.4383798", "0.4381541", "0.43731275", "0.4371944", "0.4367555", "0.43654245", "0.43641654", "0.43586725", "0.43586725", "0.43586725", "0.43586725", "0.43586725", "0.43586725", "0.43582115", "0.43582115", "0.43579292", "0.43552336", "0.43526906", "0.4348965", "0.4348054", "0.43443558", "0.4344285", "0.4343781", "0.43432313", "0.4343124" ]
0.6673344
0
Validate the Font Awesome icon name.
public static function validateIconName($element, FormStateInterface $form_state) { // Load the configuration settings. $configuration_settings = \Drupal::config('fontawesome.settings'); // Check if we need to bypass. if ($configuration_settings->get('bypass_validation')) { return; } $value = $element['#value']; if (strlen($value) == 0) { $form_state->setValueForElement($element, ''); return; } // Load the icon data so we can check for a valid icon. $iconData = \Drupal::service('fontawesome.font_awesome_manager')->getIconMetadata($value); if (!isset($iconData['name'])) { $form_state->setError($element, t("Invalid icon name %value. Please see @iconLink for correct icon names, or turn off validation in the Font Awesome settings if you are trying to use custom icon names.", [ '%value' => $value, '@iconLink' => Link::fromTextAndUrl(t('the Font Awesome icon list'), Url::fromUri('https://fontawesome.com/icons'))->toString(), ])); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "private function assertTheNameOnlyContainsAllowedCharacters()\n {\n if (1 !== preg_match(self::NAME_REGEX, $this->getName())) {\n throw new Exception('The result of the getName method can only contain letters, numbers, underscore and dashes.');\n }\n }", "public function validateName($attribute)\n {\n if (!$this->hasErrors()) {\n if (!preg_match('/^[\\w\\s\\p{L}]{1,255}$/u', $this->$attribute)) {\n $this->addError($attribute, Yii::t('podium/view', 'Name must contain only letters, digits, underscores and spaces (255 characters max).'));\n }\n }\n }", "static function checkNames($input)\r\n {\r\n if (preg_match('/^[\\w\\W][\\w\\W]{1,20}$/', $input)) {\r\n return true; //Illegal Character found!\r\n } else {\r\n echo PageBuilder::printError(\"Please enter alphabets only in name fields.\");\r\n return false;\r\n }\r\n }", "function fa_icon( $icon = 'user' ) {\n\t\treturn \"<i class=\\\"fa fa-{$icon}\\\"></i>\";\n\t}", "protected function checkName()\n {\n if (preg_match('/^[a-zA-Z_]{1}[a-zA-Z_0-9]*$/', $this->name) == false) {\n throw new ReflectionException('Annotation parameter name may contain letters, underscores and numbers, but contains an invalid character.');\n }\n }", "public function hasValidNameArgument()\n {\n $name = $this->argument('name');\n\n if (! Str::contains($name, '/')) {\n $this->error(\"The name argument expects a vendor and name in 'Composer' format. Here's an example: `vendor/name`.\");\n\n return false;\n }\n\n return true;\n }", "public static function isValidName($name) {}", "private function validate_icon_data( $data ) {\n\n\t\t\t$validate = array_diff( $this->default_icon_data, array( 'icon_base', 'icon_prefix' ) );\n\n\t\t\tforeach ( $validate as $key => $field ) {\n\n\t\t\t\tif ( empty( $data[ $key ] ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}", "private function assertValidName() : void\n {\n InvalidDescriptorArgumentException::assertIsNotEmpty(\n $this->name,\n '#[Route.name] must contain a non-empty string.'\n );\n }", "public function setIconName($iconName) {}", "public function setIconName($iconName) {}", "public function setIconName($iconName) {}", "protected static function validateName($file, $name, $attr)\n {\n $accept = array_map('trim', explode(',', strtolower($attr)));\n\n $extensions = array_filter($accept, function($value) {\n return !strstr($value, '/');\n });\n\n $mimes = array_filter($accept, function($value) {\n return strstr($value, '/');\n });\n\n if (static::validateExtension($name, $extensions) || static::validateMime($file, $mimes)) {\n return;\n }\n\n throw new InvalidValueException(sprintf(static::$error_message, $attr));\n }", "function is_name_valid($input)\n {\n return (preg_match(\"/^([-a-z_ ])+$/i\", $input)) ? TRUE : FALSE;\n }", "function _name_check($str){\n }", "function nameValidator() {\n\t\tglobal $firstname;\n\t\treturn ctype_alpha($firstname);\n\t}", "public function get_icon()\n\t{\n\t\treturn 'fab fa-algolia';\n\t}", "public function icon($icon);", "public function validateName()\n {\n if (strlen(trim($_POST[$this->key])) < $this->minLength) {\n self::$errors[] = $this->convertUnderscores() . \" field requires at least $this->minLength characters\";\n }\n\n //check for profanity.\n if ($this->noProfanity) {\n $this->checkProfanity();\n }\n\n //lastly, check for valid first name patterns.\n\n if (!preg_match(\"/^[a-zA-Z]+[ -\\/\\\\'\\\"]*[a-zA-Z]+[ \\\"]{0,2}[a-zA-Z]*$/\", trim($_POST[$this->key]))) {\n self::$errors[] = \"Not a valid \" . $this->convertUnderscores();\n }\n\n return self::$errors ? false : true;\n }", "function font_awesome($icon){\n\treturn \"<span class='fa fa-fw $icon'></span>\";\n}", "public function validateRealname() {\r\n $leng = mb_strlen($this->data[$this->name]['RealName']);\r\n if ($leng > 128) {\r\n return FALSE;\r\n } else if ($leng > 64) {\r\n if (mb_ereg(self::_REGEX_FULLWITH, $this->data[$this->name]['RealName']) !== false) {\r\n return FALSE;\r\n }\r\n }\r\n return TRUE;\r\n }", "public function getIconName(): ?string;", "public function enqueue_font_awesome() {\n\t\tglobal $hestia_load_fa;\n\n\t\tif ( $hestia_load_fa !== true ) {\n\t\t\treturn false;\n\t\t}\n\n\t\twp_enqueue_style( 'font-awesome-5-all', get_template_directory_uri() . '/assets/font-awesome/css/all.min.css', array(), HESTIA_VENDOR_VERSION );\n\t\tif ( $this->should_load_shim() ) {\n\t\t\twp_enqueue_style( 'font-awesome-4-shim', get_template_directory_uri() . '/assets/font-awesome/css/v4-shims.min.css', array(), HESTIA_VENDOR_VERSION );\n\t\t}\n\n\t\treturn true;\n\t}", "public static function nameIsValid($name) {\r\n return ( is_string($name) && !empty($name) && strlen($name) >=2 ); \r\n }", "public static function filename_valid($name) {\n return strlen($name) < 100 && preg_match(\"/^[a-z0-9 \\.-]+$/i\", $name) != 0;\n }", "function us_is_fallback_icon( $icon_name ) {\r\n\t\treturn in_array( $icon_name, array(\r\n\t\t\t'angle-down',\r\n\t\t\t'angle-left',\r\n\t\t\t'angle-right',\r\n\t\t\t'angle-up',\r\n\t\t\t'bars',\r\n\t\t\t'check',\r\n\t\t\t'comments',\r\n\t\t\t'copy',\r\n\t\t\t'envelope',\r\n\t\t\t'map-marker-alt',\r\n\t\t\t'mobile',\r\n\t\t\t'phone',\r\n\t\t\t'play',\r\n\t\t\t'quote-left',\r\n\t\t\t'search',\r\n\t\t\t'search-plus',\r\n\t\t\t'shopping-cart',\r\n\t\t\t'star',\r\n\t\t\t'tags',\r\n\t\t\t'times',\r\n\t\t) );\r\n\t}", "public function getIcon()\n {\n return ' fa fa-lock';\n }", "public function validateName($attribute, $params)\n\t{\n\t\tif (!preg_match('/^[а-яё\\s-]+$/iu', $this->$attribute)) {\n\t\t\t$this->addError($attribute, 'Используйте русские буквы.');\n\t\t}\n\t}", "public function name_validation($name){\n\t\tif(!preg_match('/^[a-zA-Z0-9. ]*$/',$name)){ \n\t\t\treturn true;\n \t}\n }", "function validFname($fname)\r\n {\r\n return !empty($fname) && ctype_alpha($fname);\r\n }", "private function validName($name): bool {\n\t\t$pattern = '~\n# XML 1.0 Name symbol PHP PCRE regex <http://www.w3.org/TR/REC-xml/#NT-Name>\n(?(DEFINE)\n (?<NameStartChar> [A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\xF8-\\\\x{2FF}\\\\x{370}-\\\\x{37D}\\\\x{37F}-\\\\x{1FFF}\\\\x{200C}-\\\\x{200D}\\\\x{2070}-\\\\x{218F}\\\\x{2C00}-\\\\x{2FEF}\\\\x{3001}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFFD}\\\\x{10000}-\\\\x{EFFFF}])\n (?<NameChar> (?&NameStartChar) | [.\\\\-0-9\\\\xB7\\\\x{0300}-\\\\x{036F}\\\\x{203F}-\\\\x{2040}])\n (?<Name> (?&NameStartChar) (?&NameChar)*)\n)\n^(?&Name)$\n~ux';\n\t\treturn (1 === preg_match($pattern, $name));\n\t}", "public function getIcon() {\n\t\t//regex is used to check if there's a filename within the iconFile string\n\t\treturn preg_replace('/^.*\\/([^\\/]+\\.(gif|png))?$/i', '\\1', $this->iconFile) ? $this->iconFile : '';\n\t}", "private function _check_valid_attr($string) {\n\t\t\n\t\t$result = true;\n\t\t\n\t\t// Check $name for correct characters\n\t\t// \"^[a-zA-Z0-9_-]*$\"\n\t\t\n\t\treturn $result;\n\t\t\n\t}", "function verifyUserName($name) {\r\n if (preg_match('/^[a-zA-Z0-9\\ \\\\._\\'\"-]{4,50}$/', $name) != 1) { // no match\r\n return \"Name must be 4-50 characters long and consist of letters, digits, \"\r\n . \"spaces, dots, underscores, apostrophies, or minus sign.\";\r\n }\r\n return TRUE;\r\n}", "function testFileName(): void\n {\n $this->assertTrue(FileValidator::isName(\"docu.doc\"));\n $this->assertTrue(FileValidator::isName(\"docu\"));\n $this->assertFalse(FileValidator::isName(\"doc?u\"));\n }", "public static function newFontAwesomeIcon(): FontAwesomeIconInterface {\n return new FontAwesomeIcon();\n }", "function studeon_vc_iconpicker_type_fontawesome($icons) {\n\t\t$list = studeon_get_list_icons();\n\t\tif (!is_array($list) || count($list) == 0) return $icons;\n\t\t$rez = array();\n\t\tforeach ($list as $icon)\n\t\t\t$rez[] = array($icon => str_replace('icon-', '', $icon));\n\t\treturn array_merge( $icons, array(esc_html__('Theme Icons', 'studeon') => $rez) );\n\t}", "public function validateControlName($name);", "public function isValidFilename()\n {\n $fileName = $this->fileName;\n if(substr($fileName, 0,1) == '-') {\n return false;\n }\n return true;\n }", "function maybe_enqueue_font_awesome( $field )\n\t{\n\t\tif( 'font-awesome' == $field['type'] && $field['enqueue_fa'] ) {\n\t\t\tadd_action( 'wp_footer', array( $this, 'frontend_enqueue_scripts' ) );\n\t\t}\n\n\t\treturn $field;\n\t}", "function isNameViable(){\n\t$postName = filter_var($_POST['name'], FILTER_SANITIZE_SPECIAL_CHARS);\n\tif(strlen($postName) < 3){\n\t\treturn false;\n\t}\n\n\t$f = $postName[0]; #first letter is predicted class\n\t$s = $postName[1]; #second letter is actual class\n\t#third letter is '_'\n\tif(($f=='B' || $f=='D' || $f=='F' || $f=='L' || $f=='R') && \n\t\t($s=='B' || $s=='D' || $s=='F' || $s=='L' || $s=='R') &&\n\t\t$postName[2]=='_'){\n\t\t\treturn true;\n\t} else{\n\t\treturn false;\n\t}\n}", "function pkg_valid_name($pkgname) {\n\tglobal $g;\n\n\t$pattern = \"/^{$g['pkg_prefix']}[a-zA-Z0-9\\.\\-_]+$/\";\n\treturn preg_match($pattern, $pkgname);\n}", "public static function validateName()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\Validator\\Length(null, 255),\n\t\t);\n\t}", "public static function isValidName( $name ) {\n return TRUE;\n }", "static function Icon($icon_to_test)\n\t{\n\t\tif(in_array($icon_to_test, self::$_icons) )\n\t\t\treturn $icon_to_test;\n\t\tWdfException::Raise(\"Invalid Icon '$icon_to_test'\");\n return '';\n\t}", "function isCorrectFilename ($name) {\r\n if (!empty($name)) {\r\n if (preg_match('/[a-zA-Z0-9_]/', $name)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "private function hasValidUserName($input) {\n\t\treturn strtolower($input->user) == strtolower(get_option(\"wp_broadbean_users\"));\n\t}", "function verify_download_name($download_name) // Colorize: green\n { // Colorize: green\n return isset($download_name) // Colorize: green\n && // Colorize: green\n is_string($download_name) // Colorize: green\n && // Colorize: green\n preg_match(DOWNLOAD_NAME_REGEXP, $download_name); // Colorize: green\n }", "function validName($name)\n {\n //name should not be empty and should contain only letters\n return !empty($name) && ctype_alpha($name);\n }", "function validateName($name) {\n\tif (!preg_match('/[^A-Za-z]+/', $name) && strlen($name) >= 2 && strlen($name) <= 20)\n\t\treturn 1;\t//name is valid\n\telse\n\t\treturn 0;\n}", "private function userIconType() {\n $firstInitial = substr($this->get('username'),0,1);\n if (strlen($firstInitial) > 0) {\n echo '<i class=\"first-initial\" aria-hidden=\"true\">'.$firstInitial.'</i><span class=\"sr-only\">My User</span>';\n } else {\n echo '<i class=\"fa fa-user\" aria-hidden=\"true\"></i><span class=\"sr-only\">My User</span>';\n }\n }", "public static function parseFontAwesomeIcon(array $args): FontAwesomeIconInterface {\n\n $icon = static::newFontAwesomeIcon();\n\n $icon->setName(ArrayHelper::get($args, \"name\", \"home\"));\n $icon->setStyle(ArrayHelper::get($args, \"style\"));\n\n $icon->setAnimation(ArrayHelper::get($args, \"animation\"));\n $icon->setBordered(ArrayHelper::get($args, \"bordered\", false));\n $icon->setFixedWidth(ArrayHelper::get($args, \"fixedWidth\", false));\n $icon->setFont(ArrayHelper::get($args, \"font\"));\n $icon->setPull(ArrayHelper::get($args, \"pull\"));\n $icon->setSize(ArrayHelper::get($args, \"size\"));\n\n return $icon;\n }", "function check_fa4_styles() {\n\n\t\tglobal $wp_styles;\n\t\tforeach ( $wp_styles->queue as $style ) {\n\t\t\tif ( strstr( $wp_styles->registered[ $style ]->src, 'font-awesome.min.css' ) ) {\n\t\t\t\tupdate_option( 'hestia_load_shim', 'yes' );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private function ValidateName($name){\n if (empty($name)){ //checks if empty\n $this->valid = False;\n }else if (strlen($name)>= 30){ //checks max length\n $this->valid = False;\n }else if(!preg_match(\"/^[a-zA-Z ]*$/\",$name)){ //checks format\n $this->valid = False;\n }\n }", "private function checkUsername($name){\n\t\t\tif(strlen($name) < 3)\n\t\t\t\tthrow new UserFewCharException();\n\t\t\tif($this->userList->getUsers()->getUserByName($name) != null)\n\t\t\t\tthrow new UserExistsException();\n\t\t\tif($name != strip_tags($name))\n\t\t\t\tthrow new UserBadCharException();\n\t\t\treturn true;\n\t\t}", "function valid_name($name) {\r\n\tif (empty($name)) \r\n\t\treturn false;\r\n\telse\r\n\t\treturn true;\r\n }", "public function validate_name($str){\n $allowed = array(\".\", \"-\", \"_\", \" \"); // you can add here more value, you want to allow.\n if(ctype_alnum(str_replace($allowed, '', $str ))) {\n return true;\n }\n else{\n return false;\n }\n }", "private function validateFirstName($fn){\n if(strlen($fn)<2 || strlen($fn)>25){\n array_push($this->errorArray, Constants::$firstNameCharecters);\n }\n }", "private function __validate_name() {\n if (isset($this->initial_data[\"name\"])) {\n if ($this->get_limiter_id_by_name($this->initial_data[\"name\"], true)) {\n $this->id = $this->get_limiter_id_by_name($this->initial_data[\"name\"]);\n } else {\n $this->errors[] = APIResponse\\get(4209);\n }\n } else {\n $this->errors[] = APIResponse\\get(4167);\n }\n }", "static function validName($name)\r\n {\r\n if (ctype_alpha($name)) {\r\n return $name;\r\n } else if ($name == \"\") {\r\n return !empty($name);\r\n }\r\n }", "public function icons() {\n\n\t\t$solid_icons = array(\n\t\t\t\"fas-f641\" => \"fas fa-ad\",\n\t\t\t\"fas-f2b9\" => \"fas fa-address-book\",\n\t\t\t\"fas-f2bb\" => \"fas fa-address-card\",\n\t\t\t\"fas-f042\" => \"fas fa-adjust\",\n\t\t\t\"fas-f5d0\" => \"fas fa-air-freshener\",\n\t\t\t\"fas-f037\" => \"fas fa-align-center\",\n\t\t\t\"fas-f039\" => \"fas fa-align-justify\",\n\t\t\t\"fas-f036\" => \"fas fa-align-left\",\n\t\t\t\"fas-f038\" => \"fas fa-align-right\",\n\t\t\t\"fas-f461\" => \"fas fa-allergies\",\n\t\t\t\"fas-f0f9\" => \"fas fa-ambulance\",\n\t\t\t\"fas-f2a3\" => \"fas fa-american-sign-language-interpreting\",\n\t\t\t\"fas-f13d\" => \"fas fa-anchor\",\n\t\t\t\"fas-f103\" => \"fas fa-angle-double-down\",\n\t\t\t\"fas-f100\" => \"fas fa-angle-double-left\",\n\t\t\t\"fas-f101\" => \"fas fa-angle-double-right\",\n\t\t\t\"fas-f102\" => \"fas fa-angle-double-up\",\n\t\t\t\"fas-f107\" => \"fas fa-angle-down\",\n\t\t\t\"fas-f104\" => \"fas fa-angle-left\",\n\t\t\t\"fas-f105\" => \"fas fa-angle-right\",\n\t\t\t\"fas-f106\" => \"fas fa-angle-up\",\n\t\t\t\"fas-f556\" => \"fas fa-angry\",\n\t\t\t\"fas-f644\" => \"fas fa-ankh\",\n\t\t\t\"fas-f5d1\" => \"fas fa-apple-alt\",\n\t\t\t\"fas-f187\" => \"fas fa-archive\",\n\t\t\t\"fas-f557\" => \"fas fa-archway\",\n\t\t\t\"fas-f358\" => \"fas fa-arrow-alt-circle-down\",\n\t\t\t\"fas-f359\" => \"fas fa-arrow-alt-circle-left\",\n\t\t\t\"fas-f35a\" => \"fas fa-arrow-alt-circle-right\",\n\t\t\t\"fas-f35b\" => \"fas fa-arrow-alt-circle-up\",\n\t\t\t\"fas-f0ab\" => \"fas fa-arrow-circle-down\",\n\t\t\t\"fas-f0a8\" => \"fas fa-arrow-circle-left\",\n\t\t\t\"fas-f0a9\" => \"fas fa-arrow-circle-right\",\n\t\t\t\"fas-f0aa\" => \"fas fa-arrow-circle-up\",\n\t\t\t\"fas-f063\" => \"fas fa-arrow-down\",\n\t\t\t\"fas-f060\" => \"fas fa-arrow-left\",\n\t\t\t\"fas-f061\" => \"fas fa-arrow-right\",\n\t\t\t\"fas-f062\" => \"fas fa-arrow-up\",\n\t\t\t\"fas-f0b2\" => \"fas fa-arrows-alt\",\n\t\t\t\"fas-f337\" => \"fas fa-arrows-alt-h\",\n\t\t\t\"fas-f338\" => \"fas fa-arrows-alt-v\",\n\t\t\t\"fas-f2a2\" => \"fas fa-assistive-listening-systems\",\n\t\t\t\"fas-f069\" => \"fas fa-asterisk\",\n\t\t\t\"fas-f1fa\" => \"fas fa-at\",\n\t\t\t\"fas-f558\" => \"fas fa-atlas\",\n\t\t\t\"fas-f5d2\" => \"fas fa-atom\",\n\t\t\t\"fas-f29e\" => \"fas fa-audio-description\",\n\t\t\t\"fas-f559\" => \"fas fa-award\",\n\t\t\t\"fas-f77c\" => \"fas fa-baby\",\n\t\t\t\"fas-f77d\" => \"fas fa-baby-carriage\",\n\t\t\t\"fas-f55a\" => \"fas fa-backspace\",\n\t\t\t\"fas-f04a\" => \"fas fa-backward\",\n\t\t\t\"fas-f7e5\" => \"fas fa-bacon\",\n\t\t\t\"fas-f666\" => \"fas fa-bahai\",\n\t\t\t\"fas-f24e\" => \"fas fa-balance-scale\",\n\t\t\t\"fas-f515\" => \"fas fa-balance-scale-left\",\n\t\t\t\"fas-f516\" => \"fas fa-balance-scale-right\",\n\t\t\t\"fas-f05e\" => \"fas fa-ban\",\n\t\t\t\"fas-f462\" => \"fas fa-band-aid\",\n\t\t\t\"fas-f02a\" => \"fas fa-barcode\",\n\t\t\t\"fas-f0c9\" => \"fas fa-bars\",\n\t\t\t\"fas-f433\" => \"fas fa-baseball-ball\",\n\t\t\t\"fas-f434\" => \"fas fa-basketball-ball\",\n\t\t\t\"fas-f2cd\" => \"fas fa-bath\",\n\t\t\t\"fas-f244\" => \"fas fa-battery-empty\",\n\t\t\t\"fas-f240\" => \"fas fa-battery-full\",\n\t\t\t\"fas-f242\" => \"fas fa-battery-half\",\n\t\t\t\"fas-f243\" => \"fas fa-battery-quarter\",\n\t\t\t\"fas-f241\" => \"fas fa-battery-three-quarters\",\n\t\t\t\"fas-f236\" => \"fas fa-bed\",\n\t\t\t\"fas-f0fc\" => \"fas fa-beer\",\n\t\t\t\"fas-f0f3\" => \"fas fa-bell\",\n\t\t\t\"fas-f1f6\" => \"fas fa-bell-slash\",\n\t\t\t\"fas-f55b\" => \"fas fa-bezier-curve\",\n\t\t\t\"fas-f647\" => \"fas fa-bible\",\n\t\t\t\"fas-f206\" => \"fas fa-bicycle\",\n\t\t\t\"fas-f84a\" => \"fas fa-biking\",\n\t\t\t\"fas-f1e5\" => \"fas fa-binoculars\",\n\t\t\t\"fas-f780\" => \"fas fa-biohazard\",\n\t\t\t\"fas-f1fd\" => \"fas fa-birthday-cake\",\n\t\t\t\"fas-f517\" => \"fas fa-blender\",\n\t\t\t\"fas-f6b6\" => \"fas fa-blender-phone\",\n\t\t\t\"fas-f29d\" => \"fas fa-blind\",\n\t\t\t\"fas-f781\" => \"fas fa-blog\",\n\t\t\t\"fas-f032\" => \"fas fa-bold\",\n\t\t\t\"fas-f0e7\" => \"fas fa-bolt\",\n\t\t\t\"fas-f1e2\" => \"fas fa-bomb\",\n\t\t\t\"fas-f5d7\" => \"fas fa-bone\",\n\t\t\t\"fas-f55c\" => \"fas fa-bong\",\n\t\t\t\"fas-f02d\" => \"fas fa-book\",\n\t\t\t\"fas-f6b7\" => \"fas fa-book-dead\",\n\t\t\t\"fas-f7e6\" => \"fas fa-book-medical\",\n\t\t\t\"fas-f518\" => \"fas fa-book-open\",\n\t\t\t\"fas-f5da\" => \"fas fa-book-reader\",\n\t\t\t\"fas-f02e\" => \"fas fa-bookmark\",\n\t\t\t\"fas-f84c\" => \"fas fa-border-all\",\n\t\t\t\"fas-f850\" => \"fas fa-border-none\",\n\t\t\t\"fas-f853\" => \"fas fa-border-style\",\n\t\t\t\"fas-f436\" => \"fas fa-bowling-ball\",\n\t\t\t\"fas-f466\" => \"fas fa-box\",\n\t\t\t\"fas-f49e\" => \"fas fa-box-open\",\n\t\t\t\"fas-f95b\" => \"fas fa-box-tissue\",\n\t\t\t\"fas-f468\" => \"fas fa-boxes\",\n\t\t\t\"fas-f2a1\" => \"fas fa-braille\",\n\t\t\t\"fas-f5dc\" => \"fas fa-brain\",\n\t\t\t\"fas-f7ec\" => \"fas fa-bread-slice\",\n\t\t\t\"fas-f0b1\" => \"fas fa-briefcase\",\n\t\t\t\"fas-f469\" => \"fas fa-briefcase-medical\",\n\t\t\t\"fas-f519\" => \"fas fa-broadcast-tower\",\n\t\t\t\"fas-f51a\" => \"fas fa-broom\",\n\t\t\t\"fas-f55d\" => \"fas fa-brush\",\n\t\t\t\"fas-f188\" => \"fas fa-bug\",\n\t\t\t\"fas-f1ad\" => \"fas fa-building\",\n\t\t\t\"fas-f0a1\" => \"fas fa-bullhorn\",\n\t\t\t\"fas-f140\" => \"fas fa-bullseye\",\n\t\t\t\"fas-f46a\" => \"fas fa-burn\",\n\t\t\t\"fas-f207\" => \"fas fa-bus\",\n\t\t\t\"fas-f55e\" => \"fas fa-bus-alt\",\n\t\t\t\"fas-f64a\" => \"fas fa-business-time\",\n\t\t\t\"fas-f1ec\" => \"fas fa-calculator\",\n\t\t\t\"fas-f133\" => \"fas fa-calendar\",\n\t\t\t\"fas-f073\" => \"fas fa-calendar-alt\",\n\t\t\t\"fas-f274\" => \"fas fa-calendar-check\",\n\t\t\t\"fas-f783\" => \"fas fa-calendar-day\",\n\t\t\t\"fas-f272\" => \"fas fa-calendar-minus\",\n\t\t\t\"fas-f271\" => \"fas fa-calendar-plus\",\n\t\t\t\"fas-f273\" => \"fas fa-calendar-times\",\n\t\t\t\"fas-f784\" => \"fas fa-calendar-week\",\n\t\t\t\"fas-f030\" => \"fas fa-camera\",\n\t\t\t\"fas-f083\" => \"fas fa-camera-retro\",\n\t\t\t\"fas-f6bb\" => \"fas fa-campground\",\n\t\t\t\"fas-f786\" => \"fas fa-candy-cane\",\n\t\t\t\"fas-f55f\" => \"fas fa-cannabis\",\n\t\t\t\"fas-f46b\" => \"fas fa-capsules\",\n\t\t\t\"fas-f1b9\" => \"fas fa-car\",\n\t\t\t\"fas-f5de\" => \"fas fa-car-alt\",\n\t\t\t\"fas-f5df\" => \"fas fa-car-battery\",\n\t\t\t\"fas-f5e1\" => \"fas fa-car-crash\",\n\t\t\t\"fas-f5e4\" => \"fas fa-car-side\",\n\t\t\t\"fas-f8ff\" => \"fas fa-caravan\",\n\t\t\t\"fas-f0d7\" => \"fas fa-caret-down\",\n\t\t\t\"fas-f0d9\" => \"fas fa-caret-left\",\n\t\t\t\"fas-f0da\" => \"fas fa-caret-right\",\n\t\t\t\"fas-f150\" => \"fas fa-caret-square-down\",\n\t\t\t\"fas-f191\" => \"fas fa-caret-square-left\",\n\t\t\t\"fas-f152\" => \"fas fa-caret-square-right\",\n\t\t\t\"fas-f151\" => \"fas fa-caret-square-up\",\n\t\t\t\"fas-f0d8\" => \"fas fa-caret-up\",\n\t\t\t\"fas-f787\" => \"fas fa-carrot\",\n\t\t\t\"fas-f218\" => \"fas fa-cart-arrow-down\",\n\t\t\t\"fas-f217\" => \"fas fa-cart-plus\",\n\t\t\t\"fas-f788\" => \"fas fa-cash-register\",\n\t\t\t\"fas-f6be\" => \"fas fa-cat\",\n\t\t\t\"fas-f0a3\" => \"fas fa-certificate\",\n\t\t\t\"fas-f6c0\" => \"fas fa-chair\",\n\t\t\t\"fas-f51b\" => \"fas fa-chalkboard\",\n\t\t\t\"fas-f51c\" => \"fas fa-chalkboard-teacher\",\n\t\t\t\"fas-f5e7\" => \"fas fa-charging-station\",\n\t\t\t\"fas-f1fe\" => \"fas fa-chart-area\",\n\t\t\t\"fas-f080\" => \"fas fa-chart-bar\",\n\t\t\t\"fas-f201\" => \"fas fa-chart-line\",\n\t\t\t\"fas-f200\" => \"fas fa-chart-pie\",\n\t\t\t\"fas-f00c\" => \"fas fa-check\",\n\t\t\t\"fas-f058\" => \"fas fa-check-circle\",\n\t\t\t\"fas-f560\" => \"fas fa-check-double\",\n\t\t\t\"fas-f14a\" => \"fas fa-check-square\",\n\t\t\t\"fas-f7ef\" => \"fas fa-cheese\",\n\t\t\t\"fas-f439\" => \"fas fa-chess\",\n\t\t\t\"fas-f43a\" => \"fas fa-chess-bishop\",\n\t\t\t\"fas-f43c\" => \"fas fa-chess-board\",\n\t\t\t\"fas-f43f\" => \"fas fa-chess-king\",\n\t\t\t\"fas-f441\" => \"fas fa-chess-knight\",\n\t\t\t\"fas-f443\" => \"fas fa-chess-pawn\",\n\t\t\t\"fas-f445\" => \"fas fa-chess-queen\",\n\t\t\t\"fas-f447\" => \"fas fa-chess-rook\",\n\t\t\t\"fas-f13a\" => \"fas fa-chevron-circle-down\",\n\t\t\t\"fas-f137\" => \"fas fa-chevron-circle-left\",\n\t\t\t\"fas-f138\" => \"fas fa-chevron-circle-right\",\n\t\t\t\"fas-f139\" => \"fas fa-chevron-circle-up\",\n\t\t\t\"fas-f078\" => \"fas fa-chevron-down\",\n\t\t\t\"fas-f053\" => \"fas fa-chevron-left\",\n\t\t\t\"fas-f054\" => \"fas fa-chevron-right\",\n\t\t\t\"fas-f077\" => \"fas fa-chevron-up\",\n\t\t\t\"fas-f1ae\" => \"fas fa-child\",\n\t\t\t\"fas-f51d\" => \"fas fa-church\",\n\t\t\t\"fas-f111\" => \"fas fa-circle\",\n\t\t\t\"fas-f1ce\" => \"fas fa-circle-notch\",\n\t\t\t\"fas-f64f\" => \"fas fa-city\",\n\t\t\t\"fas-f7f2\" => \"fas fa-clinic-medical\",\n\t\t\t\"fas-f328\" => \"fas fa-clipboard\",\n\t\t\t\"fas-f46c\" => \"fas fa-clipboard-check\",\n\t\t\t\"fas-f46d\" => \"fas fa-clipboard-list\",\n\t\t\t\"fas-f017\" => \"fas fa-clock\",\n\t\t\t\"fas-f24d\" => \"fas fa-clone\",\n\t\t\t\"fas-f20a\" => \"fas fa-closed-captioning\",\n\t\t\t\"fas-f0c2\" => \"fas fa-cloud\",\n\t\t\t\"fas-f381\" => \"fas fa-cloud-download-alt\",\n\t\t\t\"fas-f73b\" => \"fas fa-cloud-meatball\",\n\t\t\t\"fas-f6c3\" => \"fas fa-cloud-moon\",\n\t\t\t\"fas-f73c\" => \"fas fa-cloud-moon-rain\",\n\t\t\t\"fas-f73d\" => \"fas fa-cloud-rain\",\n\t\t\t\"fas-f740\" => \"fas fa-cloud-showers-heavy\",\n\t\t\t\"fas-f6c4\" => \"fas fa-cloud-sun\",\n\t\t\t\"fas-f743\" => \"fas fa-cloud-sun-rain\",\n\t\t\t\"fas-f382\" => \"fas fa-cloud-upload-alt\",\n\t\t\t\"fas-f561\" => \"fas fa-cocktail\",\n\t\t\t\"fas-f121\" => \"fas fa-code\",\n\t\t\t\"fas-f126\" => \"fas fa-code-branch\",\n\t\t\t\"fas-f0f4\" => \"fas fa-coffee\",\n\t\t\t\"fas-f013\" => \"fas fa-cog\",\n\t\t\t\"fas-f085\" => \"fas fa-cogs\",\n\t\t\t\"fas-f51e\" => \"fas fa-coins\",\n\t\t\t\"fas-f0db\" => \"fas fa-columns\",\n\t\t\t\"fas-f075\" => \"fas fa-comment\",\n\t\t\t\"fas-f27a\" => \"fas fa-comment-alt\",\n\t\t\t\"fas-f651\" => \"fas fa-comment-dollar\",\n\t\t\t\"fas-f4ad\" => \"fas fa-comment-dots\",\n\t\t\t\"fas-f7f5\" => \"fas fa-comment-medical\",\n\t\t\t\"fas-f4b3\" => \"fas fa-comment-slash\",\n\t\t\t\"fas-f086\" => \"fas fa-comments\",\n\t\t\t\"fas-f653\" => \"fas fa-comments-dollar\",\n\t\t\t\"fas-f51f\" => \"fas fa-compact-disc\",\n\t\t\t\"fas-f14e\" => \"fas fa-compass\",\n\t\t\t\"fas-f066\" => \"fas fa-compress\",\n\t\t\t\"fas-f422\" => \"fas fa-compress-alt\",\n\t\t\t\"fas-f78c\" => \"fas fa-compress-arrows-alt\",\n\t\t\t\"fas-f562\" => \"fas fa-concierge-bell\",\n\t\t\t\"fas-f563\" => \"fas fa-cookie\",\n\t\t\t\"fas-f564\" => \"fas fa-cookie-bite\",\n\t\t\t\"fas-f0c5\" => \"fas fa-copy\",\n\t\t\t\"fas-f1f9\" => \"fas fa-copyright\",\n\t\t\t\"fas-f4b8\" => \"fas fa-couch\",\n\t\t\t\"fas-f09d\" => \"fas fa-credit-card\",\n\t\t\t\"fas-f125\" => \"fas fa-crop\",\n\t\t\t\"fas-f565\" => \"fas fa-crop-alt\",\n\t\t\t\"fas-f654\" => \"fas fa-cross\",\n\t\t\t\"fas-f05b\" => \"fas fa-crosshairs\",\n\t\t\t\"fas-f520\" => \"fas fa-crow\",\n\t\t\t\"fas-f521\" => \"fas fa-crown\",\n\t\t\t\"fas-f7f7\" => \"fas fa-crutch\",\n\t\t\t\"fas-f1b2\" => \"fas fa-cube\",\n\t\t\t\"fas-f1b3\" => \"fas fa-cubes\",\n\t\t\t\"fas-f0c4\" => \"fas fa-cut\",\n\t\t\t\"fas-f1c0\" => \"fas fa-database\",\n\t\t\t\"fas-f2a4\" => \"fas fa-deaf\",\n\t\t\t\"fas-f747\" => \"fas fa-democrat\",\n\t\t\t\"fas-f108\" => \"fas fa-desktop\",\n\t\t\t\"fas-f655\" => \"fas fa-dharmachakra\",\n\t\t\t\"fas-f470\" => \"fas fa-diagnoses\",\n\t\t\t\"fas-f522\" => \"fas fa-dice\",\n\t\t\t\"fas-f6cf\" => \"fas fa-dice-d20\",\n\t\t\t\"fas-f6d1\" => \"fas fa-dice-d6\",\n\t\t\t\"fas-f523\" => \"fas fa-dice-five\",\n\t\t\t\"fas-f524\" => \"fas fa-dice-four\",\n\t\t\t\"fas-f525\" => \"fas fa-dice-one\",\n\t\t\t\"fas-f526\" => \"fas fa-dice-six\",\n\t\t\t\"fas-f527\" => \"fas fa-dice-three\",\n\t\t\t\"fas-f528\" => \"fas fa-dice-two\",\n\t\t\t\"fas-f566\" => \"fas fa-digital-tachograph\",\n\t\t\t\"fas-f5eb\" => \"fas fa-directions\",\n\t\t\t\"fas-f7fa\" => \"fas fa-disease\",\n\t\t\t\"fas-f529\" => \"fas fa-divide\",\n\t\t\t\"fas-f567\" => \"fas fa-dizzy\",\n\t\t\t\"fas-f471\" => \"fas fa-dna\",\n\t\t\t\"fas-f6d3\" => \"fas fa-dog\",\n\t\t\t\"fas-f155\" => \"fas fa-dollar-sign\",\n\t\t\t\"fas-f472\" => \"fas fa-dolly\",\n\t\t\t\"fas-f474\" => \"fas fa-dolly-flatbed\",\n\t\t\t\"fas-f4b9\" => \"fas fa-donate\",\n\t\t\t\"fas-f52a\" => \"fas fa-door-closed\",\n\t\t\t\"fas-f52b\" => \"fas fa-door-open\",\n\t\t\t\"fas-f192\" => \"fas fa-dot-circle\",\n\t\t\t\"fas-f4ba\" => \"fas fa-dove\",\n\t\t\t\"fas-f019\" => \"fas fa-download\",\n\t\t\t\"fas-f568\" => \"fas fa-drafting-compass\",\n\t\t\t\"fas-f6d5\" => \"fas fa-dragon\",\n\t\t\t\"fas-f5ee\" => \"fas fa-draw-polygon\",\n\t\t\t\"fas-f569\" => \"fas fa-drum\",\n\t\t\t\"fas-f56a\" => \"fas fa-drum-steelpan\",\n\t\t\t\"fas-f6d7\" => \"fas fa-drumstick-bite\",\n\t\t\t\"fas-f44b\" => \"fas fa-dumbbell\",\n\t\t\t\"fas-f793\" => \"fas fa-dumpster\",\n\t\t\t\"fas-f794\" => \"fas fa-dumpster-fire\",\n\t\t\t\"fas-f6d9\" => \"fas fa-dungeon\",\n\t\t\t\"fas-f044\" => \"fas fa-edit\",\n\t\t\t\"fas-f7fb\" => \"fas fa-egg\",\n\t\t\t\"fas-f052\" => \"fas fa-eject\",\n\t\t\t\"fas-f141\" => \"fas fa-ellipsis-h\",\n\t\t\t\"fas-f142\" => \"fas fa-ellipsis-v\",\n\t\t\t\"fas-f0e0\" => \"fas fa-envelope\",\n\t\t\t\"fas-f2b6\" => \"fas fa-envelope-open\",\n\t\t\t\"fas-f658\" => \"fas fa-envelope-open-text\",\n\t\t\t\"fas-f199\" => \"fas fa-envelope-square\",\n\t\t\t\"fas-f52c\" => \"fas fa-equals\",\n\t\t\t\"fas-f12d\" => \"fas fa-eraser\",\n\t\t\t\"fas-f796\" => \"fas fa-ethernet\",\n\t\t\t\"fas-f153\" => \"fas fa-euro-sign\",\n\t\t\t\"fas-f362\" => \"fas fa-exchange-alt\",\n\t\t\t\"fas-f12a\" => \"fas fa-exclamation\",\n\t\t\t\"fas-f06a\" => \"fas fa-exclamation-circle\",\n\t\t\t\"fas-f071\" => \"fas fa-exclamation-triangle\",\n\t\t\t\"fas-f065\" => \"fas fa-expand\",\n\t\t\t\"fas-f424\" => \"fas fa-expand-alt\",\n\t\t\t\"fas-f31e\" => \"fas fa-expand-arrows-alt\",\n\t\t\t\"fas-f35d\" => \"fas fa-external-link-alt\",\n\t\t\t\"fas-f360\" => \"fas fa-external-link-square-alt\",\n\t\t\t\"fas-f06e\" => \"fas fa-eye\",\n\t\t\t\"fas-f1fb\" => \"fas fa-eye-dropper\",\n\t\t\t\"fas-f070\" => \"fas fa-eye-slash\",\n\t\t\t\"fas-f863\" => \"fas fa-fan\",\n\t\t\t\"fas-f049\" => \"fas fa-fast-backward\",\n\t\t\t\"fas-f050\" => \"fas fa-fast-forward\",\n\t\t\t\"fas-f905\" => \"fas fa-faucet\",\n\t\t\t\"fas-f1ac\" => \"fas fa-fax\",\n\t\t\t\"fas-f52d\" => \"fas fa-feather\",\n\t\t\t\"fas-f56b\" => \"fas fa-feather-alt\",\n\t\t\t\"fas-f182\" => \"fas fa-female\",\n\t\t\t\"fas-f0fb\" => \"fas fa-fighter-jet\",\n\t\t\t\"fas-f15b\" => \"fas fa-file\",\n\t\t\t\"fas-f15c\" => \"fas fa-file-alt\",\n\t\t\t\"fas-f1c6\" => \"fas fa-file-archive\",\n\t\t\t\"fas-f1c7\" => \"fas fa-file-audio\",\n\t\t\t\"fas-f1c9\" => \"fas fa-file-code\",\n\t\t\t\"fas-f56c\" => \"fas fa-file-contract\",\n\t\t\t\"fas-f6dd\" => \"fas fa-file-csv\",\n\t\t\t\"fas-f56d\" => \"fas fa-file-download\",\n\t\t\t\"fas-f1c3\" => \"fas fa-file-excel\",\n\t\t\t\"fas-f56e\" => \"fas fa-file-export\",\n\t\t\t\"fas-f1c5\" => \"fas fa-file-image\",\n\t\t\t\"fas-f56f\" => \"fas fa-file-import\",\n\t\t\t\"fas-f570\" => \"fas fa-file-invoice\",\n\t\t\t\"fas-f571\" => \"fas fa-file-invoice-dollar\",\n\t\t\t\"fas-f477\" => \"fas fa-file-medical\",\n\t\t\t\"fas-f478\" => \"fas fa-file-medical-alt\",\n\t\t\t\"fas-f1c1\" => \"fas fa-file-pdf\",\n\t\t\t\"fas-f1c4\" => \"fas fa-file-powerpoint\",\n\t\t\t\"fas-f572\" => \"fas fa-file-prescription\",\n\t\t\t\"fas-f573\" => \"fas fa-file-signature\",\n\t\t\t\"fas-f574\" => \"fas fa-file-upload\",\n\t\t\t\"fas-f1c8\" => \"fas fa-file-video\",\n\t\t\t\"fas-f1c2\" => \"fas fa-file-word\",\n\t\t\t\"fas-f575\" => \"fas fa-fill\",\n\t\t\t\"fas-f576\" => \"fas fa-fill-drip\",\n\t\t\t\"fas-f008\" => \"fas fa-film\",\n\t\t\t\"fas-f0b0\" => \"fas fa-filter\",\n\t\t\t\"fas-f577\" => \"fas fa-fingerprint\",\n\t\t\t\"fas-f06d\" => \"fas fa-fire\",\n\t\t\t\"fas-f7e4\" => \"fas fa-fire-alt\",\n\t\t\t\"fas-f134\" => \"fas fa-fire-extinguisher\",\n\t\t\t\"fas-f479\" => \"fas fa-first-aid\",\n\t\t\t\"fas-f578\" => \"fas fa-fish\",\n\t\t\t\"fas-f6de\" => \"fas fa-fist-raised\",\n\t\t\t\"fas-f024\" => \"fas fa-flag\",\n\t\t\t\"fas-f11e\" => \"fas fa-flag-checkered\",\n\t\t\t\"fas-f74d\" => \"fas fa-flag-usa\",\n\t\t\t\"fas-f0c3\" => \"fas fa-flask\",\n\t\t\t\"fas-f579\" => \"fas fa-flushed\",\n\t\t\t\"fas-f07b\" => \"fas fa-folder\",\n\t\t\t\"fas-f65d\" => \"fas fa-folder-minus\",\n\t\t\t\"fas-f07c\" => \"fas fa-folder-open\",\n\t\t\t\"fas-f65e\" => \"fas fa-folder-plus\",\n\t\t\t\"fas-f031\" => \"fas fa-font\",\n\t\t\t\"fas-f44e\" => \"fas fa-football-ball\",\n\t\t\t\"fas-f04e\" => \"fas fa-forward\",\n\t\t\t\"fas-f52e\" => \"fas fa-frog\",\n\t\t\t\"fas-f119\" => \"fas fa-frown\",\n\t\t\t\"fas-f57a\" => \"fas fa-frown-open\",\n\t\t\t\"fas-f662\" => \"fas fa-funnel-dollar\",\n\t\t\t\"fas-f1e3\" => \"fas fa-futbol\",\n\t\t\t\"fas-f11b\" => \"fas fa-gamepad\",\n\t\t\t\"fas-f52f\" => \"fas fa-gas-pump\",\n\t\t\t\"fas-f0e3\" => \"fas fa-gavel\",\n\t\t\t\"fas-f3a5\" => \"fas fa-gem\",\n\t\t\t\"fas-f22d\" => \"fas fa-genderless\",\n\t\t\t\"fas-f6e2\" => \"fas fa-ghost\",\n\t\t\t\"fas-f06b\" => \"fas fa-gift\",\n\t\t\t\"fas-f79c\" => \"fas fa-gifts\",\n\t\t\t\"fas-f79f\" => \"fas fa-glass-cheers\",\n\t\t\t\"fas-f000\" => \"fas fa-glass-martini\",\n\t\t\t\"fas-f57b\" => \"fas fa-glass-martini-alt\",\n\t\t\t\"fas-f7a0\" => \"fas fa-glass-whiskey\",\n\t\t\t\"fas-f530\" => \"fas fa-glasses\",\n\t\t\t\"fas-f0ac\" => \"fas fa-globe\",\n\t\t\t\"fas-f57c\" => \"fas fa-globe-africa\",\n\t\t\t\"fas-f57d\" => \"fas fa-globe-americas\",\n\t\t\t\"fas-f57e\" => \"fas fa-globe-asia\",\n\t\t\t\"fas-f7a2\" => \"fas fa-globe-europe\",\n\t\t\t\"fas-f450\" => \"fas fa-golf-ball\",\n\t\t\t\"fas-f664\" => \"fas fa-gopuram\",\n\t\t\t\"fas-f19d\" => \"fas fa-graduation-cap\",\n\t\t\t\"fas-f531\" => \"fas fa-greater-than\",\n\t\t\t\"fas-f532\" => \"fas fa-greater-than-equal\",\n\t\t\t\"fas-f57f\" => \"fas fa-grimace\",\n\t\t\t\"fas-f580\" => \"fas fa-grin\",\n\t\t\t\"fas-f581\" => \"fas fa-grin-alt\",\n\t\t\t\"fas-f582\" => \"fas fa-grin-beam\",\n\t\t\t\"fas-f583\" => \"fas fa-grin-beam-sweat\",\n\t\t\t\"fas-f584\" => \"fas fa-grin-hearts\",\n\t\t\t\"fas-f585\" => \"fas fa-grin-squint\",\n\t\t\t\"fas-f586\" => \"fas fa-grin-squint-tears\",\n\t\t\t\"fas-f587\" => \"fas fa-grin-stars\",\n\t\t\t\"fas-f588\" => \"fas fa-grin-tears\",\n\t\t\t\"fas-f589\" => \"fas fa-grin-tongue\",\n\t\t\t\"fas-f58a\" => \"fas fa-grin-tongue-squint\",\n\t\t\t\"fas-f58b\" => \"fas fa-grin-tongue-wink\",\n\t\t\t\"fas-f58c\" => \"fas fa-grin-wink\",\n\t\t\t\"fas-f58d\" => \"fas fa-grip-horizontal\",\n\t\t\t\"fas-f7a4\" => \"fas fa-grip-lines\",\n\t\t\t\"fas-f7a5\" => \"fas fa-grip-lines-vertical\",\n\t\t\t\"fas-f58e\" => \"fas fa-grip-vertical\",\n\t\t\t\"fas-f7a6\" => \"fas fa-guitar\",\n\t\t\t\"fas-f0fd\" => \"fas fa-h-square\",\n\t\t\t\"fas-f805\" => \"fas fa-hamburger\",\n\t\t\t\"fas-f6e3\" => \"fas fa-hammer\",\n\t\t\t\"fas-f665\" => \"fas fa-hamsa\",\n\t\t\t\"fas-f4bd\" => \"fas fa-hand-holding\",\n\t\t\t\"fas-f4be\" => \"fas fa-hand-holding-heart\",\n\t\t\t\"fas-f95c\" => \"fas fa-hand-holding-medical\",\n\t\t\t\"fas-f4c0\" => \"fas fa-hand-holding-usd\",\n\t\t\t\"fas-f4c1\" => \"fas fa-hand-holding-water\",\n\t\t\t\"fas-f258\" => \"fas fa-hand-lizard\",\n\t\t\t\"fas-f806\" => \"fas fa-hand-middle-finger\",\n\t\t\t\"fas-f256\" => \"fas fa-hand-paper\",\n\t\t\t\"fas-f25b\" => \"fas fa-hand-peace\",\n\t\t\t\"fas-f0a7\" => \"fas fa-hand-point-down\",\n\t\t\t\"fas-f0a5\" => \"fas fa-hand-point-left\",\n\t\t\t\"fas-f0a4\" => \"fas fa-hand-point-right\",\n\t\t\t\"fas-f0a6\" => \"fas fa-hand-point-up\",\n\t\t\t\"fas-f25a\" => \"fas fa-hand-pointer\",\n\t\t\t\"fas-f255\" => \"fas fa-hand-rock\",\n\t\t\t\"fas-f257\" => \"fas fa-hand-scissors\",\n\t\t\t\"fas-f95d\" => \"fas fa-hand-sparkles\",\n\t\t\t\"fas-f259\" => \"fas fa-hand-spock\",\n\t\t\t\"fas-f4c2\" => \"fas fa-hands\",\n\t\t\t\"fas-f4c4\" => \"fas fa-hands-helping\",\n\t\t\t\"fas-f95e\" => \"fas fa-hands-wash\",\n\t\t\t\"fas-f2b5\" => \"fas fa-handshake\",\n\t\t\t\"fas-f95f\" => \"fas fa-handshake-alt-slash\",\n\t\t\t\"fas-f960\" => \"fas fa-handshake-slash\",\n\t\t\t\"fas-f6e6\" => \"fas fa-hanukiah\",\n\t\t\t\"fas-f807\" => \"fas fa-hard-hat\",\n\t\t\t\"fas-f292\" => \"fas fa-hashtag\",\n\t\t\t\"fas-f8c0\" => \"fas fa-hat-cowboy\",\n\t\t\t\"fas-f8c1\" => \"fas fa-hat-cowboy-side\",\n\t\t\t\"fas-f6e8\" => \"fas fa-hat-wizard\",\n\t\t\t\"fas-f0a0\" => \"fas fa-hdd\",\n\t\t\t\"fas-f961\" => \"fas fa-head-side-cough\",\n\t\t\t\"fas-f962\" => \"fas fa-head-side-cough-slash\",\n\t\t\t\"fas-f963\" => \"fas fa-head-side-mask\",\n\t\t\t\"fas-f964\" => \"fas fa-head-side-virus\",\n\t\t\t\"fas-f1dc\" => \"fas fa-heading\",\n\t\t\t\"fas-f025\" => \"fas fa-headphones\",\n\t\t\t\"fas-f58f\" => \"fas fa-headphones-alt\",\n\t\t\t\"fas-f590\" => \"fas fa-headset\",\n\t\t\t\"fas-f004\" => \"fas fa-heart\",\n\t\t\t\"fas-f7a9\" => \"fas fa-heart-broken\",\n\t\t\t\"fas-f21e\" => \"fas fa-heartbeat\",\n\t\t\t\"fas-f533\" => \"fas fa-helicopter\",\n\t\t\t\"fas-f591\" => \"fas fa-highlighter\",\n\t\t\t\"fas-f6ec\" => \"fas fa-hiking\",\n\t\t\t\"fas-f6ed\" => \"fas fa-hippo\",\n\t\t\t\"fas-f1da\" => \"fas fa-history\",\n\t\t\t\"fas-f453\" => \"fas fa-hockey-puck\",\n\t\t\t\"fas-f7aa\" => \"fas fa-holly-berry\",\n\t\t\t\"fas-f015\" => \"fas fa-home\",\n\t\t\t\"fas-f6f0\" => \"fas fa-horse\",\n\t\t\t\"fas-f7ab\" => \"fas fa-horse-head\",\n\t\t\t\"fas-f0f8\" => \"fas fa-hospital\",\n\t\t\t\"fas-f47d\" => \"fas fa-hospital-alt\",\n\t\t\t\"fas-f47e\" => \"fas fa-hospital-symbol\",\n\t\t\t\"fas-f80d\" => \"fas fa-hospital-user\",\n\t\t\t\"fas-f593\" => \"fas fa-hot-tub\",\n\t\t\t\"fas-f80f\" => \"fas fa-hotdog\",\n\t\t\t\"fas-f594\" => \"fas fa-hotel\",\n\t\t\t\"fas-f254\" => \"fas fa-hourglass\",\n\t\t\t\"fas-f253\" => \"fas fa-hourglass-end\",\n\t\t\t\"fas-f252\" => \"fas fa-hourglass-half\",\n\t\t\t\"fas-f251\" => \"fas fa-hourglass-start\",\n\t\t\t\"fas-f6f1\" => \"fas fa-house-damage\",\n\t\t\t\"fas-f965\" => \"fas fa-house-user\",\n\t\t\t\"fas-f6f2\" => \"fas fa-hryvnia\",\n\t\t\t\"fas-f246\" => \"fas fa-i-cursor\",\n\t\t\t\"fas-f810\" => \"fas fa-ice-cream\",\n\t\t\t\"fas-f7ad\" => \"fas fa-icicles\",\n\t\t\t\"fas-f86d\" => \"fas fa-icons\",\n\t\t\t\"fas-f2c1\" => \"fas fa-id-badge\",\n\t\t\t\"fas-f2c2\" => \"fas fa-id-card\",\n\t\t\t\"fas-f47f\" => \"fas fa-id-card-alt\",\n\t\t\t\"fas-f7ae\" => \"fas fa-igloo\",\n\t\t\t\"fas-f03e\" => \"fas fa-image\",\n\t\t\t\"fas-f302\" => \"fas fa-images\",\n\t\t\t\"fas-f01c\" => \"fas fa-inbox\",\n\t\t\t\"fas-f03c\" => \"fas fa-indent\",\n\t\t\t\"fas-f275\" => \"fas fa-industry\",\n\t\t\t\"fas-f534\" => \"fas fa-infinity\",\n\t\t\t\"fas-f129\" => \"fas fa-info\",\n\t\t\t\"fas-f05a\" => \"fas fa-info-circle\",\n\t\t\t\"fas-f033\" => \"fas fa-italic\",\n\t\t\t\"fas-f669\" => \"fas fa-jedi\",\n\t\t\t\"fas-f595\" => \"fas fa-joint\",\n\t\t\t\"fas-f66a\" => \"fas fa-journal-whills\",\n\t\t\t\"fas-f66b\" => \"fas fa-kaaba\",\n\t\t\t\"fas-f084\" => \"fas fa-key\",\n\t\t\t\"fas-f11c\" => \"fas fa-keyboard\",\n\t\t\t\"fas-f66d\" => \"fas fa-khanda\",\n\t\t\t\"fas-f596\" => \"fas fa-kiss\",\n\t\t\t\"fas-f597\" => \"fas fa-kiss-beam\",\n\t\t\t\"fas-f598\" => \"fas fa-kiss-wink-heart\",\n\t\t\t\"fas-f535\" => \"fas fa-kiwi-bird\",\n\t\t\t\"fas-f66f\" => \"fas fa-landmark\",\n\t\t\t\"fas-f1ab\" => \"fas fa-language\",\n\t\t\t\"fas-f109\" => \"fas fa-laptop\",\n\t\t\t\"fas-f5fc\" => \"fas fa-laptop-code\",\n\t\t\t\"fas-f966\" => \"fas fa-laptop-house\",\n\t\t\t\"fas-f812\" => \"fas fa-laptop-medical\",\n\t\t\t\"fas-f599\" => \"fas fa-laugh\",\n\t\t\t\"fas-f59a\" => \"fas fa-laugh-beam\",\n\t\t\t\"fas-f59b\" => \"fas fa-laugh-squint\",\n\t\t\t\"fas-f59c\" => \"fas fa-laugh-wink\",\n\t\t\t\"fas-f5fd\" => \"fas fa-layer-group\",\n\t\t\t\"fas-f06c\" => \"fas fa-leaf\",\n\t\t\t\"fas-f094\" => \"fas fa-lemon\",\n\t\t\t\"fas-f536\" => \"fas fa-less-than\",\n\t\t\t\"fas-f537\" => \"fas fa-less-than-equal\",\n\t\t\t\"fas-f3be\" => \"fas fa-level-down-alt\",\n\t\t\t\"fas-f3bf\" => \"fas fa-level-up-alt\",\n\t\t\t\"fas-f1cd\" => \"fas fa-life-ring\",\n\t\t\t\"fas-f0eb\" => \"fas fa-lightbulb\",\n\t\t\t\"fas-f0c1\" => \"fas fa-link\",\n\t\t\t\"fas-f195\" => \"fas fa-lira-sign\",\n\t\t\t\"fas-f03a\" => \"fas fa-list\",\n\t\t\t\"fas-f022\" => \"fas fa-list-alt\",\n\t\t\t\"fas-f0cb\" => \"fas fa-list-ol\",\n\t\t\t\"fas-f0ca\" => \"fas fa-list-ul\",\n\t\t\t\"fas-f124\" => \"fas fa-location-arrow\",\n\t\t\t\"fas-f023\" => \"fas fa-lock\",\n\t\t\t\"fas-f3c1\" => \"fas fa-lock-open\",\n\t\t\t\"fas-f309\" => \"fas fa-long-arrow-alt-down\",\n\t\t\t\"fas-f30a\" => \"fas fa-long-arrow-alt-left\",\n\t\t\t\"fas-f30b\" => \"fas fa-long-arrow-alt-right\",\n\t\t\t\"fas-f30c\" => \"fas fa-long-arrow-alt-up\",\n\t\t\t\"fas-f2a8\" => \"fas fa-low-vision\",\n\t\t\t\"fas-f59d\" => \"fas fa-luggage-cart\",\n\t\t\t\"fas-f604\" => \"fas fa-lungs\",\n\t\t\t\"fas-f967\" => \"fas fa-lungs-virus\",\n\t\t\t\"fas-f0d0\" => \"fas fa-magic\",\n\t\t\t\"fas-f076\" => \"fas fa-magnet\",\n\t\t\t\"fas-f674\" => \"fas fa-mail-bulk\",\n\t\t\t\"fas-f183\" => \"fas fa-male\",\n\t\t\t\"fas-f279\" => \"fas fa-map\",\n\t\t\t\"fas-f59f\" => \"fas fa-map-marked\",\n\t\t\t\"fas-f5a0\" => \"fas fa-map-marked-alt\",\n\t\t\t\"fas-f041\" => \"fas fa-map-marker\",\n\t\t\t\"fas-f3c5\" => \"fas fa-map-marker-alt\",\n\t\t\t\"fas-f276\" => \"fas fa-map-pin\",\n\t\t\t\"fas-f277\" => \"fas fa-map-signs\",\n\t\t\t\"fas-f5a1\" => \"fas fa-marker\",\n\t\t\t\"fas-f222\" => \"fas fa-mars\",\n\t\t\t\"fas-f227\" => \"fas fa-mars-double\",\n\t\t\t\"fas-f229\" => \"fas fa-mars-stroke\",\n\t\t\t\"fas-f22b\" => \"fas fa-mars-stroke-h\",\n\t\t\t\"fas-f22a\" => \"fas fa-mars-stroke-v\",\n\t\t\t\"fas-f6fa\" => \"fas fa-mask\",\n\t\t\t\"fas-f5a2\" => \"fas fa-medal\",\n\t\t\t\"fas-f0fa\" => \"fas fa-medkit\",\n\t\t\t\"fas-f11a\" => \"fas fa-meh\",\n\t\t\t\"fas-f5a4\" => \"fas fa-meh-blank\",\n\t\t\t\"fas-f5a5\" => \"fas fa-meh-rolling-eyes\",\n\t\t\t\"fas-f538\" => \"fas fa-memory\",\n\t\t\t\"fas-f676\" => \"fas fa-menorah\",\n\t\t\t\"fas-f223\" => \"fas fa-mercury\",\n\t\t\t\"fas-f753\" => \"fas fa-meteor\",\n\t\t\t\"fas-f2db\" => \"fas fa-microchip\",\n\t\t\t\"fas-f130\" => \"fas fa-microphone\",\n\t\t\t\"fas-f3c9\" => \"fas fa-microphone-alt\",\n\t\t\t\"fas-f539\" => \"fas fa-microphone-alt-slash\",\n\t\t\t\"fas-f131\" => \"fas fa-microphone-slash\",\n\t\t\t\"fas-f610\" => \"fas fa-microscope\",\n\t\t\t\"fas-f068\" => \"fas fa-minus\",\n\t\t\t\"fas-f056\" => \"fas fa-minus-circle\",\n\t\t\t\"fas-f146\" => \"fas fa-minus-square\",\n\t\t\t\"fas-f7b5\" => \"fas fa-mitten\",\n\t\t\t\"fas-f10b\" => \"fas fa-mobile\",\n\t\t\t\"fas-f3cd\" => \"fas fa-mobile-alt\",\n\t\t\t\"fas-f0d6\" => \"fas fa-money-bill\",\n\t\t\t\"fas-f3d1\" => \"fas fa-money-bill-alt\",\n\t\t\t\"fas-f53a\" => \"fas fa-money-bill-wave\",\n\t\t\t\"fas-f53b\" => \"fas fa-money-bill-wave-alt\",\n\t\t\t\"fas-f53c\" => \"fas fa-money-check\",\n\t\t\t\"fas-f53d\" => \"fas fa-money-check-alt\",\n\t\t\t\"fas-f5a6\" => \"fas fa-monument\",\n\t\t\t\"fas-f186\" => \"fas fa-moon\",\n\t\t\t\"fas-f5a7\" => \"fas fa-mortar-pestle\",\n\t\t\t\"fas-f678\" => \"fas fa-mosque\",\n\t\t\t\"fas-f21c\" => \"fas fa-motorcycle\",\n\t\t\t\"fas-f6fc\" => \"fas fa-mountain\",\n\t\t\t\"fas-f8cc\" => \"fas fa-mouse\",\n\t\t\t\"fas-f245\" => \"fas fa-mouse-pointer\",\n\t\t\t\"fas-f7b6\" => \"fas fa-mug-hot\",\n\t\t\t\"fas-f001\" => \"fas fa-music\",\n\t\t\t\"fas-f6ff\" => \"fas fa-network-wired\",\n\t\t\t\"fas-f22c\" => \"fas fa-neuter\",\n\t\t\t\"fas-f1ea\" => \"fas fa-newspaper\",\n\t\t\t\"fas-f53e\" => \"fas fa-not-equal\",\n\t\t\t\"fas-f481\" => \"fas fa-notes-medical\",\n\t\t\t\"fas-f247\" => \"fas fa-object-group\",\n\t\t\t\"fas-f248\" => \"fas fa-object-ungroup\",\n\t\t\t\"fas-f613\" => \"fas fa-oil-can\",\n\t\t\t\"fas-f679\" => \"fas fa-om\",\n\t\t\t\"fas-f700\" => \"fas fa-otter\",\n\t\t\t\"fas-f03b\" => \"fas fa-outdent\",\n\t\t\t\"fas-f815\" => \"fas fa-pager\",\n\t\t\t\"fas-f1fc\" => \"fas fa-paint-brush\",\n\t\t\t\"fas-f5aa\" => \"fas fa-paint-roller\",\n\t\t\t\"fas-f53f\" => \"fas fa-palette\",\n\t\t\t\"fas-f482\" => \"fas fa-pallet\",\n\t\t\t\"fas-f1d8\" => \"fas fa-paper-plane\",\n\t\t\t\"fas-f0c6\" => \"fas fa-paperclip\",\n\t\t\t\"fas-f4cd\" => \"fas fa-parachute-box\",\n\t\t\t\"fas-f1dd\" => \"fas fa-paragraph\",\n\t\t\t\"fas-f540\" => \"fas fa-parking\",\n\t\t\t\"fas-f5ab\" => \"fas fa-passport\",\n\t\t\t\"fas-f67b\" => \"fas fa-pastafarianism\",\n\t\t\t\"fas-f0ea\" => \"fas fa-paste\",\n\t\t\t\"fas-f04c\" => \"fas fa-pause\",\n\t\t\t\"fas-f28b\" => \"fas fa-pause-circle\",\n\t\t\t\"fas-f1b0\" => \"fas fa-paw\",\n\t\t\t\"fas-f67c\" => \"fas fa-peace\",\n\t\t\t\"fas-f304\" => \"fas fa-pen\",\n\t\t\t\"fas-f305\" => \"fas fa-pen-alt\",\n\t\t\t\"fas-f5ac\" => \"fas fa-pen-fancy\",\n\t\t\t\"fas-f5ad\" => \"fas fa-pen-nib\",\n\t\t\t\"fas-f14b\" => \"fas fa-pen-square\",\n\t\t\t\"fas-f303\" => \"fas fa-pencil-alt\",\n\t\t\t\"fas-f5ae\" => \"fas fa-pencil-ruler\",\n\t\t\t\"fas-f968\" => \"fas fa-people-arrows\",\n\t\t\t\"fas-f4ce\" => \"fas fa-people-carry\",\n\t\t\t\"fas-f816\" => \"fas fa-pepper-hot\",\n\t\t\t\"fas-f295\" => \"fas fa-percent\",\n\t\t\t\"fas-f541\" => \"fas fa-percentage\",\n\t\t\t\"fas-f756\" => \"fas fa-person-booth\",\n\t\t\t\"fas-f095\" => \"fas fa-phone\",\n\t\t\t\"fas-f879\" => \"fas fa-phone-alt\",\n\t\t\t\"fas-f3dd\" => \"fas fa-phone-slash\",\n\t\t\t\"fas-f098\" => \"fas fa-phone-square\",\n\t\t\t\"fas-f87b\" => \"fas fa-phone-square-alt\",\n\t\t\t\"fas-f2a0\" => \"fas fa-phone-volume\",\n\t\t\t\"fas-f87c\" => \"fas fa-photo-video\",\n\t\t\t\"fas-f4d3\" => \"fas fa-piggy-bank\",\n\t\t\t\"fas-f484\" => \"fas fa-pills\",\n\t\t\t\"fas-f818\" => \"fas fa-pizza-slice\",\n\t\t\t\"fas-f67f\" => \"fas fa-place-of-worship\",\n\t\t\t\"fas-f072\" => \"fas fa-plane\",\n\t\t\t\"fas-f5af\" => \"fas fa-plane-arrival\",\n\t\t\t\"fas-f5b0\" => \"fas fa-plane-departure\",\n\t\t\t\"fas-f969\" => \"fas fa-plane-slash\",\n\t\t\t\"fas-f04b\" => \"fas fa-play\",\n\t\t\t\"fas-f144\" => \"fas fa-play-circle\",\n\t\t\t\"fas-f1e6\" => \"fas fa-plug\",\n\t\t\t\"fas-f067\" => \"fas fa-plus\",\n\t\t\t\"fas-f055\" => \"fas fa-plus-circle\",\n\t\t\t\"fas-f0fe\" => \"fas fa-plus-square\",\n\t\t\t\"fas-f2ce\" => \"fas fa-podcast\",\n\t\t\t\"fas-f681\" => \"fas fa-poll\",\n\t\t\t\"fas-f682\" => \"fas fa-poll-h\",\n\t\t\t\"fas-f2fe\" => \"fas fa-poo\",\n\t\t\t\"fas-f75a\" => \"fas fa-poo-storm\",\n\t\t\t\"fas-f619\" => \"fas fa-poop\",\n\t\t\t\"fas-f3e0\" => \"fas fa-portrait\",\n\t\t\t\"fas-f154\" => \"fas fa-pound-sign\",\n\t\t\t\"fas-f011\" => \"fas fa-power-off\",\n\t\t\t\"fas-f683\" => \"fas fa-pray\",\n\t\t\t\"fas-f684\" => \"fas fa-praying-hands\",\n\t\t\t\"fas-f5b1\" => \"fas fa-prescription\",\n\t\t\t\"fas-f485\" => \"fas fa-prescription-bottle\",\n\t\t\t\"fas-f486\" => \"fas fa-prescription-bottle-alt\",\n\t\t\t\"fas-f02f\" => \"fas fa-print\",\n\t\t\t\"fas-f487\" => \"fas fa-procedures\",\n\t\t\t\"fas-f542\" => \"fas fa-project-diagram\",\n\t\t\t\"fas-f96a\" => \"fas fa-pump-medical\",\n\t\t\t\"fas-f96b\" => \"fas fa-pump-soap\",\n\t\t\t\"fas-f12e\" => \"fas fa-puzzle-piece\",\n\t\t\t\"fas-f029\" => \"fas fa-qrcode\",\n\t\t\t\"fas-f128\" => \"fas fa-question\",\n\t\t\t\"fas-f059\" => \"fas fa-question-circle\",\n\t\t\t\"fas-f458\" => \"fas fa-quidditch\",\n\t\t\t\"fas-f10d\" => \"fas fa-quote-left\",\n\t\t\t\"fas-f10e\" => \"fas fa-quote-right\",\n\t\t\t\"fas-f687\" => \"fas fa-quran\",\n\t\t\t\"fas-f7b9\" => \"fas fa-radiation\",\n\t\t\t\"fas-f7ba\" => \"fas fa-radiation-alt\",\n\t\t\t\"fas-f75b\" => \"fas fa-rainbow\",\n\t\t\t\"fas-f074\" => \"fas fa-random\",\n\t\t\t\"fas-f543\" => \"fas fa-receipt\",\n\t\t\t\"fas-f8d9\" => \"fas fa-record-vinyl\",\n\t\t\t\"fas-f1b8\" => \"fas fa-recycle\",\n\t\t\t\"fas-f01e\" => \"fas fa-redo\",\n\t\t\t\"fas-f2f9\" => \"fas fa-redo-alt\",\n\t\t\t\"fas-f25d\" => \"fas fa-registered\",\n\t\t\t\"fas-f87d\" => \"fas fa-remove-format\",\n\t\t\t\"fas-f3e5\" => \"fas fa-reply\",\n\t\t\t\"fas-f122\" => \"fas fa-reply-all\",\n\t\t\t\"fas-f75e\" => \"fas fa-republican\",\n\t\t\t\"fas-f7bd\" => \"fas fa-restroom\",\n\t\t\t\"fas-f079\" => \"fas fa-retweet\",\n\t\t\t\"fas-f4d6\" => \"fas fa-ribbon\",\n\t\t\t\"fas-f70b\" => \"fas fa-ring\",\n\t\t\t\"fas-f018\" => \"fas fa-road\",\n\t\t\t\"fas-f544\" => \"fas fa-robot\",\n\t\t\t\"fas-f135\" => \"fas fa-rocket\",\n\t\t\t\"fas-f4d7\" => \"fas fa-route\",\n\t\t\t\"fas-f09e\" => \"fas fa-rss\",\n\t\t\t\"fas-f143\" => \"fas fa-rss-square\",\n\t\t\t\"fas-f158\" => \"fas fa-ruble-sign\",\n\t\t\t\"fas-f545\" => \"fas fa-ruler\",\n\t\t\t\"fas-f546\" => \"fas fa-ruler-combined\",\n\t\t\t\"fas-f547\" => \"fas fa-ruler-horizontal\",\n\t\t\t\"fas-f548\" => \"fas fa-ruler-vertical\",\n\t\t\t\"fas-f70c\" => \"fas fa-running\",\n\t\t\t\"fas-f156\" => \"fas fa-rupee-sign\",\n\t\t\t\"fas-f5b3\" => \"fas fa-sad-cry\",\n\t\t\t\"fas-f5b4\" => \"fas fa-sad-tear\",\n\t\t\t\"fas-f7bf\" => \"fas fa-satellite\",\n\t\t\t\"fas-f7c0\" => \"fas fa-satellite-dish\",\n\t\t\t\"fas-f0c7\" => \"fas fa-save\",\n\t\t\t\"fas-f549\" => \"fas fa-school\",\n\t\t\t\"fas-f54a\" => \"fas fa-screwdriver\",\n\t\t\t\"fas-f70e\" => \"fas fa-scroll\",\n\t\t\t\"fas-f7c2\" => \"fas fa-sd-card\",\n\t\t\t\"fas-f002\" => \"fas fa-search\",\n\t\t\t\"fas-f688\" => \"fas fa-search-dollar\",\n\t\t\t\"fas-f689\" => \"fas fa-search-location\",\n\t\t\t\"fas-f010\" => \"fas fa-search-minus\",\n\t\t\t\"fas-f00e\" => \"fas fa-search-plus\",\n\t\t\t\"fas-f4d8\" => \"fas fa-seedling\",\n\t\t\t\"fas-f233\" => \"fas fa-server\",\n\t\t\t\"fas-f61f\" => \"fas fa-shapes\",\n\t\t\t\"fas-f064\" => \"fas fa-share\",\n\t\t\t\"fas-f1e0\" => \"fas fa-share-alt\",\n\t\t\t\"fas-f1e1\" => \"fas fa-share-alt-square\",\n\t\t\t\"fas-f14d\" => \"fas fa-share-square\",\n\t\t\t\"fas-f20b\" => \"fas fa-shekel-sign\",\n\t\t\t\"fas-f3ed\" => \"fas fa-shield-alt\",\n\t\t\t\"fas-f96c\" => \"fas fa-shield-virus\",\n\t\t\t\"fas-f21a\" => \"fas fa-ship\",\n\t\t\t\"fas-f48b\" => \"fas fa-shipping-fast\",\n\t\t\t\"fas-f54b\" => \"fas fa-shoe-prints\",\n\t\t\t\"fas-f290\" => \"fas fa-shopping-bag\",\n\t\t\t\"fas-f291\" => \"fas fa-shopping-basket\",\n\t\t\t\"fas-f07a\" => \"fas fa-shopping-cart\",\n\t\t\t\"fas-f2cc\" => \"fas fa-shower\",\n\t\t\t\"fas-f5b6\" => \"fas fa-shuttle-van\",\n\t\t\t\"fas-f4d9\" => \"fas fa-sign\",\n\t\t\t\"fas-f2f6\" => \"fas fa-sign-in-alt\",\n\t\t\t\"fas-f2a7\" => \"fas fa-sign-language\",\n\t\t\t\"fas-f2f5\" => \"fas fa-sign-out-alt\",\n\t\t\t\"fas-f012\" => \"fas fa-signal\",\n\t\t\t\"fas-f5b7\" => \"fas fa-signature\",\n\t\t\t\"fas-f7c4\" => \"fas fa-sim-card\",\n\t\t\t\"fas-f0e8\" => \"fas fa-sitemap\",\n\t\t\t\"fas-f7c5\" => \"fas fa-skating\",\n\t\t\t\"fas-f7c9\" => \"fas fa-skiing\",\n\t\t\t\"fas-f7ca\" => \"fas fa-skiing-nordic\",\n\t\t\t\"fas-f54c\" => \"fas fa-skull\",\n\t\t\t\"fas-f714\" => \"fas fa-skull-crossbones\",\n\t\t\t\"fas-f715\" => \"fas fa-slash\",\n\t\t\t\"fas-f7cc\" => \"fas fa-sleigh\",\n\t\t\t\"fas-f1de\" => \"fas fa-sliders-h\",\n\t\t\t\"fas-f118\" => \"fas fa-smile\",\n\t\t\t\"fas-f5b8\" => \"fas fa-smile-beam\",\n\t\t\t\"fas-f4da\" => \"fas fa-smile-wink\",\n\t\t\t\"fas-f75f\" => \"fas fa-smog\",\n\t\t\t\"fas-f48d\" => \"fas fa-smoking\",\n\t\t\t\"fas-f54d\" => \"fas fa-smoking-ban\",\n\t\t\t\"fas-f7cd\" => \"fas fa-sms\",\n\t\t\t\"fas-f7ce\" => \"fas fa-snowboarding\",\n\t\t\t\"fas-f2dc\" => \"fas fa-snowflake\",\n\t\t\t\"fas-f7d0\" => \"fas fa-snowman\",\n\t\t\t\"fas-f7d2\" => \"fas fa-snowplow\",\n\t\t\t\"fas-f96e\" => \"fas fa-soap\",\n\t\t\t\"fas-f696\" => \"fas fa-socks\",\n\t\t\t\"fas-f5ba\" => \"fas fa-solar-panel\",\n\t\t\t\"fas-f0dc\" => \"fas fa-sort\",\n\t\t\t\"fas-f15d\" => \"fas fa-sort-alpha-down\",\n\t\t\t\"fas-f881\" => \"fas fa-sort-alpha-down-alt\",\n\t\t\t\"fas-f15e\" => \"fas fa-sort-alpha-up\",\n\t\t\t\"fas-f882\" => \"fas fa-sort-alpha-up-alt\",\n\t\t\t\"fas-f160\" => \"fas fa-sort-amount-down\",\n\t\t\t\"fas-f884\" => \"fas fa-sort-amount-down-alt\",\n\t\t\t\"fas-f161\" => \"fas fa-sort-amount-up\",\n\t\t\t\"fas-f885\" => \"fas fa-sort-amount-up-alt\",\n\t\t\t\"fas-f0dd\" => \"fas fa-sort-down\",\n\t\t\t\"fas-f162\" => \"fas fa-sort-numeric-down\",\n\t\t\t\"fas-f886\" => \"fas fa-sort-numeric-down-alt\",\n\t\t\t\"fas-f163\" => \"fas fa-sort-numeric-up\",\n\t\t\t\"fas-f887\" => \"fas fa-sort-numeric-up-alt\",\n\t\t\t\"fas-f0de\" => \"fas fa-sort-up\",\n\t\t\t\"fas-f5bb\" => \"fas fa-spa\",\n\t\t\t\"fas-f197\" => \"fas fa-space-shuttle\",\n\t\t\t\"fas-f891\" => \"fas fa-spell-check\",\n\t\t\t\"fas-f717\" => \"fas fa-spider\",\n\t\t\t\"fas-f110\" => \"fas fa-spinner\",\n\t\t\t\"fas-f5bc\" => \"fas fa-splotch\",\n\t\t\t\"fas-f5bd\" => \"fas fa-spray-can\",\n\t\t\t\"fas-f0c8\" => \"fas fa-square\",\n\t\t\t\"fas-f45c\" => \"fas fa-square-full\",\n\t\t\t\"fas-f698\" => \"fas fa-square-root-alt\",\n\t\t\t\"fas-f5bf\" => \"fas fa-stamp\",\n\t\t\t\"fas-f005\" => \"fas fa-star\",\n\t\t\t\"fas-f699\" => \"fas fa-star-and-crescent\",\n\t\t\t\"fas-f089\" => \"fas fa-star-half\",\n\t\t\t\"fas-f5c0\" => \"fas fa-star-half-alt\",\n\t\t\t\"fas-f69a\" => \"fas fa-star-of-david\",\n\t\t\t\"fas-f621\" => \"fas fa-star-of-life\",\n\t\t\t\"fas-f048\" => \"fas fa-step-backward\",\n\t\t\t\"fas-f051\" => \"fas fa-step-forward\",\n\t\t\t\"fas-f0f1\" => \"fas fa-stethoscope\",\n\t\t\t\"fas-f249\" => \"fas fa-sticky-note\",\n\t\t\t\"fas-f04d\" => \"fas fa-stop\",\n\t\t\t\"fas-f28d\" => \"fas fa-stop-circle\",\n\t\t\t\"fas-f2f2\" => \"fas fa-stopwatch\",\n\t\t\t\"fas-f96f\" => \"fas fa-stopwatch-20\",\n\t\t\t\"fas-f54e\" => \"fas fa-store\",\n\t\t\t\"fas-f54f\" => \"fas fa-store-alt\",\n\t\t\t\"fas-f970\" => \"fas fa-store-alt-slash\",\n\t\t\t\"fas-f971\" => \"fas fa-store-slash\",\n\t\t\t\"fas-f550\" => \"fas fa-stream\",\n\t\t\t\"fas-f21d\" => \"fas fa-street-view\",\n\t\t\t\"fas-f0cc\" => \"fas fa-strikethrough\",\n\t\t\t\"fas-f551\" => \"fas fa-stroopwafel\",\n\t\t\t\"fas-f12c\" => \"fas fa-subscript\",\n\t\t\t\"fas-f239\" => \"fas fa-subway\",\n\t\t\t\"fas-f0f2\" => \"fas fa-suitcase\",\n\t\t\t\"fas-f5c1\" => \"fas fa-suitcase-rolling\",\n\t\t\t\"fas-f185\" => \"fas fa-sun\",\n\t\t\t\"fas-f12b\" => \"fas fa-superscript\",\n\t\t\t\"fas-f5c2\" => \"fas fa-surprise\",\n\t\t\t\"fas-f5c3\" => \"fas fa-swatchbook\",\n\t\t\t\"fas-f5c4\" => \"fas fa-swimmer\",\n\t\t\t\"fas-f5c5\" => \"fas fa-swimming-pool\",\n\t\t\t\"fas-f69b\" => \"fas fa-synagogue\",\n\t\t\t\"fas-f021\" => \"fas fa-sync\",\n\t\t\t\"fas-f2f1\" => \"fas fa-sync-alt\",\n\t\t\t\"fas-f48e\" => \"fas fa-syringe\",\n\t\t\t\"fas-f0ce\" => \"fas fa-table\",\n\t\t\t\"fas-f45d\" => \"fas fa-table-tennis\",\n\t\t\t\"fas-f10a\" => \"fas fa-tablet\",\n\t\t\t\"fas-f3fa\" => \"fas fa-tablet-alt\",\n\t\t\t\"fas-f490\" => \"fas fa-tablets\",\n\t\t\t\"fas-f3fd\" => \"fas fa-tachometer-alt\",\n\t\t\t\"fas-f02b\" => \"fas fa-tag\",\n\t\t\t\"fas-f02c\" => \"fas fa-tags\",\n\t\t\t\"fas-f4db\" => \"fas fa-tape\",\n\t\t\t\"fas-f0ae\" => \"fas fa-tasks\",\n\t\t\t\"fas-f1ba\" => \"fas fa-taxi\",\n\t\t\t\"fas-f62e\" => \"fas fa-teeth\",\n\t\t\t\"fas-f62f\" => \"fas fa-teeth-open\",\n\t\t\t\"fas-f769\" => \"fas fa-temperature-high\",\n\t\t\t\"fas-f76b\" => \"fas fa-temperature-low\",\n\t\t\t\"fas-f7d7\" => \"fas fa-tenge\",\n\t\t\t\"fas-f120\" => \"fas fa-terminal\",\n\t\t\t\"fas-f034\" => \"fas fa-text-height\",\n\t\t\t\"fas-f035\" => \"fas fa-text-width\",\n\t\t\t\"fas-f00a\" => \"fas fa-th\",\n\t\t\t\"fas-f009\" => \"fas fa-th-large\",\n\t\t\t\"fas-f00b\" => \"fas fa-th-list\",\n\t\t\t\"fas-f630\" => \"fas fa-theater-masks\",\n\t\t\t\"fas-f491\" => \"fas fa-thermometer\",\n\t\t\t\"fas-f2cb\" => \"fas fa-thermometer-empty\",\n\t\t\t\"fas-f2c7\" => \"fas fa-thermometer-full\",\n\t\t\t\"fas-f2c9\" => \"fas fa-thermometer-half\",\n\t\t\t\"fas-f2ca\" => \"fas fa-thermometer-quarter\",\n\t\t\t\"fas-f2c8\" => \"fas fa-thermometer-three-quarters\",\n\t\t\t\"fas-f165\" => \"fas fa-thumbs-down\",\n\t\t\t\"fas-f164\" => \"fas fa-thumbs-up\",\n\t\t\t\"fas-f08d\" => \"fas fa-thumbtack\",\n\t\t\t\"fas-f3ff\" => \"fas fa-ticket-alt\",\n\t\t\t\"fas-f00d\" => \"fas fa-times\",\n\t\t\t\"fas-f057\" => \"fas fa-times-circle\",\n\t\t\t\"fas-f043\" => \"fas fa-tint\",\n\t\t\t\"fas-f5c7\" => \"fas fa-tint-slash\",\n\t\t\t\"fas-f5c8\" => \"fas fa-tired\",\n\t\t\t\"fas-f204\" => \"fas fa-toggle-off\",\n\t\t\t\"fas-f205\" => \"fas fa-toggle-on\",\n\t\t\t\"fas-f7d8\" => \"fas fa-toilet\",\n\t\t\t\"fas-f71e\" => \"fas fa-toilet-paper\",\n\t\t\t\"fas-f972\" => \"fas fa-toilet-paper-slash\",\n\t\t\t\"fas-f552\" => \"fas fa-toolbox\",\n\t\t\t\"fas-f7d9\" => \"fas fa-tools\",\n\t\t\t\"fas-f5c9\" => \"fas fa-tooth\",\n\t\t\t\"fas-f6a0\" => \"fas fa-torah\",\n\t\t\t\"fas-f6a1\" => \"fas fa-torii-gate\",\n\t\t\t\"fas-f722\" => \"fas fa-tractor\",\n\t\t\t\"fas-f25c\" => \"fas fa-trademark\",\n\t\t\t\"fas-f637\" => \"fas fa-traffic-light\",\n\t\t\t\"fas-f941\" => \"fas fa-trailer\",\n\t\t\t\"fas-f238\" => \"fas fa-train\",\n\t\t\t\"fas-f7da\" => \"fas fa-tram\",\n\t\t\t\"fas-f224\" => \"fas fa-transgender\",\n\t\t\t\"fas-f225\" => \"fas fa-transgender-alt\",\n\t\t\t\"fas-f1f8\" => \"fas fa-trash\",\n\t\t\t\"fas-f2ed\" => \"fas fa-trash-alt\",\n\t\t\t\"fas-f829\" => \"fas fa-trash-restore\",\n\t\t\t\"fas-f82a\" => \"fas fa-trash-restore-alt\",\n\t\t\t\"fas-f1bb\" => \"fas fa-tree\",\n\t\t\t\"fas-f091\" => \"fas fa-trophy\",\n\t\t\t\"fas-f0d1\" => \"fas fa-truck\",\n\t\t\t\"fas-f4de\" => \"fas fa-truck-loading\",\n\t\t\t\"fas-f63b\" => \"fas fa-truck-monster\",\n\t\t\t\"fas-f4df\" => \"fas fa-truck-moving\",\n\t\t\t\"fas-f63c\" => \"fas fa-truck-pickup\",\n\t\t\t\"fas-f553\" => \"fas fa-tshirt\",\n\t\t\t\"fas-f1e4\" => \"fas fa-tty\",\n\t\t\t\"fas-f26c\" => \"fas fa-tv\",\n\t\t\t\"fas-f0e9\" => \"fas fa-umbrella\",\n\t\t\t\"fas-f5ca\" => \"fas fa-umbrella-beach\",\n\t\t\t\"fas-f0cd\" => \"fas fa-underline\",\n\t\t\t\"fas-f0e2\" => \"fas fa-undo\",\n\t\t\t\"fas-f2ea\" => \"fas fa-undo-alt\",\n\t\t\t\"fas-f29a\" => \"fas fa-universal-access\",\n\t\t\t\"fas-f19c\" => \"fas fa-university\",\n\t\t\t\"fas-f127\" => \"fas fa-unlink\",\n\t\t\t\"fas-f09c\" => \"fas fa-unlock\",\n\t\t\t\"fas-f13e\" => \"fas fa-unlock-alt\",\n\t\t\t\"fas-f093\" => \"fas fa-upload\",\n\t\t\t\"fas-f007\" => \"fas fa-user\",\n\t\t\t\"fas-f406\" => \"fas fa-user-alt\",\n\t\t\t\"fas-f4fa\" => \"fas fa-user-alt-slash\",\n\t\t\t\"fas-f4fb\" => \"fas fa-user-astronaut\",\n\t\t\t\"fas-f4fc\" => \"fas fa-user-check\",\n\t\t\t\"fas-f2bd\" => \"fas fa-user-circle\",\n\t\t\t\"fas-f4fd\" => \"fas fa-user-clock\",\n\t\t\t\"fas-f4fe\" => \"fas fa-user-cog\",\n\t\t\t\"fas-f4ff\" => \"fas fa-user-edit\",\n\t\t\t\"fas-f500\" => \"fas fa-user-friends\",\n\t\t\t\"fas-f501\" => \"fas fa-user-graduate\",\n\t\t\t\"fas-f728\" => \"fas fa-user-injured\",\n\t\t\t\"fas-f502\" => \"fas fa-user-lock\",\n\t\t\t\"fas-f0f0\" => \"fas fa-user-md\",\n\t\t\t\"fas-f503\" => \"fas fa-user-minus\",\n\t\t\t\"fas-f504\" => \"fas fa-user-ninja\",\n\t\t\t\"fas-f82f\" => \"fas fa-user-nurse\",\n\t\t\t\"fas-f234\" => \"fas fa-user-plus\",\n\t\t\t\"fas-f21b\" => \"fas fa-user-secret\",\n\t\t\t\"fas-f505\" => \"fas fa-user-shield\",\n\t\t\t\"fas-f506\" => \"fas fa-user-slash\",\n\t\t\t\"fas-f507\" => \"fas fa-user-tag\",\n\t\t\t\"fas-f508\" => \"fas fa-user-tie\",\n\t\t\t\"fas-f235\" => \"fas fa-user-times\",\n\t\t\t\"fas-f0c0\" => \"fas fa-users\",\n\t\t\t\"fas-f509\" => \"fas fa-users-cog\",\n\t\t\t\"fas-f2e5\" => \"fas fa-utensil-spoon\",\n\t\t\t\"fas-f2e7\" => \"fas fa-utensils\",\n\t\t\t\"fas-f5cb\" => \"fas fa-vector-square\",\n\t\t\t\"fas-f221\" => \"fas fa-venus\",\n\t\t\t\"fas-f226\" => \"fas fa-venus-double\",\n\t\t\t\"fas-f228\" => \"fas fa-venus-mars\",\n\t\t\t\"fas-f492\" => \"fas fa-vial\",\n\t\t\t\"fas-f493\" => \"fas fa-vials\",\n\t\t\t\"fas-f03d\" => \"fas fa-video\",\n\t\t\t\"fas-f4e2\" => \"fas fa-video-slash\",\n\t\t\t\"fas-f6a7\" => \"fas fa-vihara\",\n\t\t\t\"fas-f974\" => \"fas fa-virus\",\n\t\t\t\"fas-f975\" => \"fas fa-virus-slash\",\n\t\t\t\"fas-f976\" => \"fas fa-viruses\",\n\t\t\t\"fas-f897\" => \"fas fa-voicemail\",\n\t\t\t\"fas-f45f\" => \"fas fa-volleyball-ball\",\n\t\t\t\"fas-f027\" => \"fas fa-volume-down\",\n\t\t\t\"fas-f6a9\" => \"fas fa-volume-mute\",\n\t\t\t\"fas-f026\" => \"fas fa-volume-off\",\n\t\t\t\"fas-f028\" => \"fas fa-volume-up\",\n\t\t\t\"fas-f772\" => \"fas fa-vote-yea\",\n\t\t\t\"fas-f729\" => \"fas fa-vr-cardboard\",\n\t\t\t\"fas-f554\" => \"fas fa-walking\",\n\t\t\t\"fas-f555\" => \"fas fa-wallet\",\n\t\t\t\"fas-f494\" => \"fas fa-warehouse\",\n\t\t\t\"fas-f773\" => \"fas fa-water\",\n\t\t\t\"fas-f83e\" => \"fas fa-wave-square\",\n\t\t\t\"fas-f496\" => \"fas fa-weight\",\n\t\t\t\"fas-f5cd\" => \"fas fa-weight-hanging\",\n\t\t\t\"fas-f193\" => \"fas fa-wheelchair\",\n\t\t\t\"fas-f1eb\" => \"fas fa-wifi\",\n\t\t\t\"fas-f72e\" => \"fas fa-wind\",\n\t\t\t\"fas-f410\" => \"fas fa-window-close\",\n\t\t\t\"fas-f2d0\" => \"fas fa-window-maximize\",\n\t\t\t\"fas-f2d1\" => \"fas fa-window-minimize\",\n\t\t\t\"fas-f2d2\" => \"fas fa-window-restore\",\n\t\t\t\"fas-f72f\" => \"fas fa-wine-bottle\",\n\t\t\t\"fas-f4e3\" => \"fas fa-wine-glass\",\n\t\t\t\"fas-f5ce\" => \"fas fa-wine-glass-alt\",\n\t\t\t\"fas-f159\" => \"fas fa-won-sign\",\n\t\t\t\"fas-f0ad\" => \"fas fa-wrench\",\n\t\t\t\"fas-f497\" => \"fas fa-x-ray\",\n\t\t\t\"fas-f157\" => \"fas fa-yen-sign\",\n\t\t\t\"fas-f6ad\" => \"fas fa-yin-y\"\n\t\t);\n\n\t\t$regular_icons = array(\t\n\t\t\t\"far-f2b9\" => \"far fa-address-book\",\n\t\t\t\"far-f2bb\" => \"far fa-address-card\",\n\t\t\t\"far-f556\" => \"far fa-angry\",\n\t\t\t\"far-f358\" => \"far fa-arrow-alt-circle-down\",\n\t\t\t\"far-f359\" => \"far fa-arrow-alt-circle-left\",\n\t\t\t\"far-f35a\" => \"far fa-arrow-alt-circle-right\",\n\t\t\t\"far-f35b\" => \"far fa-arrow-alt-circle-up\",\n\t\t\t\"far-f0f3\" => \"far fa-bell\",\n\t\t\t\"far-f1f6\" => \"far fa-bell-slash\",\n\t\t\t\"far-f02e\" => \"far fa-bookmark\",\n\t\t\t\"far-f1ad\" => \"far fa-building\",\n\t\t\t\"far-f133\" => \"far fa-calendar\",\n\t\t\t\"far-f073\" => \"far fa-calendar-alt\",\n\t\t\t\"far-f274\" => \"far fa-calendar-check\",\n\t\t\t\"far-f272\" => \"far fa-calendar-minus\",\n\t\t\t\"far-f271\" => \"far fa-calendar-plus\",\n\t\t\t\"far-f273\" => \"far fa-calendar-times\",\n\t\t\t\"far-f150\" => \"far fa-caret-square-down\",\n\t\t\t\"far-f191\" => \"far fa-caret-square-left\",\n\t\t\t\"far-f152\" => \"far fa-caret-square-right\",\n\t\t\t\"far-f151\" => \"far fa-caret-square-up\",\n\t\t\t\"far-f080\" => \"far fa-chart-bar\",\n\t\t\t\"far-f058\" => \"far fa-check-circle\",\n\t\t\t\"far-f14a\" => \"far fa-check-square\",\n\t\t\t\"far-f111\" => \"far fa-circle\",\n\t\t\t\"far-f328\" => \"far fa-clipboard\",\n\t\t\t\"far-f017\" => \"far fa-clock\",\n\t\t\t\"far-f24d\" => \"far fa-clone\",\n\t\t\t\"far-f20a\" => \"far fa-closed-captioning\",\n\t\t\t\"far-f075\" => \"far fa-comment\",\n\t\t\t\"far-f27a\" => \"far fa-comment-alt\",\n\t\t\t\"far-f4ad\" => \"far fa-comment-dots\",\n\t\t\t\"far-f086\" => \"far fa-comments\",\n\t\t\t\"far-f14e\" => \"far fa-compass\",\n\t\t\t\"far-f0c5\" => \"far fa-copy\",\n\t\t\t\"far-f1f9\" => \"far fa-copyright\",\n\t\t\t\"far-f09d\" => \"far fa-credit-card\",\n\t\t\t\"far-f567\" => \"far fa-dizzy\",\n\t\t\t\"far-f192\" => \"far fa-dot-circle\",\n\t\t\t\"far-f044\" => \"far fa-edit\",\n\t\t\t\"far-f0e0\" => \"far fa-envelope\",\n\t\t\t\"far-f2b6\" => \"far fa-envelope-open\",\n\t\t\t\"far-f06e\" => \"far fa-eye\",\n\t\t\t\"far-f070\" => \"far fa-eye-slash\",\n\t\t\t\"far-f15b\" => \"far fa-file\",\n\t\t\t\"far-f15c\" => \"far fa-file-alt\",\n\t\t\t\"far-f1c6\" => \"far fa-file-archive\",\n\t\t\t\"far-f1c7\" => \"far fa-file-audio\",\n\t\t\t\"far-f1c9\" => \"far fa-file-code\",\n\t\t\t\"far-f1c3\" => \"far fa-file-excel\",\n\t\t\t\"far-f1c5\" => \"far fa-file-image\",\n\t\t\t\"far-f1c1\" => \"far fa-file-pdf\",\n\t\t\t\"far-f1c4\" => \"far fa-file-powerpoint\",\n\t\t\t\"far-f1c8\" => \"far fa-file-video\",\n\t\t\t\"far-f1c2\" => \"far fa-file-word\",\n\t\t\t\"far-f024\" => \"far fa-flag\",\n\t\t\t\"far-f579\" => \"far fa-flushed\",\n\t\t\t\"far-f07b\" => \"far fa-folder\",\n\t\t\t\"far-f07c\" => \"far fa-folder-open\",\n\t\t\t\"far-f119\" => \"far fa-frown\",\n\t\t\t\"far-f57a\" => \"far fa-frown-open\",\n\t\t\t\"far-f1e3\" => \"far fa-futbol\",\n\t\t\t\"far-f3a5\" => \"far fa-gem\",\n\t\t\t\"far-f57f\" => \"far fa-grimace\",\n\t\t\t\"far-f580\" => \"far fa-grin\",\n\t\t\t\"far-f581\" => \"far fa-grin-alt\",\n\t\t\t\"far-f582\" => \"far fa-grin-beam\",\n\t\t\t\"far-f583\" => \"far fa-grin-beam-sweat\",\n\t\t\t\"far-f584\" => \"far fa-grin-hearts\",\n\t\t\t\"far-f585\" => \"far fa-grin-squint\",\n\t\t\t\"far-f586\" => \"far fa-grin-squint-tears\",\n\t\t\t\"far-f587\" => \"far fa-grin-stars\",\n\t\t\t\"far-f588\" => \"far fa-grin-tears\",\n\t\t\t\"far-f589\" => \"far fa-grin-tongue\",\n\t\t\t\"far-f58a\" => \"far fa-grin-tongue-squint\",\n\t\t\t\"far-f58b\" => \"far fa-grin-tongue-wink\",\n\t\t\t\"far-f58c\" => \"far fa-grin-wink\",\n\t\t\t\"far-f258\" => \"far fa-hand-lizard\",\n\t\t\t\"far-f256\" => \"far fa-hand-paper\",\n\t\t\t\"far-f25b\" => \"far fa-hand-peace\",\n\t\t\t\"far-f0a7\" => \"far fa-hand-point-down\",\n\t\t\t\"far-f0a5\" => \"far fa-hand-point-left\",\n\t\t\t\"far-f0a4\" => \"far fa-hand-point-right\",\n\t\t\t\"far-f0a6\" => \"far fa-hand-point-up\",\n\t\t\t\"far-f25a\" => \"far fa-hand-pointer\",\n\t\t\t\"far-f255\" => \"far fa-hand-rock\",\n\t\t\t\"far-f257\" => \"far fa-hand-scissors\",\n\t\t\t\"far-f259\" => \"far fa-hand-spock\",\n\t\t\t\"far-f2b5\" => \"far fa-handshake\",\n\t\t\t\"far-f0a0\" => \"far fa-hdd\",\n\t\t\t\"far-f004\" => \"far fa-heart\",\n\t\t\t\"far-f0f8\" => \"far fa-hospital\",\n\t\t\t\"far-f254\" => \"far fa-hourglass\",\n\t\t\t\"far-f2c1\" => \"far fa-id-badge\",\n\t\t\t\"far-f2c2\" => \"far fa-id-card\",\n\t\t\t\"far-f03e\" => \"far fa-image\",\n\t\t\t\"far-f302\" => \"far fa-images\",\n\t\t\t\"far-f11c\" => \"far fa-keyboard\",\n\t\t\t\"far-f596\" => \"far fa-kiss\",\n\t\t\t\"far-f597\" => \"far fa-kiss-beam\",\n\t\t\t\"far-f598\" => \"far fa-kiss-wink-heart\",\n\t\t\t\"far-f599\" => \"far fa-laugh\",\n\t\t\t\"far-f59a\" => \"far fa-laugh-beam\",\n\t\t\t\"far-f59b\" => \"far fa-laugh-squint\",\n\t\t\t\"far-f59c\" => \"far fa-laugh-wink\",\n\t\t\t\"far-f094\" => \"far fa-lemon\",\n\t\t\t\"far-f1cd\" => \"far fa-life-ring\",\n\t\t\t\"far-f0eb\" => \"far fa-lightbulb\",\n\t\t\t\"far-f022\" => \"far fa-list-alt\",\n\t\t\t\"far-f279\" => \"far fa-map\",\n\t\t\t\"far-f11a\" => \"far fa-meh\",\n\t\t\t\"far-f5a4\" => \"far fa-meh-blank\",\n\t\t\t\"far-f5a5\" => \"far fa-meh-rolling-eyes\",\n\t\t\t\"far-f146\" => \"far fa-minus-square\",\n\t\t\t\"far-f3d1\" => \"far fa-money-bill-alt\",\n\t\t\t\"far-f186\" => \"far fa-moon\",\n\t\t\t\"far-f1ea\" => \"far fa-newspaper\",\n\t\t\t\"far-f247\" => \"far fa-object-group\",\n\t\t\t\"far-f248\" => \"far fa-object-ungroup\",\n\t\t\t\"far-f1d8\" => \"far fa-paper-plane\",\n\t\t\t\"far-f28b\" => \"far fa-pause-circle\",\n\t\t\t\"far-f144\" => \"far fa-play-circle\",\n\t\t\t\"far-f0fe\" => \"far fa-plus-square\",\n\t\t\t\"far-f059\" => \"far fa-question-circle\",\n\t\t\t\"far-f25d\" => \"far fa-registered\",\n\t\t\t\"far-f5b3\" => \"far fa-sad-cry\",\n\t\t\t\"far-f5b4\" => \"far fa-sad-tear\",\n\t\t\t\"far-f0c7\" => \"far fa-save\",\n\t\t\t\"far-f14d\" => \"far fa-share-square\",\n\t\t\t\"far-f118\" => \"far fa-smile\",\n\t\t\t\"far-f5b8\" => \"far fa-smile-beam\",\n\t\t\t\"far-f4da\" => \"far fa-smile-wink\",\n\t\t\t\"far-f2dc\" => \"far fa-snowflake\",\n\t\t\t\"far-f0c8\" => \"far fa-square\",\n\t\t\t\"far-f005\" => \"far fa-star\",\n\t\t\t\"far-f089\" => \"far fa-star-half\",\n\t\t\t\"far-f249\" => \"far fa-sticky-note\",\n\t\t\t\"far-f28d\" => \"far fa-stop-circle\",\n\t\t\t\"far-f185\" => \"far fa-sun\",\n\t\t\t\"far-f5c2\" => \"far fa-surprise\",\n\t\t\t\"far-f165\" => \"far fa-thumbs-down\",\n\t\t\t\"far-f164\" => \"far fa-thumbs-up\",\n\t\t\t\"far-f057\" => \"far fa-times-circle\",\n\t\t\t\"far-f5c8\" => \"far fa-tired\",\n\t\t\t\"far-f2ed\" => \"far fa-trash-alt\",\n\t\t\t\"far-f007\" => \"far fa-user\",\n\t\t\t\"far-f2bd\" => \"far fa-user-circle\",\n\t\t\t\"far-f410\" => \"far fa-window-close\",\n\t\t\t\"far-f2d0\" => \"far fa-window-maximize\",\n\t\t\t\"far-f2d1\" => \"far fa-window-minimize\",\n\t\t\t\"far-f2d2\" => \"far fa-window-rest\"\n\t\t);\n\n\t\t$brand_icons = array(\n\t\t\t\"fab-f26e\" => \"fab fa-500px\",\n\t\t\t\"fab-f368\" => \"fab fa-accessible-icon\",\n\t\t\t\"fab-f369\" => \"fab fa-accusoft\",\n\t\t\t\"fab-f6af\" => \"fab fa-acquisitions-incorporated\",\n\t\t\t\"fab-f170\" => \"fab fa-adn\",\n\t\t\t\"fab-f778\" => \"fab fa-adobe\",\n\t\t\t\"fab-f36a\" => \"fab fa-adversal\",\n\t\t\t\"fab-f36b\" => \"fab fa-affiliatetheme\",\n\t\t\t\"fab-f834\" => \"fab fa-airbnb\",\n\t\t\t\"fab-f36c\" => \"fab fa-algolia\",\n\t\t\t\"fab-f642\" => \"fab fa-alipay\",\n\t\t\t\"fab-f270\" => \"fab fa-amazon\",\n\t\t\t\"fab-f42c\" => \"fab fa-amazon-pay\",\n\t\t\t\"fab-f36d\" => \"fab fa-amilia\",\n\t\t\t\"fab-f17b\" => \"fab fa-android\",\n\t\t\t\"fab-f209\" => \"fab fa-angellist\",\n\t\t\t\"fab-f36e\" => \"fab fa-angrycreative\",\n\t\t\t\"fab-f420\" => \"fab fa-angular\",\n\t\t\t\"fab-f36f\" => \"fab fa-app-store\",\n\t\t\t\"fab-f370\" => \"fab fa-app-store-ios\",\n\t\t\t\"fab-f371\" => \"fab fa-apper\",\n\t\t\t\"fab-f179\" => \"fab fa-apple\",\n\t\t\t\"fab-f415\" => \"fab fa-apple-pay\",\n\t\t\t\"fab-f77a\" => \"fab fa-artstation\",\n\t\t\t\"fab-f372\" => \"fab fa-asymmetrik\",\n\t\t\t\"fab-f77b\" => \"fab fa-atlassian\",\n\t\t\t\"fab-f373\" => \"fab fa-audible\",\n\t\t\t\"fab-f41c\" => \"fab fa-autoprefixer\",\n\t\t\t\"fab-f374\" => \"fab fa-avianex\",\n\t\t\t\"fab-f421\" => \"fab fa-aviato\",\n\t\t\t\"fab-f375\" => \"fab fa-aws\",\n\t\t\t\"fab-f2d5\" => \"fab fa-bandcamp\",\n\t\t\t\"fab-f835\" => \"fab fa-battle-net\",\n\t\t\t\"fab-f1b4\" => \"fab fa-behance\",\n\t\t\t\"fab-f1b5\" => \"fab fa-behance-square\",\n\t\t\t\"fab-f378\" => \"fab fa-bimobject\",\n\t\t\t\"fab-f171\" => \"fab fa-bitbucket\",\n\t\t\t\"fab-f379\" => \"fab fa-bitcoin\",\n\t\t\t\"fab-f37a\" => \"fab fa-bity\",\n\t\t\t\"fab-f27e\" => \"fab fa-black-tie\",\n\t\t\t\"fab-f37b\" => \"fab fa-blackberry\",\n\t\t\t\"fab-f37c\" => \"fab fa-blogger\",\n\t\t\t\"fab-f37d\" => \"fab fa-blogger-b\",\n\t\t\t\"fab-f293\" => \"fab fa-bluetooth\",\n\t\t\t\"fab-f294\" => \"fab fa-bluetooth-b\",\n\t\t\t\"fab-f836\" => \"fab fa-bootstrap\",\n\t\t\t\"fab-f15a\" => \"fab fa-btc\",\n\t\t\t\"fab-f837\" => \"fab fa-buffer\",\n\t\t\t\"fab-f37f\" => \"fab fa-buromobelexperte\",\n\t\t\t\"fab-f8a6\" => \"fab fa-buy-n-large\",\n\t\t\t\"fab-f20d\" => \"fab fa-buysellads\",\n\t\t\t\"fab-f785\" => \"fab fa-canadian-maple-leaf\",\n\t\t\t\"fab-f42d\" => \"fab fa-cc-amazon-pay\",\n\t\t\t\"fab-f1f3\" => \"fab fa-cc-amex\",\n\t\t\t\"fab-f416\" => \"fab fa-cc-apple-pay\",\n\t\t\t\"fab-f24c\" => \"fab fa-cc-diners-club\",\n\t\t\t\"fab-f1f2\" => \"fab fa-cc-discover\",\n\t\t\t\"fab-f24b\" => \"fab fa-cc-jcb\",\n\t\t\t\"fab-f1f1\" => \"fab fa-cc-mastercard\",\n\t\t\t\"fab-f1f4\" => \"fab fa-cc-paypal\",\n\t\t\t\"fab-f1f5\" => \"fab fa-cc-stripe\",\n\t\t\t\"fab-f1f0\" => \"fab fa-cc-visa\",\n\t\t\t\"fab-f380\" => \"fab fa-centercode\",\n\t\t\t\"fab-f789\" => \"fab fa-centos\",\n\t\t\t\"fab-f268\" => \"fab fa-chrome\",\n\t\t\t\"fab-f838\" => \"fab fa-chromecast\",\n\t\t\t\"fab-f383\" => \"fab fa-cloudscale\",\n\t\t\t\"fab-f384\" => \"fab fa-cloudsmith\",\n\t\t\t\"fab-f385\" => \"fab fa-cloudversify\",\n\t\t\t\"fab-f1cb\" => \"fab fa-codepen\",\n\t\t\t\"fab-f284\" => \"fab fa-codiepie\",\n\t\t\t\"fab-f78d\" => \"fab fa-confluence\",\n\t\t\t\"fab-f20e\" => \"fab fa-connectdevelop\",\n\t\t\t\"fab-f26d\" => \"fab fa-contao\",\n\t\t\t\"fab-f89e\" => \"fab fa-cotton-bureau\",\n\t\t\t\"fab-f388\" => \"fab fa-cpanel\",\n\t\t\t\"fab-f25e\" => \"fab fa-creative-commons\",\n\t\t\t\"fab-f4e7\" => \"fab fa-creative-commons-by\",\n\t\t\t\"fab-f4e8\" => \"fab fa-creative-commons-nc\",\n\t\t\t\"fab-f4e9\" => \"fab fa-creative-commons-nc-eu\",\n\t\t\t\"fab-f4ea\" => \"fab fa-creative-commons-nc-jp\",\n\t\t\t\"fab-f4eb\" => \"fab fa-creative-commons-nd\",\n\t\t\t\"fab-f4ec\" => \"fab fa-creative-commons-pd\",\n\t\t\t\"fab-f4ed\" => \"fab fa-creative-commons-pd-alt\",\n\t\t\t\"fab-f4ee\" => \"fab fa-creative-commons-remix\",\n\t\t\t\"fab-f4ef\" => \"fab fa-creative-commons-sa\",\n\t\t\t\"fab-f4f0\" => \"fab fa-creative-commons-sampling\",\n\t\t\t\"fab-f4f1\" => \"fab fa-creative-commons-sampling-plus\",\n\t\t\t\"fab-f4f2\" => \"fab fa-creative-commons-share\",\n\t\t\t\"fab-f4f3\" => \"fab fa-creative-commons-zero\",\n\t\t\t\"fab-f6c9\" => \"fab fa-critical-role\",\n\t\t\t\"fab-f13c\" => \"fab fa-css3\",\n\t\t\t\"fab-f38b\" => \"fab fa-css3-alt\",\n\t\t\t\"fab-f38c\" => \"fab fa-cuttlefish\",\n\t\t\t\"fab-f38d\" => \"fab fa-d-and-d\",\n\t\t\t\"fab-f6ca\" => \"fab fa-d-and-d-beyond\",\n\t\t\t\"fab-f952\" => \"fab fa-dailymotion\",\n\t\t\t\"fab-f210\" => \"fab fa-dashcube\",\n\t\t\t\"fab-f1a5\" => \"fab fa-delicious\",\n\t\t\t\"fab-f38e\" => \"fab fa-deploydog\",\n\t\t\t\"fab-f38f\" => \"fab fa-deskpro\",\n\t\t\t\"fab-f6cc\" => \"fab fa-dev\",\n\t\t\t\"fab-f1bd\" => \"fab fa-deviantart\",\n\t\t\t\"fab-f790\" => \"fab fa-dhl\",\n\t\t\t\"fab-f791\" => \"fab fa-diaspora\",\n\t\t\t\"fab-f1a6\" => \"fab fa-digg\",\n\t\t\t\"fab-f391\" => \"fab fa-digital-ocean\",\n\t\t\t\"fab-f392\" => \"fab fa-discord\",\n\t\t\t\"fab-f393\" => \"fab fa-discourse\",\n\t\t\t\"fab-f394\" => \"fab fa-dochub\",\n\t\t\t\"fab-f395\" => \"fab fa-docker\",\n\t\t\t\"fab-f396\" => \"fab fa-draft2digital\",\n\t\t\t\"fab-f17d\" => \"fab fa-dribbble\",\n\t\t\t\"fab-f397\" => \"fab fa-dribbble-square\",\n\t\t\t\"fab-f16b\" => \"fab fa-dropbox\",\n\t\t\t\"fab-f1a9\" => \"fab fa-drupal\",\n\t\t\t\"fab-f399\" => \"fab fa-dyalog\",\n\t\t\t\"fab-f39a\" => \"fab fa-earlybirds\",\n\t\t\t\"fab-f4f4\" => \"fab fa-ebay\",\n\t\t\t\"fab-f282\" => \"fab fa-edge\",\n\t\t\t\"fab-f430\" => \"fab fa-elementor\",\n\t\t\t\"fab-f5f1\" => \"fab fa-ello\",\n\t\t\t\"fab-f423\" => \"fab fa-ember\",\n\t\t\t\"fab-f1d1\" => \"fab fa-empire\",\n\t\t\t\"fab-f299\" => \"fab fa-envira\",\n\t\t\t\"fab-f39d\" => \"fab fa-erlang\",\n\t\t\t\"fab-f42e\" => \"fab fa-ethereum\",\n\t\t\t\"fab-f2d7\" => \"fab fa-etsy\",\n\t\t\t\"fab-f839\" => \"fab fa-evernote\",\n\t\t\t\"fab-f23e\" => \"fab fa-expeditedssl\",\n\t\t\t\"fab-f09a\" => \"fab fa-facebook\",\n\t\t\t\"fab-f39e\" => \"fab fa-facebook-f\",\n\t\t\t\"fab-f39f\" => \"fab fa-facebook-messenger\",\n\t\t\t\"fab-f082\" => \"fab fa-facebook-square\",\n\t\t\t\"fab-f6dc\" => \"fab fa-fantasy-flight-games\",\n\t\t\t\"fab-f797\" => \"fab fa-fedex\",\n\t\t\t\"fab-f798\" => \"fab fa-fedora\",\n\t\t\t\"fab-f799\" => \"fab fa-figma\",\n\t\t\t\"fab-f269\" => \"fab fa-firefox\",\n\t\t\t\"fab-f907\" => \"fab fa-firefox-browser\",\n\t\t\t\"fab-f2b0\" => \"fab fa-first-order\",\n\t\t\t\"fab-f50a\" => \"fab fa-first-order-alt\",\n\t\t\t\"fab-f3a1\" => \"fab fa-firstdraft\",\n\t\t\t\"fab-f16e\" => \"fab fa-flickr\",\n\t\t\t\"fab-f44d\" => \"fab fa-flipboard\",\n\t\t\t\"fab-f417\" => \"fab fa-fly\",\n\t\t\t\"fab-f2b4\" => \"fab fa-font-awesome\",\n\t\t\t\"fab-f35c\" => \"fab fa-font-awesome-alt\",\n\t\t\t\"fab-f425\" => \"fab fa-font-awesome-flag\",\n\t\t\t\"fab-f280\" => \"fab fa-fonticons\",\n\t\t\t\"fab-f3a2\" => \"fab fa-fonticons-fi\",\n\t\t\t\"fab-f286\" => \"fab fa-fort-awesome\",\n\t\t\t\"fab-f3a3\" => \"fab fa-fort-awesome-alt\",\n\t\t\t\"fab-f211\" => \"fab fa-forumbee\",\n\t\t\t\"fab-f180\" => \"fab fa-foursquare\",\n\t\t\t\"fab-f2c5\" => \"fab fa-free-code-camp\",\n\t\t\t\"fab-f3a4\" => \"fab fa-freebsd\",\n\t\t\t\"fab-f50b\" => \"fab fa-fulcrum\",\n\t\t\t\"fab-f50c\" => \"fab fa-galactic-republic\",\n\t\t\t\"fab-f50d\" => \"fab fa-galactic-senate\",\n\t\t\t\"fab-f265\" => \"fab fa-get-pocket\",\n\t\t\t\"fab-f260\" => \"fab fa-gg\",\n\t\t\t\"fab-f261\" => \"fab fa-gg-circle\",\n\t\t\t\"fab-f1d3\" => \"fab fa-git\",\n\t\t\t\"fab-f841\" => \"fab fa-git-alt\",\n\t\t\t\"fab-f1d2\" => \"fab fa-git-square\",\n\t\t\t\"fab-f09b\" => \"fab fa-github\",\n\t\t\t\"fab-f113\" => \"fab fa-github-alt\",\n\t\t\t\"fab-f092\" => \"fab fa-github-square\",\n\t\t\t\"fab-f3a6\" => \"fab fa-gitkraken\",\n\t\t\t\"fab-f296\" => \"fab fa-gitlab\",\n\t\t\t\"fab-f426\" => \"fab fa-gitter\",\n\t\t\t\"fab-f2a5\" => \"fab fa-glide\",\n\t\t\t\"fab-f2a6\" => \"fab fa-glide-g\",\n\t\t\t\"fab-f3a7\" => \"fab fa-gofore\",\n\t\t\t\"fab-f3a8\" => \"fab fa-goodreads\",\n\t\t\t\"fab-f3a9\" => \"fab fa-goodreads-g\",\n\t\t\t\"fab-f1a0\" => \"fab fa-google\",\n\t\t\t\"fab-f3aa\" => \"fab fa-google-drive\",\n\t\t\t\"fab-f3ab\" => \"fab fa-google-play\",\n\t\t\t\"fab-f2b3\" => \"fab fa-google-plus\",\n\t\t\t\"fab-f0d5\" => \"fab fa-google-plus-g\",\n\t\t\t\"fab-f0d4\" => \"fab fa-google-plus-square\",\n\t\t\t\"fab-f1ee\" => \"fab fa-google-wallet\",\n\t\t\t\"fab-f184\" => \"fab fa-gratipay\",\n\t\t\t\"fab-f2d6\" => \"fab fa-grav\",\n\t\t\t\"fab-f3ac\" => \"fab fa-gripfire\",\n\t\t\t\"fab-f3ad\" => \"fab fa-grunt\",\n\t\t\t\"fab-f3ae\" => \"fab fa-gulp\",\n\t\t\t\"fab-f1d4\" => \"fab fa-hacker-news\",\n\t\t\t\"fab-f3af\" => \"fab fa-hacker-news-square\",\n\t\t\t\"fab-f5f7\" => \"fab fa-hackerrank\",\n\t\t\t\"fab-f452\" => \"fab fa-hips\",\n\t\t\t\"fab-f3b0\" => \"fab fa-hire-a-helper\",\n\t\t\t\"fab-f427\" => \"fab fa-hooli\",\n\t\t\t\"fab-f592\" => \"fab fa-hornbill\",\n\t\t\t\"fab-f3b1\" => \"fab fa-hotjar\",\n\t\t\t\"fab-f27c\" => \"fab fa-houzz\",\n\t\t\t\"fab-f13b\" => \"fab fa-html5\",\n\t\t\t\"fab-f3b2\" => \"fab fa-hubspot\",\n\t\t\t\"fab-f913\" => \"fab fa-ideal\",\n\t\t\t\"fab-f2d8\" => \"fab fa-imdb\",\n\t\t\t\"fab-f16d\" => \"fab fa-instagram\",\n\t\t\t\"fab-f955\" => \"fab fa-instagram-square\",\n\t\t\t\"fab-f7af\" => \"fab fa-intercom\",\n\t\t\t\"fab-f26b\" => \"fab fa-internet-explorer\",\n\t\t\t\"fab-f7b0\" => \"fab fa-invision\",\n\t\t\t\"fab-f208\" => \"fab fa-ioxhost\",\n\t\t\t\"fab-f83a\" => \"fab fa-itch-io\",\n\t\t\t\"fab-f3b4\" => \"fab fa-itunes\",\n\t\t\t\"fab-f3b5\" => \"fab fa-itunes-note\",\n\t\t\t\"fab-f4e4\" => \"fab fa-java\",\n\t\t\t\"fab-f50e\" => \"fab fa-jedi-order\",\n\t\t\t\"fab-f3b6\" => \"fab fa-jenkins\",\n\t\t\t\"fab-f7b1\" => \"fab fa-jira\",\n\t\t\t\"fab-f3b7\" => \"fab fa-joget\",\n\t\t\t\"fab-f1aa\" => \"fab fa-joomla\",\n\t\t\t\"fab-f3b8\" => \"fab fa-js\",\n\t\t\t\"fab-f3b9\" => \"fab fa-js-square\",\n\t\t\t\"fab-f1cc\" => \"fab fa-jsfiddle\",\n\t\t\t\"fab-f5fa\" => \"fab fa-kaggle\",\n\t\t\t\"fab-f4f5\" => \"fab fa-keybase\",\n\t\t\t\"fab-f3ba\" => \"fab fa-keycdn\",\n\t\t\t\"fab-f3bb\" => \"fab fa-kickstarter\",\n\t\t\t\"fab-f3bc\" => \"fab fa-kickstarter-k\",\n\t\t\t\"fab-f42f\" => \"fab fa-korvue\",\n\t\t\t\"fab-f3bd\" => \"fab fa-laravel\",\n\t\t\t\"fab-f202\" => \"fab fa-lastfm\",\n\t\t\t\"fab-f203\" => \"fab fa-lastfm-square\",\n\t\t\t\"fab-f212\" => \"fab fa-leanpub\",\n\t\t\t\"fab-f41d\" => \"fab fa-less\",\n\t\t\t\"fab-f3c0\" => \"fab fa-line\",\n\t\t\t\"fab-f08c\" => \"fab fa-linkedin\",\n\t\t\t\"fab-f0e1\" => \"fab fa-linkedin-in\",\n\t\t\t\"fab-f2b8\" => \"fab fa-linode\",\n\t\t\t\"fab-f17c\" => \"fab fa-linux\",\n\t\t\t\"fab-f3c3\" => \"fab fa-lyft\",\n\t\t\t\"fab-f3c4\" => \"fab fa-magento\",\n\t\t\t\"fab-f59e\" => \"fab fa-mailchimp\",\n\t\t\t\"fab-f50f\" => \"fab fa-mandalorian\",\n\t\t\t\"fab-f60f\" => \"fab fa-markdown\",\n\t\t\t\"fab-f4f6\" => \"fab fa-mastodon\",\n\t\t\t\"fab-f136\" => \"fab fa-maxcdn\",\n\t\t\t\"fab-f8ca\" => \"fab fa-mdb\",\n\t\t\t\"fab-f3c6\" => \"fab fa-medapps\",\n\t\t\t\"fab-f23a\" => \"fab fa-medium\",\n\t\t\t\"fab-f3c7\" => \"fab fa-medium-m\",\n\t\t\t\"fab-f3c8\" => \"fab fa-medrt\",\n\t\t\t\"fab-f2e0\" => \"fab fa-meetup\",\n\t\t\t\"fab-f5a3\" => \"fab fa-megaport\",\n\t\t\t\"fab-f7b3\" => \"fab fa-mendeley\",\n\t\t\t\"fab-f91a\" => \"fab fa-microblog\",\n\t\t\t\"fab-f3ca\" => \"fab fa-microsoft\",\n\t\t\t\"fab-f3cb\" => \"fab fa-mix\",\n\t\t\t\"fab-f289\" => \"fab fa-mixcloud\",\n\t\t\t\"fab-f956\" => \"fab fa-mixer\",\n\t\t\t\"fab-f3cc\" => \"fab fa-mizuni\",\n\t\t\t\"fab-f285\" => \"fab fa-modx\",\n\t\t\t\"fab-f3d0\" => \"fab fa-monero\",\n\t\t\t\"fab-f3d2\" => \"fab fa-napster\",\n\t\t\t\"fab-f612\" => \"fab fa-neos\",\n\t\t\t\"fab-f5a8\" => \"fab fa-nimblr\",\n\t\t\t\"fab-f419\" => \"fab fa-node\",\n\t\t\t\"fab-f3d3\" => \"fab fa-node-js\",\n\t\t\t\"fab-f3d4\" => \"fab fa-npm\",\n\t\t\t\"fab-f3d5\" => \"fab fa-ns8\",\n\t\t\t\"fab-f3d6\" => \"fab fa-nutritionix\",\n\t\t\t\"fab-f263\" => \"fab fa-odnoklassniki\",\n\t\t\t\"fab-f264\" => \"fab fa-odnoklassniki-square\",\n\t\t\t\"fab-f510\" => \"fab fa-old-republic\",\n\t\t\t\"fab-f23d\" => \"fab fa-opencart\",\n\t\t\t\"fab-f19b\" => \"fab fa-openid\",\n\t\t\t\"fab-f26a\" => \"fab fa-opera\",\n\t\t\t\"fab-f23c\" => \"fab fa-optin-monster\",\n\t\t\t\"fab-f8d2\" => \"fab fa-orcid\",\n\t\t\t\"fab-f41a\" => \"fab fa-osi\",\n\t\t\t\"fab-f3d7\" => \"fab fa-page4\",\n\t\t\t\"fab-f18c\" => \"fab fa-pagelines\",\n\t\t\t\"fab-f3d8\" => \"fab fa-palfed\",\n\t\t\t\"fab-f3d9\" => \"fab fa-patreon\",\n\t\t\t\"fab-f1ed\" => \"fab fa-paypal\",\n\t\t\t\"fab-f704\" => \"fab fa-penny-arcade\",\n\t\t\t\"fab-f3da\" => \"fab fa-periscope\",\n\t\t\t\"fab-f3db\" => \"fab fa-phabricator\",\n\t\t\t\"fab-f3dc\" => \"fab fa-phoenix-framework\",\n\t\t\t\"fab-f511\" => \"fab fa-phoenix-squadron\",\n\t\t\t\"fab-f457\" => \"fab fa-php\",\n\t\t\t\"fab-f2ae\" => \"fab fa-pied-piper\",\n\t\t\t\"fab-f1a8\" => \"fab fa-pied-piper-alt\",\n\t\t\t\"fab-f4e5\" => \"fab fa-pied-piper-hat\",\n\t\t\t\"fab-f1a7\" => \"fab fa-pied-piper-pp\",\n\t\t\t\"fab-f91e\" => \"fab fa-pied-piper-square\",\n\t\t\t\"fab-f0d2\" => \"fab fa-pinterest\",\n\t\t\t\"fab-f231\" => \"fab fa-pinterest-p\",\n\t\t\t\"fab-f0d3\" => \"fab fa-pinterest-square\",\n\t\t\t\"fab-f3df\" => \"fab fa-playstation\",\n\t\t\t\"fab-f288\" => \"fab fa-product-hunt\",\n\t\t\t\"fab-f3e1\" => \"fab fa-pushed\",\n\t\t\t\"fab-f3e2\" => \"fab fa-python\",\n\t\t\t\"fab-f1d6\" => \"fab fa-qq\",\n\t\t\t\"fab-f459\" => \"fab fa-quinscape\",\n\t\t\t\"fab-f2c4\" => \"fab fa-quora\",\n\t\t\t\"fab-f4f7\" => \"fab fa-r-project\",\n\t\t\t\"fab-f7bb\" => \"fab fa-raspberry-pi\",\n\t\t\t\"fab-f2d9\" => \"fab fa-ravelry\",\n\t\t\t\"fab-f41b\" => \"fab fa-react\",\n\t\t\t\"fab-f75d\" => \"fab fa-reacteurope\",\n\t\t\t\"fab-f4d5\" => \"fab fa-readme\",\n\t\t\t\"fab-f1d0\" => \"fab fa-rebel\",\n\t\t\t\"fab-f3e3\" => \"fab fa-red-river\",\n\t\t\t\"fab-f1a1\" => \"fab fa-reddit\",\n\t\t\t\"fab-f281\" => \"fab fa-reddit-alien\",\n\t\t\t\"fab-f1a2\" => \"fab fa-reddit-square\",\n\t\t\t\"fab-f7bc\" => \"fab fa-redhat\",\n\t\t\t\"fab-f18b\" => \"fab fa-renren\",\n\t\t\t\"fab-f3e6\" => \"fab fa-replyd\",\n\t\t\t\"fab-f4f8\" => \"fab fa-researchgate\",\n\t\t\t\"fab-f3e7\" => \"fab fa-resolving\",\n\t\t\t\"fab-f5b2\" => \"fab fa-rev\",\n\t\t\t\"fab-f3e8\" => \"fab fa-rocketchat\",\n\t\t\t\"fab-f3e9\" => \"fab fa-rockrms\",\n\t\t\t\"fab-f267\" => \"fab fa-safari\",\n\t\t\t\"fab-f83b\" => \"fab fa-salesforce\",\n\t\t\t\"fab-f41e\" => \"fab fa-sass\",\n\t\t\t\"fab-f3ea\" => \"fab fa-schlix\",\n\t\t\t\"fab-f28a\" => \"fab fa-scribd\",\n\t\t\t\"fab-f3eb\" => \"fab fa-searchengin\",\n\t\t\t\"fab-f2da\" => \"fab fa-sellcast\",\n\t\t\t\"fab-f213\" => \"fab fa-sellsy\",\n\t\t\t\"fab-f3ec\" => \"fab fa-servicestack\",\n\t\t\t\"fab-f214\" => \"fab fa-shirtsinbulk\",\n\t\t\t\"fab-f957\" => \"fab fa-shopify\",\n\t\t\t\"fab-f5b5\" => \"fab fa-shopware\",\n\t\t\t\"fab-f215\" => \"fab fa-simplybuilt\",\n\t\t\t\"fab-f3ee\" => \"fab fa-sistrix\",\n\t\t\t\"fab-f512\" => \"fab fa-sith\",\n\t\t\t\"fab-f7c6\" => \"fab fa-sketch\",\n\t\t\t\"fab-f216\" => \"fab fa-skyatlas\",\n\t\t\t\"fab-f17e\" => \"fab fa-skype\",\n\t\t\t\"fab-f198\" => \"fab fa-slack\",\n\t\t\t\"fab-f3ef\" => \"fab fa-slack-hash\",\n\t\t\t\"fab-f1e7\" => \"fab fa-slideshare\",\n\t\t\t\"fab-f2ab\" => \"fab fa-snapchat\",\n\t\t\t\"fab-f2ac\" => \"fab fa-snapchat-ghost\",\n\t\t\t\"fab-f2ad\" => \"fab fa-snapchat-square\",\n\t\t\t\"fab-f1be\" => \"fab fa-soundcloud\",\n\t\t\t\"fab-f7d3\" => \"fab fa-sourcetree\",\n\t\t\t\"fab-f3f3\" => \"fab fa-speakap\",\n\t\t\t\"fab-f83c\" => \"fab fa-speaker-deck\",\n\t\t\t\"fab-f1bc\" => \"fab fa-spotify\",\n\t\t\t\"fab-f5be\" => \"fab fa-squarespace\",\n\t\t\t\"fab-f18d\" => \"fab fa-stack-exchange\",\n\t\t\t\"fab-f16c\" => \"fab fa-stack-overflow\",\n\t\t\t\"fab-f842\" => \"fab fa-stackpath\",\n\t\t\t\"fab-f3f5\" => \"fab fa-staylinked\",\n\t\t\t\"fab-f1b6\" => \"fab fa-steam\",\n\t\t\t\"fab-f1b7\" => \"fab fa-steam-square\",\n\t\t\t\"fab-f3f6\" => \"fab fa-steam-symbol\",\n\t\t\t\"fab-f3f7\" => \"fab fa-sticker-mule\",\n\t\t\t\"fab-f428\" => \"fab fa-strava\",\n\t\t\t\"fab-f429\" => \"fab fa-stripe\",\n\t\t\t\"fab-f42a\" => \"fab fa-stripe-s\",\n\t\t\t\"fab-f3f8\" => \"fab fa-studiovinari\",\n\t\t\t\"fab-f1a4\" => \"fab fa-stumbleupon\",\n\t\t\t\"fab-f1a3\" => \"fab fa-stumbleupon-circle\",\n\t\t\t\"fab-f2dd\" => \"fab fa-superpowers\",\n\t\t\t\"fab-f3f9\" => \"fab fa-supple\",\n\t\t\t\"fab-f7d6\" => \"fab fa-suse\",\n\t\t\t\"fab-f8e1\" => \"fab fa-swift\",\n\t\t\t\"fab-f83d\" => \"fab fa-symfony\",\n\t\t\t\"fab-f4f9\" => \"fab fa-teamspeak\",\n\t\t\t\"fab-f2c6\" => \"fab fa-telegram\",\n\t\t\t\"fab-f3fe\" => \"fab fa-telegram-plane\",\n\t\t\t\"fab-f1d5\" => \"fab fa-tencent-weibo\",\n\t\t\t\"fab-f69d\" => \"fab fa-the-red-yeti\",\n\t\t\t\"fab-f5c6\" => \"fab fa-themeco\",\n\t\t\t\"fab-f2b2\" => \"fab fa-themeisle\",\n\t\t\t\"fab-f731\" => \"fab fa-think-peaks\",\n\t\t\t\"fab-f513\" => \"fab fa-trade-federation\",\n\t\t\t\"fab-f181\" => \"fab fa-trello\",\n\t\t\t\"fab-f262\" => \"fab fa-tripadvisor\",\n\t\t\t\"fab-f173\" => \"fab fa-tumblr\",\n\t\t\t\"fab-f174\" => \"fab fa-tumblr-square\",\n\t\t\t\"fab-f1e8\" => \"fab fa-twitch\",\n\t\t\t\"fab-f099\" => \"fab fa-twitter\",\n\t\t\t\"fab-f081\" => \"fab fa-twitter-square\",\n\t\t\t\"fab-f42b\" => \"fab fa-typo3\",\n\t\t\t\"fab-f402\" => \"fab fa-uber\",\n\t\t\t\"fab-f7df\" => \"fab fa-ubuntu\",\n\t\t\t\"fab-f403\" => \"fab fa-uikit\",\n\t\t\t\"fab-f8e8\" => \"fab fa-umbraco\",\n\t\t\t\"fab-f404\" => \"fab fa-uniregistry\",\n\t\t\t\"fab-f949\" => \"fab fa-unity\",\n\t\t\t\"fab-f405\" => \"fab fa-untappd\",\n\t\t\t\"fab-f7e0\" => \"fab fa-ups\",\n\t\t\t\"fab-f287\" => \"fab fa-usb\",\n\t\t\t\"fab-f7e1\" => \"fab fa-usps\",\n\t\t\t\"fab-f407\" => \"fab fa-ussunnah\",\n\t\t\t\"fab-f408\" => \"fab fa-vaadin\",\n\t\t\t\"fab-f237\" => \"fab fa-viacoin\",\n\t\t\t\"fab-f2a9\" => \"fab fa-viadeo\",\n\t\t\t\"fab-f2aa\" => \"fab fa-viadeo-square\",\n\t\t\t\"fab-f409\" => \"fab fa-viber\",\n\t\t\t\"fab-f40a\" => \"fab fa-vimeo\",\n\t\t\t\"fab-f194\" => \"fab fa-vimeo-square\",\n\t\t\t\"fab-f27d\" => \"fab fa-vimeo-v\",\n\t\t\t\"fab-f1ca\" => \"fab fa-vine\",\n\t\t\t\"fab-f189\" => \"fab fa-vk\",\n\t\t\t\"fab-f40b\" => \"fab fa-vnv\",\n\t\t\t\"fab-f41f\" => \"fab fa-vuejs\",\n\t\t\t\"fab-f83f\" => \"fab fa-waze\",\n\t\t\t\"fab-f5cc\" => \"fab fa-weebly\",\n\t\t\t\"fab-f18a\" => \"fab fa-weibo\",\n\t\t\t\"fab-f1d7\" => \"fab fa-weixin\",\n\t\t\t\"fab-f232\" => \"fab fa-whatsapp\",\n\t\t\t\"fab-f40c\" => \"fab fa-whatsapp-square\",\n\t\t\t\"fab-f40d\" => \"fab fa-whmcs\",\n\t\t\t\"fab-f266\" => \"fab fa-wikipedia-w\",\n\t\t\t\"fab-f17a\" => \"fab fa-windows\",\n\t\t\t\"fab-f5cf\" => \"fab fa-wix\",\n\t\t\t\"fab-f730\" => \"fab fa-wizards-of-the-coast\",\n\t\t\t\"fab-f514\" => \"fab fa-wolf-pack-battalion\",\n\t\t\t\"fab-f19a\" => \"fab fa-wordpress\",\n\t\t\t\"fab-f411\" => \"fab fa-wordpress-simple\",\n\t\t\t\"fab-f297\" => \"fab fa-wpbeginner\",\n\t\t\t\"fab-f2de\" => \"fab fa-wpexplorer\",\n\t\t\t\"fab-f298\" => \"fab fa-wpforms\",\n\t\t\t\"fab-f3e4\" => \"fab fa-wpressr\",\n\t\t\t\"fab-f412\" => \"fab fa-xbox\",\n\t\t\t\"fab-f168\" => \"fab fa-xing\",\n\t\t\t\"fab-f169\" => \"fab fa-xing-square\",\n\t\t\t\"fab-f23b\" => \"fab fa-y-combinator\",\n\t\t\t\"fab-f19e\" => \"fab fa-yahoo\",\n\t\t\t\"fab-f840\" => \"fab fa-yammer\",\n\t\t\t\"fab-f413\" => \"fab fa-yandex\",\n\t\t\t\"fab-f414\" => \"fab fa-yandex-international\",\n\t\t\t\"fab-f7e3\" => \"fab fa-yarn\",\n\t\t\t\"fab-f1e9\" => \"fab fa-yelp\",\n\t\t\t\"fab-f2b1\" => \"fab fa-yoast\",\n\t\t\t\"fab-f167\" => \"fab fa-youtube\",\n\t\t\t\"fab-f431\" => \"fab fa-youtube-square\",\n\t\t\t\"fab-f63f\" => \"fab fa-zhihu\"\n\t\t);\n\n\t\t$icons = array_merge( $solid_icons, $regular_icons, $brand_icons );\n\n\t\t$icons = apply_filters( \"megamenu_fontawesome_5_icons\", $icons );\n\n\t\treturn $icons;\n\n\t}", "function name_validation($str)\n{\n return preg_match(\"/^[a-zA-Z ]+$/\", $str);\n}", "public function testAdminBSBIconBasicFunctionWithName() {\n\n $obj = new IconTwigExtension($this->twigEnvironment);\n\n $arg = [\"name\" => \"person\"];\n $res = '<i class=\"material-icons\">person</i>';\n $this->assertEquals($res, $obj->adminBSBIconBasicFunction($arg));\n }", "public function admin_enqueue_fontawesomeBlock(){\n\t\t}", "public function testAdminBSBIconMaterialDesignFunctionWithName() {\n\n $obj = new IconTwigExtension($this->twigEnvironment);\n\n $arg = [\"name\" => \"person\"];\n $res = '<i class=\"material-icons col-red\">person</i>';\n $this->assertEquals($res, $obj->adminBSBIconMaterialDesignFunction($arg));\n }", "public static function checkName($name)\r\n {\r\n if (strlen($name) >= 4) {\r\n return true;\r\n }\r\n return false;\r\n }", "private final static function validClassName($name)\n {\n # a-z, 0-9. Must start with a capitalised letter\n return !preg_match('#[^A-Za-z0-9]|^[^A-Z]#', $name);\n }", "private function validateUsername() {\r\n $val = trim($this->data['username');\r\n \r\n if( empty($val) ) { \r\n $this->addError('username', 'username cannot be empty');\r\n } else {\r\n if(preg_match('/^[a-aA-Z0-9]{6,12}$/', $val)) {\r\n $this->addError('username', 'username must 6-12 chars $ alphanumeric')\r\n }\r\n } \r\n }", "function _validateUsername($name)\n {\n return trim(substr(preg_replace('/[^A-Za-z0-9_ \\-]/', '',$name),0,24)); \n }", "public function _validWikName($str)\n\t{\n\t\tif (preg_match('/[^a-z0-9\\-\\_]/i', $str))\n\t\t{\n\t\t\tee()->form_validation->set_message('_validWikName', lang('invalid_short_name'));\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function is_validwhitelistname($name) {\n\tif (!is_string($name))\n\t\treturn false;\n\n\tif (!preg_match(\"/[^a-zA-Z0-9\\_\\.\\/]/\", $name))\n\t\treturn true;\n\n\treturn false;\n}", "public function icon(): string;", "function av_icon($icon, $font = false, $string = 'string')\n{\t\n\treturn avia_font_manager::frontend_icon($icon, $font, $string);\n}", "public function get_icon() {\n return 'fa fa-address-card';\n }", "protected static function isValidName($name)\n {\n return '' === $name || null === $name || preg_match('/^[a-zA-Z0-9_][a-zA-Z0-9_\\-:]*$/D', $name);\n }", "function verify_name($name) // Colorize: green\n { // Colorize: green\n return isset($name) // Colorize: green\n && // Colorize: green\n is_string($name) // Colorize: green\n && // Colorize: green\n $name != \"\"; // Colorize: green\n }", "function _kalatheme_font_icon($name, $bundle = NULL, $attr = array(), $resolvePrefix = TRUE){\n if($bundle === NULL){\n $bundle = theme_get_setting('icon_font_library');\n }\n // Find the icon prefix\n if($resolvePrefix){\n switch($bundle){\n case('font_awesome'):\n $name = 'fa-' . $name;\n break;\n case('bootstrap_glyphicons'):\n $name = 'glyphicon-' . $name;\n break;\n }\n }\n\n $output = NULL;\n if (module_exists('icon')){\n $output = theme('icon', array(\n 'bundle' => $bundle,\n 'icon' => $name,\n 'attributes' => $attr\n ));\n }\n if($output === NULL){\n $attr = array();\n $attr += array('aria-hidden' => 'true' );\n $attr['class'] = array();\n\n if($bundle === 'font_awesome'){\n $attr['class'][] = 'fa';\n }\n elseif($bundle === 'bootstrap_glyphicons'){\n $attr['class'][] = 'glyphicon';\n }\n\n\n $attr['class'][] = $name;\n $output = '<span '. drupal_attributes($attr) . '></span>';\n }\n return $output;\n}", "public static function validateName($name) {\n if (preg_match(\"/^[a-zA-Z]*$/\",$name))\n return true;\n else\n return false;\n }", "function validateUserName($name)\n {\n /**condition for validating the type and size of user input string\n *takes user input name as a parameter for validating with the set conditons\n */\n if (preg_match('/[a-zA-Z]{3}/', $name)) {\n return true;\n }\n }", "public static function validateName($name) {\n\t\tif (!empty($name)) {\n\t\t\tif (preg_match('/^[a-z0-9 ]{3,}$/i', $name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-pencil';\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-pencil';\n\t}", "private function is_funciri_attribute($tag, $attr)\n {\n return in_array($attr, array('fill', 'filter', 'stroke', 'marker-start',\n 'marker-end', 'marker-mid', 'clip-path', 'mask', 'cursor'));\n }", "public function getInvalidName()\n {\n return $this->_invalidName;\n }", "function valid_email($name){\r\n if(strpos($name, '@') !== false)\r\n return true;\r\n else\r\n return false;\r\n }", "function is_validwhitelistname($name) {\n\tif (!is_string($name))\n\treturn false;\n\n\tif (!preg_match(\"/[^a-zA-Z0-9\\.\\/]/\", $name))\n\treturn true;\n\n\treturn false;\n}", "public function validate_name() {\n $errors = array();\n \n if ($this->name == '' || $this->name == null) {\n $errors[] = 'Nimi ei saa olla tyhjä.';\n }\n \n if (strlen($this->name) < 2 || strlen($this->name) > 50) {\n $errors[] = 'Nimen pituuden tulee olla vähintään 2 ja enintaan 50 merkkiä.';\n }\n \n $other_departments = $this->other_departments();\n\n foreach ($other_departments as $d) {\n if (strcasecmp($d->name, $this->name) == 0) {\n $errors[] = 'Olet jo lisännyt samannimisen osaston.';\n }\n }\n \n return $errors;\n }", "private function __validate_name() {\n if (isset($this->initial_data[\"name\"])) {\n if ($this->get_limiter_id_by_name($this->initial_data[\"name\"], true)) {\n $this->parent_id = $this->get_limiter_id_by_name($this->initial_data[\"name\"]);\n } else {\n $this->errors[] = APIResponse\\get(4209);\n }\n } else {\n $this->errors[] = APIResponse\\get(4167);\n }\n }", "private function checkName($file) \n {\n return $this->imageConstraint->checkName($file);\n }", "private final static function validPropertyName($name)\n {\n return !preg_match('#[^a-z0-9_]|^[^a-z]|__#', $name);\n }", "function isColorName($input) {\n return (preg_match(\"/(^(?:(?:[a-zA-Z]+)(?:[ -]?))+$)/\", $input));\n }", "function isValidName ($name)\r\n{\r\n global $cf_reservedpattern;\r\n\r\n $reservedpattern = $cf_reservedpattern ? $cf_reservedpattern : '[_a-z]{0,1}([\\d]+)';\r\n\r\n if (preg_match(\"%^\".$reservedpattern.\"$%i\", $name, $matches))\r\n return FALSE; // reserved - not permitted\r\n\r\n $pattern = '[a-z\\d][_a-z\\d]{2,23}';\r\n if (preg_match('%^'.$pattern.'$%i', $name))\r\n if (!preg_match(\"%^(api|com|biz|def|gov|net|org|wap|web|www|gamma|mobile|mygamma|buzzcity|netbeacon)[\\d]*$%i\", $name))\r\n return TRUE;\r\n\r\n return FALSE; // not permitted\r\n}", "public function get_icon()\n {\n return 'fa fa-file-video-o';\n }", "public function getIcon() {}", "public function get_icon()\n {\n return 'fa fa-filter';\n }", "function alpha_extra($str) {\n $this->CI->form_validation->set_message('alpha_extra', 'The %s may only contain alpha-numeric characters, spaces, periods, underscores & dashes.');\n return ( ! preg_match(\"/^([\\.\\s-a-z0-9_-])+$/i\", $str)) ? FALSE : TRUE;\n }" ]
[ "0.58730716", "0.58730716", "0.58724123", "0.58724123", "0.5839516", "0.56914526", "0.56051415", "0.5596326", "0.55347383", "0.5519239", "0.551734", "0.55072576", "0.54797703", "0.5433613", "0.5433613", "0.543236", "0.54220545", "0.5421784", "0.53743976", "0.53476727", "0.5347339", "0.5316145", "0.5272626", "0.527031", "0.52354217", "0.52215093", "0.52147657", "0.52124554", "0.52094007", "0.5199331", "0.5179605", "0.5150601", "0.5139901", "0.5139325", "0.51369375", "0.5135492", "0.50668025", "0.50619596", "0.50548357", "0.5050157", "0.50406206", "0.5006859", "0.49958262", "0.49690852", "0.4968541", "0.49551645", "0.4953756", "0.4949941", "0.49327996", "0.49310163", "0.49266174", "0.49255306", "0.49228254", "0.49226657", "0.4921095", "0.49204513", "0.49171752", "0.49081972", "0.4907151", "0.4899312", "0.48990494", "0.48944417", "0.48779652", "0.48770955", "0.48578247", "0.48560622", "0.4854305", "0.4842514", "0.48420292", "0.4841051", "0.48369065", "0.48361084", "0.4832773", "0.48254153", "0.48247012", "0.48234707", "0.48132524", "0.48130572", "0.48114625", "0.481032", "0.48046803", "0.48032486", "0.47982553", "0.4791648", "0.47908548", "0.47908548", "0.47791168", "0.47765815", "0.47758445", "0.47741824", "0.47724876", "0.47596964", "0.47560185", "0.475185", "0.47512218", "0.4749398", "0.47470525", "0.4743035", "0.4742758", "0.4742431" ]
0.7926421
0
Get the URL for the page.
public function url() { return backpack_url("/page/{$this->id}/edit"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function url()\n\t{\n\t\t$id\t\t= $this->attribute('id');\n\t\t$page\t= $this->pyrocache->model('pages_m', 'get', array($id));\n\n\t\treturn site_url($page ? $page->uri : '');\n\t}", "public function getURL()\n {\n return $this->page->getURL() . 'links-to-this/';\n }", "public function get_url () {\r\n\t\treturn $this->url;\r\n\t}", "public function getUrl()\n\t{\n\t\tif ($this->uri !== null)\n\t\t{\n\t\t\treturn UrlHelper::getSiteUrl($this->uri);\n\t\t}\n\t}", "protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }", "public function url() {\n\t\tif ( ! isset( $this->url ) ) {\n\t\t\t$url = add_query_arg( 'page', $this->page_slug, 'sites.php' );\n\t\t\t$this->url = network_admin_url( $url );\n\t\t}\n\n\t\treturn $this->url;\n\t}", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function getUrl() {\n return $this->get(self::URL);\n }", "public static function _url() {\n\t\treturn self::pw('pages')->get('pw_template=mpm')->url;\n\t}", "public function get_url(): string\n {\n return $this->get_url_internal();\n }", "public function getPageUrl()\n {\n if ($this->hasData(static::REGISTRATION_URL)) {\n return $this->getData(static::REGISTRATION_URL);\n } elseif ($this->hasData(static::CONFIGURATION_URI)) {\n return $this->getData(static::CONFIGURATION_URI);\n } elseif ($this->hasData(static::REGISTRATION_URI)) {\n return $this->getData(static::REGISTRATION_URI);\n }\n\n return '';\n }", "public function ___httpUrl() {\n\t\t$page = $this->pagefiles->getPage();\n\t\t$url = substr($page->httpUrl(), 0, -1 * strlen($page->url())); \n\t\treturn $url . $this->url(); \n\t}", "public static function url(): string\n\t{\n\t\treturn static::$url;\n\t}", "public function url()\n {\n return $this->factory->getUrl($this->handle);\n }", "protected function ___url() {\n\t\treturn $this->pagefiles->url . $this->basename;\n\t}", "protected function _getUrl()\n {\n return Router::url([\n '_name' => 'wikiPages',\n 'id' => $this->id,\n 'slug' => Inflector::slug($this->title)\n ]);\n }", "protected function getUrl() {\r\n\t\treturn $this->url;\r\n\t}", "public function getURL();", "public function getURL();", "public function get_url()\n {\n return $this->url;\n }", "protected function getPageURL()\n {\n global $post_id;\n try {\n if (defined('TOPIC_ID')) {\n // this is a TOPICS page\n $SQL = \"SELECT `link` FROM `\".TABLE_PREFIX.\"mod_topics` WHERE `topic_id`='\".TOPIC_ID.\"'\";\n $link = $this->app['db']->fetchColumn($SQL);\n // include TOPICS settings\n global $topics_directory;\n include_once WB_PATH . '/modules/topics/module_settings.php';\n return WB_URL . $topics_directory . $link . PAGE_EXTENSION;\n }\n elseif (!is_null($post_id) || defined('POST_ID')) {\n // this is a NEWS page\n $id = (defined('POST_ID')) ? POST_ID : $post_id;\n $SQL = \"SELECT `link` FROM `\".TABLE_PREFIX.\"mod_news_posts` WHERE `post_id`='$id'\";\n $link = $this->app['db']->fetchColumn($SQL);\n return WB_URL.PAGES_DIRECTORY.$link.PAGE_EXTENSION;\n }\n else {\n $SQL = \"SELECT `link` FROM `\".TABLE_PREFIX.\"pages` WHERE `page_id`='\".PAGE_ID.\"'\";\n $link = $this->app['db']->fetchColumn($SQL);\n return WB_URL.PAGES_DIRECTORY.$link.PAGE_EXTENSION;\n }\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw new \\Exception($e);\n }\n }", "public function getUrl($page);", "public function get_url();", "public function getURL ();", "public function GetURL()\n\t\t{\n\t\t\treturn $this->_url;\n\t\t}", "public function getURL(): string\n {\n return $this->http->getURL();\n }", "public function GetUrl() {\n return $this->url;\n }", "public function getUrl(): ?string\n {\n if ($this->page_id || $this->page) {\n $oPage = $this->page();\n }\n\n return $oPage->published->url ?? $this->url;\n }", "public function getUserPageUrl()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_PAGE_URL);\n }", "public function getFrontPageUrl();", "protected function getUrl() {\n\t\treturn $this->getQueryParam ( self::URL_PARAM );\n\t}", "public function getUrl($page): string;", "public function get_url()\n {\n return $this->_url;\n }", "public function get_url()\n {\n return $this->_url;\n }", "public function getUrl()\n {\n return $this->_urlBuilder->getUrl();\n }", "public function GetURL() {\n\n return $this->URL;\n }", "public static function getURL() {\n $url = self::getHost() . $_SERVER['REQUEST_URI'];\n return $url;\n }", "public function getURL() {\n\t\treturn $this->url;\n\t}", "public static function curlPageURL() {\n\t\t$pageURL = 'http';\n\t\tif (isset ( $_SERVER [\"HTTPS\"] )) {\n\t\t\tif ($_SERVER [\"HTTPS\"] == \"on\") {\n\t\t\t\t$pageURL .= \"s\";\n\t\t\t}\n\t\t}\n\t\t$pageURL .= \"://\";\n\t\tif ($_SERVER [\"SERVER_PORT\"] != \"80\") {\n\t\t\t$pageURL .= $_SERVER [\"SERVER_NAME\"] . \":\" . $_SERVER [\"SERVER_PORT\"] . $_SERVER [\"REQUEST_URI\"];\n\t\t} else {\n\t\t\t$pageURL .= $_SERVER [\"SERVER_NAME\"] . $_SERVER [\"REQUEST_URI\"];\n\t\t}\n\t\treturn $pageURL;\n\t}", "protected function getUrl() {\n return $this->url;\n }", "public function getUrl()\r\n\t{\r\n\t\treturn $this->url;\r\n\t}", "protected function getUrl(): string\n {\n return $this->url;\n }", "public function url()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n {\n return $this->parseUrl();\n }", "static public function getURL() {\n\t\treturn self::$url;\n\t}", "public function URL()\n\t{\n\t\treturn $this->isHomePage() ? \\URL::to('/') : \\URL::to($this->uri);\n\t}", "public function getURL()\n {\n return $this->_url;\n }", "public function getUrl() {\n if ($this->hasUrl()) {\n return $this->_getData('url');\n }\n $uri = $this->getUrlKey() . $this->getUrlSuffix();\n return $this->_getUrl($uri);\n }", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public static function getUrl() {\n\t\tif(!isset(self::$url)) {\n\t\t\tself::$url = self::getUrlBase();\n\t\t\tif(isset($_SERVER['REQUEST_URI'])) {\n\t\t\t\tself::$url .= $_SERVER['REQUEST_URI'];\n\t\t\t}\n\t\t}\n\t\treturn self::$url;\n\t}", "protected function getUrl(){\n\n\t\t//retornando a url aonde o usuario está\n\t\treturn parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n\n\t}", "public function getURL() {\n\t\treturn $this->_url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "function cherry_get_page_URL(){\n\t\tif(!isset($_SERVER['REQUEST_URI'])){\n\t\t\t$site_uri = $_SERVER['PHP_SELF'];\n\t\t} else {\n\t\t\t$site_uri = $_SERVER['REQUEST_URI'];\n\t\t\t$https = empty($_SERVER[\"HTTPS\"]) ? '' : (($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\");\n\t\t\t$site_protocol = strtolower($_SERVER[\"SERVER_PROTOCOL\"]);\n\t\t\t$site_protocol = substr($site_protocol,0,strpos($site_protocol,\"/\")).$https;\n\t\t\t$site_port = ($_SERVER[\"SERVER_PORT\"] == \"80\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\n\t\t}\n\t\treturn $site_protocol.\"://\".$_SERVER['SERVER_NAME'].$site_port.$site_uri;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->_url;\n\t}", "public function getCurrentPageURL() {\n\t\t\t$pageURL = 'http';\n\t\t\tif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == \"on\") {\n\t\t\t\t$pageURL .= \"s\";\n\t\t\t}\n\t\t\t$pageURL .= \"://\";\n\t\t\tif ($_SERVER['SERVER_PORT'] != 80) {\n\t\t\t\t$pageURL .= $_SERVER['SERVER_NAME'] . \":\" . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$pageURL .= $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n\t\t\t}\n\t\t\treturn $pageURL;\n\t\t}", "public abstract function getURL();", "public function url() {\n return $this->info['url'];\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n if ($this->_url === null) {\n $this->_url = $this->resolveRequestUri();\n }\n\n return $this->_url;\n }", "public function url()\n {\n return $this->url;\n }", "private function curPageURL() {\r\n $pageURL = 'http';\r\n if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\r\n $pageURL .= \"://\";\r\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\r\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\r\n } else {\r\n $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\r\n }\r\n return $pageURL;\r\n }", "public function getUrl() {\n\t\treturn $this->siteURL;\n\t}" ]
[ "0.8006654", "0.78609854", "0.77082515", "0.76500857", "0.76356167", "0.76219845", "0.76147705", "0.76147705", "0.7613133", "0.75973046", "0.7596074", "0.7573233", "0.75551045", "0.7552092", "0.75502014", "0.7549048", "0.75302356", "0.7505565", "0.75047624", "0.75047624", "0.75043464", "0.7482677", "0.7473385", "0.7462761", "0.7459524", "0.7458447", "0.7447938", "0.74410504", "0.74392146", "0.74298537", "0.7423525", "0.7420521", "0.7408473", "0.74071825", "0.74071825", "0.74050736", "0.7398657", "0.7398165", "0.7394163", "0.7384022", "0.73822176", "0.7377913", "0.73759365", "0.73667324", "0.7361826", "0.73586106", "0.7354611", "0.7352735", "0.73497874", "0.73349047", "0.73349047", "0.73349047", "0.73349047", "0.73349047", "0.73236793", "0.7302197", "0.73016065", "0.7297869", "0.7297869", "0.7297869", "0.72797036", "0.7276039", "0.7255953", "0.72520506", "0.7251456", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7244783", "0.7239669", "0.7232832", "0.72239393", "0.72094727" ]
0.0
-1
Assert that the browser is on the page.
public function assert(Browser $browser) { $browser->assertUrlIs($this->url()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assert(Browser $browser)\n {\n $browser->assertVisible($this->selector());\n }", "public function assert(Browser $browser)\n {\n // $browser->assertVisible($this->selector());\n }", "public function testOpenBrowser()\n\t{\n\t\t$this->url('/');//The test page has only phpinfo(); as HTML content\n\t\t$content = $this->byTag('body')->text();\n\t\t// $this->assertEquals('PHP Version 5.6.20-1+deb.sury.org~trusty+1', $content);\n\t\t$this->assertContains('PHP Version 5.6.20-1+deb.sury.org~trusty+1', $content);\n\n\t\t//Simulating and ajax call\n\t\t//Will loop on the callback for 2 seconds before continuing scripts below\n\t\t// $this->timeouts()->implicitWait(300); //milliseconds\n\t\t$this->waitUntil(function(){\n\t\t\ttry{\n\t\t\t\t// $webdriver->byId('rootElement');//select by id\n\t\t\t\t$this->byCssSelector('h1.p');//select by css\n\n\t\t\t\treturn true;\n\t\t\t}catch (Exception $ex){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}, 2000);//2 seconds\n\t\t//This is run after the waitUntil finished in 2 seconds\n\t\t$content = $this->byCssSelector('h1.p')->text();\n\t\t$this->assertEquals('PHP Version 5.6.20-1+deb.sury.org~trusty+1', $content);\n\n\t}", "public function assert(Browser $browser)\n {\n $this->assert($this->getUrl());\n }", "function testWebpageExists() {\n\t\t$this->get('http://www.ug.it.usyd.edu.au/~dbro8182/lnm/');\n $this->assertTitle('Administration :: Local Network Monitor');\n\t\t$this->setField('username', 'admin');\n\t\t$this->setField('passwd', 'admin');\n\t\t$this->click('Submit');\n\t\t$this->click('Conflicts');\n\t\t$this->assertText('Below displays all conflicting devices that are connected to the network. Conflicting Devices share IP addresses.');\n }", "public function assert(Browser $browser)\n {\n parent::assert($browser);\n $browser->assertSee('Nieuwe voogd toevoegen');\n }", "public function assert(Browser $browser)\n {\n $browser->assertPathIs($this->url());\n }", "public function assert(Browser $browser)\n {\n $browser->assertPathIs($this->url());\n }", "public function assert(Browser $browser)\n {\n $browser->assertPathIs($this->url());\n }", "public function assert(Browser $browser)\n {\n $browser->assertPathIs($this->url());\n }", "public function assert(Browser $browser)\n {\n $browser->assertPathIs($this->url());\n }", "public function testLoginPageIsRendered()\n {\n $this->browse(function ( Browser $browser) {\n $browser->visit('/admin')\n ->assertSee('Sign In');\n });\n }", "public function assert(Browser $browser)\n {\n $email = str_random(20) . '@' . str_random(5) . '.' . str_random(3);\n $browser->assertPathIs($this->url());\n $browser->resize(1920, 1020);\n $browser->assertSeeLink('Home');\n $browser->assertSeeLink('Our Cars');\n $browser->assertSeeLink('How it Works');\n $browser->assertSeeLink('Contact Us');\n\n $browser->assertSee('SUBSCRIBE TO OUR NEWSLETTER');\n $browser->assertSee('KEEP IN TOUCH');\n\n $browser->assertVisible('#contact-email');\n $browser->assertVisible('#contact-phone');\n $browser->assertVisible('#contact-name');\n $browser->assertVisible('#contact-content');\n $browser->driver->executeScript('window.scrollTo(0, 350);');\n $browser->keys('#contact-name', 'Veronica Ong');\n $browser->pause(500);\n $browser->assertValue('#contact-name', 'Veronica Ong');\n $browser->keys('#contact-email', '[email protected]');\n $browser->pause(500);\n $browser->assertValue('#contact-email', '[email protected]');\n $browser->keys('#contact-phone', '1');\n $browser->pause(500);\n $browser->assertValue('#contact-phone', '1');\n $browser->keys('#contact-content', 'Hi There');\n $browser->pause(500);\n $browser->assertValue('#contact-content', 'Hi There');\n $browser->keys('#contact-phone', ['{backspace}'], '0416842836');\n $browser->assertVisible('#contact-submit-btn');\n $browser->click('#contact-submit-btn');\n $browser->waitForText('Your query has been received!');\n\n $browser->assertVisible('#newsletter-email');\n $browser->keys('#newsletter-email', $email);\n $browser->pause(500);\n $browser->assertValue('#newsletter-email', $email);\n $browser->assertVisible('#newsletter-submit-btn');\n $browser->click('#newsletter-submit-btn');\n $browser->waitForText('Your email is on our list now!');\n\n $browser->assertVisible('#newsletter-email');\n $browser->keys('#newsletter-email', $email);\n $browser->pause(500);\n $browser->assertValue('#newsletter-email', $email);\n $browser->assertVisible('#newsletter-submit-btn');\n $browser->click('#newsletter-submit-btn');\n $browser->waitForText('Your email is already on our list!');\n }", "public function testRegisterPageDisplay()\n {\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->assertDontSee('Contacts Manager');\n });\n }", "public function testLoadLandingPage()\n {\n $this->visit('/')\n ->see('<div class=\"title\">Risk and Control</div>');\n }", "public function shouldBeDisplayed()\n {\n return Auth::user()->can('browse', Actadmin::model('Page'));\n }", "public function testHomePageAvailability()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function assert(Browser $browser)\n {\n //\n }", "public function assert(Browser $browser)\n {\n //\n }", "public function assert(Browser $browser)\n {\n //\n }", "public function test_search_page_is_loading(){\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->clickLink(\"Search Items\")\n ->assertPathIs('/item-search');\n });\n }", "public function testLoginPage()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->assertSee('Login');\n });\n }", "public function test_guestPage()\n\t{\n\t\t$output = $this->request('GET', ['UserController','guestPage']);\n\t\t$this->assertContains('<h3 class=\"text-center text-dark\"><i>Gost</i></h3>', $output);\t\n\t}", "public function testAccessToDomain()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('https://google.com')\n ->assertSee('Google');\n });\n }", "public function verify_browser()\n {\n $this->_ci->load->library('user_agent');\n\n $min_browser = config_item('bitheme_min_browser');\n $current_browser = $this->_ci->agent->browser();\n $current_version = explode('.', $this->_ci->agent->version());\n\n if ( isset($min_browser[$current_browser]) and !IS_CLI )\n {\n if ( $current_version[0] <= $min_browser[$current_browser] )\n {\n $firefox = anchor('http://www.mozilla.org/id/', 'Mozilla Firefox', 'target=\"_blank\"');\n $chrome = anchor('https://www.google.com/intl/id/chrome/browser/', 'Google Chrome', 'target=\"_blank\"');\n\n log_message('error', lang(\"error_browser_jadul\"));\n show_error(array(\n 'Peramban yang anda gunakan tidak memenuhi syarat minimal penggunaan aplikasi ini.',\n 'Silahkan gunakan '.$firefox.' atau '.$chrome.' biar lebih GREGET!'), 500, 'error_browser_jadul');\n }\n }\n }", "public function testAboutPageLoad()\n {\n $this->visit('/about')\n ->see('Vihaara - Travel planner');\n }", "public function assert(Browser $browser)\n {\n parent::assert($browser);\n $date_str = ($this->dateParam ? $this->dateParam : Carbon::now())->format('d-m-Y');\n $browser->assertSee('Transacties voor '.$date_str);\n }", "public function test_a_guest_can_browse_home()\n {\n $this->get('/')->assertStatus(200);\n }", "public function testDisplayedTest() {\n\n $this->open('?r=site/page&view=test');\n $this->assertEquals('My Web Application - Test', $this->title());\n\n $elements = $this->elements($this->using('css selector')->value('#yw0 > li'));\n error_log(__METHOD__ . ' . count($var): ' . count($elements));\n foreach ($elements as $element) {\n $text = $element->byCssSelector('#yw0 > li > a')->text();\n error_log(__METHOD__ . ' . $text: ' . $text);\n\n if ($text === 'Test') {\n $element->click();\n $breadcrumbsTest = $this->byCssSelector('#page > div.breadcrumbs > span');\n $bool = $breadcrumbsTest->displayed();\n $this->assertEquals(True, $bool);\n $this->assertEquals('Test', $this->byCssSelector('#page > div.breadcrumbs > span')->text());\n break;\n }\n }\n sleep(1);\n }", "public function testHomePageIsWorking() {\n $this->client->request('GET', '/');\n\n Assert::true($this->client->getResponse()->isOk());\n }", "public function test_builder_page_displaying()\n {\n $response = $this->actingAs($this->user)->get('/admin/builder');\n\n $response->assertStatus(200);\n }", "public function testDisplayedAbout() {\n\n $this->open('?r=site/page&view=about');\n $this->assertEquals('My Web Application - About', $this->title());\n\n $elements = $this->elements($this->using('css selector')->value('#yw0 > li'));\n error_log(__METHOD__ . ' . count($var): ' . count($elements));\n foreach ($elements as $element) {\n $text = $element->byCssSelector('#yw0 > li > a')->text();\n error_log(__METHOD__ . ' . $text: ' . $text);\n\n if ($text === 'About') {\n $element->click();\n $breadcrumbsAbout = $this->byCssSelector('#page > div.breadcrumbs > span');\n $bool = $breadcrumbsAbout->displayed();\n $this->assertEquals(True, $bool);\n $this->assertEquals('About', $this->byCssSelector('#page > div.breadcrumbs > span')->text());\n break;\n }\n }\n sleep(1);\n }", "public function testShowDetailHotelInPageShowPlace()\n { \n $this->makePlace(7);\n $place = Place::find(1);\n $this->makeHotelOfPlace($place->id);\n $this->browse(function (Browser $browser) use ($place) {\n $selector = '.container .row div:nth-child(2) .room-thumb .mask .content';\n $hotel = Hotel::find(1);\n $browser->visit('/places/'.$place->slug)\n ->assertSee($place->name)\n ->mouseover($selector)\n ->whenAvailable($selector, function ($selectorAvailable) {\n $selectorAvailable->click('.btn');\n })\n ->assertPathIs('/hotels/'.$hotel->slug);\n \n });\n }", "public function testTaskVisibleOnPage(): void\n {\n $this->client->request('GET', '/');\n self::assertResponseIsSuccessful();\n self::assertSelectorTextContains('.widget-heading', 'Test Task');\n self::assertSelectorTextContains('.widget-subheading', 'Mike');\n }", "public function testDisplayedHome() {\n\n $this->open('?r=site/index');\n $this->assertEquals('My Web Application', $this->title());\n\n $elements = $this->elements($this->using('css selector')->value('#yw0 > li'));\n error_log(__METHOD__ . ' . count($var): ' . count($elements));\n foreach ($elements as $element) {\n $text = $element->byCssSelector('#yw0 > li > a')->text();\n error_log(__METHOD__ . ' . $text: ' . $text);\n\n if ($text === 'Home') {\n $element->click();\n $titlePage = $this->byCssSelector('#content > h1 > i');\n $bool = $titlePage->displayed();\n $this->assertEquals(True, $bool);\n $this->assertEquals('My Web Application', $this->byCssSelector('#content > h1 > i')->text());\n $this->assertEquals('Congratulations! You have successfully created your Yii application.', $this->byCssSelector('#content > p')->text());\n break;\n }\n }\n sleep(1);\n }", "function testCanViewAccountPage() {\n\t\t$this->get('account/');\n\t\t$this->assertPartialMatchBySelector('p.message', array(\n\t\t\t\"You'll need to login before you can access the account page. If you are not registered, you won't be able to access it until you make your first order, otherwise please enter your details below.\", ));\n\n\t\t/* But if we're logged on you can see */\n\t\t$this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'member'));\n\t\t$this->get('account/');\n\t\t$this->assertPartialMatchBySelector('#PastOrders h3', array('Your Order History'));\n\t}", "public function testExample()\n {\n $this->visit(\"http://localhost/laravel/cdp/public/project/1/visitor\");\n $this->seePageIs('http://localhost/laravel/cdp/public/project/1/visitor');\n }", "public function testUrl()\n {\n $this->visit('/')\n ->seePageIs('/login');\n }", "public function assert(Browser $browser)\n {\n $browser->assertSeeText(__('admin.expand'))\n ->assertSeeText(__('admin.collapse'))\n ->assertSeeText(__('admin.save'))\n ->assertSeeText(__('admin.new'))\n ->whenAvailable('@tree', function (Browser $browser) {\n $browser->assertSeeText('Menu')\n ->assertSeeText('Index')\n ->assertSeeText('Admin')\n ->assertSeeText('Users')\n ->assertSeeText('Roles')\n ->assertSeeText('Permission')\n ->assertSeeText('Menu');\n }, 1)\n ->within('@form', function (Browser $browser) {\n $browser->assertSeeText(__('admin.parent_id'))\n ->assertSeeText(__('admin.title'))\n ->assertSeeText(__('admin.icon'))\n ->assertSeeText(__('admin.uri'))\n ->assertSeeText(__('admin.roles'))\n ->assertSeeText(__('admin.permission'))\n ->assertSeeText(__('admin.selectall'))\n ->assertSeeText(__('admin.expand'))\n //->assertSelected('parent_id', 0)\n ->hasInput('title')\n ->hasInput('icon')\n ->hasInput('uri')\n ->assertButtonEnabled(__('admin.submit'))\n ->assertButtonEnabled(__('admin.reset'));\n });\n }", "public function testRestrictPage()\n {\n $this->assertTrue(true);\n }", "public function user_can_visit_events_page()\n {\n $response = $this->get('/events');\n echo $response->content();\n $response->assertStatus(200);\n $response->assertSeeText('Events');\n }", "public function assert(Browser $browser)\n {\n $browser\n ->assertTitle('Я в Барнауле - Мои бронирования')\n ->assertSee('Мои бронирования')\n ->assertPathIs($this->url());\n }", "public function testHomePageShowsMadComics()\n {\n $this->visit('/')\n ->see('Mad Comics');\n }", "public function testStatsNavigationLinksIsPresent()\n {\n $user = User::find(User::JANITOR_USER_ID);\n\n $this->browse(function ($browser) use ($user) {\n $browser->loginAs($user)\n ->visit(new HomePage)\n ->click('@nav-cog')\n ->assertSee('Stats');\n });\n }", "public function test_user_can_see_login_link()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSeeLink('LOGIN');\n });\n }", "function testNavigationWorkingProperly() {\n\t\t$this->get('http://www.ug.it.usyd.edu.au/~dbro8182/lnm/');\n\t\t$this->setField('username', 'admin');\n\t\t$this->setField('passwd', 'admin');\n\t\t$this->click('Submit');\n\t\t$this->click('Conflicts');\n\t\t$this->click('Home');\n\t\t$this->assertTitle('Administration :: Local Network Monitor');\n\t\t$this->click('Conflicts');\n\t\t$this->click('Registered Devices');\n\t\t$this->assertTitle('Registered Devices :: Local Network Monitor');\n\t\t$this->click('Conflicts');\n\t\t$this->click('Map');\n\t\t$this->assertText('Select a map to view');\n\t\t$this->click('Conflicts');\n\t\t$this->click('Unregistered Devices');\n\t\t$this->assertTitle('Unregistered Devices :: Local Network Monitor');\n\t}", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "public function iCanSeeEventsForTheGroup()\n {\n $main = $this->getMainContext();\n /** @var \\Behat\\MinkExtension\\Context\\MinkContext $mink */\n $mink = $main->getSubcontext('mink');\n\n // Verify the existance of some things on the page that\n $mink->assertElementOnPage('#upcomingTab');\n $mink->assertElementOnPage('#pastTab');\n }", "public function testClubInHomepage()\n {\n \t$club = Club::where('name','=','EscBasket')->first();\n $this->visit('/')\n ->see($club->name);\n }", "public function testHomePage()\n\t{\n\t\t$crawler = $this->client->request('GET', '/');\n\n\t\t$this->assertTrue($this->client->getResponse()->isOk());\n\t}", "public function testHomePageAndChangeColorPage()\n {\n $client = $this->makeClient();\n $client->request('GET', '/');\n $this->assertStatusCode(200, $client);\n }", "public function checkPage()\r\n {\r\n WEB::startBrowser(MTMEnv::$msc1_ip, MTMEnv::$product_name_of_msc1);\r\n //Login to the device's home.asp page\r\n WEB::login();\r\n $selenium_driver=WEB::getSelenium();\r\n Logger::toAll(MTMEnv::$msc1_ip.\"/stat/l3_overview.asp\");\r\n $selenium_driver->open(\"stat/l3_overview.asp\");\r\n sleep(10);\r\n \r\n $return_code=TRUE;\r\n $return_code=$selenium_driver->isTextPresent($this->scenario->GetDevice('AP1')->GetInterface('eth0')->GetMAC()); \r\n //$return_code=$selenium_driver->isTextPresent(\"Data\"); \r\n WEB::logout();\r\n WEB::closeBrowser(TRUE);\r\n return $return_code;\r\n }", "public function test_user_is_able_to_login()\n {\n \n $this->browse(function (Browser $browser) {\n $user = factory (User::class)->create();\n $browser->visit(new LoginPage)\n ->loginAsUser($user)\n ->assertSee(\"Welcome {$user->name}\");\n });\n }", "public function testSeeLoginPage()\n {\n $response = $this->get('/login');\n $response->assertSee('LOGIN');\n $response->assertStatus(200);\n }", "public function testHistoryPageDisplayed()\n {\n $user = factory(User::class)->make();\n\n $response = $this->actingAs($user)->get('/history');\n $response->assertStatus(200);\n\n $this->assertAuthenticatedAs($user);\n }", "public function testGetPage()\n {\n $response = $this->get('/form');\n $response->assertStatus(200);\n }", "public function testCapabilities()\n {\n\n $this->assertContains(\n url()->getBaseUri() . 'auth/login',\n route('showLoginForm')\n );\n\n # - You will get an error if the file 'welcome.volt not found',\n # the only solution to know if this works is to know the instance\n\n $this->assertInstanceOf(View::class, view('welcome'));\n }", "public function testHasPage() {\n $this->assertEquals(1, $this->users->page());\n }", "public function testShowUnderConstruction()\n {\n $response = $this->amGoingToHome();\n\n $response->assertSee('Under construction');\n }", "function test()\n\t{\n\t\t$this->open('tickets/index.php/ticket653');\n\t\t$this->verifyTitle(\"Verifying Ticket 653\", \"\");\n\n\t\t$this->assertText('textspan', 'This is the page for Ticket653');\n\t}", "public function testClientsPageAsVisitor() {\n\n $this->visit('/clients')\n ->seePageIs('/login');\n\n }", "public function assert(Browser $browser)\n {\n $browser->assertPathIs($this->url())\n ->assertSee(trans('user.admin.add.title'))\n ->assertSee(trans('user.admin.add.name'))\n ->assertSee(trans('user.admin.add.email'))\n ->assertSee(trans('user.admin.add.password'))\n ->assertSee(trans('user.admin.add.phone'))\n ->assertSee(trans('user.admin.add.address'))\n ->assertSee(trans('user.admin.add.submit'));\n }", "public function test_home_page()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function user_can_visit_contact_page()\n {\n $response = $this->get('/contact');\n $response->assertStatus(200);\n $response->assertSeeText('Contact');\n }", "public function test_home_page()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testInitialPage() {\n $this->session->visit($this->baseUrl);\n $page = $this->session->getPage();\n\n $this->assertInstanceOf(\n NodeElement::Class,\n $page->find('css', 'p'),\n 'Should have a p tag in this page'\n );\n $this->assertEquals('Ikke logget inn', $page->find('css', 'p')->getText(),\n 'Wrong text in paragraph');\n }", "public function testDashboardRequiresLogin()\n {\n $response = $this->get('/home');\n\n // confirm going to login page\n $response->assertSee('ogin');\n\n }", "public function testPageFound()\n {\n $client = static::createClient();\n $client->request('GET', getenv(\"TEST_BASE_URL\"));\n $this->assertResponseIsSuccessful();\n }", "public function shouldBeDisplayed()\n {\n return Auth::user()->can('browse', app(Property::class));\n }", "public function AnomalyPageTest()\n {\n // Test user login\n $user = $this->testAccounts[\"anthro-analyst\"];\n $this->browse(function ($browser) use ($user) {\n $browser->visit(new loginPage)\n ->loginUser($user['email'], $user['password'])\n ->pause(3000)\n ->assertSee('Welcome');\n\n $browser->visit(new specimenPage)\n ->pause(5000)\n ->maximize()\n ->pause(2000)\n\n ->click('@leftSideBar-menu')\n ->pause(2000)\n ->click('@project-report-button')\n ->driver->switchTo()->window(collect($browser->driver->getWindowHandles())->last());\n $browser\n ->pause(3000)\n\n ->click('@anomaly_as')\n ->pause(10000)\n ->assertSee('Accession Number')\n ->assertSee('Bone')\n ->assertSee('Provenance 1')\n ->assertSee('Provenance 2')\n ->assertSee('Side')\n ->assertSee('Anomaly')\n\n ->pause(3000)\n\n\n ->logoutUser();\n });\n }", "protected function _isBrowserFailed()\n {\n try {\n $browser = Factory::getClientBrowser();\n //If browser was terminated every browser method call will throw specific exception\n $browser->getUrl();\n } catch (\\PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) {\n return true;\n }\n return false;\n }", "public function testInicio()\n {\n $this->visit('/')\n ->see('Bienvenido');\n $this->visit('/')\n ->click('Ingresar')\n ->seePageIs('/login');\n $this->visit('/')\n ->click('Registrarse')\n ->seePageIs('/register');\n $this->visit('/')\n ->click('Personas involucradas')\n ->seePageIs('/acercaDe');\n $this->visit('/')\n ->click('SAIRCO')\n ->seePageIs('/');\n }", "public static function isPage();", "public function test_show_homepage()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function test_home()\n {\n $user=$this->user;\n $this->actingAs($user);\n $response = $this->get('/');\n\n $response->assertSee('Dashboard');\n $response->assertStatus(200);\n }", "protected function checkDashboard()\n {\n if (LOCATION == 'Live') {\n $this->markTestSkipped('Cannot run in Live environment');\n return;\n }\n $this->dashboardPage->isLoaded()\n ->checkPageTitle('overview')\n ->setDefaultTimeoutForFinds($this->upperTimeoutForFinds)\n ->verifyElecGraphPartial()\n ->verifyGasGraphPartial()\n ->setDefaultTimeoutForFinds($this->defaultTimeoutForFinds)\n ->checkMeterReadPartialHeading()\n ->checkLatestBillPartialHeading()\n ->checkMyTariffPartialHeading()\n ->checkAccountId()\n ->checkMobilePromoBox()\n ->navigateToElecUsageGraph()\n ->open()\n ->navigateToGasUsageGraph()\n ->open()\n ->navigateToViewPreviousReads()\n ->open()\n ->navigateToSubmitReading()\n ->open()\n ->navigateToViewBills()\n ->open()\n ->navigateToManualPayment()\n ->open()\n ->navigateToFullTariffInfo()\n ->open()\n ->navigateToContactUsViaSideButton();\n\n }", "public function testRegistrarmeSinDatos(){\n $this->browse(function ($browser) {\n $browser->visit('/registrar')\n ->press('Registrarme')\n ->assertPathIs('/registrar'); \n }); \n }", "public function aboutPageTest()\n {\n $response = $this->get('/about');\n\n $response->assertStatus(200);\n }", "public function shouldBeDisplayed()\n {\n return true;\n }", "public function shouldBeDisplayed()\n {\n return true;\n }", "public function testExample()\n {\n $this->browse(function ($browser) {\n $browser->on(new LoginPage)\n ->loginUser()\n ->visit('/talk/talk')\n ->waitFor('.is-login')\n ->assertSee('TALKに話題を投稿しましょう!');\n });\n }", "public function test_client_page_auth_check()\n {\n $response = $this->get(route('client.index'))->assertStatus(302);\n }", "public function test_userHomePage()\n\t{\n\t\t$output = $this->request('GET', ['UserController','userHomePage']);\n\t\t$this->assertContains('<h3 class=\"text-center text-dark\"><i>Običan Korisnik</i></h3>', $output);\n\t}", "public function testSeeHomepageTest()\n {\n $response = $this->actingAs(\\App\\User::firstOrFail())->get('/home');\n\n $response->assertStatus(200);\n $response->assertSeeText(config('app.name'));\n }", "public function testApplicationIsRunning()\n\t{\n\t\t$crawler = $this->client->request('GET', '/');\n\t\t$this->assertTrue($this->client->getResponse()->isOk());\n\t}", "public function testWebpage(): void\n {\n $this->wd->get('file:///' . __DIR__ . '/webpage.html');\n $this->assertSame('Page header', $this->findByCss('h1')->getText());\n\n // Save some dummy data to the Legacy\n $legacy = new Legacy($this);\n $legacy->saveWithName(['fooBarData'], 'dummy-data');\n }", "protected function assertPreConditions()\n {\n $this->navigate('manage_stores');\n }", "public function testShowPlace()\n { \n Cache::flush();\n $this->makePlace(7);\n $this->browse(function (Browser $browser) {\n $selector = '#top-3-places .container .row div:nth-child(2) .room-thumb .mask .content';\n $text = $browser->visit('/')->text('#top-3-places .container .row div:nth-child(2) .room-thumb .mask .main div:nth-child(1) a');\n $placeName = explode(' |', $text);\n $place = Place::where('name', $placeName[0])->first();\n $browser->resize(1920, 2000)\n ->visit('/')\n ->assertTitle('Home page')\n ->assertSee('Outstanding Places')\n ->mouseover($selector)\n ->whenAvailable($selector, function ($selectorAvailable) {\n $selectorAvailable->click('.btn');\n })\n ->assertSee($place->name)\n ->assertPathIs('/places/'.$place->slug);\n });\n }", "function is_browser(){\n\n\t\treturn (new user_agent)->is_browser();\n\n\t}", "public function testHomeLogin()\n {\n\n\n $this->browse(function ($browser) {\n\n\n $browser->visit('/login')\n ->type('email', '[email protected]')\n ->type('password', '1qwertyu')\n ->press('Entrar')\n ->assertPathIs('/home')\n ->click('.abv-logout-menu-wrapper')\n ->clickLink('Sair');\n \n });\n\n\n\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/user/profile')\n ->assertSee('Profile');\n \n });\n }", "public function checkSuccessfulPageOpening() :void\n {\n $this->successLogIn();\n\n $division = Division::where($this->department_data)->first();\n $response = $this->get(route('crud.department.edit', ['id' => $division->id]));\n\n $response->assertOk();\n $response->assertViewIs(\"crud::edit\");\n }", "public function assertElementOnPage($locator)\n {\n $element = $this->getSession()->getPage();\n $nodes = $element->find('css', $locator);\n\n if (null === $nodes) {\n throw new \\InvalidArgumentException(sprintf('Could not evaluate CSS selector: \"%s\"', $locator));\n }\n\n if ($nodes->isVisible()) {\n return;\n } else {\n throw new \\Exception(\"The element \\\"$locator\\\" is not visible.\");\n }\n }", "public function test_if_products_page_exist()\n {\n $response = $this->get('/product');\n $response->assertStatus(200);\n }", "public function testGuestNotAccessHomePage()\n\t{\n\t\t$this->open('/');\n\t\t$this->assertTextNotPresent('Home');\n\t}", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Login to Airtel Sales Force System');\n });\n }", "public function loginCheck()\n {\n $this->getHelperAssert()->assertTextPresent('Dashboard');\n }", "public function loginCheck()\n {\n $this->getHelperAssert()->assertTextPresent('Dashboard');\n }" ]
[ "0.7119363", "0.708095", "0.69689494", "0.65386957", "0.64763045", "0.6349853", "0.6328191", "0.6328191", "0.6328191", "0.6328191", "0.6328191", "0.6321913", "0.62856877", "0.62815684", "0.6269359", "0.6199372", "0.61859334", "0.6183665", "0.6183665", "0.6183665", "0.61622745", "0.6161872", "0.61444086", "0.60623366", "0.60525805", "0.6040552", "0.6008327", "0.60027796", "0.5981644", "0.5981073", "0.597576", "0.5964224", "0.59628755", "0.59543115", "0.59538287", "0.5951773", "0.59454215", "0.5937434", "0.5936187", "0.59086734", "0.5868008", "0.5849149", "0.58432406", "0.58311236", "0.5825899", "0.58201194", "0.582004", "0.5806006", "0.57929057", "0.5792831", "0.5791168", "0.5789767", "0.5787895", "0.57784104", "0.5775893", "0.57605463", "0.57559335", "0.57490635", "0.5746197", "0.57442236", "0.57400024", "0.57335305", "0.5729359", "0.5727951", "0.57078093", "0.56976235", "0.5695793", "0.5680085", "0.56638104", "0.5659884", "0.5650825", "0.56499165", "0.56489736", "0.56355757", "0.56349766", "0.56345046", "0.5630794", "0.5628257", "0.56281084", "0.56281084", "0.5627092", "0.5626811", "0.5621946", "0.56181383", "0.56053025", "0.55965024", "0.5574926", "0.555631", "0.5554815", "0.5534482", "0.5533624", "0.5521315", "0.55158836", "0.5513365", "0.55068874", "0.5502083", "0.55019724", "0.55019724" ]
0.6689033
4
Get the element shortcuts for the page.
public function elements() { return parent::elements(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShortcuts();", "public static function getShortcuts() {\n if (empty(self::$shortcuts)) {\n $shorts = file(\"helper/shortcuts.txt\");\n\n foreach ($shorts as $i => $line) {\n $line_arr = explode(\"/\", $line);\n self::$shortcuts[$line_arr[0]] = $line_arr[1];\n }\n }\n\n return self::$shortcuts;\n }", "public static function __shortcuts()\n {\n $shortcuts = array('user', 'pdc', 'game');\n return array_merge(parent::$shortcuts, $shortcuts);\n }", "public static function __shortcuts()\n {\n $shortcuts = array('form' => array('form', array('manage_fightus')), 'email' => 'MyMailer');\n return array_merge(parent::$shortcuts, $shortcuts);\n }", "protected function getGroupsFromShortcuts() {}", "private function get_customizer_shortcuts() {\n\t\treturn [\n\t\t\t[\n\t\t\t\t'text' => __( 'Upload Logo', 'neve' ),\n\t\t\t\t'link' => add_query_arg( [ 'autofocus[control]' => 'custom_logo' ], admin_url( 'customize.php' ) ),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'text' => __( 'Set Colors', 'neve' ),\n\t\t\t\t'link' => add_query_arg( [ 'autofocus[section]' => 'neve_colors_background_section' ], admin_url( 'customize.php' ) ),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'text' => __( 'Customize Fonts', 'neve' ),\n\t\t\t\t'link' => add_query_arg( [ 'autofocus[control]' => 'neve_headings_font_family' ], admin_url( 'customize.php' ) ),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'text' => __( 'Layout Options', 'neve' ),\n\t\t\t\t'link' => add_query_arg( [ 'autofocus[panel]' => 'neve_layout' ], admin_url( 'customize.php' ) ),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'text' => __( 'Header Options', 'neve' ),\n\t\t\t\t'link' => add_query_arg( [ 'autofocus[panel]' => 'hfg_header' ], admin_url( 'customize.php' ) ),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'text' => __( 'Blog Layouts', 'neve' ),\n\t\t\t\t'link' => add_query_arg( [ 'autofocus[section]' => 'neve_blog_archive_layout' ], admin_url( 'customize.php' ) ),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'text' => __( 'Footer Options', 'neve' ),\n\t\t\t\t'link' => add_query_arg( [ 'autofocus[panel]' => 'hfg_footer' ], admin_url( 'customize.php' ) ),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'text' => __( 'Content / Sidebar', 'neve' ),\n\t\t\t\t'link' => add_query_arg( [ 'autofocus[section]' => 'neve_sidebar' ], admin_url( 'customize.php' ) ),\n\t\t\t],\n\t\t];\n\t}", "protected function getGlobalShortcutGroups() {}", "public function elements()\n {\n return [\n '@login' => '#login > p.control.is-clearfix > button',\n '@bookNowHeader' => '#app > div.header.nav.is-inverted > div > div.nav-right > span > a:nth-child(3)',\n '@forgotPassword' => '#login > p.control.is-clearfix > a',\n '@signUpButton' => '#app > div > section > div > div > footer > div > a',\n '@logoHeader' => '#app > div.header.nav.is-inverted > div > div.nav-left > a > div > svg',\n '@logout' => '#app > div.main-container > div.nav-bar > nav > a.admin-nav-link.logout > div'\n ];\n }", "public function elements()\n {\n return [\n '@newBorrowingButton' => '#new-borrowing-button',\n '@endBorrowingButton' => '#end-borrowing-button',\n '@borrowingsHistoryButton' => '#borrowings-history-button',\n '@viewInventoryButton' => '#view-inventory-button',\n '@editInventoryButton' => '#edit-inventory-button',\n '@editUsersButton' => '#edit-users-button',\n '@githubLink' => '#github-link',\n '@englishLink' => '#english-link',\n '@frenchLink' => '#french-link',\n '@lightThemeLink' => '#light-theme-link',\n '@darkThemeLink' => '#dark-theme-link',\n '@accountButton' => '#account-link'\n ];\n }", "protected function getShortcutButton() {}", "function get_shortcut_link()\n {\n }", "protected function getButtons()\n {\n $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();\n // Shortcut\n $shortcutButton = $buttonBar->makeShortcutButton()\n ->setModuleName($this->MCONF['name'])\n ->setGetVariables(array('id', 'M'));\n $buttonBar->addButton($shortcutButton);\n }", "public function get_jumps() {\n global $DB;\n $jumps = array();\n $params = array (\"lessonid\" => $this->lesson->id, \"pageid\" => $this->properties->id);\n if ($answers = $this->get_answers()) {\n foreach ($answers as $answer) {\n $jumps[] = $this->get_jump_name($answer->jumpto);\n }\n } else {\n $jumps[] = $this->get_jump_name($this->properties->nextpageid);\n }\n return $jumps;\n }", "public static function siteElements()\n {\n return [\n '@timeout' => 'input[type=number]#timeout',\n '@timeout-help' => 'p.help.is-danger#timeout-help',\n '@testitem-submit' => 'button#btn-submit',\n ];\n }", "public static function pageHelpKey(){\n\t\t$page = self::definePage();\n\n\t\t//adding the distinct fieldnames to the return array\n\t\tif($page == \"home\"){\n\t\t\t$a = array();\n\t\t} elseif($page == \"exmng\"){\n\t\t\t$a = array(\"selectMerchant\",);\n\t\t} elseif($page == \"tax\"){\n\t\t\t$a = array();\n\t\t} elseif($page == \"cpnl\"){\n\t\t\t$a = array();\n\t\t} elseif($page == \"tst\"){\n\t\t\t$a = array();\n\t\t} elseif($page == \"dtbs\"){\n\t\t\t$a = array();\n\t\t} elseif($page == \"ovrde\"){\n\t\t\t$a = array();\n\t\t} else {\n\t\t\t$a = array();\n\t\t}\n\n\t\treturn $a;\n\t}", "public function elements()\n {\n return [\n '@showPet1' => 'div:nth-child(1) > a', \n ];\n }", "protected function initShortcuts() {}", "public function elements()\n {\n return [\n '@save-setting' => '#setting-manage .btn-success',\n '@app-name-field' => '#setting-manage input[name=setting[app_name]]',\n '@add-setting-key' => '#add-setting-form input[name=name]',\n '@add-setting-value' => '#add-setting-form input[name=value]',\n '@add-setting-submit' => '#add-setting-form .btn-success'\n ];\n }", "public function elements()\n {\n return [\n //'@element' => '#selector',\n ];\n }", "public function getHelpLinks(){\n return $this->pluginDefinition['help_links'];\n }", "public function elements()\n {\n return [\n '@new_record' => 'a[id=\"new_record\"]',\n '@title' => 'input[id=\"title\"]',\n '@description' => 'input[id=\"description\"]',\n '@map' => 'input[id=\"map\"]',\n '@create' => 'button[id=\"create\"]',\n\n ];\n }", "public function getLinks()\n {\n // Define an empty array to hold the list of admin links\n $links = array();\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'modifyconfig'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config');\n }\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'view'),\n 'text' => $this->__('Tag List'),\n 'class' => 'z-icon-es-view');\n }\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'edit'),\n 'text' => $this->__('New tag'),\n 'class' => 'z-icon-es-new');\n }\n\n return $links;\n }", "public function getAliases()\n {\n $aliases = array();\n // find aliases without specified language\n $target = '[[' . self::PLACEHOLDER_PREFIX . $this->getNode()->getId() . ']]';\n $crit1 = array(\n 'type' => self::TYPE_ALIAS,\n 'target' => $target,\n );\n \n // find aliases with language specified\n $target = '[[' . self::PLACEHOLDER_PREFIX . $this->getNode()->getId() . '_' . $this->getLang() . ']]';\n $crit2 = array(\n 'type' => self::TYPE_ALIAS,\n 'target' => $target,\n );\n \n $pageRepo = \\Env::get('em')->getRepository(\"Cx\\Core\\ContentManager\\Model\\Entity\\Page\");\n \n // merge both resultsets\n $aliases = array_merge(\n $pageRepo->findBy($crit1, true),\n $pageRepo->findBy($crit2, true)\n );\n return $aliases;\n }", "function getAllAddOnTools(){\n\t $url = urlize();\n\t $url = substr($url,0,strpos($url,'index.php'));\n\t $url .= 'jukebox/jukeboxes/junctionbox/?id=';\n\t return ' - <a href=\"'.htmlentities($url).'\" target=\"_BLANK\"> [Click to open]</a>';\n\t}", "private function _getActiveElements()\n {\n $elements = array();\n $segments = craft()->request->getSegments();\n\n // Add homepage\n $element = craft()->elements->getElementByUri('__home__');\n if ($element) {\n $elements[] = $element;\n }\n\n // Find other elements\n if (count($segments)) {\n $count = 0; // Start at second\n $segmentString = $segments[0]; // Add first\n while ($count < count($segments)) {\n // Get element\n $element = craft()->elements->getElementByUri($segmentString);\n\n // Add element to active elements\n if ($element) {\n $elements[] = $element;\n }\n\n // Search for next possible element\n $count ++;\n if (isset($segments[$count])) {\n $segmentString .= '/' . $segments[$count];\n }\n }\n }\n return $elements;\n }", "protected function initShortcutGroups() {}", "function getPreferenceLinks()\n {\n }", "public function elements()\n {\n return [\n '@element' => '#selector',\n ];\n }", "public function elements()\n {\n return [\n '@element' => '#selector',\n ];\n }", "public function elements()\n {\n return [\n '@element' => '#selector',\n ];\n }", "public function elements()\n {\n return [\n '@element' => '#selector',\n ];\n }", "static public function getKeywords() {\n\t\treturn self::$page_keywords;\n\t}", "public function elements()\n {\n return [\n '@modal-open' => '#review-modal-button',\n '@send-review' => '#review-submit',\n '@comment' => 'textarea[name=\"content\"]',\n \"@rate\" => '.rate-input-stars > .fa-star:first-of-type'\n ];\n }", "protected function navigations(): iterable\n {\n return [\n Menu::make('Basic Elements')\n ->route('platform.example.fields'),\n\n Menu::make('Advanced Elements')\n ->route('platform.example.advanced'),\n\n Menu::make('Text Editors')\n ->route('platform.example.editors'),\n\n Menu::make('Run Actions')\n ->route('platform.example.actions'),\n ];\n }", "public function getExtensionKeys() {}", "public function elements()\n {\n return [\n '@returnButton' => '#return-button',\n '@lostButton' => '#lost-button',\n '@borrowingsEndingModal' => '#borrowings-ending-modal',\n '@borrowingsEndingConfirmationButton' => '#borrowings-ending-confirmation-button'\n ];\n }", "public function getlinks()\n {\n $links = array();\n\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_READ)) {\n $links[] = array('url' => ModUtil::url($this->name, 'user', 'hooks'),\n 'text' => $this->__('Frontend'),\n 'title' => $this->__('Switch to user area.'),\n 'class' => 'z-icon-es-home');\n }\n if (SecurityUtil::checkPermission($this->name . ':Twitterparm:', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'view', array('ot' => 'twitterparm')),\n 'text' => $this->__('Twitterparms'),\n 'title' => $this->__('Twitterparm list'));\n }\n\n return $links;\n }", "public function alias()\n\t{\n\t\treturn array(\n\t\t\t'action_admin_theme_get_menus' => 'action_admin_theme_post_menus',\n\t\t\t'action_admin_theme_get_menu_iframe' => 'action_admin_theme_post_menu_iframe',\n\t\t);\n\t}", "private static function StructureList ()\n {\n return array (\n \"a\" => \"<a ###>$$$</a>\",\n \"button\" => \"<button ###>$$$</button>\"\n );\n }", "public function getElementIndexes()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('elementIndexes');\n }", "public function renderAdminShortcuts() {\n\t\n\t\t$user = $this->wire('user');\n\t\t$config = $this->wire('config');\n\t\t\n\t\tif($user->isGuest() || !$user->hasPermission('page-edit')) return '';\n\t\n\t\t$language = $user->language && $user->language->id && !$user->language->isDefault() ? $user->language : null;\n\t\t$url = $config->urls->admin . 'page/add/';\n\t\t$out = '';\n\t\n\t\tforeach(wire('templates') as $template) {\n\t\t\t$parent = $template->getParentPage(true); \n\t\t\tif(!$parent) continue; \n\t\t\tif($parent->id) {\n\t\t\t\t// one parent possible\t\n\t\t\t\t$qs = \"?parent_id=$parent->id\";\n\t\t\t} else {\n\t\t\t\t// multiple parents possible\n\t\t\t\t$qs = \"?template_id=$template->id\";\n\t\t\t}\n\t\t\t$label = $template->label;\n\t\t\tif($language) $label = $template->get(\"label$language\");\n\t\t\tif(empty($label)) $label = $template->name; \n\t\t\t$out .= \"<li><a href='$url$qs'>$label</a></li>\";\n\t\t}\n\t\n\t\tif(empty($out)) return '';\n\t\n\t\t$label = $this->_('Add New'); \n\t\n\t\t$out =\t\"<div id='head_button'>\" . \t\n\t\t\t\"<button class='ui-button dropdown-toggle'><i class='fa fa-angle-down'></i> $label</button>\" . \n\t\t\t\"<ul class='dropdown-menu shortcuts'>$out</ul>\" . \n\t\t\t\"</div>\";\n\t\n\t\treturn $out; \n\t}", "public function getGlazedElementsFolders();", "private function addons_pointer() {\n\t\treturn array(\n\t\t\t'content' => '<h3>' . __( 'Addons', 'formidable' ) . '</h3>'\n\t\t\t . '<p>' . sprintf( __( 'The powerful functions of %1$s can be extended with %2$spremium plugins%3$s. You can read all about the Formidable Premium Plugins %2$shere%3$s.', 'formidable' ), 'Formidable', '<a target=\"_blank\" href=\"' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/' ) ) . '\">', '</a>' )\n\t\t\t\t\t\t . '</p>'\n\t\t\t . '<p><strong>' . __( 'Like this plugin?', 'formidable' ) . '</strong><br/>' . sprintf( __( 'So, we&#8217;ve come to the end of the tour. If you like the plugin, please %1$srate it 5 stars on WordPress.org%2$s!', 'formidable' ), '<a target=\"_blank\" href=\"https://wordpress.org/plugins/formidable/\">', '</a>' ) . '</p>'\n\t\t\t . '<p>' . sprintf( __( 'Thank you for using our plugin and good luck with your forms!<br/><br/>Best,<br/>Team Formidable - %1$sformidableforms.com%2$s', 'formidable' ), '<a target=\"_blank\" href=\"' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/' ) ) . '\">', '</a>' ) . '</p>',\n\t\t\t'prev_page' => 'settings',\n\t\t);\n\t}", "static public function getRegisteredAliases () {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:171: characters 3-17\n\t\treturn Boot::$aliases;\n\t}", "public function getAliases();", "private function getPageLinkProperties(): array\n {\n return [\n 'postPage' => [\n 'group' => Plugin::LOCALIZATION_KEY . 'components.post_list_abstract.links_group',\n 'title' => 'rainlab.blog::lang.settings.posts_post',\n 'description' => 'rainlab.blog::lang.settings.posts_description',\n 'type' => 'dropdown',\n 'default' => 'blog/post',\n 'showExternalParam' => false,\n ],\n 'categoryPage' => [\n 'group' => Plugin::LOCALIZATION_KEY . 'components.post_list_abstract.links_group',\n 'title' => 'rainlab.blog::lang.settings.posts_category',\n 'description' => 'rainlab.blog::lang.settings.posts_category_description',\n 'type' => 'dropdown',\n 'default' => 'blog/category',\n 'showExternalParam' => false,\n ],\n ];\n }", "public function getAliases()\n {\n $this->parseDocBlock();\n return $this->aliases;\n }", "public function getUrlOptions()\n {\n $allPages = Page::sortBy('baseFileName')->lists('title', 'baseFileName');\n $pages = array(\n '' => 'No page link'\n );\n foreach ($allPages as $key => $value) {\n $pages[$key] = \"$key\";\n }\n return $pages;\n }", "function pluginShortcuts($links, $file) {\r\n\t\t\t\r\n\t\t\tif ( $file == TTB_BASENAME )\r\n\t\t\t{\r\n\t\t\t\t$links[] = '<a href=\"options-general.php?page=trackthebook.php\">' . __('Settings') . '</a>';\r\n\t\t\t}\r\n\r\n\t\t\treturn $links;\r\n\t\t}", "private static function EventList ()\n {\n return array (\n \"a\" => array (),\n \"button\" => array (\n \"onblur\", \"onclick\", \"ondblclick\",\n \"onfocus\", \"onmousedown\", \"onmousemove\",\n \"onmouseout\", \"onmouseover\", \"onmouseup\",\n \"onkeydown\", \"onkeypress\", \"onkeyup\",\n ),\n );\n }", "function &plgSearchKunenaAreas() {\n\tstatic $areas = array();\n\tif (empty($areas)) {\n\t\t$areas['kunena'] = JText::_('COM_KUNENA');\n\t}\n\treturn $areas;\n}", "function getAdminLinks()\n {\n }", "public function getShortcutImports(): array\n {\n return $this->config['modelShortcut']['imports'];\n }", "public function getRegisteredElementTypes() {}", "static function getKeys();", "public function get_help_tabs()\n {\n }", "function getHomeTagHitlist()\n {\n return $this->getTagHitlist();\n }", "function links() {\n return array(\n\n );\n }", "public function getLinks()\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 \t\t\t\t 'text' => $this->__(' Info'),\n \t\t\t\t 'class' => 'mediasharex-icon-laptop',\n\t\t\t\t\t\t\t 'links' => $this->getInfoLinks());\n }\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info_docs'),\n \t\t\t\t 'text' => $this->__(' Documentation'),\n \t\t\t\t 'class' => 'mediasharex-icon-cabinet');\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_general'),\n \t\t\t\t 'text' => $this->__(' Settings'),\n \t\t\t\t 'class' => 'mediasharex-icon-cogs',\n\t\t\t\t\t\t\t 'links' => $this->getSettingsLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager'),\n \t\t\t\t 'text' => $this->__(' Content manager'),\n \t\t\t\t 'class' => 'mediasharex-icon-folder',\n\t\t\t\t\t\t\t 'links' => $this->getManagerLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh'),\n \t\t\t\t 'text' => $this->__(' Sources & Handlers'),\n \t\t\t\t 'class' => 'mediasharex-icon-equalizer',\n\t\t\t\t\t\t\t 'links' => $this->getSandHLinks());\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'media_types'),\n \t\t\t\t 'text' => $this->__(' Media types'),\n \t\t\t\t 'class' => 'mediasharex-icon-star',\n\t\t\t\t\t\t\t 'links' => $this->getMediaTypesLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'),\n \t\t\t\t 'text' => $this->__(' Import'),\n \t\t\t\t 'class' => 'mediasharex-icon-loop',\n\t\t\t\t\t\t\t 'links' => $this->getImportLinks());\n }\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t/*\t\n\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'mainsettings'), 'text' => $this->__('Main settings'), 'class' => 'z-icon-es-config');\n }\n\n\n\n\n\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managealbums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageitems'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managemediastore'), 'text' => $this->__('Media store'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managehandlers'), 'text' => $this->__('Handlers'), 'class' => 'z-icon-es-display');\n }\n\t\t\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managesources'), 'text' => $this->__('Sources'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageinvitations'), 'text' => $this->__('Invitations'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Import'), 'class' => 'z-icon-es-filter');\n }\t\n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t */\t\n \n return $links;\n }", "public function helpers()\n {\n if ($this->_helpers === null) {\n $this->_helpers = new HelperRegistry($this);\n }\n\n return $this->_helpers;\n }", "public function elements()\n {\n return [\n '@tree' => '.dd',\n '@form' => 'form[method=\"POST\"]',\n ];\n }", "protected function getDiscoveryTools() {\n\t\t$config = $this->getMFConfig();\n\t\t$menu = new MenuBuilder();\n\t\t$discoveryNamespace = $config->get( 'MFContentNamespace', 0 );\n\n\t\t// Home link\n\t\t$menu->insert( 'home' )\n\t\t\t->addComponent(\n\t\t\t\t$this->msg( 'mobile-frontend-home-button' )->escaped(),\n\t\t\t\tTitle::newMainPage()->getLocalUrl(),\n\t\t\t\tMobileUI::iconClass( 'mf-home', 'before' ),\n\t\t\t\t[ 'data-event-name' => 'home' ]\n\t\t\t);\n\n\t\t// Random link\n\t\t$menu->insert( 'random' )\n\t\t\t->addComponent(\n\t\t\t\t$this->msg( 'mobile-frontend-random-button' )->escaped(),\n\t\t\t\tSpecialPage::getTitleFor( 'Randompage',\n\t\t\t\t\tMWNamespace::getCanonicalName( $discoveryNamespace ) )->getLocalUrl() .\n\t\t\t\t\t\t'#/random',\n\t\t\t\tMobileUI::iconClass( 'mf-random', 'before' ),\n\t\t\t\t[\n\t\t\t\t\t'id' => 'randomButton',\n\t\t\t\t\t'data-event-name' => 'random',\n\t\t\t\t]\n\t\t\t);\n\n\t\t// Nearby link (if supported)\n\t\tif (\n\t\t\t$config->get( 'MFNearby' ) &&\n\t\t\t( $config->get( 'MFNearbyEndpoint' ) || class_exists( 'GeoData\\GeoData' ) )\n\t\t) {\n\t\t\t$menu->insert( 'nearby', $isJSOnly = true )\n\t\t\t\t->addComponent(\n\t\t\t\t\t$this->msg( 'mobile-frontend-main-menu-nearby' )->escaped(),\n\t\t\t\t\tSpecialPage::getTitleFor( 'Nearby' )->getLocalURL(),\n\t\t\t\t\tMobileUI::iconClass( 'mf-nearby', 'before', 'nearby' ),\n\t\t\t\t\t[ 'data-event-name' => 'nearby' ]\n\t\t\t\t);\n\t\t}\n\n\t\t// Allow other extensions to add or override tools\n\t\tHooks::run( 'MobileMenu', [ 'discovery', &$menu ] );\n\t\treturn $menu->getEntries();\n\t}", "public function elements()\n {\n return [\n '@email' => 'input[name=email]',\n '@passwd' => 'input[name=passwd]',\n ];\n }", "public function elements()\n {\n return [\n '@submit' => '#saveActions button[type=submit]',\n ];\n }", "public static function getLinks()\n\t{\n\t\treturn static::$links;\n\t}", "function suggest_requests() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'title' => qa_lang_html('dashboard/page_title'),\n\t\t\t\t'request' => 'dashboard',\n\t\t\t\t'nav' => 'B', // 'M'=main, 'F'=footer, 'B'=before main, 'O'=opposite main, null=none\n\t\t\t),\n\t\t);\n\t}", "protected function getReferences()\n {\n $extensions = $this->extensionRepository->findByHasSphinxDocumentation();\n $references = array();\n foreach ($extensions as $extension) {\n $typeLabel = $this->translate('extensionType_' . $extension->getInstallType());\n $references[$typeLabel]['EXT:' . $extension->getExtensionKey()] = sprintf('[%2$s] %1$s', $extension->getTitle(), $extension->getExtensionKey());\n }\n\n $this->signalSlotDispatcher->dispatch(\n __CLASS__,\n 'afterInitializeReferences',\n array(\n 'references' => &$references,\n )\n );\n\n foreach (array_keys($references) as $key) {\n asort($references[$key]);\n }\n\n return $references;\n }", "public function aliases() \n {\n $aliases = array();\n foreach ($this->_entries as $alias => $key) {\n $aliases[] = $alias;\n }\n return $aliases;\n }", "function getHelpers() {\r\n return is_array($this->helpers) ? $this->helpers : array($this->helpers);\r\n }", "public function getlinks()\n {////\n // Define an empty array to hold the list of admin links\n $links = array();\n\n // Return the links array back to the calling function\n return $links;\n }", "public function getRoutes()\n {\n\n $routes = array();\n\n array_push($routes, CoreControllerObject::buildAction('/admin/system/lessvariables', __CLASS__, CoreControllerObject::MATCH_TYPE_STRING));\n\n return $routes;\n\n }", "protected function getSiteLinks() {\n\t\t$menu = new MenuBuilder();\n\n\t\t// About link\n\t\t$title = Title::newFromText( $this->msg( 'aboutpage' )->inContentLanguage()->text() );\n\t\t$msg = $this->msg( 'aboutsite' );\n\t\tif ( $title && !$msg->isDisabled() ) {\n\t\t\t$menu->insert( 'about' )\n\t\t\t\t->addComponent( $msg->text(), $title->getLocalUrl() );\n\t\t}\n\n\t\t// Disclaimers link\n\t\t$title = Title::newFromText( $this->msg( 'disclaimerpage' )->inContentLanguage()->text() );\n\t\t$msg = $this->msg( 'disclaimers' );\n\t\tif ( $title && !$msg->isDisabled() ) {\n\t\t\t$menu->insert( 'disclaimers' )\n\t\t\t\t->addComponent( $msg->text(), $title->getLocalUrl() );\n\t\t}\n\n\t\t// Allow other extensions to add or override tools\n\t\tHooks::run( 'MobileMenu', [ 'sitelinks', &$menu ] );\n\t\treturn $menu->getEntries();\n\t}", "public function get_instance_pages() {\n\n\t\t\t$base_path = $this->component_path( 'pages/' );\n\n\t\t\treturn array(\n\t\t\t\t'Jet_Engine_Relations_Page_List' => $base_path . 'list.php',\n\t\t\t\t'Jet_Engine_Relations_Page_Edit' => $base_path . 'edit.php',\n\t\t\t);\n\t\t}", "public function registerMarkupTags()\n\t{\n\t\treturn [\n\t\t\t'functions' => [\n\t\t\t\t'image_field_path'\t\t\t\t\t\t=> ['AxC\\Framework\\Helpers\\ImageField', 'path'\t\t\t\t\t\t\t],\n\t\t\t\t'image_field_thumb'\t\t\t\t\t\t=> ['AxC\\Framework\\Helpers\\ImageField', 'thumb'\t\t\t\t\t\t\t],\n\t\t\t\t'image_field_path_settings'\t\t=> ['AxC\\Framework\\Helpers\\ImageField', 'pathFromSettings'\t],\n\t\t\t\t'image_field_thumb_settings'\t=> ['AxC\\Framework\\Helpers\\ImageField', 'thumbFromSettings'\t]\n\t\t\t]\n\t\t];\n\t}", "public function getHelpers()\n {\n return [\n ];\n }", "public function getBrowserLinks()\n\t{\n\t\treturn array('Wordpress site' => '');\n\t}", "public function getAliases()\n {\n return array_values($this->aliases);\n }", "protected function elements()\n {\n $window = $this->getUrlWindow($this->onEachSide);\n\n return array_filter(array(\n $window['first'],\n is_array($window['slider']) ? '...' : null,\n $window['slider'],\n is_array($window['last']) ? '...' : null,\n $window['last'],\n ));\n }", "public function get_links() {\n\t\t$context = $this->context_memoizer->for_current_page();\n\n\t\treturn $context->presentation->breadcrumbs;\n\t}", "public function getlinks()\n {\n $links = array();\n\n if (Content_Util::contentHasPageCreateAccess()) {\n $links[] = array(\n 'url' => ModUtil::url('Content', 'admin', 'newPage'),\n 'text' => $this->__('Add new page'),\n 'class' => 'z-icon-es-new');\n }\n if (SecurityUtil::checkPermission('Content::', '::', ACCESS_EDIT)) {\n $links[] = array(\n 'url' => ModUtil::url('Content', 'admin', 'main'),\n 'text' => $this->__('Page list'),\n 'class' => 'z-icon-es-edit',\n 'links' => array(\n array('url' => ModUtil::url('Content', 'user', 'sitemap'),\n 'text' => $this->__('Sitemap')),\n array('url' => ModUtil::url('Content', 'user', 'extlist'),\n 'text' => $this->__('Extended')),\n array('url' => ModUtil::url('Content', 'user', 'pagelist'),\n 'text' => $this->__('Complete')),\n array('url' => ModUtil::url('Content', 'user', 'categories'),\n 'text' => $this->__('Category list')),\n ));\n }\n\n return $links;\n }", "function wikir_pages_references($str)\n{\n $refs = array();\n $link_regexp = '/\\[\\[(.*?)\\]\\]/';\n preg_match_all($link_regexp, $str, $matches, PREG_SET_ORDER);\n foreach($matches as $match) $refs[] = $match[1];\n return $refs;\n}", "protected function getKeys(): array\n {\n return collect([\n 'site', 'title', 'image', 'description', 'url',\n 'twitter.site', 'twitter.title', 'twitter.image', 'twitter.description',\n ])\n ->merge(array_keys($this->defaults))\n ->merge(array_keys($this->values))\n ->unique()\n ->filter(function (string $key) {\n if (count($parts = explode('.', $key)) > 1) {\n if (isset($this->extensions[$parts[0]])) {\n // Is the extension allowed?\n return $this->extensions[$parts[0]];\n }\n\n return false;\n }\n\n return true;\n })\n ->toArray();\n }", "private function getLinkKeywords()\n {\n $this->tplVar['keys'] = array();\n \n $keywords = array();\n \n // get demanded link data\n $this->model->action('link','getKeywordIds', \n array('result' => & $keywords,\n 'id_link' => (int)$_REQUEST['id_link']));\n\n foreach($keywords as $key)\n {\n $tmp = array();\n $tmp['id_key'] = $key; \n \n $keyword = array();\n $this->model->action('keyword','getKeyword', \n array('result' => & $keyword,\n 'id_key' => (int)$key,\n 'fields' => array('title','id_key'))); \n $branch = array();\n // get navigation node branch of the current node\n $this->model->action('keyword','getBranch', \n array('result' => & $branch,\n 'id_key' => (int)$key,\n 'fields' => array('title','id_key'))); \n\n $tmp['branch'] = '';\n \n foreach($branch as $bkey)\n {\n $tmp['branch'] .= '/'.$bkey['title'];\n }\n \n $tmp['branch'] .= '/<strong>'.$keyword['title'].'</strong>';\n \n $this->tplVar['keys'][] = $tmp;\n }\n sort($this->tplVar['keys']); \n }", "public function makeShortcutButton() {}", "public function getElementNames()\n {\n return $this->elements->keys()->all();\n }", "public function getSettingsLinks()\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', 'settings_general'), 'text' => $this->__('General settings'), 'class' => 'z-icon-es-confi');\n }\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_display'), 'text' => $this->__('Display'), 'class' => 'z-icon-es-displa');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_albums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-displa');\n }\n \t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_media'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-displa');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_access'), 'text' => $this->__('Access'), 'class' => 'z-icon-es-displa');\n }\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_storage'), 'text' => $this->__('Storage'), 'class' => 'z-icon-es-displa');\n } \n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_handlers'), 'text' => $this->__('Handlers'), 'class' => 'z-icon-es-displa');\n }\n \tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_sources'), 'text' => $this->__('Sources'), 'class' => 'z-icon-es-displa');\n }\n \tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_import'), 'text' => $this->__('Import'), 'class' => 'z-icon-es-displa');\n } \n\t\t\t\t\n return $links;\n }", "public static function getLinks() {\n $links = Yii::$app->cacheManage->links;\n if ($links) {\n return $links;\n }\n\n $links = LinkOption::getAllLinks();\n if ($links) {\n Yii::$app->cacheManage->links = $links;\n }\n return $links;\n }", "public function getSettingLinks()\n {\n $currentUserModel = Users_Record_Model::getCurrentUserModel();\n if ($currentUserModel->isAdminUser()) {\n $settingsLinks[] = array(\"linktype\" => \"LISTVIEWSETTING\", \"linklabel\" => \"Settings\", \"linkurl\" => \"index.php?module=VDXMLExport&view=Settings&parent=Settings\", \"linkicon\" => \"\");\n $settingsLinks[] = array(\"linktype\" => \"LISTVIEWSETTING\", \"linklabel\" => \"Uninstall\", \"linkurl\" => \"index.php?module=VDXMLExport&view=Uninstall&parent=Settings\", \"linkicon\" => \"\");\n }\n return $settingsLinks;\n }", "public function getScreenshots() {\n\t\treturn ScreenshotManager::getScreenshotsFromAddon($this->id);\n\t}", "public static function getMenuItems()\n {\n // Will be handled in XML in future (or/and with the Joomla native menus)\n // -> give your opinion on j-cook.pro/forum\n\n $items = array();\n\n $items['admin.countries.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_COUNTRIES',\n 'view' => 'countries',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_countries'\n );\n\n $items['admin.regions.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_REGIONS',\n 'view' => 'regions',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_regions'\n );\n\n $items['admin.provinces.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_PROVINCES',\n 'view' => 'provinces',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_provinces'\n );\n\n $items['admin.subscriptionplans.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_SUBSCRIPTIONPLANS',\n 'view' => 'subscriptionplans',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_subscriptionplans'\n );\n\n $items['admin.categories.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_CATEGORIES',\n 'view' => 'categories',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_categories'\n );\n\n $items['admin.typedocuments.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_TYPEDOCUMENTS',\n 'view' => 'typedocuments',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_typedocuments'\n );\n\n $items['admin.documents.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_DOCUMENTS',\n 'view' => 'documents',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_documents'\n );\n\n $items['admin.reservations.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_RESERVATIONS',\n 'view' => 'reservations',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_reservations'\n );\n\n $items['admin.cpanel.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_CONTROL_PANEL',\n 'view' => 'cpanel',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_cpanel'\n );\n\n $items['site.cpanel.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_CONTROL_PANEL',\n 'view' => 'cpanel',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_cpanel'\n );\n\n return $items;\n }", "public function getToolbarEntries()\n {\n return $this->toolbar['entries'];\n }", "public static function getToolShortcuts($content_row)\r\n\t{\r\n\t\tglobal $_current_user, $_base_href, $contentManager, $_course_id;\r\n\t\t\r\n\t\tif (((!$content_row['content_parent_id'] && ($_SESSION['packaging'] == 'top'))\r\n\t\t || ($_SESSION['packaging'] == 'all'))\r\n\t\t\t || (isset($_current_user) && ($_current_user->isAuthor($_course_id)|| $_current_user->isAdmin()))) {\r\n\t\t\r\n\t\t\t$tool_shortcuts[] = array(\r\n\t\t\t\t 'title' => _AT('export_content_in_cp'), \r\n\t\t\t\t 'url' => $_base_href . 'home/ims/ims_export.php?_cid='.$content_row['content_id'],\r\n\t\t\t\t 'icon' => $_base_href . 'themes/'.$_SESSION['prefs']['PREF_THEME'].'/images/export.png');\r\n\t\t\t$tool_shortcuts[] = array(\r\n\t\t\t\t 'title' => _AT('export_content_in_cc'), \r\n\t\t\t\t 'url' => $_base_href . 'home/imscc/ims_export.php?_cid='.$content_row['content_id'].SEP.'to_a4a=1',\r\n\t\t\t\t 'icon' => $_base_href . 'themes/'.$_SESSION['prefs']['PREF_THEME'].'/images/export_cc.png');\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($_current_user) && ($_current_user->isAuthor($_course_id) || $_current_user->isAdmin())) {\r\n\t\t\tif ($content_row['content_type'] == CONTENT_TYPE_CONTENT || $content_row['content_type'] == CONTENT_TYPE_WEBLINK) {\r\n\t\t\t\t$tool_shortcuts[] = array(\r\n\t\t\t\t\t 'title' => _AT('edit_this_page'), \r\n\t\t\t\t\t 'url' => $_base_href . 'home/editor/edit_content.php?_cid='.$content_row['content_id'],\r\n\t\t\t\t\t 'icon' => $_base_href . 'images/medit.gif');\r\n\t\t\t}\r\n\t\t\tglobal $_config;\r\n\t\t\tif($_config['enable_template_structure'] == '1'){\r\n\t\t\t$tool_shortcuts[] = array(\r\n\t\t\t 'title' => _AT('add_top_structure'), \r\n\t\t\t 'url' => $_base_href .\r\n\t\t\t\t'home/editor/edit_content_struct.php?_course_id='.$_course_id,\r\n\t\t\t 'icon' => $_base_href . 'images/addstruct.gif');\r\n\t\t\t}\r\n\t\t\t$tool_shortcuts[] = array(\r\n\t\t\t 'title' => _AT('add_sibling_folder'), \r\n\t\t\t 'url' => $_base_href .\r\n\t\t\t\t'home/editor/edit_content_folder.php?pid='.$contentManager->_menu_info[$content_row['content_id']]['content_parent_id'].SEP.'_course_id='.$_course_id,\r\n\t\t\t 'icon' => $_base_href . 'images/add_sibling_folder.gif');\r\n\r\n\t\t\tif ($content_row['content_type'] == CONTENT_TYPE_FOLDER || $content_row['content_type'] == CONTENT_TYPE_WEBLINK) {\r\n\t\t\t\t$tool_shortcuts[] = array(\r\n\t\t\t\t 'title' => _AT('add_sub_folder'), \r\n\t\t\t\t 'url' => $_base_href .\r\n\t\t\t\t\t'home/editor/edit_content_folder.php?_course_id='.$_course_id.SEP.'pid='.$content_row['content_id'],\r\n\t\t\t\t 'icon' => $_base_href . 'images/add_sub_folder.gif');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$tool_shortcuts[] = array(\r\n\t\t\t 'title' => _AT('add_sibling_page'), \r\n\t\t\t 'url' => $_base_href .\r\n\t\t\t\t'home/editor/edit_content.php?pid='.$contentManager->_menu_info[$content_row['content_id']]['content_parent_id'].SEP.'_course_id='.$_course_id,\r\n\t\t\t 'icon' => $_base_href . 'images/add_sibling_page.gif');\r\n\t\t\t\r\n\t\t\tif ($content_row['content_type'] == CONTENT_TYPE_CONTENT || $content_row['content_type'] == CONTENT_TYPE_WEBLINK) {\r\n\t\t\t\t$tool_shortcuts[] = array(\r\n\t\t\t\t 'title' => _AT('delete_this_page'), \t\r\n\t\t\t\t 'url' => $_base_href . 'home/editor/delete_content.php?_cid='.$content_row['content_id'],\r\n\t\t\t\t 'icon' => $_base_href . 'images/page_delete.gif');\r\n\t\t\t}\r\n\t\t\telse if ($content_row['content_type'] == CONTENT_TYPE_FOLDER) {\r\n\t\t\t\t$tool_shortcuts[] = array(\r\n\t\t\t\t 'title' => _AT('add_sub_page'), \t\r\n\t\t\t\t 'url' => $_base_href . 'home/editor/edit_content.php?_course_id='.$_course_id.SEP.'pid='.$content_row['content_id'],\r\n\t\t\t\t 'icon' => $_base_href . 'images/add_sub_page.gif');\r\n\t\t\t\t\r\n\t\t\t\t$tool_shortcuts[] = array(\r\n\t\t\t\t 'title' => _AT('delete_this_folder'), \t\r\n\t\t\t\t 'url' => $_base_href . 'home/editor/delete_content.php?_cid='.$content_row['content_id'],\r\n\t\t\t\t 'icon' => $_base_href . 'images/page_delete.gif');\r\n\t\t\t}\r\n\t\t}\r\n $sharedContentDAO = new SharedContentDAO();\r\n\t\tif (isset($_current_user) && isset($_GET['_cid']) && $sharedContentDAO->isShared($_SESSION['user_id'],$_GET['_cid'])) {\r\n \t\t $tool_shortcuts[] = array(\r\n\t\t 'title' => _AT('edit_this_page'), \r\n\t\t 'url' => $_base_href . 'home/editor/edit_content.php?_cid='.$content_row['content_id'],\r\n\t\t 'icon' => $_base_href . 'images/medit.gif');\r\n }\r\n\t\treturn $tool_shortcuts;\r\n\r\n//\tif (isset($_current_user) && $_current_user->isAuthor($_course_id)) {\r\n//\t\t$shortcuts[] = array('title' => _AT('add_sub_folder'), 'url' => $_base_href . 'home/editor/edit_content_folder.php?_course_id='.$_course_id.'pid='.$cid);\r\n//\t\t\r\n////\t\t$shortcuts[] = array('title' => _AT('add_top_page'), 'url' => $_base_href . 'home/editor/edit_content.php?_course_id='.$_course_id, 'icon' => $_base_href . 'images/page_add.gif');\r\n//\t\tif ($contentManager->_menu_info[$cid]['content_parent_id']) {\r\n//\t\t\t$shortcuts[] = array('title' => _AT('add_sibling_page'), 'url' => $_base_href .\r\n//\t\t\t\t'home/editor/edit_content.php?_course_id='.$_course_id.SEP.'pid='.$contentManager->_menu_info[$cid]['content_parent_id'], 'icon' => $_base_href . 'images/page_add_sibling.gif');\r\n//\t\t}\r\n//\t\r\n//\t\t$shortcuts[] = array('title' => _AT('add_sub_page'), 'url' => $_base_href . 'home/editor/edit_content.php?_course_id='.$_course_id.SEP.'pid='.$cid);\r\n//\t\t$shortcuts[] = array('title' => _AT('delete_this_folder'), 'url' => $_base_href . 'home/editor/delete_content.php?_cid='.$cid, 'icon' => $_base_href . 'images/page_delete.gif');\r\n//\t}\r\n\t}", "public function getSettingLinks()\n\t{\n\t\t$currentUserModel = Users_Record_Model::getCurrentUserModel();\n\t\t$settingLinks = parent::getSettingLinks();\n\n\t\tif ($currentUserModel->isAdminUser()) {\n\t\t\t$settingLinks[] = array(\n\t\t\t\t'linktype' => 'LISTVIEWSETTING',\n\t\t\t\t'linklabel' => 'LBL_PASS_CONFIGURATION',\n\t\t\t\t'linkurl' => 'index.php?module=OSSPasswords&view=ConfigurePass&parent=Settings',\n\t\t\t\t'linkicon' => ''\n\t\t\t);\n\t\t}\n\t\treturn $settingLinks;\n\t}", "public function getFunctions()\n {\n return array(\n 'link' => new \\Twig_Function_Method($this, 'getContentLink'),\n 'menu' => new \\Twig_Function_Method($this, 'getContentMenu'),\n 'widget' => new \\Twig_Function_Method($this, 'getContentWidget'),\n 'meta' => new \\Twig_Function_Method($this, 'getContentMeta'),\n 'pref' => new \\Twig_Function_Method($this, 'getPreference'),\n 'image' => new \\Twig_Function_Method($this, 'getImage'),\n 'thumb' => new \\Twig_Function_Method($this, 'getThumbImage'),\n 'pagination' => new \\Twig_Function_Method($this, 'getPagination'),\n );\n }", "protected function getLinkHandlers() {}", "protected function getLinkHandlers() {}", "public function find_emoticons()\n {\n if (!is_null($this->EMOTICON_CACHE)) {\n return $this->EMOTICON_CACHE;\n }\n $rows = $this->connection->query_select('smilies', array('*'));\n $this->EMOTICON_CACHE = array();\n foreach ($rows as $myrow) {\n $src = $this->get_emo_dir() . $myrow['image'];\n $this->EMOTICON_CACHE[$myrow['find']] = array('EMOTICON_IMG_CODE_DIR', $src, $myrow['find']);\n }\n uksort($this->EMOTICON_CACHE, '_strlen_sort');\n $this->EMOTICON_CACHE = array_reverse($this->EMOTICON_CACHE);\n return $this->EMOTICON_CACHE;\n }", "public function getLinksList(){\n return $this->_get(9);\n }", "public function getHelpers()\n {\n if (!isset($this->helpers)) {\n return new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n } else {\n return $this->helpers;\n }\n }", "public function getAliases()\n {\n return $this->aliases;\n }", "protected function _getAdditionalElementTypes() {\n\t\treturn array(\n\t\t\t'image' => Mage::getConfig()->getBlockClassName('flexslider/adminhtml_slide_helper_image')\n\t\t);\n\t}" ]
[ "0.74707633", "0.68247354", "0.6336499", "0.63056904", "0.60867923", "0.6084112", "0.59398913", "0.5855128", "0.5807522", "0.5801427", "0.5688435", "0.5584898", "0.5558277", "0.55490214", "0.5503617", "0.5500386", "0.5475228", "0.5460432", "0.54425657", "0.54254526", "0.5395803", "0.53948015", "0.53934413", "0.53883535", "0.53700703", "0.53528005", "0.53293216", "0.53214586", "0.53214586", "0.53214586", "0.53214586", "0.5316893", "0.53167033", "0.52799153", "0.52417743", "0.52389866", "0.5215121", "0.5210475", "0.51634914", "0.51634693", "0.5154905", "0.51399744", "0.5136673", "0.5105556", "0.50951934", "0.5066369", "0.5048537", "0.5034629", "0.50333035", "0.5022826", "0.50190645", "0.50061303", "0.5006036", "0.50022674", "0.4988031", "0.49764857", "0.49755946", "0.49657366", "0.49623632", "0.4958254", "0.49546567", "0.49545443", "0.49528873", "0.4941388", "0.4925282", "0.49067852", "0.49053252", "0.49052477", "0.48977312", "0.48903733", "0.4882947", "0.48688674", "0.4860191", "0.48592842", "0.4856243", "0.48469618", "0.4842918", "0.4841503", "0.48360935", "0.48341998", "0.48329425", "0.48209596", "0.4819362", "0.48177907", "0.48170695", "0.4814395", "0.48115078", "0.4811277", "0.48057035", "0.48022395", "0.48018655", "0.47993645", "0.4792705", "0.47889587", "0.47887832", "0.47887832", "0.4781513", "0.47750425", "0.4771084", "0.4765401", "0.47629726" ]
0.0
-1
Calculates the URL to the page containing parameters for the form fields which have been specified as needing values passed via the URL. This helps when the CMS user wants to copy and paste the URL in to an email to others, or display on the screen etc. Often a 3rd party system should create the paramertised URL.
protected function calculateUrlWithParams() { // Get the absolute URL to the page including the site domain. // Get the Url parameter records for this page. // Also include the project coordinator field values in the URL parameters. $pageUrl = $this->AbsoluteLink(); $parameters = ""; // If values for the project code, Project Manager, Project Coordinator, or Project Coordinator // email fields have been specified include them as parameters in the URL. if ($this->ProjectName) { $parameters .= '&Project_Name=' . urlencode($this->ProjectName); } if ($this->ProjectCode) { $parameters .= '&Project_Code=' . urlencode($this->ProjectCode); } if ($this->ProjectManager) { $parameters .= '&Project_Manager=' . urlencode($this->ProjectManager); } if ($this->ProjectManagerEmail) { $parameters .= '&Project_Manager_email=' . urlencode($this->ProjectManagerEmail); } if ($this->ProjectCoordinator) { $parameters .= '&Project_Coordinator=' . urlencode($this->ProjectCoordinator); } if ($this->ProjectCoordinatorEmail) { $parameters .= '&Project_Coordinator_email=' . urlencode($this->ProjectCoordinatorEmail); } // Get the URL parameters specified for this page. Loop and add them. $parameterFields = $this->UrlParams()->sort('SortOrder', 'Asc'); foreach($parameterFields as $field) { $parameters .= '&' . str_replace(' ', '_', $field->PostcardMetadataField()->Label) . '=' . urlencode($field->Value); } // Remove first & and replace with ?. $parameters = ltrim($parameters, '&'); // Put together the URL of the page with the params. $pageUrl .= '?' . $parameters; return $pageUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_url_params()\n {\n }", "private function getParamsUrlFormat() {\n $urlParams = \"\";\n\n if ($this->getMethod() == 'GET') {\n $urlParams .= ($this->getPaging()) ? \n \"?_paging=1\" : \n \"\";\n $urlParams .= ($this->getPaging()) ? \n \"&_return_as_object=1\" : \n \"\";\n $urlParams .= ($this->getPaging()) ? \n \"&_max_results=\" . $this->getMaxResults() : \n \"\";\n }\n\n if ($this->getMethod() == 'POST') {\n $function = $this->getFuction();\n $urlParams .= (isset($function) and $function != \"\") ?\n \"?_function=\" . $this->getFuction() :\n \"\";\n }\n\n return $urlParams;\n }", "public function getUrl ()\n {\n $url = $this->_config['formAction'] . '?';\n \n foreach ($this->_params as $key => $value) {\n if ($value != '') {\n $url .= $key . '=' . $value . '&';\n }\n }\n \n $url .= 'SHASign=' . $this->getSha1Sign();\n \n return $url;\n }", "function url_get_parameters() {\n $this->init_full();\n return array('id' => $this->modulerecord->id, 'pageid' => $this->lessonpageid);;\n }", "public function getUrl() {\n $url = $this->request->get_normalized_http_url() . '?';\n $url .= http_build_query($this->request->get_parameters(), '', '&');\n\n return $url;\n }", "public function getAdditionalParams()\n {\n return oxRegistry::get(\"oxUtilsUrl\")->processUrl('', false);\n }", "private function generateURL()\n\t{\n\t\t// Is there's a query string, strip it from the URI\n\t\t$sURI\t= ($iPos = strpos($_SERVER['REQUEST_URI'], '?')) ?\n\t\t\t\t\tsubstr($_SERVER['REQUEST_URI'], 0, $iPos) :\n\t\t\t\t\t$_SERVER['REQUEST_URI'];\n\n\t\t// Is there's a ampersand string, strip it from the URI\n\t\t$sURI\t= ($i = strpos($sURI, '&')) ?\n\t\t\t\t\tsubstr($sURI, 0, $i) :\n\t\t\t\t\t$sURI;\n\n\t\t// Is there's a hash string, strip it from the URI\n\t\t$sURI\t= ($i = strpos($sURI, '#')) ?\n\t\t\t\t\tsubstr($sURI, 0, $i) :\n\t\t\t\t\t$sURI;\n\n\t\t// If we're on page 1\n\t\tif($this->iPage == 1)\n\t\t{\n\t\t\t$this->sURL\t\t= $sURI;\n\t\t}\n\t\t// Else we need to pull off the current page\n\t\telse\n\t\t{\n\t\t\t// Split the URI by / after trimming them off the front and end\n\t\t\t$aURI\t= explode('/', trim($sURI, '/'));\n\n\t\t\t// If the last part doesn't match the current page\n\t\t\t$iPage\t= array_pop($aURI);\n\t\t\tif($iPage != $this->iPage) {\n\t\t\t\ttrigger_error(__METHOD__ . ' Error: Invalid page passed. ' . $iPage . ' / ' . $this->iPage, E_USER_ERROR);\n\t\t\t}\n\n\t\t\t// If there is no other parts\n\t\t\tif(count($aURI) == 0) {\n\t\t\t\t$this->sURL = '/';\n\t\t\t} else {\n\t\t\t\t$this->sURL = '/' . implode('/', $aURI) . '/';\n\t\t\t}\n\t\t}\n\n\t\t// Set the query string\n\t\t$this->sQuery\t= ($iPos) ? substr($_SERVER['REQUEST_URI'], $iPos) : '';\n\t}", "public function url() {\n if (empty($this->parameters)) {\n return $this->url;\n }\n\n return $this->url . '?' . http_build_query($this->parameters);\n }", "private static function generateUrlPrams(){\n\t\t$url = [] ;\n\t\tif ( isset($_GET['urlFromHtaccess']) ){\n\t\t\t$url = explode('/' , trim($_GET['urlFromHtaccess']) );\n\t\t}\n\t\tself::$url = $url ;\n\t}", "protected function _getUrl() {\n\t\t\t$this->_url =\timplode('/', array(\n\t\t\t\t$this->_baseUrlSegment,\n\t\t\t\t$this->_apiSegment,\n\t\t\t\timplode('_', array(\n\t\t\t\t\t$this->_type,\n\t\t\t\t\t$this->_language,\n\t\t\t\t\t$this->_locale,\n\t\t\t\t)),\n\t\t\t\t$this->_apiVersionSegment,\n\t\t\t\t$this->controller,\n\t\t\t\t$this->function\t\n\t\t\t));\n\n\t\t\tempty($this->_getFields) ?: $this->_url .= '?' . http_build_query($this->_getFields);\n\t\t}", "private function _getUrlParamsForFormAction() {\n\n $param = $this->params()->fromRoute('param');\n $param2 = $this->params()->fromRoute('param2');\n $value = $this->params()->fromRoute('value', 0);\n $value2 = $this->params()->fromRoute('value2', 0);\n\n $params = array(\n 'productId' => 0,\n 'categoryId' => 0,\n 'parentId' => 0\n );\n\n// $productId = $categoryId = null;\n// if ($param == \"product\") {\n// $productId = $value;\n// $categoryId = $value2;\n// } else if ($param == \"category\") {\n// $productId = $value2;\n// $categoryId = $value;\n// }\n\n switch ($param) {\n case 'product':\n $params['productId'] = $value;\n $params['categoryId'] = $value2;\n break;\n case 'category':\n $params['productId'] = $value2;\n $params['categoryId'] = $value;\n break;\n case 'parent':\n $params['parentId'] = $value;\n break;\n default:\n break;\n }\n\n return $params;\n }", "protected function _getAddUrlParams()\n {\n if ($this->getListType() == \"search\") {\n return $this->getDynUrlParams();\n }\n }", "function UrlIfy($fields) {\n\t$delim = \"\";\n\t$fields_string = \"\";\n\tforeach($fields as $key=>$value) {\n\t\t$fields_string .= $delim . $key . '=' . $value;\n\t\t$delim = \"&\";\n\t}\n\n\treturn $fields_string;\n}", "function getURL($url, $prams)\n {\n return $url . '?' . http_build_query($prams);\n }", "public function url()\n {\n if (empty($this->parameters)) {\n return $this->url;\n }\n $total = array();\n foreach ($this->parameters as $k => $v) {\n if (is_array($v)) {\n foreach ($v as $va) {\n $total[] = HttpClient::urlencodeRFC3986($k).\"[]=\".HttpClient::urlencodeRFC3986($va);\n }\n } else {\n $total[] = HttpClient::urlencodeRFC3986($k).\"=\".HttpClient::urlencodeRFC3986($v);\n }\n }\n $out = implode(\"&\", $total);\n\n return $this->url.'?'.$out;\n }", "public static function getPageUrl()\n {\n $db = DataAccess::getInstance();\n $url = $db->get_site_setting('classifieds_file_name') . '?';\n $gets = array();\n foreach ($_GET as $key => $val) {\n if (in_array($key, array('filterValue','setFilter','resetFilter', 'resetAllFilters', 'page'))) {\n //don't add this -- it's part of the filters\n //also don't add \"page\" so that adding a new filter always forces the user to \"page one\"\n continue;\n }\n $gets[] = \"$key=$val\";\n }\n $url .= implode('&amp;', $gets);\n return $url;\n }", "private function splitUrl()\n {\n if (isset($_GET['url'])) {\n // split URL\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n $this->url_controller = isset($url[0]) ? $url[0] : null;\n $this->url_action = isset($url[1]) ? $url[1] : null;\n\n unset($url[0], $url[1]);\n\n\n $this->url_params = array_values($url);\n // ::DEBUGGING\n // echo 'Controller: ' . $this->url_controller . '<br>';\n // echo 'Action: ' . $this->url_action . '<br>';\n // echo 'Parameters: ' . print_r($this->url_params, true) . '<br>';\n // echo 'Parameters POST: ' . print_r($_POST, true) . '<br>';\n }\n }", "function getUrl($vars = null, $pageName = null, $sid = null)\n {\n $fvars = array();\n if (is_array($vars))\n {\n foreach ($vars as $k => $v)\n $fvars[$this->name($k)] = $v;\n }\n else if (isset($vars))\n $fvars[$this->name()] = $vars;\n\n return $this->form->getUrl($fvars, $pageName, $sid);\n }", "private function url_params()\n {\n return \"?user={$this->login}&password={$this->password}&answer=json\";\n }", "public function url()\r\n {\r\n return $this->get_base_url() . http_build_query($this->get_query_params());\r\n }", "function ghostpool_validate_url() {\n\t\tglobal $post;\n\t\t$gp_page_url = esc_url( home_url() );\n\t\t$gp_urlget = strpos( $gp_page_url, '?' );\n\t\tif ( $gp_urlget === false ) {\n\t\t\t$gp_concate = \"?\";\n\t\t} else {\n\t\t\t$gp_concate = \"&\";\n\t\t}\n\t\treturn $gp_page_url . $gp_concate;\n\t}", "protected function _getFormUrl() {\n $params = array();\n if (Mage::app()->getStore()->isCurrentlySecure()) {\n // Modern browsers require the Ajax request protocol to match the protocol used for initial request,\n // so force Magento to generate a secure URL if the request was secure.\n $params['_forced_secure'] = true;\n }\n return $this->getUrl('cloudiq/callme/request', $params);\n }", "protected function prepareURL() {\n $request = trim($_SERVER['REQUEST_URI'], '/');\n if( !empty($request)) {\n $url = explode('/', $request); // split the request into an array of controller, action, parameters\n \n // is controller is given, then set that name as controller\n // if this is empty, then make homeController as default controller\n $this->controller = isset($url[0]) ? $url[0].'Controller' : 'accountController';\n \n // action to be performed\n // it is specified after the controller name in the url\n // \n $this->action = isset($url[1]) ? $url[1]: 'index';\n \n unset($url[0], $url[1]); // delete this values from the url so that we can have parameters only\n \n // now add the parameters passed, to the prams array\n $this->prams = !empty($url) ? array_values($url) : [];\n }\n }", "private function getUrl() {\n $queryArr = array();\n\n $uri = filter_input(INPUT_SERVER, 'REQUEST_URI');\n\n //get uri as a array\n $uriArr = parse_url($uri);\n\n //get query parameter string\n $queryStr = isset($uriArr['query']) ? $uriArr['query'] : '';\n\n //get query parameters as a array\n parse_str($queryStr, $queryArr);\n\n //remove 'page' parameter if it is set\n if (isset($queryArr['page'])) {\n unset($queryArr['page']);\n }\n\n //rebuild the uri and return \n $returnUri = $uriArr['path'] . '?' . http_build_query($queryArr);\n\n return $returnUri;\n }", "private function getParameters()\n {\n $inputParametersStr = \"\";\n\n foreach ($_GET as $key => $input) {\n\n if(empty($input)){\n continue ; //ignore empty field \n }\n $inputParametersStr .= \"$key=\" . urlencode($input) . \"&\"; // convert string into url syntax.\n\n }\n $inputParametersStr = trim($inputParametersStr, '&'); // separate parameters by \"&\" .\n\n return $inputParametersStr ;\n }", "function email_build_url($options, $form=false, $arrayinput=false, $nameinput=NULL) {\n\n\t$url = '';\n\n\t// Build url part options\n \tif ($options) {\n \t\t// Index of part url\n \t\t$i = 0;\n\n foreach ($options as $name => $value) {\n \t// If not first param\n \tif (! $form ) {\n \t\tif ($i != 0) {\n \t\t\t$url .= '&amp;' .$name .'='. $value;\n \t\t} else {\n \t\t\t// If first param\n \t\t\t$url .= $name .'='. $value;\n \t\t}\n \t\t// Increment index\n \t\t$i++;\n \t} else {\n\n \t\tif ( $arrayinput ) {\n \t\t\t$url .= '<input type=\"hidden\" name=\"'.$nameinput.'[]\" value=\"'.$value.'\" /> ';\n \t\t} else {\n \t\t\t$url .= '<input type=\"hidden\" name=\"'.$name.'\" value=\"'.$value.'\" /> ';\n \t\t}\n \t}\n }\n }\n\n return $url;\n}", "private function splitUrl()\n {\n if (isset($_GET['url'])) {\n\n // split URL\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n \n // Put URL parts into according properties\n // By the way, the syntax here is just a short form of if/else, called \"Ternary Operators\"\n // @see http://davidwalsh.name/php-shorthand-if-else-ternary-operators\n $this->url_controller = (isset($url[0]) ? $url[0] : null);\n $this->url_action = (isset($url[1]) ? $url[1] : null);\n $this->url_parameter_1 = (isset($url[2]) ? $url[2] : null);\n $this->url_parameter_2 = (isset($url[3]) ? $url[3] : null);\n $this->url_parameter_3 = (isset($url[4]) ? $url[4] : null);\n\n // for debugging. uncomment this if you have problems with the URL\n # echo 'Controller: ' . $this->url_controller . '<br />';\n # echo 'Action: ' . $this->url_action . '<br />';\n # echo 'Parameter 1: ' . $this->url_parameter_1 . '<br />';\n # echo 'Parameter 2: ' . $this->url_parameter_2 . '<br />';\n # echo 'Parameter 3: ' . $this->url_parameter_3 . '<br />';\n }\n }", "protected function populateParams() {\r\n $this->pageNum = isset($_GET['p']) ? (int)$_GET['p'] : 0;\r\n $catId = isset($_GET['c']) ? (int)$_GET['c'] : 0;\r\n \r\n if ($this->pageNum < 1) {\r\n $this->pageNum = 1;\r\n }\r\n }", "protected function populateParams() {\r\n $this->pageNum = isset($_GET['p']) ? (int)$_GET['p'] : 0;\r\n $this->status = isset($_GET['status']) ? (int)$_GET['status'] : 0;\r\n if ($this->pageNum < 1) {\r\n $this->pageNum = 1;\r\n }\r\n }", "protected function determineValues()\n {\n $this->strUrl = preg_replace(\n array(\n '#\\?page=\\d+&#i',\n '#\\?page=\\d+$#i',\n '#&(amp;)?page=\\d+#i'\n ),\n array(\n '?',\n '',\n ''\n ),\n \\Environment::get('request')\n );\n\n $this->strVarConnector = strpos(\n $this->strUrl,\n '?'\n ) !== false\n ? '&amp;'\n : '?';\n $this->intTotalPages = ceil($this->intRows / $this->intRowsPerPage);\n }", "private function UrlIfy($fields) {\n\t\t$delim = \"\";\n\t\t$fields_string = \"\";\n\t\tforeach($fields as $key=>$value) {\n\t\t\t$fields_string .= $delim . $key . '=' . $value;\n\t\t\t$delim = \"&\";\n\t\t}\n\n\t\treturn $fields_string;\n\t}", "public function SubmitLandPageUrl()\n {\n $url = $this->URL;\n $page = Director::get_current_page();\n $res = $page->getManyManyComponents(\"Companies\", \"CompanyID={$this->ID}\", \"ID\")->First();\n $submit_url = $res->SubmitPageUrl;\n if (isset($submit_url) && $submit_url != '') {\n return $submit_url;\n }\n\n return $url;\n }", "function buildUrl($parts=array()){\r\n\t$uparts=array();\r\n\tforeach($parts as $key=>$val){\r\n\t\tif(preg_match('/^(PHPSESSID|GUID|debug|error|username|password|add_result|domain_href|add_id|add_table|edit_result|edit_id|edit_table|)$/i',$key)){continue;}\r\n\t\tif(preg_match('/^\\_(login|pwe|try|formfields|action|view|formname|enctype|fields|csuid|csoot)$/i',$key)){continue;}\r\n\t\tif(!is_string($val) && !isNum($val)){continue;}\r\n\t\tif(!strlen(trim($val))){continue;}\r\n\t\tif($val=='Array'){continue;}\r\n\t\tarray_push($uparts,\"$key=\" . encodeURL($val));\r\n \t}\r\n $url=implode('&',$uparts);\r\n return $url;\r\n\t}", "public function getUrlParameters() {\n\t\t$parameters = $this->parameters;\n\t\tif ($this->profile) {\n\t\t\t$parameters['profile'] = $this->profile;\n\t\t}\n\t\treturn $parameters;\n\t}", "function _build_url() {\n\t\t// Add transaction ID for better detecting double requests in AUTH server\n\t\tif($GLOBALS['config']['application']['tid'] == '') $GLOBALS['config']['application']['tid'] = rand(0, 10000);\n\n\t\t$url = $this->url.'&action='.$this->action.'&tid='.$GLOBALS['config']['application']['tid'];\n\t\t\n\t\treturn $url;\n\t}", "function _prep_url($field)\r\n\t{\r\n\t\t$this->{$field} = $this->form_validation->prep_url($this->{$field});\r\n\t}", "public function getFullUrl(){\n return 'http://'. $_SERVER['HTTP_HOST'] .'/'. implode('/', self::$_request_vars);\n }", "public function getUrlParams()\n {\n\n if ($this->gc_publish_all_albums != 1)\n {\n if (!unserialize($this->gc_publish_albums))\n {\n return;\n }\n }\n\n if (\\Input::get('items'))\n {\n //aktueller Albumalias\n $this->strAlbumalias = \\Input::get('items');\n\n //Authentifizierung bei vor Zugriff geschützten Alben, dh. der Benutzer bekommt, wenn nicht berechtigt, nur das Albumvorschaubild zu sehen.\n $this->authenticate($this->strAlbumalias);\n\n //fuer jw_imagerotator ajax-requests\n if (\\Input::get('jw_imagerotator'))\n {\n return;\n }\n }\n\n //wenn nur ein Album ausgewaehlt wurde und Weiterleitung in den Inhaltselementeinstellungen aktiviert wurde, wird weitergeleitet\n if ($this->doRedirectOnSingleAlbum())\n {\n $arrAlbId = unserialize($this->gc_publish_albums);\n if ($this->gc_publish_all_albums)\n {\n //if all albums are selected\n $objAlbum = $this->Database->prepare('SELECT alias FROM tl_gallery_creator_albums WHERE published=?')\n ->execute('1');\n }\n else\n {\n $objAlbum = $this->Database->prepare('SELECT alias FROM tl_gallery_creator_albums WHERE id=?')\n ->execute($arrAlbId[0]);\n }\n\n //Authentifizierung bei vor Zugriff geschützten Alben, dh. der Benutzer bekommt, wenn nicht berechtigt, nur das Albumvorschaubild zu sehen.\n $this->authenticate($objAlbum->alias);\n\n \\Input::setGet('items', $objAlbum->alias);\n $this->strAlbumalias = $objAlbum->alias;\n }\n\n // Get the Album Id\n if (\\Input::get('items'))\n {\n $objAlbum = \\GalleryCreatorAlbumsModel::findByAlias($this->strAlbumalias);\n if ($objAlbum !== null)\n {\n $this->intAlbumId = $objAlbum->id;\n $this->DETAIL_VIEW = true;\n }\n }\n }", "private function splitUrl() {\n\n if (isset($_GET['url'])) {\n\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n $this->url_controller = isset($url[0]) ? $url[0] : null;\n $this->url_action = isset($url[1]) ? $url[1] : null;\n\n unset($url[0], $url[1]);\n\n $this->url_params = array_values($url);\n\n // para debugging, descomente estas lineas si tiene problemas con la URL\n //echo 'Controller: ' . $this->url_controller . '<br>';\n //echo 'Action: ' . $this->url_action . '<br>';\n //echo 'Parameters: ' . print_r($this->url_params, true) . '<br>';\n }\n }", "function GetPageAddress()\n\t{\n\t\t$url =\"http://{$_SERVER['HTTP_HOST']}{$_SERVER['SCRIPT_NAME']}\";\n\t\t$url.=\"?\";\n\t\t$url.=\"{$_SERVER['QUERY_STRING']}\";\n\t\treturn $url;\n\t}", "protected function getUrl() {\n\t\treturn $this->getQueryParam ( self::URL_PARAM );\n\t}", "function GetCRMURL($spec,$vars,$url)\n{\n $bad = false;\n $list = explode(\",\",$spec);\n\t$map = array();\n for ($ii = 0 ; $ii < count($list) ; $ii++)\n {\n $name = $list[$ii];\n if ($name)\n {\n //\n // the specification must be in this format:\n // form-field-name:CRM-field-name\n //\n if (($i_crm_name_pos = strpos($name,\":\")) > 0)\n {\n $s_crm_name = substr($name,$i_crm_name_pos + 1);\n $name = substr($name,0,$i_crm_name_pos);\n\t\t\t\tif (isset($vars[$name]))\n\t\t\t\t{\n\t\t\t\t\t$map[] = $s_crm_name.\"=\".urlencode($vars[$name]);\n\t\t\t\t\t$map[] = \"Orig_\".$s_crm_name.\"=\".urlencode($name);\n\t\t\t\t}\n }\n\t\t\telse\n\t\t\t{\n\t\t\t\t\t//\n\t\t\t\t\t// not the right format, so just include as a parameter\n\t\t\t\t\t// check for name=value format to choose encoding\n\t\t\t\t\t//\n\t\t\t\t$a_values = explode(\"=\",$name);\n\t\t\t\tif (count($a_values) > 1)\n\t\t\t\t\t$map[] = urlencode($a_values[0]).\"=\".urlencode($a_values[1]);\n\t\t\t\telse\n\t\t\t\t\t$map[] = urlencode($a_values[0]);\n\t\t\t}\n }\n }\n\tif (count($map) == 0)\n\t\treturn (\"\");\n\tif (strpos($url,'?') === false)\t// append ? if not present\n\t\t$url .= '?';\n\treturn ($url.implode(\"&\",$map));\n}", "protected function getSearchFormActionURL() {}", "private function getUrls() {\n\t\t// reassign the array because of a php bug (solved later with php 5.2.x @see: http://bugs.php.net/39449)\n\t\t$arr = $this->formData;\n\n\t\t// build bas URL for replacement variables\n\t\t$protocol\t= 'http'\n . ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ? 's' : '' )\n . '://';\n\t\t$url\t\t= $_SERVER['HTTP_HOST'] . dirname( $_SERVER['PHP_SELF'] ) . '/';\n $url = str_replace( '//', '/', $url ); // some server add 2 /\n $url = $protocol . $url . 'index.php?route=payment/directebanking/';\n\n\t\tif( $this->_param['successUrlStd'] ) {\n\t\t\t$arr['user_variable_0'] = $url . 'success'\n\t\t\t. '&transaction=-TRANSACTION-&security_criteria=-SECURITY_CRITERIA-'\n\t\t\t. '&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['successUrl'] ) {\n\t\t\t\t$arr['user_variable_0'] = $this->_param['successUrl'];\n\t\t\t}\n\t\t}\n\n\t\tif( $this->_param['cancelUrlStd'] ) {\n\t\t\t$arr['user_variable_1'] = $url . 'cancel'\n\t\t\t. '&transaction=-TRANSACTION-&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['cancelUrl'] ) {\n\t\t\t\t$arr['user_variable_1'] = $this->_param['cancelUrl'];\n\t\t\t}\n\t\t}\n\n\t\t// and reassign again\n\t\t$this->formData = $arr;\n\n\t\tunset( $arr );\n\t}", "public static function view_url_parameters() {\n return new external_function_parameters(\n array(\n 'urlid' => new external_value(PARAM_INT, 'url instance id')\n )\n );\n }", "public function get_url_get_parameters() {\r\n\t\treturn $this->url_get_parameters;\r\n\t}", "private function _getURL()\n {\n\n $url = $this->_ect . '?';\n foreach ($this as $name => $var) {\n if ($name == 'ect') {\n continue;\n }\n $url .= \"$name=$var&\";\n }\n\n $this->url = $url;\n\n return $this->url;\n }", "private function generate_url($params) {\n $s = ($_SERVER['HTTPS'] == 'on') ? 's' : '';\n $protocol = $this->strleft(strtolower($_SERVER['SERVER_PROTOCOL']), '/') . $s;\n $port = (($_SERVER['SERVER_PORT'] == '80' && $_SERVER['HTTPS'] != 'on') ||\n ($_SERVER['SERVER_PORT'] == '443' && $_SERVER['HTTPS'] == 'on')) ? \n '' : (':' .$_SERVER['SERVER_PORT']);\n $path = $this->strleft($_SERVER['REQUEST_URI'], '?');\n $parsed_params = '';\n $delm = '?';\n foreach (array_reverse($params) as $key => $val) {\n if (!empty($val)) {\n $parsed_key = $key[0] == '_' ? $key : '_' . $key;\n $parsed_params .= $delm . urlencode($parsed_key) . '=' . urlencode($val);\n $delm = '&';\n }\n }\n $cfg = rcmail::get_instance()->config->all();\n if ( $cfg['cas_webmail_server_name'] ) {\n $serverName = $cfg['cas_webmail_server_name'];\n } else {\n $serverName=$_SERVER['SERVER_NAME'];\n }\n return $protocol . '://' . $serverName . $port . $path . $parsed_params;\n }", "private function getParamsFromRequest() {\n if (isset($_GET['page'])) {\n $this->currentpage = $_GET['page'];\n } else {\n //else set default page to render\n $this->currentpage = 1;\n }\n //If limit is defined in URL\n if (isset($_GET['limit'])) {\n $this->limit = $_GET['limit'];\n } else { //else set default limit to 20\n $this->limit = 10;\n }\n //If currentpage is set to null or is set to 0 or less\n //set it to default (1)\n if (($this->currentpage == null) || ($this->currentpage < 1)) {\n $this->currentpage = 1;\n }\n //if limit is set to null set it to default (10)\n if (($this->limit == null)) {\n $this->limit = 10;\n //if limit is any number less than 1 then set it to 0 for displaying\n //items without limit\n } else if ($this->limit < 1) {\n $this->limit = 0;\n }\n }", "public function getUrlParameters()\n {\n // TODO: Implement getUrlParameters() method.\n }", "protected function get_url_this_add(){ return $this->input ['add_url'] ;}", "function generateGoogleFormURL($data) {\n $fieldName = array(\n 'name' => 'entry.1829444857',\n 'email' => 'entry.1251102372',\n 'contactno' => 'entry.1081583319',\n );\n\n $qsArray = [];\n foreach ($data as $key => $value) {\n if (isset($fieldName[$key])) {\n $qsArray[] = $fieldName[$key] . '=' . urlencode($data[$key]);\n }\n }\n\n return appendQueryString(FORM_URL, join('&', $qsArray));\n}", "public function to_url() {\n $post_data = $this->to_postdata();\n $out = $this->get_normalized_http_url();\n if ($post_data) {\n $out .= '?'.$post_data;\n }\n return $out;\n }", "private function build_params() {\n\n\t\t\t$this->per_page = $this->request->get_param( 'per_page' ) ? $this->request->get_param( 'per_page' ) : (int) get_option( 'posts_per_page' );\n\t\t\t$this->page = $this->request->get_param( 'page' ) ? $this->request->get_param( 'page' ) : 1;\n\t\t}", "protected function getRedirectToListAppend()\r\n\t{\r\n\t\t$append = parent::getRedirectToListAppend();\r\n\r\n\t\tforeach ($this->allow_url_params as $param):\r\n\t\t\tif (JRequest::getVar($param))\r\n\t\t\t{\r\n\t\t\t\t$append .= \"&{$param}=\" . JRequest::getVar($param);\r\n\t\t\t}\r\n\t\tendforeach;\r\n\r\n\t\treturn $append;\r\n\t}", "protected function prepareRequestUrlRegister()\n {\n return (intval($this->oConfig->get('debugEnabled'))) ?\n $this->oConfig->get('apiUrlRegisterDeb') : $this->oConfig->get('apiUrlRegisterProd');\n }", "function buildLinkWithQueryString($userName, $firstName, $lastName, $email) {\t\n\t$linkWithQueryString = 'index.php?userName=' . $userName . '&firstName=' . $firstName . '&lastName=' . $lastName . \n\t'&email=' . $email;\t\n\treturn $linkWithQueryString;\t\t\n}", "public function to_url()\n {\n $out = $this->get_normalized_http_url() . \"?\";\n $out .= $this->to_postdata();\n return $out;\n }", "function build_url_params ($url_params, $params = '')\n{\n\tforeach ($url_params as $k=>$v)\n\t{\n\t\t$params .= (strlen($params) ? '&' : '?') . $k . '=' . urlencode($v);\n\t}\n\t\n\treturn $params;\n}", "public function getParamsForUrl()\n {\n return array(\n 'restaurant_slug' => $this->getRestaurant()->getSlug(),\n 'locality_slug' => $this->getRestaurant()->getLocality()->getSlug(),\n 'country_slug' => $this->getRestaurant()->getCountry()->getSlug(),\n 'dish_slug' => $this->getSlug()\n );\n }", "function _pageform_url( $pid, $pf = NULL)\n{\n if (!empty($pf))\n $url = xarModUrl('xarpages','user','display',array('pid'=>$pid, 'pf'=>$pf));\n else\n $url = xarModUrl('xarpages','user','display',array('pid'=>$pid));\n return $url;\n}", "function reportsetup_submit( Pieform $form, $values ) {\n $query = http_build_query( $values );\n lib::redirect( \"reportview.php?$query\" );\n}", "public function get_requestUrlExParams()\n {\n return $this->requestUrlExParams;\n }", "function buildurl($params, $facet=NULL, $newvalue=NULL, $facet2=NULL, $newvalue2=NULL, $facet3=NULL, $newvalue3=NULL, $facet4=NULL, $newvalue4=NULL) {\n\n\tif ($facet) {\n\t\t$params[$facet]=$newvalue;\n\t}\n\n\tif ($facet2) {\n\t\t$params[$facet2]=$newvalue2;\n\t}\n\n\tif ($facet3) {\r\n\t\t$params[$facet3]=$newvalue3;\r\n\t}\n\t\r\n\tif ($facet4) {\r\n\t\t$params[$facet4]=$newvalue4;\r\n\t}\r\n\t\n\t// if param false, delete it\n\tforeach ($params as $key=>$value) {\n\n\t\tif ($value==false) {\n\t\t\tunset($params[$key]);\n\t\t}\n\n\t}\n\n\t$uri = \"?\".http_build_query($params);\n\n\treturn $uri;\n\n}", "private function _url($par = array()) {\n\t\t$get = $_GET;\n\t\t\n\t\tforeach ((array) $par AS $key => $val) { //overide value\n\t\t\tif ($key == 'path') //if path, encode\n\t\t\t\t$get['path'] = \\Crypt::encrypt($val);\n\t\t\telse\n\t\t\t\t$get[$key] = $val;\n\t\t}\n\t\t\n\t\t$url = '//';\n\t\t\n\t\t$url .= $this->_sanitize(g($_SERVER, 'HTTP_HOST').'/'.strtok(g($_SERVER, 'REQUEST_URI'), '?'));\n\t\t\n\t\treturn $url.'?'.http_build_query($get);\n\t}", "private function _getUrl()\n {\n // Explode url to the array Variabels (url)\n $url = isset($_GET['url']) ? $_GET['url'] : null;;\n $url = rtrim($url, '/');\n $url = filter_var($url,FILTER_SANITIZE_URL);\n $this->_url = explode('/', $url);\n }", "protected function _build_url() {\n\n $params = array_filter([\n 'name' => $this->_names,\n 'country_id' => $this->_country_id,\n 'language_id' => $this->_language_id,\n ], function($v) {\n if (!is_array($v)) {\n return strlen(trim($v)) > 0;\n } else {\n return $v;\n }\n });\n //Only pass apikey if there is one set\n if ($api_key = $this->get_api_key()) {\n $params['apikey'] = trim($api_key);\n }\n\n return self::BASE . '?' . http_build_query($params);\n }", "public function splitUrl() {\n if (isset($_GET['url'])) {\n\n // split URL\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_STRING);\n $url = explode('/', $url);\n\n // parse custom urls\n $url = $this->parseRoutes($url);\n\n if ($this->app->language->enabled) {\n // set lang key\n $this->lang_key = isset($url[0]) ? $url[0] : null;\n // set controller\n $this->url_controller = isset($url[1]) ? $url[1] : null;\n // and action\n $this->url_action = isset($url[2]) ? $url[2] : null;\n\n // store URL parts\n $this->url_parts = array_values($url);\n\n // remove controller and action from URL parts\n unset($url[0], $url[1], $url[2]);\n } else {\n // set controller\n $this->url_controller = isset($url[0]) ? $url[0] : null;\n // and action\n $this->url_action = isset($url[1]) ? $url[1] : null;\n\n // store URL parts\n $this->url_parts = array_values($url);\n\n // remove controller and action from URL parts\n unset($url[0], $url[1]);\n }\n\n // store action params\n $this->action_params = array_values($url);\n\n }\n }", "public static function getFieldUrl()\n {\n return sprintf(\n '%s/Fields/%s',\n \\Invertus\\SaferPay\\Config\\SaferPayConfig::getBaseUrl(),\n Configuration::get(\n \\Invertus\\SaferPay\\Config\\SaferPayConfig::CUSTOMER_ID .\n \\Invertus\\SaferPay\\Config\\SaferPayConfig::getConfigSuffix()\n )\n );\n }", "protected function _getUrlParams()\n {\n return array(\n '_store' => $this->getStore(),\n '_store_to_url' => true\n );\n }", "public function to_url()\n {\n $post_data = $this->to_postdata();\n $out = $this->get_http_url();\n if ($post_data) {\n $out .= '?'.$post_data;\n }\n\n return $out;\n }", "function url($array = false, $keep=false, $validate = true, $SiteUrlOnEmptyParamSet = false, $getAliases = true) {\n if(is_string($array) && !is_numeric($array) && strtolower(substr($array, 0, 4)) == 'www.') return 'http://'.$array;\n\n $pass = array();\n if($array == false) $array = array();\n if(!is_array($array)) $array = array('id' => $array);\n if($keep === true) {\n $keep = $_GET->keys();\n }\n elseif($keep !== false && !is_array($keep)) $keep = array($keep);\n if(!is_array($keep)) $keep = array();\n foreach($_REQUEST as $g => $v) {\n if(!in_array($g, $keep)) continue;\n elseif(is_array($v)) {\n foreach($v as $a => $b) {\n if(!empty($b)) $pass[$g][$a] = $b;\n }\n }\n else $pass[$g] = $v;\n }\n $parts = array_merge($pass,$array);\n $validParts = array();\n foreach($parts as $key => $val) {\n if($key == '#') continue;\n if(!$validate || ($_REQUEST->validate($key, $val) || $_GET->validate($key, $val))) {\n $validParts[$key] = $val;\n }\n }\n $url = '';\n //FIXME: Config\n // Short-URL\n if(true && isset($validParts['id'])) {\n global $Controller;\n if(is_numeric($validParts['id']) && $getAliases) {\n if($obj = $Controller->get($validParts['id'], OVERRIDE))\n if($alias = $obj->alias) $validParts['id'] = $alias;\n } elseif(is_object($validParts['id'])) {\n if($alias = $validParts['id']->alias) $validParts['id'] = $alias;\n else $validParts['id'] = $validParts['id']->ID;\n }\n $url = '/'.($validParts['id'] != 'frontpage'?$validParts['id']:'');\n unset($validParts['id']);\n }\n $query = http_build_query($validParts,'','&amp;');\n if(!empty($query)) $url .= '?'.$query;\n if(isset($array['#'])) $url.='#'.$array['#'];\n if((!empty($url) || $SiteUrlOnEmptyParamSet) && $SiteUrlOnEmptyParamSet != -1) {\n global $SITE;\n $url = $SITE->URL.$url;\n }\n return $url;\n}", "protected function getUrl() {\n\n\t\t\t$parsedUrls = [\n\t\t\t\t\"&parsedUrl=\". rawurlencode(static::AjaxUrl. \"?value=\". static::ValueValid),\n\t\t\t\t\"&parsedUrl=\". rawurlencode(static::AjaxUrl. \"?value=\". static::ValueInvalid),\n\t\t\t\t\"&parsedUrl=\". rawurlencode(static::AjaxUrl. \"?value=\". static::ValueInit),\n\t\t\t];\n\n\t\t\treturn $parsedUrls;\n\t\t}", "public function makelink()\n {\n /*\n * If link set directly that forces using it rather than build\n */\n if ($this->link) {\n return $this->link;\n }\n\n $pageid = static::makeParameterId($this->for);\n $parameters = $this->app['request']->query->all();\n if (array_key_exists($pageid, $parameters)) {\n unset($parameters[$pageid]);\n } else {\n unset($parameters['page']);\n }\n\n $parameters[$pageid] = '';\n $link = '?' . http_build_query($parameters);\n\n return $link;\n }", "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 }", "function publishs_url()\r\n {\r\n \t$query = '';\r\n \t$page = 'partlist.php';\r\n if(isset($_GET[\"key\"])){\r\n \t \t$value = trim($_GET[\"key\"]);\r\n \t \tif($value != \"\"){\r\n\t \t $query = '?key='.$value ; \t \t \t\r\n \t \t}\r\n \t}\r\n\t$url = $page.$query;\r\n\techo $url;\r\n }", "function fielding_youtube_params( $url ) {\n\treturn ((strpos($url, \"?\") < -1) ? \"?\" : \"&\") . \"autoplay=1&fs=1&rel=0\";\n}", "protected static function get_new_url()\n {\n return parse_url($_SERVER['REQUEST_URI'])['path'] . '?' . $_SERVER['QUERY_STRING'];\n }", "function build_url($base_url, $params) {\r\n $url = $base_url;\r\n if (!empty($params)) {\r\n $url .= '?' . implode('&', $params);\r\n }\r\n return $url;\r\n }", "private function sanitized_url() {\n $url = $_SERVER['SCRIPT_NAME'] . \"?\";\n /* the GET vars used by git-php */\n $git_get = array('p', 'dl', 'b', 'a', 'h', 't');\n foreach ($_GET as $var => $val) {\n if(!in_array($var, $git_get)){\n $get[$var] = $val;\n $url.=\"{$var}={$val}&amp;\";\n }\n }\n return $url;\n }", "private function _getUrl()\n\t{\n\t\t$url = isset($_GET['url']) ? $_GET['url'] : null;\n\t\t$url = rtrim($url, '/');\n\t\t$url = filter_var($url, FILTER_SANITIZE_URL);\n\t\t$this->_url = explode('/', $url);\n\t}", "private function _getUrl()\n\t{\n\t\t$url = isset($_GET['url']) ? $_GET['url'] : null;\n\t\t$url = rtrim($url, '/');\n\t\t$url = filter_var($url, FILTER_SANITIZE_URL);\n\t\t$this->_url = explode('/', $url);\n\t}", "private function build_url_field($_meta, $_ptype = \"wccpf\", $_class = \"\", $_index, $_show_value = \"no\", $_readonly = \"\", $_cloneable = \"\", $_wrapper = true) {\r\n $html = '';\r\n if ($_ptype != \"wccaf\") {\r\n if (isset($_meta[\"default_value\"]) && $_meta[\"default_value\"] != \"\") {\r\n $visual_type = (isset($_meta[\"view_in\"]) && ! empty($_meta[\"view_in\"])) ? $_meta[\"view_in\"] : \"link\";\r\n $open_tab = (isset($_meta[\"tab_open\"]) && ! empty($_meta[\"tab_open\"])) ? $_meta[\"tab_open\"] : \"_blank\";\r\n if ($visual_type == \"link\") {\r\n /* Admin wants this url to be displayed as LINK */\r\n $html = '<a href=\"' . $_meta[\"default_value\"] . '\" class=\"' . $_class . '\" target=\"' . $open_tab . '\" title=\"' . $_meta[\"tool_tip\"] . '\" ' . $_cloneable . ' >' . $_meta[\"link_name\"] . '</a>';\r\n } else {\r\n /* Admin wants this url to be displayed as Button */\r\n $html = '<button onclick=\"window.open(\\'' . $_meta[\"default_value\"] . '\\', \\'' . $open_tab . '\\' )\" title=\"' . $_meta[\"tool_tip\"] . '\" class=\"' . $_class . '\" ' . $_cloneable . ' >' . $_meta[\"link_name\"] . '</button>';\r\n }\r\n } else {\r\n /* This means url value is empty so no need render the field */\r\n $_wrapper = false;\r\n }\r\n } else {\r\n $html .= '<input type=\"text\" name=\"' . esc_attr($_meta['key']) . '\" class=\"wccaf-field short\" id=\"' . esc_attr($_meta['key']) . '\" placeholder=\"http://example.com\" wccaf-type=\"url\" value=\"' . esc_attr($_meta['value']) . '\" wccaf-pattern=\"mandatory\" wccaf-mandatory=\"\">';\r\n }\r\n /* Add wrapper around the field, based on the user options */\r\n if ($_wrapper) {\r\n $html = $this->built_field_wrapper($html, $_meta, $_ptype, $_index);\r\n }\r\n return $html;\r\n }", "private function _getUrl()\r\n {\r\n $url = filter_input(INPUT_GET, 'url');\r\n $url = rtrim($url, '/');\r\n $url = filter_var($url,FILTER_SANITIZE_URL);\r\n $this->_url = explode('/', $url);\r\n }", "public function redirecturl()\n\t\t\t{\n\t\t\t\tif($this->fields_arr['pcakey'])\n\t\t\t\t Redirect2URL($_SESSION['pcakey'][$this->fields_arr['pcakey']]);\n\t\t\t}", "protected function setUrl() {\r\n\t\t$this->url = htmlspecialchars(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), ENT_QUOTES);\r\n\t}", "public function getPaymentFormUrl()\r\n {\r\n return self::HPF_URL;\r\n }", "public static function formUrlParameters(array $variables) : string {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $variables);\n\n\t\t$variables = self::_applyFilter(get_class(), __FUNCTION__, $variables, array('event' => 'args'));\n\n\t\t$appendix = '?';\n\n\t\t$first = 1;\n\t\tforeach ($variables as $key => $value) {\n\t\t\tif ($first === 1) {\n\t\t\t\t$appendix .= $key . '=' . urlencode($value);\n\t\t\t} else {\n\t\t\t\t$appendix .= '&' . $key . '=' . urlencode($value);\n\t\t\t}\n\t\t\t$first = 0;\n\t\t}//end foreach\n\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $appendix, $variables);\n\t\t$appendix = self::_applyFilter(get_class(), __FUNCTION__, $appendix, array('event' => 'return'));\n\n\t\treturn $appendix;\n\n\t}", "protected function get_url_this_view(){ return $this->input ['table_url'] ;}", "function build_url($strip_vars = false)\n{\n\tglobal $user, $phpbb_root_path;\n\n\t// Append SID\n\t$redirect = append_sid($user->page['page'], false, false);\n\n\t// Add delimiter if not there...\n\tif (strpos($redirect, '?') === false)\n\t{\n\t\t$redirect .= '?';\n\t}\n\n\t// Strip vars...\n\tif ($strip_vars !== false && strpos($redirect, '?') !== false)\n\t{\n\t\tif (!is_array($strip_vars))\n\t\t{\n\t\t\t$strip_vars = array($strip_vars);\n\t\t}\n\n\t\t$query = $_query = array();\n\n\t\t$args = substr($redirect, strpos($redirect, '?') + 1);\n\t\t$args = ($args) ? explode('&', $args) : array();\n\t\t$redirect = substr($redirect, 0, strpos($redirect, '?'));\n\n\t\tforeach ($args as $argument)\n\t\t{\n\t\t\t$arguments = explode('=', $argument);\n\t\t\t$key = $arguments[0];\n\t\t\tunset($arguments[0]);\n\n\t\t\t$query[$key] = implode('=', $arguments);\n\t\t}\n\n\t\t// Strip the vars off\n\t\tforeach ($strip_vars as $strip)\n\t\t{\n\t\t\tif (isset($query[$strip]))\n\t\t\t{\n\t\t\t\tunset($query[$strip]);\n\t\t\t}\n\t\t}\n\n\t\t// Glue the remaining parts together... already urlencoded\n\t\tforeach ($query as $key => $value)\n\t\t{\n\t\t\t$_query[] = $key . '=' . $value;\n\t\t}\n\t\t$query = implode('&', $_query);\n\n\t\t$redirect .= ($query) ? '?' . $query : '';\n\t}\n\n\t// We need to be cautious here.\n\t// On some situations, the redirect path is an absolute URL, sometimes a relative path\n\t// For a relative path, let's prefix it with $phpbb_root_path to point to the correct location,\n\t// else we use the URL directly.\n\t$url_parts = @parse_url($redirect);\n\n\t// URL\n\tif ($url_parts !== false && !empty($url_parts['scheme']) && !empty($url_parts['host']))\n\t{\n\t\treturn str_replace('&', '&amp;', $redirect);\n\t}\n\n\treturn $phpbb_root_path . str_replace('&', '&amp;', $redirect);\n}", "function getEditUrl()\r\n\t{\r\n\t\tglobal $config;\r\n\r\n\t\t// need full url for links placed inside email messages\r\n\t\t$link = \"http://\". $config[\"http_host\"] . \"/survey_response_form?survey_id={$this->survey_id}\";\r\n\t\tif($this->token)\r\n\t\t\t$link .= \"&token={$this->token}\";\r\n\t\t\t\r\n\t\treturn $link;\r\n\t}", "abstract public function getPaymentPageUrl();", "function propagar()\r\n\t{\r\n\t\t$str = \"\";\r\n\t\tforeach ($_GET as $nombre_var => $valor_var) {\r\n\t\t\t if(substr($nombre_var, 0, 4)==\"fil_\")\r\n\t\t\t\t$str .= \"&$nombre_var=$valor_var\";\r\n\t\t} \r\n\t\treturn $str.\"&\".$this->variables();\r\n \t\t\r\n\t}", "function wpmu_admin_redirect_add_updated_param($url = '')\n {\n }", "public static function buildUrl($parameters) {\n\t \n\t $url='';\n\t \n\t // set the base url\n\t if(isset($parameters['baseUrl'])) {\n\t $url .= $parameters['baseUrl'];\n\t unset($parameters['baseUrl']);\n\t } else {\n\t $url .= self::getBaseUrl();\n\t }\n\t \n\t // set the kiosk\n\t if(isset($parameters['kiosk'])) {\n\t $kiosk = $parameters['kiosk'];\n\t unset($parameters['kiosk']);\n\t } else {\n\t $kiosk = self::getKiosk();\n\t }\n\t if(!empty($kiosk)) {\n\t $url .= '/'.$kiosk;\n\t }\n\t \n\t // set the scope\n\t if(isset($parameters['scope'])) {\n\t $url .= '/'.$parameters['scope'];\n\t unset($parameters['scope']);\n\t } else {\n\t $url .= '/'.self::getScope();\n\t }\n\t \n\t if(isset($parameters['action'])) {\n\t $url .= '/'. $parameters['action'].'.do';\n\t unset($parameters['action']);\n\t } else {\n\t $url .= '/'. self::getAction().'.do';\n\t }\n\t \n\t if(count($parameters)) {\n\t $url .= '?'.http_build_query($parameters);\n\t }\n\t \n\t return $url;\n\t}", "function KeyUrl($url, $parm = \"\") {\n\t\t$sUrl = $url . \"?\";\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\n\t\tif (!is_null($this->gjd_id->CurrentValue)) {\n\t\t\t$sUrl .= \"gjd_id=\" . urlencode($this->gjd_id->CurrentValue);\n\t\t} else {\n\t\t\treturn \"javascript:ew_Alert(ewLanguage.Phrase('InvalidRecord'));\";\n\t\t}\n\t\treturn $sUrl;\n\t}", "public function makeUrlFromRequest()\n {\n $id = __Request::get('id', null);\n $resolvedVO = $this->createResolvedVO($id);\n return $resolvedVO->url;\n }", "private function getThisPageFullURL()\n {\n return 'http' . ( ! empty($_SERVER['HTTPS']) ? 's' : '' ) . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . ( ( empty($_GET) ) ? '' : '?' . http_build_query($_GET) );\n }", "function CreateURL($url,$querystring='',$encode=false,$redirect=false)\n{\n\t$url = ROOTURL.'/'.$url;\n\tif($querystring)\n\t{\n\t\tif($encode)\n\t\t{\n\t\t\treturn $url.'?'.Encode($querystring);\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $url.'?'.$querystring;\t\t\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn $url;\n\t}\n\treturn false;\n}", "public static function filterFormAction() {\n\n $query = Request::segments();\n\n\n foreach ($query as $k => $q) {\n if (preg_match(\"/page-[0-9]+$/\", $q, $match)) {\n unset($query[$k]);\n };\n }\n $query = implode('/', $query);\n $url = Request::root() . \"/$query/\";\n\n return $url;\n }" ]
[ "0.6785151", "0.67579556", "0.6423543", "0.63742775", "0.6314623", "0.6295872", "0.6285857", "0.6260256", "0.6258695", "0.62438756", "0.6184899", "0.6171379", "0.61319715", "0.6098319", "0.60783106", "0.60723263", "0.60273266", "0.60028243", "0.59857315", "0.5982742", "0.5977669", "0.5976051", "0.5970223", "0.5934199", "0.5913682", "0.5907831", "0.58867323", "0.58849144", "0.5870174", "0.58699524", "0.58549094", "0.5854765", "0.58438456", "0.5836882", "0.5830976", "0.58231074", "0.5806124", "0.5804345", "0.57987636", "0.57842445", "0.57676303", "0.5729268", "0.572873", "0.5728226", "0.5728085", "0.57237", "0.57078046", "0.57068264", "0.569452", "0.5690928", "0.5688951", "0.56834584", "0.566714", "0.56492937", "0.56407344", "0.56368554", "0.56263745", "0.5617227", "0.561626", "0.5611055", "0.5602766", "0.55882406", "0.5583548", "0.5582738", "0.5576281", "0.5571901", "0.55637175", "0.55601573", "0.55546206", "0.5535891", "0.55328083", "0.55317515", "0.5526475", "0.55214643", "0.5519209", "0.5503127", "0.5497867", "0.5497633", "0.5496033", "0.5489045", "0.54755586", "0.54755586", "0.54733", "0.5472123", "0.54641527", "0.54629713", "0.5460532", "0.54466295", "0.5441758", "0.5431914", "0.5431896", "0.5424991", "0.5421634", "0.54211515", "0.5417193", "0.5415532", "0.5413907", "0.5412921", "0.54078907", "0.5384518" ]
0.7867275
0
Ensure that the catalogue URL parts have any whitespace around them stripped to avoid weird and unhelpful error that comes back from catalogue if there is a space in it.
protected function onBeforeWrite() { parent::onBeforeWrite(); $this->CataloguePushUrl = trim($this->CataloguePushUrl); $this->CatalogueViewUrl = trim($this->CatalogueViewUrl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanStringUrl($cadena){\n\t\t$cadena = strtolower($cadena);\n\t\t$cadena = trim($cadena);\n\t\t$cadena = strtr($cadena,\n\t\t\t\t\t\t\t\t\"ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ\",\n\t\t\t\t\t\t\t\t\"aaaaaaaaaaaaooooooooooooeeeeeeeecciiiiiiiiuuuuuuuuynn\");\n\t\t$cadena = strtr($cadena,\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\"abcdefghijklmnopqrstuvwxyz\");\n\t\t$cadena = preg_replace('#([^.a-z0-9]+)#i', '-', $cadena);\n\t\t$cadena = preg_replace('#-{2,}#','-',$cadena);\n \t$cadena = preg_replace('#-$#','',$cadena);\n \t\t$cadena = preg_replace('#^-#','',$cadena);\n\t\treturn $cadena;\n\t}", "public function sanitizeLocalUrlValidUrlsDataProvider() {}", "function heateor_ss_validate_url($url){\r\n\treturn filter_var(trim($url), FILTER_VALIDATE_URL);\r\n}", "public function sanitizeLocalUrlInvalidDataProvider() {}", "public static function Zf_URLSanitize() {\n\n /**\n * IF A URL HAS BEEN SET, GET IT FOR SANITIZATION\n */\n $zf_url = isset($_GET['url']) ? $_GET['url'] : null;\n\n\n /**\n * REMOVE THE LAST FORWARD SLASH \"/\" FROM THE URL\n */\n $zf_url = rtrim($zf_url, '/');\n\n\n /**\n * FILTER THE URL TO ONLY REMAIN WITH CLEAN URL\n */\n $zf_url = filter_var($zf_url, FILTER_SANITIZE_URL);\n\n\n /**\n * SPLIT THE URL, WITH \"/\" AS THE DELIMITER WHILE RETURNING EACH PART INTO\n * AN ARRAY\n */\n $zf_url = explode('/', $zf_url);\n\n //print_r($zf_url); echo \"<br><br>\"; //This is strictly for debugging purposes.\n\n\n /**\n * RETURNS AN ARRAY OF THE URL PARTS.\n */\n return $zf_url;\n }", "function normalize_url($url) {\n\n $url = trim($url);\n if (!$url) return $url;\n\n if (preg_match('~^([a-z0-9_-]+)://~i', $url)) {\n return $url;\n }\n\n return 'http://' . $url;\n }", "function iu_cleaner_url($title){\n\t$blogtitle = trim(strtolower($title)); //remove spaces before and after and lowercase\n\t$blogtitle = iconv('UTF-8', 'ASCII//TRANSLIT', $blogtitle); // replaces weird characters with normal/readable counterparts ie: à to a\n\t$blogtitle = preg_replace('/[^A-Za-z0-9_\\s]+/', '', $blogtitle); //get rid of non-url chars\n\t$blogtitle = preg_replace('/\\s/', '-', $blogtitle); //replace spaces with a dash -\n\t$blogtitle = preg_replace('/-([-]+)?/', '-', $blogtitle); // replace dashes with more than two dashes side by side into only a single dash\n\treturn $blogtitle;\n}", "function checkurl($url){\n if(!filter_var($url, FILTER_VALIDATE_URL)){\n return \" \";\n }\n else{\n return $url;\n }\n }", "public static function sanitizeString($url) {\r\n $url = mb_strtolower($url, 'UTF-8');\r\n $url = iconv('UTF-8', 'ASCII//TRANSLIT', $url);\r\n $url = str_replace(array(\"'\", '\"', ';', ',', ':', ' ', '_'), '-', $url);\r\n $url = preg_replace(\"/[^a-z0-9-]/\", '', $url);\r\n\t$url = str_replace('---', '-', $url);\r\n $url = str_replace('--', '-', $url);\r\n\t$url = trim($url, '-');\r\n\treturn $url;\r\n }", "function standardize_url($url) {\n if(empty($url)) return $url;\n return (strstr($url,'http://') OR strstr($url,'https://')) ? $url : 'http://'.$url;\n}", "public function cleanHost() {\r\n\t\t$this->host = preg_replace('/^\\/+|\\/+$/', '', $this->host);\r\n\t}", "function clean_url($text)\n\t\t{\n\t\t\t$text=strtolower($text);\n\t\t\t$code_entities_match = array(' ','--','&quot;','!','@','#','$','%','^','&','*','(',')','_','+','{','}','|',':','\"','<','>','?','[',']','\\\\',';',\"'\",',','.','/','*','+','~','`','=');\n\t\t\t$code_entities_replace = array('-','-','','','','','','','','','','','','','','','','','','','','','','','','');\n\t\t\t$text = str_replace($code_entities_match, $code_entities_replace, $text);\n\t\t\treturn $text;\n\t\t}", "function clean_url($url) {\n\n global $globals;\n\n //Remove the AEF Session Code - Also there in parse_br function\n $url = preg_replace('/(\\?|&amp;|;|&)(as=[\\w]{32})(&amp;|;|&|$)?/is', '$1$3', $url);\n\n return $url;\n}", "function yt_clean_url( $url ) {\n\t\tif ( '' == $url )\n\t\t\treturn;\n\t\t\t\n\t\t$url = preg_replace('/\\?.*/', '', $url);\n\t\t\n\t\treturn $url;\n\t \n\t}", "function prepareURL($_sUrl) {\n $sUrl = trim($_sUrl);\n if(strlen($sUrl) > 0) {\n //add protocol if necessary\n if(strpos($sUrl, '://') === FALSE) {\n $sUrl = 'http://'.$sUrl;\n }\n //remove ancors if necessary\n if(strpos($sUrl, '#') !== FALSE) {\n list($sUrl) = explode('#', $sUrl, 2);\n }\n //remove after-? marks\n if(strpos($sUrl, '?') !== FALSE) {\n list($sUrl) = explode('?', $sUrl, 2);\n }\n }\n return $sUrl;\n}", "function normalize($url) {\n\t\t//$result = preg_replace('%(?<!:/|[^/])/|(?<=&)&|&$|%', '', $url);\n\t\t$result=str_replace(array('://','//',':::'),array(':::','/','://'),$url);\n\t\treturn $result;\n\t}", "function seo_url($string)\n{\n //Lower case everything\n $string = strtolower($string);\n //Make alphanumeric (removes all other characters)\n $string = preg_replace(\"/[^a-z0-9_\\s-]/\", \"\", $string);\n //Clean up multiple dashes or whitespaces\n $string = preg_replace(\"/[\\s-]+/\", \" \", $string);\n //Convert whitespaces and underscore to dash\n $string = preg_replace(\"/[\\s_]/\", \"-\", $string);\n return strtolower($string);\n}", "function mustsee_sanitize_url( $new_value ) {\n if ( '' == $new_value ) { return; }\n\n if ( !preg_match('/http:\\/\\//', $new_value) ) {\n $new_value = 'http://' . $new_value;\n }\n\n return strip_tags( $new_value );\n}", "function Sanitize_url($url) \n{\n $nurl = filter_var($url, FILTER_SANITIZE_URL);\n return $nurl;\n}", "function clean_url_data($urldata)\n{\n\t$new_urldata = array();\n\tforeach($urldata AS $key=>$value)\n\t{\n\t\tif($value === FALSE || trim($value) == '')\n\t\t{\n\t\t\t$new_urldata[$key] = '';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$new_urldata[$key] = $value;\n\t\t}\n\t}\n\t\n\treturn $new_urldata;\n}", "function strip_url_console($name)\n\t{\n\t\t/*$name = trim($name);\n\t\t$name = preg_replace(\"/[^0-9a-zA-Z-]+/\", \"\", $name);\n\t\t$name = str_replace(\"---\",\"-\",$name);\n\t\t$name = str_replace(\"----\",\"-\",$name);\n\t\t$name = str_replace(\"--\",\"-\",$name);\n\t\treturn $name;*/\n\t\t$name = trim($name);\n\t\t$name = str_replace(\" \",\"-\",$name);\n\t\t$name = str_replace(\"_\",\"-\",$name);\n\t\t$name = preg_replace(\"/[^0-9a-zA-Z-]+/\", \"\", $name);\n\t\t$name = str_replace(\"----\",\"-\",$name);\n\t\t$name = str_replace(\"---\",\"-\",$name);\n\t\t$name = str_replace(\"--\",\"-\",$name);\n\t\t$name = str_replace(\".\",\"-\",$name);\n\t\treturn strtolower($name);\n\t}", "public function validateRedirectUrlKeepsCleanUrlDataProvider() {}", "function whitespace_warnings()\n{\n global $comdef_install_wizard_strings, $http_vars;\n $warn = '';\n foreach ([['Database_Host', 'dbServer'], ['Table_Prefix', 'dbPrefix'], ['Database_Name', 'dbName'], ['Database_User', 'dbUser'], ['Database_PW', 'dbPassword']] as $pair) {\n $value = $http_vars[$pair[1]];\n if ($value != trim($value)) {\n $field_name = str_replace(':', '', $comdef_install_wizard_strings[$pair[0]]);\n $warn .= ' ' . sprintf($comdef_install_wizard_strings['Database_Whitespace_Note'], $field_name);\n }\n }\n return $warn;\n}", "function formatUrl($str, $sep='-'){ #convert white space to dashes for urls\n\t$res = strtolower($str);\n\t$res = preg_replace('/[^[:alnum:]]/', ' ', $res);\n\t$res = preg_replace('/[[:space:]]+/', $sep, $res);\n\treturn trim($res, $sep);\n}", "protected function check_pvs_url($value) {\n\t\t$value = trim($value);\n\t\tif (get_magic_quotes_gpc ()) {\n\t\t\t$value = stripslashes($value);\n\t\t}\n\n\t\t$value = strtr($value, array_flip(get_html_translation_table(HTML_ENTITIES)));\n\t\t$value = strip_tags($value);\n\t\t$value = htmlspecialchars($value);\n\t\treturn $value;\n\t}", "function clean_urls($text) {\r\n\t$text = strip_tags(lowercase($text));\r\n\t$code_entities_match = array(' ?',' ','--','&quot;','!','@','#','$','%',\r\n '^','&','*','(',')','+','{','}','|',':','\"',\r\n '<','>','?','[',']','\\\\',';',\"'\",',','/',\r\n '*','+','~','`','=','.');\r\n\t$code_entities_replace = array('','-','-','','','','','','','','','','','',\r\n '','','','','','','','','','','','','');\r\n\t$text = str_replace($code_entities_match, $code_entities_replace, $text);\r\n\t$text = urlencode($text);\r\n\t$text = str_replace('--','-',$text);\r\n\t$text = rtrim($text, \"-\");\r\n\treturn $text;\r\n}", "public static function sanitizeURL($url){\n $parts = parse_url($url);\n $port = isset($parts['port']) ? $parts['port'] : '';\n $scheme = $parts['scheme'];\n $host = $parts['host'];\n $path = isset($parts['path']) ? $parts['path'] : '';\n $port or $port = ($scheme == 'https') ? '443' : '80';\n if(($scheme == 'https' && $port != '443') || ($scheme == 'http' && $port != '80')) {\n $host = \"$host:$port\";\n }\n $sanitizedURL = strtolower(\"$scheme://$host\").$path;\n return $sanitizedURL;\n }", "private function validate_url($url)\n\t{\n\t\tglobal $config;\n\n\t\t$url = str_replace(\"\\r\\n\", \"\\n\", str_replace('\\\"', '\"', trim($url)));\n\t\t$url = str_replace(' ', '%20', $url);\n\t\t$url = str_replace('&', '&amp;', $url);\n\n\t\t// if there is no scheme, then add http schema\n\t\tif (!preg_match('#^[a-z][a-z\\d+\\-.]*:/{2}#i', $url))\n\t\t{\n\t\t\t$url = 'http://' . $url;\n\t\t}\n\n\t\t// Is this a link to somewhere inside this board? If so then run reapply_sid()\n\t\tif (strpos($url, generate_board_url()) !== false)\n\t\t{\n\t\t\t$url = reapply_sid($url);\n\t\t}\n\n\t\treturn $url;\n\t}", "public function cleanUri(){\n return preg_replace('/[^\\da-z\\-\\/\\_]/i', '', filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL));\n }", "protected function sanitize() {}", "function sanitise_and_normalise_url( $unsafe_url ) {\n\t// Verify whether the URL is encoded. If so, encode it, to be consistent.\n\t// This regular expression was extracted from `wp_sanitize_text_field()`.\n\tif ( preg_match( '/%[a-fA-F0-9]{2}/i', $unsafe_url ) ) {\n\t\t$unsafe_url = urldecode( $unsafe_url );\n\t}\n\n\t// Test whether the URL has a scheme (like `https://`) and a domain. This is to determine whether this is an\n\t// absolute URL or a relative URL.\n\t$url_parts = wp_parse_url( $unsafe_url );\n\n\t// If we're dealing with a relative URL, make sure that there's a leading slash before it.\n\tif ( empty( $url_parts['scheme'] ) || empty( $url_parts['host'] ) ) {\n\t\t$unsafe_url = add_leading_slash( $unsafe_url );\n\t}\n\n\t// Strip query string, hash location and trailing slash.\n\t$unsafe_url = strtok( $unsafe_url, '?#' );\n\t$unsafe_url = rtrim( $unsafe_url, '/' );\n\n\t// We now can safely escape the URL.\n\t$url = esc_url_raw( $unsafe_url );\n\n\treturn $url;\n}", "public function sanitizeLocalUrlValidPathsDataProvider() {}", "function _xss_sanitization_esc_url( $url, $_context = 'display' ) {\n\n // URL protocols\n $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn');\n \n // Init\n $original_url = $url;\n \n // If blank, then no harm\n if ( '' == $url ) {\n return $url;\n }\n\n //Start cleaning\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n \n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = wp_deep_replace($strip, $url);\n\n // Make sure its not a ;//\n $url = str_replace(';//', '://', $url);\n \n /* If the URL doesn't appear to contain a scheme, we\n * presume it needs http:// appended (unless a relative\n * link starting with /, # or ? or a php file).\n */\n if ( strpos($url, ':') === false && \n ! in_array( $url[0], array( '/', '#', '?' ) ) &&\n ! preg_match('/^[a-z0-9-]+?\\.php/i', $url) \n ){\n $url = 'http://' . $url;\n }\n\n // Replace ampersands and single quotes only when displaying.\n if ( 'display' == $_context ) {\n $url = kses_normalize_entities( $url );\n $url = str_replace( '&amp;', '&#038;', $url );\n $url = str_replace( \"'\", '&#039;', $url );\n }\n\n if ( kses_bad_protocol( $url, $protocols ) != $url ){\n return '';\n }\n\n return $url;\n}", "protected function cleanUrl($url) {\n\t\treturn str_replace ( 'http://', '', $url );\n\t}", "function ywig_sanitize_url( $url ) {\n\t$output = esc_url_raw( $url );\n\treturn $output;\n}", "public function sanitizeURL($endpointURL = \"\"){\n\t\t$endpointURL = trim($endpointURL);\n\t\t$endpointURL = rtrim($endpointURL, \"/\");\n\t\treturn $endpointURL;\n\t}", "function filter_paces_site_url( $string ) {\n $site_url = \"{site_url}\";\n $replaceData = site_url();\n $string = str_replace($site_url, $replaceData, $string);\n\n return $string;\n }", "function checkUrlString( $url )\t\n\t{\n\t\t$url = trim($url);\t\t\n\t\t\tif( 'http://' != strtolower( substr($url, 0, 7)) && 'https://' != strtolower(substr($url, 0, 8)) )\n\t\t\t\treturn false;\n\t\t\telse\t\t\t\t\t\n\t\t\t\treturn true;\n\t}", "public function testUrl() {\n $this->assertEquals('http://domain.com?key=ber', Sanitize::url('http://domain.com?key=Über'));\n $this->assertEquals('http%3A%2F%2Fdomain.com%3Fkey%3D%C3%9Cber', Sanitize::url(urlencode('http://domain.com?key=Über')));\n }", "function format_url($url)\n{\n return '/' . trim($url, '/');\n}", "public function processUrl(){\n\t\t\n\t\tif (isset($_GET['url'])) {\n\t\t\treturn $url = explode('/',filter_var(rtrim($_GET['url'],'/'),FILTER_SANITIZE_URL));//what we're doing here is attempting to filter the url to make it clean and easy to use in our case we're going to explode the url into an array.\n\t\t}\n\n\n\t}", "function normalise_url( $url ) {\n\t// Sanitise the URL first rather than trying to normalise a non-URL.\n\tif ( empty( esc_url_raw( $url ) ) ) {\n\t\treturn new WP_Error( 'invalid-redirect-url', esc_html__( 'The URL does not validate', 'hm-redirects' ) );\n\t}\n\n\t// Break up the URL into it's constituent parts.\n\t$components = wp_parse_url( $url );\n\n\t// Avoid playing with unexpected data.\n\tif ( ! is_array( $components ) ) {\n\t\treturn new WP_Error( 'url-parse-failed', esc_html__( 'The URL could not be parsed', 'hm-redirects' ) );\n\t}\n\n\t// We should have at least a path or query.\n\tif ( ! isset( $components['path'] ) && ! isset( $components['query'] ) ) {\n\t\treturn new WP_Error( 'url-parse-failed', esc_html__( 'The URL contains neither a path nor query string', 'hm-redirects' ) );\n\t}\n\n\t// Make sure $components['query'] is set, to avoid errors.\n\t$components['query'] = ( isset( $components['query'] ) ) ? $components['query'] : '';\n\n\t// All we want is path and query strings.\n\t// Note this strips hashes (#) too.\n\t$normalised_url = $components['path'];\n\n\t// Remove any trailing slashes.\n\t$normalised_url = untrailingslashit( $normalised_url );\n\n\t// Only append '?' and the query if there is one.\n\tif ( ! empty( $components['query'] ) ) {\n\t\t$normalised_url = $components['path'] . '?' . $components['query'];\n\t}\n\n\treturn $normalised_url;\n}", "public function filterURL($url) {\n $url = filter_var($url, FILTER_SANITIZE_URL);\n if (filter_var($url, FILTER_VALIDATE_URL)) {\n return \"$url\";\n } else {\n die(\"$url is NOT a valid URL\");\n }\n }", "function tc_sanitize_url( $value) {\r\n $value = esc_url( $value);\r\n return $value;\r\n }", "function yz_esc_url( $url ) {\n $url = esc_url( $url );\n $disallowed = array( 'http://', 'https://' );\n foreach( $disallowed as $protocole ) {\n if ( strpos( $url, $protocole ) === 0 ) {\n return str_replace( $protocole, '', $url );\n }\n }\n return $url;\n}", "function sanitize($var) {\n return filter_var($var, FILTER_SANITIZE_URL);\n}", "function removeInvalid ($url)\n {\n global $_Invalid_Charicters;\n global $_Invalid_Charicters_Pre;\n global $_Invalid_Charicters_Post;\n //Grab the bit\n $parts = preg_split($_Invalid_Charicters_Pre, $url, null , PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n //Take out the invalid characters in the question title, this stops errors from odd Unicode characters.1\n $url = $parts[\"0\"].preg_replace($_Invalid_Charicters_Post,\"\",$parts[\"1\"]);\n \treturn $url;\n }", "protected function normaliseUrl($url)\n {\n return '/' . ltrim($url, '/');\n }", "function string_url_safe($string,$dash=true,$strlower=true) \n{\n if ($dash)\n $str = str_replace('-', ' ', $string);\n else\n $str = $string;\n\n $str = remove_sign($str);\n\n // remove any duplicate whitespace, and ensure all characters are alphanumeric\n if ($dash)\n $str = preg_replace(array('/\\s+/', '/[^A-Za-z0-9\\-]/'), array('-', ''), $str);\n\n // lowercase and trim\n if ($strlower)\n $str = trim(strtolower($str), \" \\t\\n\\r\\0\\x0B\\-\");\n return $str;\n}", "public static function clean_url($url)\n\t{\n\t\t// Assume http if not included (but don't remove http since it could be https)\n\t\tif (stripos($url, 'http') === FALSE)\n\t\t{\n\t\t\t$url = 'http://'.$url;\n\t\t}\n\n\t\t// Remove trailing slash/s\n\t\t$url = preg_replace('{/$}', '', $url);\n\n\t\treturn $url;\n\t}", "function xss_check_url( $url )\n\t{\n\t\t$url = trim( urldecode( $url ) );\n\t\t\n\t\tif ( ! preg_match( \"#^https?://(?:[^<>*\\\"]+|[a-z0-9/\\._\\- !]+)$#iU\", $url ) )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "function _filterurl($url) {\n return str_replace(\n array('<','>','(',')','#'),\n array('&lt;','&gt;','&#40;','&#41;','&#35;'),\n $url\n );\n }", "private function parseCategoryUrl() {\n $sql = \"SELECT\n id,\n name\n FROM\n categories\";\n if(!$stmt = $this->db->prepare($sql)){return $this->db->error;}\n if(!$stmt->execute()) {return $result->error;}\n $stmt->bind_result($id, $name);\n while($stmt->fetch()) {\n $name = lowerCat($name);\n if($this->cat == $name) {\n $this->catId = $id;\n break;\n }\n }\n $stmt->close();\n if($this->catId !== -1) {\n $this->parsedUrl = '/'.$this->catId.'/'.$this->cat;\n }\n }", "public function validateRedirectUrlKeepsCleanUrlInSubdirectoryDataProvider() {}", "function prepare_episode_slug_for_url($slug)\n{\n $slug = trim($slug);\n $slug = rawurlencode($slug);\n\n // allow directories in slug\n return str_replace('%2F', '/', $slug);\n}", "function cleanLink($input) {\n\t// Prefix URL with http:// if it was missing from the input\n\tif(trim($input[url]) != \"\" && !preg_match(\"#^https?://.*$#\",$input[url])) { $input[url] = \"http://\" . $input[url]; } \t\n\t\t\n\t\t$curly = array(\"{\",\"}\");\n\t\t$curly_replace = array(\"&#123;\",\"&#125;\");\n\t\t\n\t\tforeach($input as $field => $data) {\n\t\t\t$input[$field] = filter_var(trim($data),FILTER_SANITIZE_SPECIAL_CHARS);\n\t\t\t$input[$field] = str_replace($curly,$curly_replace,$input[$field]); // Replace curly brackets (needed for placeholders to work)\n\t\t\t\t\n\t\tif($field == \"url\") {\n\t\t\t$input[url] = str_replace(\"&#38;\",\"&\",$input[url]); // Put &s back into URL\n\t\t\n\t\t}\n\t}\t\n\treturn($input);\n}", "public function course_urlSlugCheck()\n {\n $output['token'] = $this->security->get_csrf_hash();\n header('Content-Type: application/json');\n $slug = $this->input->post('slug', true);\n $tableId = $this->input->post('tableId', true) ?? 0;\n $output['response'] = $this->common->_urlSlugCheck('tbl_course', 'id', 'slug', $slug, $tableId);\n $output = html_escape($this->security->xss_clean($output));\n exit(json_encode($output));\n }", "function filter_url( $url ) {\n\treturn preg_replace( \"/\\s*[^:]+:\\/\\/(www.)?/\", \"$2\", $url );\n\t\n}", "public function sanitize_slug($slug)\n {\n }", "public function validate_field_url ( $input ) {\n\t\treturn trim( esc_url( $input ) );\n\t}", "function _trimendslashurl ($url)\r\r\n{\r\r\n while(substr($url, -1) == \"/\") {\r\r\n $url = substr($url, 0, -1);\r\r\n }\r\r\n return $url;\r\r\n}", "function ghostpool_validate_url() {\n\t\tglobal $post;\n\t\t$gp_page_url = esc_url( home_url() );\n\t\t$gp_urlget = strpos( $gp_page_url, '?' );\n\t\tif ( $gp_urlget === false ) {\n\t\t\t$gp_concate = \"?\";\n\t\t} else {\n\t\t\t$gp_concate = \"&\";\n\t\t}\n\t\treturn $gp_page_url . $gp_concate;\n\t}", "public function Forcer($forcing, $to_force)\n {\n foreach (str_split($forcing) as $index => $url_char)\n if (!in_array(\"{$url_char}\", $to_force))\n App::Error('Sanitize URL (Slug Forcer)', \"Illegal URL part <b>{$url_char}</b>\");\n }", "private function sanitized_url() {\n $url = $_SERVER['SCRIPT_NAME'] . \"?\";\n /* the GET vars used by git-php */\n $git_get = array('p', 'dl', 'b', 'a', 'h', 't');\n foreach ($_GET as $var => $val) {\n if(!in_array($var, $git_get)){\n $get[$var] = $val;\n $url.=\"{$var}={$val}&amp;\";\n }\n }\n return $url;\n }", "function cleanUrl($text) {\r\n $text = strtolower($text);\r\n $code_entities_match = array('&quot;', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '+', '{', '}', '|', ':', '\"', '<', '>', '?', '[', ']', '', ';', \"'\", ',', '.', '_', '/', '*', '+', '~', '`', '=', ' ', '---', '--', '--', '�');\r\n $code_entities_replace = array('', '-', '-', '', '', '', '-', '-', '', '', '', '', '', '', '', '-', '', '', '', '', '', '', '', '', '', '-', '', '-', '-', '', '', '', '', '', '-', '-', '-', '-');\r\n $text = str_replace($code_entities_match, $code_entities_replace, $text);\r\n return $text;\r\n}", "function trimData($data) {\n $data = trim($data);\n $data = urlencode($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function rawurlencode_spaces( $url ) {\n\t\treturn str_replace( ' ', rawurlencode( ' ' ), $url );\n\t}", "public function getSanitizedUrl()\n {\n $url = preg_replace(\"/\\\\?.*/\", \"\", $this->url);\n $url = preg_replace(\"/\\\\:\\\\d{4}/\", \"\", $url);\n return $url;\n }", "function guioner($cdn){\n\t\t$cdn = trim($cdn);\n\t\t$cdn = str_replace(\" \",\"_\",$cdn);\n\t\treturn $cdn;\n\t}", "abstract public function sanitize();", "protected function escaped($url) {\n $url = trim($url);\n $url = preg_replace('~[^\\\\pL0-9_]+~u', '-', $url);\n $url = trim($url, \"-\");\n $url = iconv(\"utf-8\", \"ASCII//TRANSLIT//IGNORE\", $url);\n $url = preg_replace('~[^-a-zA-Z0-9_]+~', '', $url);\n\n return $url;\n }", "public function testFeedUrlAreWrongUrlFormat()\n {\n $listUrlStr = 'abc';\n try {\n $retrieveFeedFromUrlCommandHandler = $this->retrieveFeedFromUrlCommandHandler();\n $retrieveFeedFromUrlCommandHandler->handle(\n new RetrieveFeedFromUrlCommand($listUrlStr)\n );\n } catch (Assert\\InvalidArgumentException $e) {\n $this->assertContains(\n 'Value \"abc\" was expected to be a valid URL starting with http or https'\n , $e->getMessage()\n );\n }\n }", "public function social_sanitize_url($string) {\n return esc_url(trim($string), array('http', 'https'));\n }", "function __urls_amigables($url) {\n $url = strtolower($url);\n \n //Rememplazamos caracteres especiales latinos\n $find = array('�', '�', '�', '�', '�', '�');\n $repl = array('a', 'e', 'i', 'o', 'u', 'n');\n $url = str_replace ($find, $repl, $url);\n \n // A�aadimos los guiones\n $find = array(' ', '&', '\\r\\n', '\\n', '+');\n $url = str_replace ($find, '-', $url);\n \n // Eliminamos y Reemplazamos dem�s caracteres especiales\n $find = array('/[^a-z0-9\\-<>]/', '/[\\-]+/', '/<[^>]*>/');\n $repl = array('', '-', '');\n $url = preg_replace ($find, $repl, $url);\n return $url;\n }", "function isValidURL($var) {\n //Returns error message for an invalid URL\n \n //Check for unsafe characters\n $msg = isSantizeString($var);\n if ($msg != \"\") {\n return $msg;\n }\n\n if (filter_var($var, FILTER_VALIDATE_URL)) {\n return \"\";\n } else {\n return \"Invalid URL\";\n }\n}", "private function getPreparedUrlString()\n {\n $urlstring = $this->url->getRawUrl();\n\n // Remove schem if its set\n\n $urlstring = preg_replace('/^([a-z]+:\\/\\/)/i', '', $urlstring);\n\n // Remove double slashes\n\n $urlstring = preg_replace('/(\\/\\/)/i', '/', $urlstring);\n\n // Remove everything before the fist slash and the the slash too.\n\n $slashpos = strpos($urlstring, '/');\n\n if ($slashpos !== false) {\n $urlstring = substr($urlstring, $slashpos +1);\n }\n\n // Check if the last sign a slash to\n\n if (substr($urlstring, -1) == '/') {\n $urlstring = substr($urlstring, 0, strlen($urlstring) -1);\n }\n\n return $urlstring;\n }", "public function sanitizeWebsite($url)\n {\n // Don't sanitize what does not exists.\n if (!$url) {\n return '';\n }\n\n if (substr($url, 0, 7) !== 'http://' && substr($url, 0, 8) !== 'https://') {\n $url = 'http://'.$url;\n }\n\n return $url;\n }", "function _fix_data() {\n\t\tif (isset($this->url) && $this->url) $this->_parse_url($this->url);\n\n\t\treturn true;\n\t}", "function sUrl( $url )\r\n\t\t{\r\n\t\t return filter_var( $url, FILTER_SANITIZE_URL );\r\n\t\t \r\n\t\t}", "private function checkFormat($url){\n if(stripos($url, 'http://') !== false){\n return $url;\n } else {\n return 'http://'.$url;\n }\n }", "protected function prepareUrl()\n {\n $address = rtrim($this->config['url'], '/');\n\n if (substr_compare($address, static::API_PATH, -strlen(static::API_PATH)) !== 0) {\n $address .= static::API_PATH;\n }\n\n return $address;\n }", "protected function normalize($url) {\n $matches = array();\n \n $url = str_replace(\"\\\\\", '/', $url);\n \n // no schema\n if (preg_match(\"/\\\\A[^:\\\\/]+:(\\\\/\\\\/.*)/\", $url, $matches))\n $url = $matches[1];\n // no host name or login information\n if (preg_match(\"/\\\\A\\\\/\\\\/[^\\\\/]+(.*)/\", $url, $matches))\n $url = $matches[1];\n // strip fragments\n if (preg_match(\"/\\\\A([^#]+)#/\", $url, $matches))\n $url = $matches[1];\n // strip query string\n if (preg_match(\"/\\\\A([^?]+)\\\\?/\", $url, $matches))\n $url = $matches[1];\n // no trailing slash\n if (substr($url, -1) == '/')\n $url = substr($url, 0, -1);\n \n // process . and ..\n $cleaned = array();\n foreach (explode('/', $url) as $folder) {\n if ($folder == '.')\n continue;\n if (($folder == '') && (count($cleaned) > 0))\n continue;\n \n if ($folder == '..') {\n if (count($cleaned) > 1)\n array_pop($cleaned);\n } else {\n $cleaned[] = $folder;\n }\n }\n \n return implode('/', $cleaned);\n }", "public function checkRedirectStringAndRedirect() {\n if($this->check404ModuleStatus() == 1) {\n $urlPart = $this->getUrlString();\n // Check if url part is empty or not,\n if (empty($urlPart)) {\n // Redirect user on root level \t\t\n $this->customRedirect('/', 'default');\n } else {\n // Get configured category suffix (we are considering that product/category/page all have same)\n $suffix = Mage::helper('catalog/category')->getCategoryUrlSuffix();\n $string = $this->trimSlash($urlPart);\n\n $plorp = substr(strrchr($string, '/'), 1);\n $string = $this->trimSlash(substr($string, 0, - strlen($plorp))) . $suffix;\n // Check string part is equal to suffix or not\n if ($string != $suffix) {\n // Redirect user according to url part\n $this->customRedirect($string, 'default');\n } else {\n // Redirect customer to base url \n $this->customRedirect('/', 'default');\n }\n }\n\t}\n }", "function string_sanitize_url( $p_url ) {\r\n\r\n\t$t_url = strip_tags( urldecode( $p_url ) );\r\n\tif ( preg_match( '?http(s)*://?', $t_url ) > 0 ) { \r\n\t\t// no embedded addresses\r\n\t\tif ( preg_match( '?^' . config_get( 'path' ) . '?', $t_url ) == 0 ) { \r\n\t\t\t// url is ok if it begins with our path, if not, replace it\r\n\t\t\t$t_url = 'index.php';\r\n\t\t}\r\n\t}\r\n\tif ( $t_url == '' ) {\r\n\t\t$t_url = 'index.php';\r\n\t}\r\n\t\r\n\t// split and encode parameters\r\n\tif ( strpos( $t_url, '?' ) !== FALSE ) {\r\n\t\tlist( $t_path, $t_param ) = split( '\\?', $t_url, 2 );\r\n\t\tif ( $t_param !== \"\" ) {\r\n\t\t\t$t_vals = array();\r\n\t\t\tparse_str( $t_param, $t_vals );\r\n\t\t\t$t_param = '';\r\n\t\t\tforeach($t_vals as $k => $v) {\r\n\t\t\t\tif ($t_param != '') {\r\n\t\t\t\t\t$t_param .= '&'; \r\n\t\t\t\t}\r\n\t\t\t\t$t_param .= \"$k=\" . urlencode( strip_tags( urldecode( $v ) ) );\r\n\t\t\t}\r\n\t\t\treturn $t_path . '?' . $t_param;\r\n\t\t} else {\r\n\t\t\treturn $t_path;\r\n\t\t}\r\n\t} else {\r\n\t\treturn $t_url;\r\n\t}\r\n}", "private function stringURLSafe($string){\n $str = str_replace('-', ' ', $string);\n $str = str_replace('_', ' ', $string);\n $str = str_replace('.', ' ', $string);\n $str = preg_replace(array('/\\s+/','/[^A-Za-z0-9\\-]/'), array('-',''), $str);\n $str = trim(strtolower($str));\n return $str;\n }", "public function getPublicUrlReturnsValidUrlContainingSpecialCharacters_dataProvider() {}", "protected function prepareUrl($url)\n {\n return ltrim($this->replacePlaceHolder($url), '/');\n }", "function sanitizeName() {\n $pattern = \"/[0-9`!@#$%^&*()_+\\-=\\[\\]{};':\\\"\\\\|,.<>\\/?~]/\";\n if (!preg_match($pattern, $this->fname) && !preg_match($pattern, $this->lname)) {\n $this->fname = trim($this->fname);\n $this->lname = trim($this->lname);\n } else {\n die(\"Error. Check your form data\");\n }\n }", "function cleanSocialUrl($url)\n{\n $segment = '[^.:\\/]+';\n preg_match('/(?:https?:\\/\\/)?(?:' . $segment . '\\.)?(' . $segment . '(?:\\.' . $segment . ')+)/', $url, $matches);\n return isset($matches[1]) ? $matches[1] : false;\n}", "public static function sanitizeUrl(string $url): string\n {\n if (Helpers::configBool('edge-flush.urls.query.fully_cachable')) {\n return $url;\n }\n\n $parsed = static::parseUrl($url);\n\n $query = [];\n\n parse_str($parsed['query'] ?? '', $query);\n\n if (blank($query)) {\n return $url;\n }\n\n $routes = (array) config('edge-flush.urls.query.allow_routes');\n\n $list = $routes[$parsed['path']] ?? null;\n\n if (blank($list)) {\n try {\n $routeName = app('router')\n ->getRoutes()\n ->match(request()->create($url))\n ->getName();\n } catch (\\Throwable) {\n $routeName = '';\n }\n\n $list = $routes[$routeName] ?? null;\n }\n\n $list = collect($list);\n\n $drop = collect($query)->filter(\n fn($_, $name) => !$list->contains($name),\n );\n\n return static::rewriteUrl($query, $drop->keys(), $url);\n }", "function __construct() {\n\t\t$uri = trim($_SERVER['PATH_INFO'], '/');\n\t\tif (!$uri) $this->slugs = array();\n\t\telse $this->slugs = explode('/', $uri);\n\t\tforeach ($this->slugs as $s) if (!preg_match('|^[a-z 0-9~%.:_\\-]+$|i', $s)) {\n\t\t\tdie('The URI you submitted has disallowed characters.');\n\t\t}\n\t}", "private function sanitize($segment){\n $chars = $this->config->get('uri_chars');\n $segment = preg_replace(\"/[^\".$chars.\"]/\", \"\", $segment);\n return $segment;\n }", "function sanitize_url($url, $protocols = \\null)\n {\n }", "function horse_thatbooks_misc_cleanup( $output ) {\n\t// MANGLED LINK SHORTENERS\n\t$botched_url_snippets = array(\n\t\t'/tco/' => '/t.co/'\n\t);\n\n\tforeach( $botched_url_snippets as $bus => $r ) {\n\t\t$output = str_replace( $bus, $r, $output );\n\t}\n\n\t// HTML ENTITIES\n\t$output = htmlspecialchars_decode( $output );\n\n\t// BEGINNINGS OF STRINGS\n\t// The only non-alphanumeric character allowed at the beginning of strings is a dot, when\n\t// followed immediately by an @\n\tpreg_match( '/^[a-zA-Z@0-9]/', $output, $matches );\n\tif ( empty( $matches ) ) {\n\t\tswitch ( substr( trim( $output ), 0, 1 ) ) {\n\t\t\tcase '.' :\n\t\t\t\tif ( '@' == substr( trim( $output ), 1, 1 ) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// else fall through\n\n\t\t\tdefault :\n\t\t\t\t$output = trim( substr( trim( $output ), 1 ) );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn $output;\n}", "static function Sanitize_Route($route) {\n\t\t# remove slash if it exist at the end of the route\n\t\t$route = trim($route, '/'); \n\t\t# \t$route = (strpos($route, '/') ? explode('/', $route) : $route);\n\t\t$route = explode('/', $route);\n\t\treturn $route;\n\t}", "function acf_strip_protocol($url)\n{\n}", "public function sanitize() {\n }", "function clean_url($url, $base_url)\r\n{\r\n\tif(filter_var($url, FILTER_VALIDATE_URL) )\r\n\t{\r\n\r\n\t\t$parse = parse_url($url);\r\n\t\tif( !empty($parse['host']) && $parse['host'] == $base_url )\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n}", "function CleanURL($string, $delimiter = '-') {\n // Remove special characters\n $string = preg_replace(\"/[~`{}.'\\\"\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)\\_\\=\\+\\/\\?\\>\\<\\,\\[\\]\\:\\;\\|\\\\\\]/\", \"\", $string);\n // Replace blank space with delimeter\n $string = preg_replace(\"/[\\/_|+ -]+/\", $delimiter, $string);\n return $string;\n }", "public static function cleanURL($url, $dots = false){\r\n\t\t$url = strtolower($url);\r\n\t\t$url = preg_replace('~[^a-z0-9_'.(!$dots?'':'.').']+~', '-', $url);\r\n\t\t$url = preg_replace('~-{2,}~', '-', $url);\r\n\t\t$url = trim($url, \"- \");\r\n\r\n\r\n\t\treturn $url;\r\n\t}", "private function parseTitleUrl() {\n $posId = strpos($this->title, '-') + 1;\n $this->title = substr($this->title, $posId, strlen($this->title) - $posId);\n $this->title = $this->smoothenTitle($this->title);\n\n $sql = \"SELECT\n id,\n title\n FROM\n articles\";\n if(!$stmt = $this->db->prepare($sql)){return $this->db->error;}\n if(!$stmt->execute()) {return $result->error;}\n $stmt->bind_result($id, $title);\n while($stmt->fetch()) {\n if($this->title == $this->smoothenTitle($title)) {\n $this->articleId = $id;\n break;\n }\n }\n $stmt->close();\n if($this->articleId !== -1) {\n $this->parsedUrl = '/'.$this->articleId.'/'.$this->cat.'/'.$this->title;\n }\n }" ]
[ "0.60075915", "0.5829343", "0.5822033", "0.5819028", "0.58032477", "0.5800547", "0.57979816", "0.5797717", "0.5771163", "0.5750455", "0.5713677", "0.56940794", "0.56473124", "0.56466615", "0.56201", "0.5594687", "0.5587634", "0.55855685", "0.5567736", "0.55617106", "0.5558694", "0.55378973", "0.5529231", "0.55284286", "0.5524368", "0.55205345", "0.5518866", "0.55183184", "0.5517463", "0.54914445", "0.54826033", "0.5465012", "0.54543513", "0.54540664", "0.5446385", "0.5427122", "0.5389595", "0.53884584", "0.5382837", "0.53696084", "0.5358718", "0.5352993", "0.5348225", "0.53464717", "0.5345637", "0.5333451", "0.53286946", "0.53031635", "0.52986044", "0.5293883", "0.52923447", "0.5287493", "0.52661675", "0.5251227", "0.5236259", "0.52332455", "0.5208914", "0.5198885", "0.51958144", "0.518417", "0.518305", "0.5182796", "0.51770866", "0.5174883", "0.5170737", "0.517059", "0.5166231", "0.5164511", "0.5128842", "0.5122344", "0.51221037", "0.51200867", "0.511854", "0.5095355", "0.50946444", "0.50922793", "0.5072638", "0.5072028", "0.50655305", "0.50632614", "0.505954", "0.505316", "0.504287", "0.50421226", "0.5041627", "0.5041304", "0.50328475", "0.5031352", "0.5030021", "0.5021293", "0.5018873", "0.50138056", "0.50114995", "0.50013137", "0.4999518", "0.49925542", "0.49913275", "0.49902636", "0.49878013", "0.4986993", "0.49844706" ]
0.0
-1
Ensure that the CSS we need is included.
public function init() { parent::init(); Requirements::css('metadata-postcard-entry/css/metadata-global.css'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function css_includes()\n {\n }", "protected function loadCss() {}", "private function decideIncludeCSS(){\n //if user don´t want to use our css\n $noCSS = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_libconnect.']['settings.']['ezbNoCSS'];\n\n if($noCSS == 1){\n return;\n }\n\n //get UID of PlugIn\n $this->contentObj = $this->configurationManager->getContentObject();\n $uid = $this->contentObj->data['uid'];\n unset($this->contentObj);\n\n //only the first PlugIn needs to include the css\n if(IsfirstPlugInUserFunction('ezb', $uid)){\n $this->response->addAdditionalHeaderData('<link rel=\"stylesheet\" href=\"' . t3lib_extMgm::siteRelPath('libconnect') . 'Resources/Public/Styles/ezb.css\" />'); \n }\n }", "public function include_css($env) {\n global $CFG;\n $css = '';\n $cssurl = $CFG->dirroot . '/course/format/ludimoodle/motivators/' . $this->get_short_name() . '/styles.css';\n\n // We can't require css like this in format because <head> is already closed\n //$page = $env->get_page();\n //$page->requires->css($cssurl);\n\n // if css is not already in page\n if (file_exists($cssurl) && (!in_array($cssurl, $env->cssinitdata))) {\n // mark that this css is in page\n $env->cssinitdata[] = $cssurl;\n $css = '<style>' . file_get_contents($cssurl) . '</style>';\n }\n return $css;\n }", "protected function loadStylesheets()\n {\n if (!empty($GLOBALS['TBE_STYLES']['stylesheet'])) {\n $this->pageRenderer->addCssFile($GLOBALS['TBE_STYLES']['stylesheet']);\n }\n if (!empty($GLOBALS['TBE_STYLES']['stylesheet2'])) {\n $this->pageRenderer->addCssFile($GLOBALS['TBE_STYLES']['stylesheet2']);\n }\n }", "private function includeCss( $css ) {\n if( Director::fileExists($file = project() . '/themes/' . SSViewer::current_theme() . '/css/' . $css) ) {\n Requirements::css($file);\n\n }\n elseif( Director::fileExists($file = project() . '/css/' . $css) ) {\n Requirements::css($file);\n }\n else {\n Requirements::css(ssdropdownmenu . '/css/' . $css);\n }\n }", "function loadCSS() {\n\t\t$first = true;\n\t\t$cssPart = '';\n\t\tforeach( $this->conf->css->file as $file ) {\n\t\t\tif( ! $first ) {\n\t\t\t\t$cssPart .= chr( 9 );\n\t\t\t}\n\t\t\t$cssPart .= '<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"';\n\t\t\t$cssPart .= $this->conf->path->baseUrl . $this->conf->path->css . $file;\n\t\t\t$cssPart .= '\" />' . chr( 10 );\n\t\t\t$first = false;\n\t\t}\n\t\t\n\t\tif( count( $this->additionalCSS ) >= 1 ) {\n\t\t\tforeach( $this->additionalCSS as $key => $value ) {\n\t\t\t\t$cssPart .= '<style type=\"text/css\">' . chr( 10 );\n\t\t\t\t$cssPart .= $value . chr( 10 );\n\t\t\t\t$cssPart .= '</style>' . chr( 10 );\n\t\t\t}\n\t\t\n\t\t}\n\t\treturn $cssPart;\n\t}", "protected function loadStylesheets() {}", "function head_css()\n\t{\n\t\tqa_html_theme_base::head_css();\n\t\t// if if already added widgets have a css file activated\n\t\t$styles = array();\n\t\tforeach ($this->content['widgets'] as $region_key => $regions) {\n\t\t\tforeach ($regions as $template_key => $widgets) {\n\t\t\t\t$position = strtoupper(substr($region_key,0,1) . substr($template_key,0,1) );\n\t\t\t\tforeach ($widgets as $key => $widget) {\n\t\t\t\t\t$widget_name = get_class ($widget);\n\t\t\t\t\t$widget_key = $widget_name.'_'.$position;\n\t\t\t\t\t$file = get_widget_option($widget_key, 'uw_styles');\n\t\t\t\t\t// if file existed then put it into an array to prevent duplications\n\t\t\t\t\tif($file)\n\t\t\t\t\t\t$styles[$widget_name][$file]=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add styling files to theme\n\t\tif($styles)\n\t\t\tforeach ($styles as $widget_name => $files)\n\t\t\t\tforeach ($files as $file => $verified)\n\t\t\t\t\tif( $file != 'none' )\n\t\t\t\t\t\t$this->output('<link rel=\"stylesheet\" href=\"'.UW_URL.'widgets/'.$widget_name.'/styles/'.$file.'\"/>');\n\t}", "private function _getCSSIncludes () {\n $ret = array();\n foreach ($this->_styles as $stylesheet => $included) {\n if (!$included) {\n $this->_styles[$stylesheet] = true;\n array_push($ret, self::CSS_PATH . $stylesheet);\n }\n }\n\n return $ret;\n }", "function do_add_css(){\n\t\tglobal $jcf_included_assets;\n\t\t\n\t\tif( !empty($jcf_included_assets['styles'][get_class($this)]) )\n\t\t\treturn false;\n\t\t\n\t\tif( method_exists($this, 'add_css') ){\n\t\t\tadd_action( 'jcf_admin_edit_post_styles', array($this, 'add_css'), 10 );\n\t\t}\n\n\t\t$jcf_included_assets['styles'][get_class($this)] = 1;\n\t}", "private function _include_css()\n {\n if ( !$this->cache['css'] )\n {\n $this->EE->cp->add_to_head('<style type=\"text/css\">\n .vz_range { padding-bottom:0.5em; }\n .vz_range input { width:97%; padding:4px; }\n .vz_range_min { float:left; width:46%; }\n .vz_range_max { float:right; width:46%; }\n .vz_range_sep { float:left; width:8%; text-align:center; line-height:2; }\n</style>');\n\n $this->cache['css'] = TRUE;\n }\n }", "public function load_additional_styles() {\n\n // Grab current screen\n $screen = get_current_screen();\n\n // Make sure we're on the correct screen\n if ( ! in_array( $screen->id, $this->screens ) ) {\n return;\n }\n\n do_action( 'cv_builder_inline_styles' );\n\n }", "private function load_css () {\n $buffer = '';\n if (count($this->css_files)) {\n foreach ($this->css_files as $file) {\n $file = explode('/', $file);\n // TODO: use $this->config->item('modules_locations') for modules path\n $file = 'application/modules/'.$file[0].'/views/'.$this->get_skin().'/skin/'.implode('/',array_slice($file, 1));\n $buffer .= \"\\n\".'<link rel=\"stylesheet\" href=\"'.base_url($file).'\">';\n }\n return $buffer.\"\\n\";\n } else {\n return \"\\n\";\n }\n }", "public function loadIncludes() {\n // TODO: better way to skip load includes.\n $this->addCSS($this->env->dir['tmp_files'] . '/css.min.css');\n $this->addJS('/tmp/js.min.js');\n }", "function additional_styles() {\n\t\tJetpack_Admin_Page::load_wrapper_styles();\n\t}", "function add_css() \n {\n if( $this->options['use-css-file'] ) {\n wp_register_style( 'bbquotations-style' , $this->plugin_url . 'bbquotations-style.css');\n wp_enqueue_style( 'bbquotations-style' );\n } \n }", "private function _print_html_head_css()\n\t{\n\t\t$output = \"\";\n\t\t\n\t\t//Check if theme defined\n\t\t$theme = ($this->theme) ? $this->theme : '';\n\t\t\n\t\tforeach($this->css as $style) {\n\t\t\t$skip = FALSE;\n\t\t\t\n\t\t\t$partpath = (strpos($style, '.css') === FALSE) ? \"{$theme}css/{$style}.css\" : \"/{$style}\";\n\t\t\t$fullpath = Ashtree_Common::get_real_path($partpath, TRUE);\n\t\t\t$this->_debug->log(\"INFO\", \"Including stylesheet '{$fullpath}'\");\n\t\t\t\n\t\t\tif (!file_exists($fullpath)) {\n\t\t\t\t$this->_debug->status('ABORT');\n\t\t\t\t\n\t\t\t\t$partpath = \"css/{$style}.css\";\n\t\t\t\t$fullpath = ASH_BASEPATH . $partpath;\n\t\t\t\t$this->_debug->log(\"INFO\", \"Including stylesheet '{$fullpath}'\");\n\t\t\t\n\t\t\t\tif (!file_exists($partpath)) {\n\t\t\t\t $skip = TRUE;\n\t\t\t\t} else {\n\t\t\t\t $this->_debug->clear();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($skip) {\n\t\t\t\t$this->_debug->status('ABORT');\n\t\t\t} else {\n\t\t\t\t$this->_debug->status('OK');\n\t\t\t\t$fullpath = Ashtree_Common::get_real_path($fullpath);\n\t\t\t\t$output .= \"<link type=\\\"text/css\\\" media=\\\"screen\\\" rel=\\\"stylesheet\\\" href=\\\"{$fullpath}\\\" />\\n\";\n\t\t\t}\n\t\t\t\n\t\t}//foreach\n\t\t\n\t\t$output .= \"<style type=\\\"text/css\\\">\\n\";\n\t\t\n\t\tforeach($this->style as $style) {\n\t\t\t$output .= \"\\t{$style}\\n\";\n\t\t}//foreach\n\t\t\n\t\t$output .= \"</style>\\n\";\n\t\t\n\t\treturn $output;\n\t}", "public function testRequireCss() {\n\t\tif (!$this->_hasTrigger('requireCssToLoad')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('requireCssToLoad', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.requireCssToLoad');\n\t\t$this->assertEquals($expected, $result);\n\t}", "protected function generateCSS() {}", "protected function doConcatenateCss() {}", "function load_styles() {\n\t\tglobal $redux_options;\n\n\t\t$bs = $redux_options['opt-bootstrap'];\n\n\t\tif ( $bs == 1 ) {\n\t\t\t//Load from CDN//\n\t\t\twp_enqueue_style( 'bootstrap-script', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css', array(), '3.3.2' );\n\t\t} elseif ( $bs == 2 ) {\n\t\t\t//Load from plugin//\n\t\t\twp_enqueue_style( 'bootstrap-script', dirname( __FILE__ ).'/assets/bootstrap/css/bootstrap.min.css', array(), '3.3.2' );\n\t\t} elseif ( $bs == 3 ) {\n\t\t\t//load from nowhere... They have it loaded elsewhere... lets check to be sure though\n\t\t} else {\n\t\t\t//load from plugin. (fallback)//\n\t\t\twp_enqueue_style( 'bootstrap-script', dirname( __FILE__ ).'/assets/bootstrap/css/bootstrap.min.css', array(), '3.3.2' );\n\t\t}\n\n\t\twp_enqueue_style( 'wppm-styes', plugin_dir_url( __FILE__ ).'assets/css/wppm.css', array(), '1');\n\t\twp_enqueue_style( 'fa-styes', plugin_dir_url( __FILE__ ).'assets/font-awesome/css/font-awesome.min.css', array(), '1');\n\t\twp_enqueue_style( 'bs-validate-css', plugin_dir_url( __FILE__ ).'assets/css/min/bootstrapValidator.min.css', array(), '.52');\n\t}", "private function load_admin_styles() {\n\n\t}", "function loadStyles() {\n\t\twp_register_style('hashee_styles', $this->pluginPath . 'css/hashee_styles.css');\n\t\twp_enqueue_style('hashee_styles');\n\t}", "function fincollect_styles() {\n wp_enqueue_style( 'fancybox', get_template_directory_uri() . '/assets/css/jquery.fancybox.css' );\n wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.css' );\n wp_enqueue_style( 'main-style', get_stylesheet_uri() );\n }", "function load_css() {\n wp_register_style('main', get_template_directory_uri() . '/css/main.css', array(), false, 'all');\n wp_enqueue_style('main');\n }", "function test_stylesheet() {\n\t\t\tif ($this->is_readable_and_not_empty($this->get_stylesheet())) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// so try to generate stylesheet...\n\t\t\t$this->write_stylesheet(false);\n\n\t\t\t// retest\n\t\t\tif ($this->is_readable_and_not_empty($this->get_stylesheet())) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function require_style() {\n\n\t\t$theme_support = get_theme_support( 'multilingualpress' );\n\t\tif ( ! empty( $theme_support[0]['language_switcher_widget_style'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn self::$assets->provide( 'mlp_frontend_css' );\n\t}", "function ct_include_style () {\n\tif ( !is_admin() ) {\n\t\twp_enqueue_style( 'christatimmer', get_stylesheet_uri() );\n\t}\n}", "function init() {\r\n $this->load_upcss();\r\n }", "private static final function setupCSSEnvironmentIfCSSFile () {\r\n if (strpos ($_SERVER['SCRIPT_FILENAME'], '.css')) {\r\n self::switchHTML ();\r\n self::setHeaderKey (new S ('text/css'), new S ('Content-type'));\r\n // Do return ...\r\n return new B (TRUE);\r\n } else {\r\n // Do return ...\r\n return new B (FALSE);\r\n }\r\n }", "public function woocommerce_loaded() {\n\t\t// подключаем нужные css стили\n\t\t\n\t}", "protected function addCSS() {\n foreach ($this->css_files as $css_file) {\n $this->header.=\"<link rel='stylesheet' href='\" . __ASSETS_PATH . \"/\" . $css_file . \"'/> \\n\";\n }\n }", "public function test_css_was_sanitized() {\n\t\t$unsanitized_css = file_get_contents( __DIR__ . '/unsanitized.css' );\n\t\t$known_good_sanitized_css = file_get_contents( __DIR__ . '/sanitized.css' );\n\t\t$maybe_sanitized_css = sanitize_unsafe_css( $unsanitized_css );\n\n\t\t$this->assertEquals( $maybe_sanitized_css, $known_good_sanitized_css );\n\t}", "function scripts_styles() {\n\n\t\t// No need to process if in admin.\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme_url = get_template_directory_uri();\n\t\t$main_css_url = $theme_url . '/style.css';\n\t\t$main_css_path = get_template_directory() . '/style.css';\n\t\t$main_css_ver = file_exists( $main_css_path ) ? filemtime( $main_css_path ) : '';\n\n\t\twp_enqueue_style( 'superiocity-style', $main_css_url, null, $main_css_ver );\n\t\twp_deregister_script( 'wp-embed' );\n\t}", "private function _addCss() {\r\n JHtml::styleSheet( Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/list.css');\r\n }", "public function loadCss()\n {\n wp_register_style(\n 'fortytwo_two_factor_style_intl',\n plugin_dir_url(__FILE__) . '../Css/intlTelInput.css',\n false,\n '1.0.0'\n );\n wp_register_style(\n 'fortytwo_two_factor_style_plugin',\n plugin_dir_url(__FILE__) . '../Css/plugin.css',\n false,\n '1.0.0'\n );\n wp_enqueue_style('fortytwo_two_factor_style_intl');\n wp_enqueue_style('fortytwo_two_factor_style_plugin');\n }", "function woo_load_site_width_css_nomedia() {}", "function prefix_add_footer_styles() {\n $belowFoldCSS = '/css/below-fold.css';\n if( file_exists(dirname(__FILE__) . '/../' . $belowFoldCSS) ) {\n $belowFoldCSSMtime = filemtime(dirname(__FILE__) . '/../' . $belowFoldCSS);\n wp_enqueue_style(\n 'main-styles',\n get_template_directory_uri() . $belowFoldCSS,\n false,\n $belowFoldCSSMtime,\n 'all'\n );\n }\n }", "public static function dequeueStylesheets(): void\n {\n // ----------------------------------------------------\n // Check if we are not on the administration screen and\n // if we are not viewing a gravity forms demo screen\n // ----------------------------------------------------\n if (!is_admin() && !array_key_exists('gf_page', $_GET)) {\n wp_dequeue_style('gforms_reset_css');\n wp_dequeue_style('gforms_datepicker_css');\n wp_dequeue_style('gforms_formsmain_css');\n wp_dequeue_style('gforms_ready_class_css');\n wp_dequeue_style('gforms_browsers_css');\n }\n }", "function attach_custom_css_filter() {\n\tif ( ! is_admin() && ! is_feed() && ! is_robots() && ! is_trackback() ) {\n\t\tglobal $publishthis;\n\n\t\tif( is_singular() ) echo $publishthis->utils->display_css();\n\t}\n}", "private function addCSS()\n {\n Filters::add('head', array($this, 'renderRevisionsCSS'));\n }", "function addCSSFiles()\n\t{\n\t\t$this->getContainer()->AddCSSFile(\"include/zoombox/zoombox.css\");\n\t}", "public function includeAuthStyles() {\n\t\t//enqueue css here\n\t\twp_enqueue_style( 'defAuth', wp_defender()->getPluginUrl() . 'app/module/advanced-tools/css/login.css' );\n\t}", "private function set_styles()\n {\n\n if (count($this->assets_css['global']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN GLOBAL MANDATORY STYLES -->');\n foreach($this->assets_css['global'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n if (isset($this->assets_css['page_style']) && count($this->assets_css['page_style']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN PAGE STYLES -->');\n foreach($this->assets_css['page_style'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n\n // Webkit based browsers\n //$this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/webkit.css\" media=\"screen\" />');\n\n // Internet Explorer styles\n $this->template->append_metadata('<!--[if IE 6]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie6.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 7]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie7.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie8.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 9]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie9.css\" media=\"screen\" /><![endif]-->');\n }", "private static final function cleanCSSEnvironmentIfCSSFile () {\r\n if (strpos ($_SERVER['SCRIPT_FILENAME'], '.css') && isset ($_SESSION['CSS'][$_SERVER['SCRIPT_FILENAME']])) {\r\n unset ($_SESSION['CSS'][$_SERVER['SCRIPT_FILENAME']]);\r\n // Do return ...\r\n return new B (TRUE);\r\n } else {\r\n // Do return ...\r\n return new B (FALSE);\r\n }\r\n }", "protected function renderCssLibraries() {}", "public function css() {\r\n\t\tif ($this->cssLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/css/'.$this->cssLink.'.css\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif ($this->cssExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.$this->cssExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->cssExternalLink);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "function include_css( $strfilename, $params=NULL ){ \n\treturn CIncludeFiles :: includefiles( \"CIncludeCSSFiles\", $strfilename, $params );\t\n}", "public function load_styles() {\n\t wp_enqueue_style( 'core', get_stylesheet_uri() );\n\t\twp_enqueue_style( 'main', get_stylesheet_directory_uri() . '/assets/css/main-style.min.css' );\n\n\t\t// ADD MORE STYLE HERE ...\n\t\t\n\t}", "function html5reset_scripts_styles() {\n\t\tglobal $wp_styles;\n\n\t\t// Load Comments\t\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) )\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\n\t\t// Load Stylesheets\n//\t\twp_enqueue_style( 'html5reset-reset', get_template_directory_uri() . '/reset.css' );\n//\t\twp_enqueue_style( 'html5reset-style', get_stylesheet_uri() );\n\t\n\t\t// Load IE Stylesheet.\n//\t\twp_enqueue_style( 'html5reset-ie', get_template_directory_uri() . '/css/ie.css', array( 'html5reset-style' ), '20130213' );\n//\t\t$wp_styles->add_data( 'html5reset-ie', 'conditional', 'lt IE 9' );\n\n\t\t// Modernizr\n\t\t// This is an un-minified, complete version of Modernizr. Before you move to production, you should generate a custom build that only has the detects you need.\n\t\t// wp_enqueue_script( 'html5reset-modernizr', get_template_directory_uri() . '/_/js/modernizr-2.6.2.dev.js' );\n\t\t\n\t}", "public function styles(){\n\n\t\t//wp_enqueue_style('component-header_fixed-style', $this->directory_uri . '/assets/dist/css/headerFixed.css');\n\t}", "public function load_admin_scripts_styles(){\n\t\t\n\t}", "public static function bkap_resource_css_file(){\n\n if ( get_post_type() == 'bkap_resource' ) {\n wp_dequeue_style( 'wc_bookings_admin_styles' );\n }\n }", "public function registerStylesCommon() {\n $v = Wpjb_Project::VERSION;\n $p = plugins_url().'/wpjobboard/public/css/';\n $x = plugins_url().'/wpjobboard/application/vendor/';\n \n wp_register_style(\"wpjb-vendor-datepicker\", $x.\"date-picker/css/datepicker.css\");\n wp_register_style('wpjb-glyphs', $p.\"wpjb-glyphs.css\", array(), $v );\n wp_register_style('wpjb-stripe-elements', $p.\"wpjb-stripe-elements.css\", array(), $v );\n }", "protected function ParseCSSFile()\n {\n $this->_stylelist=$this->BuildStyleList($this->FileName, $this->_inclstandard, $this->_inclid, $this->_incsubstyle);\n }", "function chappell_construction_load_stylesheets() {\n if (is_front_page()) {\n add_action('wp_enqueue_scripts', 'chappell_construction_enqueue_front_page_stylesheet', 6);\n }\n if (get_post_type() == 'residences') {\n add_action('wp_enqueue_scripts', 'chappell_construction_enqueue_residence_stylesheet', 6);\n }\n}", "private function _include_jscss()\n {\n if (!$this->cache['jscss'])\n {\n $styles = '<style type=\"text/css\">' . file_get_contents(PATH_THIRD . '/vz_regulator/assets/styles.min.css') . '</style>' . NL;\n $scripts = '<script type=\"text/javascript\">// <![CDATA[ ' . file_get_contents(PATH_THIRD . '/vz_regulator/assets/scripts.min.js') . ' // ]]></script>';\n $this->EE->cp->add_to_head($styles . $scripts);\n\n $this->cache['jscss'] = TRUE;\n }\n }", "private function load_public_styles() {\n\n\t}", "function rainette_insert_head_css($flux) {\n\tstatic $done = false;\n\tif (!$done) {\n\t\t$done = true;\n\t\t$flux .= '<link rel=\"stylesheet\" href=\"' . find_in_path('rainette.css') . '\" type=\"text/css\" media=\"all\" />';\n\t}\n\n\treturn $flux;\n}", "function reverie_css_style()\n{\t\n\t// normalize stylesheet\n\t// wp_register_style( 'reverie-normalize-stylesheet', get_template_directory_uri() . '/css/normalize.css', array(), '' );\n\t\n\t// foundation stylesheet\n\twp_register_style( 'reverie-foundation-stylesheet', get_template_directory_uri() . '/css/foundation.css', array(), '' );\t\n\t\n\t// Register the main style under root directory\n\twp_register_style( 'reverie-stylesheet', get_stylesheet_directory_uri() . '/style.css', array(), '', 'all' );\n\t\n\twp_enqueue_style( 'reverie-normalize-stylesheet' );\n\twp_enqueue_style( 'reverie-foundation-stylesheet' );\n\twp_enqueue_style( 'reverie-stylesheet' );\n\t\n}", "protected function regStyles() {\n $this->modx->regClientCSS($this->config['cssUrl'] . 'web/bbcode/bbcode.css');\n $this->modx->regClientCSS($this->config['cssUrl'] . 'web/styles.css');\n }", "public function testInlineCssDevelopment() {\n\t\t$config = $this->Helper->config();\n\t\t$config->paths('css', null, array(\n\t\t\t$this->_testFiles . 'css' . DS\n\t\t));\n\n\t\t$config->addTarget('nav.css', array(\n\t\t\t'files' => array('nav.css')\n\t\t));\n\n\t\tConfigure::write('debug', 1);\n\t\t$results = $this->Helper->inlineCss('nav.css');\n\n\t\t$expected = <<<EOF\n<style type=\"text/css\">@import url(\"reset/reset.css\");\n#nav {\n\twidth:100%;\n}</style>\nEOF;\n\t\t$this->assertEquals($expected, $results);\n\t}", "function css_files() {\n\t\twp_enqueue_style('escalate_network-admin-global', $this->plugin_url .'/css/styles-admin-global.css');\n\t}", "public function build_css() {\n\t\t\t\n\t\t}", "function propanel_of_style_only() {\n\twp_enqueue_style('admin-style', get_stylesheet_directory_uri().'/admin/admin-style.css');\n\twp_enqueue_style('color-picker', get_stylesheet_directory_uri().'/admin/colorpicker.css');\n}", "public function formatCSS() {\n echo $this->head;\n echo \"<link rel='stylesheet' href='desktop.css'>\";\n }", "function queue_css_url($url, $media = 'all', $conditional = false)\n{\n get_view()->headLink()->appendStylesheet($url, $media, $conditional);\n}", "public function admin_css() {\n\t\t\treturn '';\n\t\t}", "public function enableConcatenateCss() {}", "function ft_hook_add_css() {}", "function cbusds_styles()\n{\n\n wp_register_style('w3css', get_template_directory_uri() . '/css/w3.css', array(), '', 'all');\n wp_enqueue_style('w3css'); // Enqueue it!\n\n wp_register_style('normalize', get_template_directory_uri() . '/normalize.css', array(), '1.0', 'all');\n wp_enqueue_style('normalize'); // Enqueue it!\n\n wp_register_style('cbusdscss', get_template_directory_uri() . '/style.css', array(), '1.0', 'all');\n wp_enqueue_style('cbusdscss'); // Enqueue it!\n}", "function egg_styles()\n{\n\tglobal $wp_styles; // call global $wp_styles variable to add conditional wrapper around ie stylesheet\n\n\t// register main stylesheet\n\twp_register_style( 'egg-stylesheet', get_stylesheet_directory_uri() . '/assets/css/style.css?091714', array(), '', 'all' );\n\t// wp_register_style( 'egg-stylesheet', get_stylesheet_directory_uri() . '/assets/css/style.min.css', array(), '', 'all' );\n\n\t// ie-only style sheet\n\twp_register_style( 'egg-ie-only', get_stylesheet_directory_uri() . '/assets/css/ie.css', array(), '' );\n\n\twp_enqueue_style( array(\n\t\t'egg-stylesheet',\n\t\t'egg-ie-only'\n\t) );\n\t\n\t$wp_styles->add_data( 'egg-ie-only', 'conditional', 'lt IE 9' ); // add conditional wrapper around ie stylesheet\n}", "function defer_stylesheets( $html, $handle ) {\n\n\t// Defer CSS.\n\t$rel_needle = \"rel='stylesheet'\";\n\t$rel_replace = \"rel='preload' as='style' onload='this.rel=\\\"stylesheet\\\"'\";\n\t$css_to_defer = array(\n\t\t'wp-block-library',\n\t\t'wp-block-library-theme',\n\t\t'contact-form-7',\n\t\t'bootstrap',\n\t\t'font-awesome',\n\t\t'gfont-monteserrat',\n\t\t'recent-posts-widget-with-thumbnails-public-style',\n\t\t'heateor_sss_frontend_css',\n\t\t'heateor_sss_sharing_default_svg',\n\t);\n\n\tif ( in_array( $handle, $css_to_defer, true ) ) {\n\t\treturn str_replace( $rel_needle, $rel_replace, $html );\n\t}\n\n\treturn $html;\n\n}", "function css( $params ){\n\t\n\t\tglobal $mainframe;\n\t\t\n\t\t$document =& JFactory::getDocument();\n\t\t\n\t\t$cssFile = 'ja_contentslide.css';\n\t\n\t\tif( file_exists(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'css'.DS.$cssFile) ) {\n\t\t\t$document->addStyleSheet( JURI::base().'templates/'.$mainframe->getTemplate().'/css/'.$cssFile );\n\t\t} else { \n\t\t\t$document->addStyleSheet( JURI::base().'modules/mod_ja_contentslide/assets/css/'.$cssFile );\n\t\t}\n\t}", "function cm_load_styles() {\n wp_enqueue_style( 'style', get_stylesheet_uri() );\n wp_enqueue_style( 'font-awesome', get_stylesheet_directory_uri() . '/css/font-awesome.min.css' );\n wp_enqueue_style( 'bootstrap', get_stylesheet_directory_uri() . '/css/bootstrap.min.css' );\n wp_enqueue_style( 'main', get_stylesheet_directory_uri() . '/css/main.css' );\n}", "public function css()\n {\n $dir = new \\Ninja\\Directory(NINJA_DOCROOT . 'public/');\n /**\n * @var $files \\Ninja\\File[]\n */\n $files = $dir->scanRecursive(\"*.css\");\n\n echo \"\\nMinifying Css Files...\\n\";\n foreach($files as $sourceFile)\n {\n // Skip all foo.#.js (e.g foo.52.js) which are files from a previous build\n if (is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)))\n continue;\n\n /**\n * @var $destFile \\Ninja\\File\n */\n $destFile = $sourceFile->getParent()->ensureFile($sourceFile->getName(true) . '.' . self::REVISION . '.' . $sourceFile->getExtension());\n\n $destFile->write(\\Minify_Css::process($sourceFile->read()));\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n\n unset($sourceFile);\n }\n }", "private static function defCssLoader() {\n\n\t\t$loadedResources = Yii::app()->user->getState('nlsLoadedResources');\n\t\tif (!isset($loadedResources))\n\t\t\t$loadedResources = array();\t\t\n\t\t\n\t\t$hk = '__defCssLoader';\n\t\t$inCache = isset($loadedResources[$hk]);\n\n\t\tif ($inCache)\n\t\t\treturn '';\n\t\n\t\t$loadedResources[$hk] = $hk;\n\t\tYii::app()->user->setState('nlsLoadedResources', $loadedResources);\n\n\t\treturn CHtml::script('\n//css loader\n__loadCss = function(f, media) {\n\tvar a = document.createElement(\"link\");\n\ta.rel=\"stylesheet\";\n\ta.type=\"text/css\";\n\ta.media=media||\"screen\";\n\ta.href=f;\n\t(document.getElementsByTagName(\"head\"))[0].appendChild(a);\n};\n');\n\t\t\t\n\t}", "public function get_stylesheet_css()\n {\n }", "public function styles() {\n $this->addStyle(CORE_WWW_ROOT.\"ressources/css/externals/bootstrap.core.min.css\", true);\n\n\n $this->addStyle($this->directory().\"css/reset.less\");\n $this->addStyle($this->directory().\"css/animations.less\");\n $this->addStyle($this->directory().\"css/main.less\");\n $this->addStyle($this->directory().\"css/overlay.less\");\n $this->addStyle($this->directory().\"css/header.less\");\n $this->addStyle($this->directory().\"css/footer.less\");\n\n // externals\n $this->addStyle(\"//fonts.googleapis.com/css?family=Lora:400,400i,700,700i\", true);\n $this->addStyle('//fonts.googleapis.com/css?family=Roboto:700', true);\n\n // blocks\n $this->addStyle($this->directory().\"css/blocks/rd_arrow.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_button.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_bigteaser.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_smallteaser.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_longtext.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_forms.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_listings.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_collection.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_components.less\");\n\n $this->addStyle($this->directory().\"css/responsive.less\");\n }", "public function enqueue_additional_css_file() {\n\t\tif (is_page() || is_single()) {\n\t\t\twhile (have_posts()) {\n\t\t\t\tthe_post();\n\t\t\t\t$additional_css_file = get_post_meta(get_the_ID(), 'im8_additional_css_file', true);\n\t\t\t\t$path = get_stylesheet_directory().'/css/'.$additional_css_file;\n\t\t\t\t$url = get_stylesheet_directory_uri().'/css/'.$additional_css_file;\n\t\t\t\tif ($additional_css_file && file_exists($path))\n\t\t\t\t\twp_enqueue_style('im8_additional_css_file', $url, array(), filemtime($path), 'screen, projection');\n\t\t\t}\n\t\t\trewind_posts();\n\t\t}\n\t}", "function need_update() {\r\n\t\treturn (bool) get_transient( 'av5_css_file' );\r\n\t}", "private function _include_css($file) {\n\t\treturn $this->EE->elements->_include_css($file);\n\t}", "function hookRegisterStyles() {\n\t \tif (!is_admin() && get_option('fse_load_fc_libs') == true) {\n\t \t\t// Check if user has its own CSS file in the theme folder\n\t \t\t$custcss = get_template_directory().'/fullcalendar.css';\n\t \t\tif (file_exists($custcss))\n\t \t\t$css = get_bloginfo('template_url').'/fullcalendar.css';\n\t \t\telse\n\t \t\t$css = self::$plugin_css_url.'fullcalendar.css';\n\t \t\twp_enqueue_style('fullcalendar', $css);\n\t \t}\n\t }", "function incluirCSS($arquivo){ ?>\n\t\t<link href=\"css/<?=$arquivo?>.css\" rel=\"stylesheet\" type=\"text/css\"/>\n\t<?php }", "function styles() {\n\t/**\n\t * Flag whether to enable loading uncompressed/debugging assets. Default false.\n\t *\n\t * @param bool additive_style_debug\n\t */\n\t$debug = apply_filters( 'additive_style_debug', false );\n\t$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_style( 'additive-fonts',\n\t\t\"https://fonts.googleapis.com/css?family=Arvo:400,700|Lato:300,400,700\",\n\t\tarray(),\n\t\tnull\n\t);\n\n\twp_enqueue_style(\n\t\t'normalize',\n\t\tADDITIVE_URL . \"/assets/css/normalize{$min}.css\",\n\t\tarray(),\n\t\tADDITIVE_VERSION\n\t);\n\n\twp_enqueue_style(\n\t\t'skeleton',\n\t\tADDITIVE_URL . \"/assets/css/skeleton{$min}.css\",\n\t\tarray(),\n\t\tADDITIVE_VERSION\n\t);\n\n\twp_enqueue_style(\n\t\t'additive',\n\t\tADDITIVE_URL . \"/assets/css/additive{$min}.css\",\n\t\tarray(),\n\t\tADDITIVE_VERSION\n\t);\n\n\twp_enqueue_style(\n\t\t'font-awesome',\n\t\tADDITIVE_URL . \"/assets/css/font-awesome{$min}.css\",\n\t\tarray(),\n\t\tADDITIVE_VERSION\n\t);\n}", "public function loadStylesAndScripts() {\n\t\tglobal $upload_url;\n\n\t\tif ( !$this->is_admin ) {\n\t\t\t// Add minified css of all themes or the selected theme css\n\t\t\tif ( ( !empty( $this->settings->themes['themes'] ) && $this->settings->themes['themes'] == 'true' ) && file_exists( $upload_url['basedir'] . '/good-old-gallery-themes.css') ) {\n\t\t\t\twp_enqueue_style( 'good-old-gallery-themes', $upload_url['baseurl'] . '/good-old-gallery-themes.css' );\n\t\t\t}\n\t\t\t// Add selected themes css\n\t\t\telse if ( !empty( $this->settings->themes['default'] ) && empty( $this->settings->themes['all'] ) ) {\n\t\t\t\twp_enqueue_style( 'good-old-gallery-theme', $this->settings->themes['theme']['url'] . '/' . $this->settings->themes['default'] );\n\t\t\t}\n\n\t\t\t// Include selected slider plugin files\n\t\t\tif ( !empty( $this->settings->settings['plugin'] ) ) {\n\t\t\t\tforeach ( $this->settings->plugin['setup']['files'] as $file ) {\n\t\t\t\t\twp_enqueue_script( 'slider', GOG_PLUGIN_URL . 'plugins/' . $this->settings->settings['plugin'] . '/' . $file, array( 'jquery' ), '', FALSE );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Includ default good-old-gallery.css\n\t\t\tif ( $this->settings->themes['default_css'] == 'true' ) {\n\t\t\t\twp_enqueue_style( 'good-old-gallery', GOG_PLUGIN_URL . 'assets/css/good-old-gallery.css' );\n\t\t\t}\n\t\t}\n\t}", "public function INCLUDE_CSS(array $conf) {\n if($conf && count($conf)) {\n foreach ($conf as $key => $CSSfile) {\n $cssFileConfig = &$conf[$key . '.'];\n if (isset($cssFileConfig['if.']) && !$GLOBALS['TSFE']->cObj->checkIf($cssFileConfig['if.'])) {\n continue;\n }\n $ss = $cssFileConfig['external'] ? $CSSfile : $GLOBALS['TSFE']->tmpl->getFileName($CSSfile);\n if ($ss) {\n if ($cssFileConfig['import']) {\n if (!$cssFileConfig['external'] && $ss[0] !== '/') {\n // To fix MSIE 6 that cannot handle these as relative paths (according to Ben v Ende)\n $ss = TYPO3\\CMS\\Core\\Utility\\GeneralUtility::dirname(GeneralUtility::getIndpEnv('SCRIPT_NAME')) . '/' . $ss;\n }\n $this->pageRenderer->addCssInlineBlock('import_' . $key, '@import url(\"' . htmlspecialchars($ss) . '\") ' . htmlspecialchars($cssFileConfig['media']) . ';', empty($cssFileConfig['disableCompression']), $cssFileConfig['forceOnTop'] ? TRUE : FALSE, '');\n } else {\n $this->pageRenderer->addCssFile(\n $ss,\n $cssFileConfig['alternate'] ? 'alternate stylesheet' : 'stylesheet',\n $cssFileConfig['media'] ?: 'all',\n $cssFileConfig['title'] ?: '',\n empty($cssFileConfig['disableCompression']),\n $cssFileConfig['forceOnTop'] ? TRUE : FALSE,\n $cssFileConfig['allWrap'],\n $cssFileConfig['excludeFromConcatenation'] ? TRUE : FALSE,\n $cssFileConfig['allWrap.']['splitChar']\n );\n unset($cssFileConfig);\n }\n }\n }\n }\n }", "function html5blank_styles()\n{\n wp_register_style('normalize', get_template_directory_uri() . '/normalize.css', array(), '1.0', 'all');\n wp_enqueue_style('normalize');\n\t\n\t//wp_enqueue_style( 'fancybox', get_stylesheet_directory_uri() . '/js/lib/jquery.fancybox.min.css' );\n\t\n\t//wp_enqueue_style( 'slick', get_template_directory_uri() . '/js/lib/slick.css' );\n\t\n\twp_enqueue_style( 'font-awesome', 'https://use.fontawesome.com/releases/v5.10.0/css/all.css' );\n\n wp_register_style('html5blank', get_template_directory_uri() . '/style.css', array(), '1.0', 'all');\n wp_enqueue_style('html5blank');\n}", "function add_qoorate_stylesheet(){\n\t\t// TODO: make call to get styles from QOORATE\n\t\t// MAYBE TODO: cacheing ... place in DB options?\n\t\t\n\t\t//$styleUrl = plugins_url('/css/guthrie.css', __FILE__);\n\t\t//$styleFile = WP_PLUGIN_DIR . '/guthrie/css/guthrie.css';\n\t\t//if ( file_exists($styleFile) ) {\n\t\t//\t\t//echo($styleUrl.\"<br />\");\n\t\t//\t\twp_register_style('guthrie', $styleUrl);\n\t\t//\t\twp_enqueue_style('guthrie');\n\t\t//}\n\t\t// unregister our really old jquery bundled with WP\n\t\t// Maybe we can keep it? should it be an option?\n\t\twp_deregister_script( 'jquery' );\n\t\twp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js' );\n\t\twp_enqueue_script( 'jquery' );\n\t}", "function findCssFiles();", "function bb_mystique_load_stylesheets() {\r\n\t$mystique_options = bb_get_mystique_options();\r\n\t$font_styles = bb_mystique_font_styles();\r\n\t/*\r\n\t$w = $mystique_options['page_width'];\r\n\t$unit = $w == 'fluid' ? '%' : 'px';\r\n\t$gs = $w == 'fluid' ? '100' : '940';\r\n\t*/\r\n\t?>\r\n\t<style type=\"text/css\">\r\n\t\t@import \"<?php bb_stylesheet_uri(); ?>\";\r\n\t\t@import \"<?php bb_active_theme_uri(); ?>color-<?php echo $mystique_options['color_scheme']; ?>.css\";;\r\n\t\t<?php\r\n\t\t\tif ( in_array( $mystique_options['font_style'], array_keys( $font_styles ) ) )\r\n\t\t\t\techo '*{font-family:' . $font_styles[$mystique_options['font_style']]['code'] . ';}';\r\n\t\t\t\r\n\t\t\tif ( $mystique_options['background'] )\r\n\t\t\t\techo '#page{background-image:none;}body{background-image:url(\"' . $mystique_options['background'] . '\");background-repeat:no-repeat;background-position:center top;}';\r\n\t\t\tif ( ( $mystique_options['background_color'] ) && ( strpos( $mystique_options['background_color'], '000000' ) === false ) ) {\r\n\t\t\t\techo 'body{background-color:#' . $mystique_options['background_color'] . ';}';\r\n\t\t\t\tif ( !$mystique_options['background'] )\r\n\t\t\t\t\techo 'body,#page{background-image:none;}';\r\n\t\t\t}\r\n\t\t\tif ( $mystique_options['user_css'] )\r\n\t\t\t\techo $mystique_options['user_css'];\r\n\t\t?>\r\n\t</style>\r\n\t<?php if ( 'rtl' == bb_get_option( 'text_direction' ) ) : ?>\r\n\t<link rel=\"stylesheet\" href=\"<?php bb_stylesheet_uri( 'rtl' ); ?>\" type=\"text/css\" />\r\n\t<?php endif; ?>\r\n\t<!--[if lte IE 6]><link media=\"screen\" rel=\"stylesheet\" href=\"<?php bb_active_theme_uri(); ?>ie6.css\" type=\"text/css\" /><![endif]-->\r\n\t<!--[if IE 7]><link media=\"screen\" rel=\"stylesheet\" href=\"<?php bb_active_theme_uri(); ?>ie7.css\" type=\"text/css\" /><![endif]-->\r\n\t<?php\r\n}", "function load_styles($styles_to_load)\r\n\t{\r\n\t\tglobal $available_styles;\r\n\t\t\r\n\t\t$styles_to_load = array_unique($styles_to_load);\r\n\t\t\r\n\t\tforeach ($styles_to_load as $style_key => $style_to_load)\r\n\t\t{\r\n\t\t\tif (is_array($available_styles[$style_to_load]))\r\n\t\t\t{\r\n\t\t\t\tforeach($available_styles[$style_to_load] as $child_key => $child_to_load)\r\n\t\t\t\t{\r\n\t\t\t\t\tsubstr($available_styles[$style_to_load][$child_key], 0, 4) == 'http' ? $root_path = '' : $root_path = ROOT_PATH;\r\n\t\t\t\t\techo '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $root_path . $available_styles[$style_to_load][$child_key] . '\"/>' . \"\\n\";\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\tsubstr($available_styles[$style_to_load], 0, 4) == 'http' ? $root_path = '' : $root_path = ROOT_PATH;\r\n\t\t\t\techo '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $root_path . $available_styles[$style_to_load] . '\"/>' . \"\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "function styles() {\n\n\twp_enqueue_style(\n\t\t'styles',\n\t\tERI_SCAFFOLD_TEMPLATE_URL . '/dist/css/style.css',\n\t\t[],\n\t\tERI_SCAFFOLD_VERSION\n\t);\n\n\tif ( is_page_template( 'templates/page-styleguide.php' ) ) {\n\t\twp_enqueue_style(\n\t\t\t'styleguide',\n\t\t\tERI_SCAFFOLD_TEMPLATE_URL . '/dist/css/styleguide-style.css',\n\t\t\t[],\n\t\t\tERI_SCAFFOLD_VERSION\n\t\t);\n\t}\n}", "function thrive_dashboard_enqueue_style($handle, $src, $deps = array(), $ver = false, $media = 'all')\n{\n if ($ver === false) {\n $ver = \"1.0\";\n }\n wp_enqueue_style($handle, $src, $deps, $ver, $media);\n}", "private function maybe_parse_set_from_css() {\n\n\t\t\tif ( true !== $this->settings['auto_parse'] || empty( $this->settings['icon_data']['icon_css'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tob_start();\n\n\t\t\t$path = str_replace( WP_CONTENT_URL, WP_CONTENT_DIR, $this->settings['icon_data']['icon_css'] );\n\t\t\tif ( file_exists( $path ) ) {\n\t\t\t\tinclude $path;\n\t\t\t}\n\n\t\t\t$result = ob_get_clean();\n\n\t\t\tpreg_match_all( '/\\.([-_a-zA-Z0-9]+):before[, {]/', $result, $matches );\n\n\t\t\tif ( ! is_array( $matches ) || empty( $matches[1] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( is_array( $this->settings['icon_data']['icons'] ) ) {\n\t\t\t\t$this->settings['icon_data']['icons'] = array_merge(\n\t\t\t\t\t$this->settings['icon_data']['icons'],\n\t\t\t\t\t$matches[1]\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$this->settings['icon_data']['icons'] = $matches[1];\n\t\t\t}\n\n\t\t}" ]
[ "0.69609773", "0.6835229", "0.6529813", "0.6526441", "0.64060557", "0.63789004", "0.63086474", "0.6299457", "0.62644166", "0.6207256", "0.6192557", "0.61568576", "0.61100614", "0.6052869", "0.6049504", "0.6046687", "0.60292625", "0.602227", "0.6021617", "0.60030293", "0.5997764", "0.5992567", "0.5990039", "0.5957206", "0.59468013", "0.59274703", "0.59185284", "0.5905579", "0.58877546", "0.5870527", "0.58645463", "0.5855972", "0.5850159", "0.5840615", "0.58107215", "0.58018166", "0.57974017", "0.57849693", "0.5773041", "0.5760313", "0.57536966", "0.57514817", "0.5732667", "0.57267743", "0.5725575", "0.5719894", "0.57182175", "0.57172674", "0.5716642", "0.57137746", "0.5708317", "0.5706411", "0.56989646", "0.56951696", "0.56865835", "0.56579745", "0.5645783", "0.56450284", "0.5641941", "0.5641939", "0.5639988", "0.563494", "0.5629751", "0.56219465", "0.5620658", "0.5617662", "0.56168383", "0.5607527", "0.5607035", "0.5603542", "0.5603518", "0.5600315", "0.55980426", "0.55929935", "0.5591839", "0.55902123", "0.5580607", "0.557799", "0.55750567", "0.55738854", "0.5568912", "0.5565233", "0.55636513", "0.55527306", "0.55520296", "0.554752", "0.55465734", "0.5544384", "0.55421066", "0.5539642", "0.55314", "0.5530254", "0.5524007", "0.55226624", "0.55226624", "0.55226624", "0.55226624", "0.55226624", "0.5519519", "0.5519328", "0.5514403" ]
0.0
-1
This function creates the metdata entry form by getting the fields defined for the page, in their sort order, and creating form fields for them.
public function MetadataEntryForm() { // NIWA are worried about parameter case and would like it case insensitive so convert all get vars to lower // I think this is because they are not 100% what case the parameters from oracle will be in. $params = array_change_key_case($this->getRequest()->getVars(), CASE_LOWER); // Check in the parameters sent to this page if there are certian fields needed to power the // functionality which emails project coordinators and if so get them as we will need to add // them to the bottom of the form as hidden fields, this way we can access them in the form // processing and send the email. $hiddenFields = array(); // These 2 fields can be populated either by Project_Coordinator or Project_Administrator as Oracle actually // sends Project_Administrator. NIWA want to keep the field here called coordinator. if (!empty($params['project_coordinator'])) { $hiddenFields['_Project_Coordinator'] = $params['project_coordinator']; } else if (!empty($params['project_administrator'])) { $hiddenFields['_Project_Coordinator'] = $params['project_administrator']; } if (!empty($params['project_coordinator_email'])) { $hiddenFields['_Project_Coordinator_email'] = $params['project_coordinator_email']; } else if (!empty($params['project_administrator_email'])) { $hiddenFields['_Project_Coordinator_email'] = $params['project_administrator_email']; } if (!empty($params['project_manager'])) { $hiddenFields['_Project_Manager'] = $params['project_manager']; } if (!empty($params['project_code'])) { $hiddenFields['_Project_Code'] = $params['project_code']; } // Get the fields defined for this page, exclude the placeholder fields as they are not displayed to the user. $metadataFields = $this->Fields()->where("FieldType != 'PLACEHOLDER'")->Sort('SortOrder', 'asc'); // Create fieldfield for the form fields. $formFields = FieldList::create(); $actions = FieldList::create(); $requiredFields = array(); // Push the required fields message as a literal field at the top. $formFields->push( LiteralField::create('required', '<p>* Required fields</p>') ); if ($metadataFields->count()) { foreach($metadataFields as $field) { // Create a version of the label with spaces replaced with underscores as that is how // any paraemters in the URL will come (plus we can use it for the field name) $fieldName = str_replace(' ', '_', $field->Label); $fieldLabel = $field->Label; // If the field is required then add it to the required fields and also add an // asterix to the end of the field label. if ($field->Required) { $requiredFields[] = $fieldName; $fieldLabel .= ' *'; } // Check if there is a parameter in the GET vars with the corresponding name. $fieldValue = null; if (isset($params[strtolower($fieldName)])) { $fieldValue = $params[strtolower($fieldName)]; } // Define a var for the new field, means no matter the type created // later on in the code we can apply common things like the value. $newField = null; // Single line text field creation. if ($field->FieldType == 'TEXTBOX') { $formFields->push($newField = TextField::create($fieldName, $fieldLabel)); } else if ($field->FieldType == 'TEXTAREA') { $formFields->push($newField = TextareaField::create($fieldName, $fieldLabel)); } else if ($field->FieldType == 'KEYWORDS') { // If keywords then output 2 fields the textbox for the keywords and then also a // literal read only list of those already specified by the admin below. $formFields->push($newField = TextAreaField::create($fieldName, $fieldLabel)); $formFields->push(LiteralField::create( $fieldName . '_adminKeywords', "<div class='control-group' style='margin-top: -12px'>Already specified : " . $field->KeywordsValue . "</div>" )); } else if ($field->FieldType == 'DROPDOWN') { // Some dropdowns have an 'other' option so must add the 'other' to the entries // and also have a conditionally displayed text field for when other is chosen. $entries = $field->DropdownEntries()->sort('SortOrder', 'Asc')->map('Key', 'Label'); if ($field->DropdownOtherOption == true) { $entries->push('other', 'Other'); } $formFields->push( $newField = DropdownField::create( $fieldName, $fieldLabel, $entries )->setEmptyString('Select') ); if ($field->DropdownOtherOption == true) { $formFields->push( TextField::create( "${fieldName}_other", "Please specify the 'other'" )->hideUnless($fieldName)->isEqualTo("other")->end() ); //++ @TODO // Ideally if the dropdown is required then if other is selected the other field // should also be required. Unfortunatley the conditional validation logic of ZEN // does not work in the front end - so need to figure out how to do this. } } // If a new field was created then set some things on it which are common no matter the type. if ($newField) { // Set help text for the field if defined. if (!empty($field->HelpText)) { $newField->setRightTitle($field->HelpText); } // Field must only be made readonly if the admin specified that they should be // provided that a value was specified in the URL for it. if ($field->Readonly && $fieldValue) { $newField->setReadonly(true); } // Set the value of the field one was plucked from the URL params. if ($fieldValue) { $newField->setValue($fieldValue); } } } // Add fields to the bottom of the form for the user to include a message in the email sent to curators // this is entirely optional and will not be used in most cases so is hidden until a checkbox is ticked. $formFields->push( CheckboxField::create('AdditionalMessage', 'Include a message from me to the curators') ); // For the email address, because its project managers filling out the form, check if the Project_Manager_email // has been specified in the URL params and if so pre-populate the field with that value. $formFields->push( $emailField = EmailField::create('AdditionalMessageEmail', 'My email address') ->setRightTitle('Please enter your email address so the curator knows who the message below is from.') ->hideUnless('AdditionalMessage')->isChecked()->end() ); if (isset($params['project_manager_email'])) { $emailField->setValue($params['project_manager_email']); } $formFields->push( TextareaField::create('AdditionalMessageText', 'My message') ->setRightTitle('You can enter a message here which is appended to the email sent the curator after the record has successfully been pushed to the catalogue.') ->hideUnless('AdditionalMessage')->isChecked()->end() ); // If there are any hidden fields then loop though and add them as hidden fields to the bottom of the form. if ($hiddenFields) { foreach($hiddenFields as $key => $val) { $formFields->push( HiddenField::create($key, '', $val) ); } } // We have at least one field so set the action for the form to submit the entry to the catalogue. $actions = FieldList::create(FormAction::create('sendMetadataForm', 'Send')); } else { $formFields->push( ErrorMessage::create('No metadata entry fields have been specified for this page.') ); } // Set up the required fields validation. $validator = ZenValidator::create(); $validator->addRequiredFields($requiredFields); // Create form. $form = Form::create($this, 'MetadataEntryForm', $formFields, $actions, $validator); // Check if the data for the form has been saved in the session, if so then populate // the form with this data, if not then just return the default form. $data = Session::get("FormData.{$form->getName()}.data"); return $data ? $form->loadDataFrom($data) : $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pageForm($parseData) {\n\t\t//$output .= $this->Params['meta'].' - '.$this->Params['value'].' : '.$this->Params['userID'];\n\t\tswitch($parseData['table']){\n\t\t\tcase \"journals\":\n\t\t\t\t$journalEntry = $output = $inputBranchUnit = \"\";\n\t\t\t\t$inputDate = $this->inputGroup(['label'=>'Entry Date','type'=>'date','id'=>'journal_date','name'=>'journals[entry_date]','placeholder'=>'yyyy-mm-dd','value'=>'','title'=>'','custom'=>'readonly=\"readonly\"']);\n\t\t\t\t$inputRecipient = $this->inputGroup(['label'=>'Recipient Name','type'=>'text','id'=>'journal_recipient','name'=>'journals[recipient]','placeholder'=>'Full Name (Client, Members, Staff and etc)','value'=>'','title'=>'Journal Recipient','custom'=>'']);\n\t\t\t\t$inputParticulars = $this->inputGroup(['label'=>'Particulars','type'=>'text','id'=>'journal_particulars','name'=>'journals[particulars]','placeholder'=>'Description: Max 500 characters','value'=>'','title'=>'Journal Entry Particulars','custom'=>'']);\n\t\t\t\t\n\t\t\t\tif($_SESSION[\"userrole\"] <= 3){ // ONLY FOR AREA MANAGERS/ADMINISTRATOR\n\t\t\t\t\t$inputBranchUnit = \"<i class='fa fa-sitemap'></i>\".$this->optionsBranchUnit([\"name\"=>\"unit\"]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$formField = \"<div class='x_panel journalForm'>\";\n\t\t\t\t$formField .= \"\n\t\t\t\t\t\t<div class='form-group item no-padding'>\n\t\t\t\t\t\t\t<div class='col-md-12 col-sm-12 col-xs-12'>{$inputDate}{$inputBranchUnit}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='form-group item no-padding'>\n\t\t\t\t\t\t\t<div class='col-md-12 col-sm-12 col-xs-12'>{$inputRecipient}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='form-group item no-padding'>\n\t\t\t\t\t\t\t<div class='col-md-12 col-sm-12 col-xs-12'>{$inputParticulars}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\";\n\t\t\t\t//$output = $formField;\n\t\t\t\t$accountCharts = $this->getOptionLists();\n\t\t\t\t$maxListID = 5;\n\t\t\t\tfor ($listID = 1; $listID <= $maxListID; $listID++) {\n\t\t\t\t\t$journalEntry .= \"<tr id='{$listID}' class='journal_entry'>\".$this->journalEntry($accountCharts,$listID).\"</tr>\";\n\t\t\t\t}\n\t\t\t\t$journalEntry .= \"<tr id='{$listID}'></tr>\";\n\t\t\t\t$output .= \"\n\t\t\t\t<form id='createJournalEntry' data-toggle='validator' name='createJournalEntry' class='form-label-left input_mask' novalidate>\n\t\t\t\t\t<input type='hidden' name='action' id='action' value='createJournalEntry' />\n\t\t\t\t\t<input type='hidden' name='table' id='table' value='{$parseData['table']}' />\n\t\t\t\t\t<input type='hidden' name='theID' id='theID' value='0' />\n\t\t\t\t\t<input type='hidden' name='entry' id='entry' value='{$maxListID}' />\n\t\t\t\t\t{$formField}\n\t\t\t\t\t<div class='x_panel no-padding journalEntry'>\n\t\t\t\t\t<table id='table_journal_entry' class='table hasFooter'>\n\t\t\t\t\t<thead>\n\t\t\t\t\t<tr class='default'>\n\t\t\t\t\t\t<th width='60%'>Account Code/Title</th><th width='20%' class='alignRight'>Debit (Dr)</th><th width='20%' class='alignRight'>Credit (Cr)</th>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>{$journalEntry}</tbody>\n\t\t\t\t\t<tfoot>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='alignRight bold no-padding'>\n\t\t\t\t\t\t\t<button type='button' class='btn capitalize no-margin right' id='saveOptionBtn' onclick='saveOption(\\\"createJournalEntry\\\")' name='submitRecords'>CREATE ENTRY</button>\n\t\t\t\t\t\t\t<button type='button' class='btn no-margin right' id='createClone' onclick='loadStorage(this);' action='getElementData' block='#table_journal_entry tbody' meta='journal_entry' value='6' name='journal_entry'><i class='fa fa-plus'></i></button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class='alignRight total no-padding bold large'>\n\t\t\t\t\t\t\t<span id='total-debit'>&ctdot;</span>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class='alignRight total no-padding bold large'>\n\t\t\t\t\t\t\t<span id='total-credit'>&ctdot;</span>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</tfoot>\n\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t\t\t<script>\n\t\t\t\t\t//$(':input').inputmask();\n\t\t\t\t\t//webshims.setOptions('forms-ext', {replaceUI: 'auto', types: 'number'});webshims.polyfill('forms forms-ext');\n\t\t\t\t\t$('.select2_group').each(function() {\n\t\t\t\t\t\t$(this).select2({\n\t\t\t\t\t\t\tplaceholder: $(this).attr('placeholder'),\n\t\t\t\t\t\t\tallowClear: true\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tfunction addTableList(me){\n\t\t\t\t\t\tthisVal = me.value;\n\t\t\t\t\t\tthisName = me.name;\n\t\t\t\t\t\tlistNum = parseFloat(thisVal) + 1;\n\t\t\t\t\t\t$('[name='+thisName+']').val(listNum);\n\t\t\t\t\t\tclone = $('.journal_entry:last-of-type').clone();\n\t\t\t\t\t\tclone.appendTo('tbody');\n\t\t\t\t\t\t//alert(clone).replaceAll('5','6');\n\t\t\t\t\t\t$('.journal_entry:last-of-type').attr('id',listNum);\n\t\t\t\t\t\t$('.journal_entry:last-of-type input#meta-code').attr('name','code-'+listNum).attr('element','elementTitle-'+listNum);\n\t\t\t\t\t\t$('.journal_entry:last-of-type input#meta-Dr').attr('name','journal[Dr]['+listNum+']');\n\t\t\t\t\t\t$('.journal_entry:last-of-type input#meta-Cr').attr('name','journal[Cr]['+listNum+']');\n\t\t\t\t\t\t$('.journal_entry:last-of-type span.ellipsis').attr('id','elementTitle-'+listNum);\n\t\t\t\t\t\t$(document).ready(function() {\n\t\t\t\t\t\t\t//$(':input').inputmask();\n\t\t\t\t\t\t\twebshims.setOptions('forms-ext', {replaceUI: 'auto', types: 'number'});webshims.polyfill('forms forms-ext');\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t$('input#journal_date').daterangepicker({\n\t\t\t\t\t\t\tsingleDatePicker: true,\n\t\t\t\t\t\t\tautoUpdateInput: true,\n\t\t\t\t\t\t\t\".(false ? \"minDate: moment().subtract(-1, 'days'),maxDate: moment().subtract(-1, 'days'),\" : \"\").\"\n\t\t\t\t\t\t\tcalender_style: 'picker_4',\n\t\t\t\t\t\t\tlocale: {\n\t\t\t\t\t\t\t\tformat: 'YYYY/MM/DD'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, function (start, end, label) {\n\t\t\t\t\t\t\t[moment().subtract(29, 'days'), moment()]\n\t\t\t\t\t\t\tconsole.log(start.toISOString(), end.toISOString(), label);\n\t\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\";\n\t\t\t\tbreak; // END CASE JOURNAL\n\t\t\t\t\n\t\t\t\tcase \"payroll\":\n\t\t\t\t$this->schema = Info::DB_NAME;\n\t\t\t\t$fieldValue[] = $tableListings = \"\";\n\t\t\t\t$defaultDateRanges = \"true\";\n\t\t\t\t$getParseValue = $this->getValueDB([\"table\"=>$parseData['table'],\"id\"=>$parseData['value']]);\n\t\t\t\t$getFields = $this->getTableFields(['table'=>$parseData['table'],'exclude'=>['id']]);\n\t\t\t\tforeach($getFields as $var){\n\t\t\t\t\t$fieldValue[$var] = (isset($getParseValue[$var]) && $parseData['value'] != \"\") ? $getParseValue[$var] : \"\";\n\t\t\t\t}\n\t\t\t\tif($parseData['value']){\n\t\t\t\t\t$defaultDateRanges = \"false\";\n\t\t\t\t\t$fieldValue['start'] = date_create($fieldValue['start']);\n\t\t\t\t\t$fieldValue['start'] = $startDate = date_format($fieldValue['start'], 'Y/m/d');\n\t\t\t\t\t$fieldValue['end'] = date_create($fieldValue['end']);\n\t\t\t\t\t$fieldValue['end'] = $endDate = date_format($fieldValue['end'], 'Y/m/d');\n\t\t\t\t\t$startDate = \"'\".$fieldValue['start'].\"'\";\n\t\t\t\t\t$endDate = \"'\".$fieldValue['end'].\"'\";\n\t\t\t\t}else{\n\t\t\t\t\t$startDate = \"moment().subtract(12, 'days')\";\n\t\t\t\t\t$endDate = \"moment()\";\n\t\t\t\t}\n\n\t\t\t\t$cutOffDate = $this->inputGroup(['label'=>'Cut-Off Date','type'=>'date','id'=>'dateRange','name'=>'cutOffDate','placeholder'=>'Cut-off Date','value'=>$fieldValue['start'].\" - \".$fieldValue['end']]);\n\t\t\t\t//$cutOffDate = \"<input title='Report Date' value='' type='text' id='inputDate' name='dateAsOf' placeholder='yyyy-mm-dd' class='form-control date-picker'>\";\n\n\t\t\t\t$title = $this->inputGroup(['label'=>'Payroll Title','type'=>'text','id'=>'title','name'=>'title','placeholder'=>'Payroll Description','value'=>$fieldValue['title']]);//$this->Params['last_name']\n\t\t\t\t$payroll_set = $this->inputGroup(['label'=>'Payroll Type','type'=>'select','id'=>'payroll_set','name'=>'payroll_set','meta_key'=>'payroll_set','meta'=>'codebook','placeholder'=>'Select Payroll Type','value'=>$fieldValue['payroll_set']]);\n\n\t\t\t\t$popUpCreate = ($parseData['value']) ? \"\n\t\t\t\t\t<button type='button' title='Upload New Logs' value='' id='uploadLogsBtn' name='uploadLogsBtn' handle='createLogRecords' action='showElement' element='fileImport' class='btn add paddingHorizontal' onclick=\\\"showElement(this)\\\"><i class='fa fa-upload'></i></button>\n\t\t\t\t\t<button type='button' title='Create New Logs' value='{$parseData['value']}' id='{$this->Params['table']}LogsBtn' name='create{$this->Params['table']}Logs' handle='createLogRecords' action='popupBox' table='{$this->Params['table']}_logs' class='btn add paddingHorizontal' onclick=\\\"getPopup(this,'console_{$this->Params['table']}')\\\" data-toggle='modal' data-target='.popup-console_{$this->Params['table']}'><i class='fa fa-plus'></i></button>\n\t\t\t\t\t\"\n\t\t\t\t\t: \"\";\n\n\t\t\t\t$formField = \"\n\t\t\t\t<form id='createRecords' data-toggle='validator' name='createPayrollEntry' class='form-label-left input_mask' novalidate>\n\t\t\t\t\t<input type='hidden' name='action' id='action' value='createRecords' />\n\t\t\t\t\t<input type='hidden' name='table' id='table' value='{$this->Params['table']}' />\n\t\t\t\t\t<input type='hidden' name='theID' id='theID' value='{$parseData['value']}' />\n\t\t\t\n\t\t\t\t\t<div class='x_panel no-padding borderBox'><div class='box_title'><h2 class='left capitalize'>Create Employee {$this->Params['table']}'s</h2></div><div class='x_content no-padding'>\n\t\t\t\t\t\t<div class='form-group no-padding item'>\n\t\t\t\t\t\t\t<div class='col-md-6 col-sm-6 col-xs-12 no-padding'>{$payroll_set}</div>\n\t\t\t\t\t\t\t<div class='col-md-6 col-sm-6 col-xs-12 no-padding'>{$cutOffDate}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='form-group no-padding item col-4'>{$title}</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='form-group bottomSubmit'>\n\t\t\t\t\t\t<div class='col-md-10 col-sm-10 col-xs-12 col-md-offset-2 no-padding'><button type='submit' title='Submit payroll records' value='' id='submitEntry' name='createRecords' class='btn btn-success capitalize paddingHorizontal' onclick='submitData(this)'>\".($parseData['value'] ? 'Update' : 'Create').\" {$this->Params['table']}</button>{$popUpCreate}</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t\t\";\n\n\t\t\t\tif(isset($parseData['value']) && $parseData['value'] != \"\"){ // LIST OF PAYROLL LOGS\n\t\t\t\t\t$tbHeader = $tblLists = \"\";\n\t\t\t\t\t$this->tblCol = ['id_number'=>['ID Number','10%'],'bio_id'=>['Bio ID','6%'],'full_name'=>['Employee\\'s Full Name',''],'employment_level'=>['Emp. Level','12%'],'gender'=>['Gender','14%'],'unit'=>['Department','18%'],'designation'=>['Position','18%']];\n\n\t\t\t\t\t$colCenter = ['id_number','bio_id'];\n\t\t\t\t\tforeach($this->tblCol as $tblKey => $tblValue){\n\t\t\t\t\t\t$alignClass = (in_array($tblKey, $colCenter)) ? \"alignCenter\" : \"paddingLeft\";\n\t\t\t\t\t\t$tbHeader .= \"<th width='{$tblValue[1]}' class='{$alignClass} no-padding'>{$tblValue[0]}</th>\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$stmtElements = ['schema'=>Info::DB_NAME,'table'=>$this->Params['table'].'_logs','arguments'=>['record_id'=>$parseData['value']],'pdoFetch'=>PDO::FETCH_GROUP | PDO::FETCH_CLASS,'fields'=>['staff_id','id','record_id']];\n\t\t\t\t\t$getElements = self::selectDB($stmtElements);\n\t\t\t\t\t//var_dump($getElements);\n\t\t\t\t\t$cnt = 1;\n\t\t\t\t\t//$this->pageAction = ($this->isApprove) ? \"view\" : \"\";\n\t\t\t\t\t$this->Params['pageName'] = \"payroll_logs-page\";\n\t\t\t\t\tforeach($getElements as $staff_ID => $metaStmt){\n\t\t\t\t\t\t$metaStmt[0]->staff_id = $staff_ID;\n\t\t\t\t\t\t$listValue = $metaStmt;\n\t\t\t\t\t\t$tblLists .= self::getTableListings($listValue);\n\t\t\t\t\t\t$cnt++;\n\t\t\t\t\t}\n\n\t\t\t\t\t$tableListings = \"\n\t\t\t\t\t<div class='x_content'>\n\t\t\t\t\t\t<table id='payroll_logs' width='100%' class='table table-bordered'>\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr class='default'>{$tbHeader}<th class='no-padding no-sort actionBtn'>&nbsp;</th></tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>{$tblLists}</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\";\n\t\t\t\t}\n\n\t\t\t\t$output = $formField.$tableListings;\n\t\t\t\t$output .= \"<script>\n\t\t\t\t$(document).ready(function() {\n\t\t\t\t\t$(':input').inputmask();\n\t\t\t\t\t$('.select2_single').each(function() {\n\t\t\t\t\t\t$(this).select2({\n\t\t\t\t\t\t\tplaceholder: $(this).attr('placeholder'),\n\t\t\t\t\t\t\tallowClear: false\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$('#payroll_logs').DataTable( {\n\t\t\t\t\t\tdom: 'Bfrtip',\n\t\t\t\t\t\t'searching': true,\n\t\t\t\t\t\t'bPaginate': false,\n\t\t\t\t\t\t'bInfo': false,\n\t\t\t\t\t\t'order': [[ 2, 'asc' ]],\n\t\t\t\t\t\tresponsive: true,\n\t\t\t\t\t\tbuttons: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\textend: 'copy',\n\t\t\t\t\t\t\t\tclassName: 'hide fa fa-clipboard'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\textend: 'csv',\n\t\t\t\t\t\t\t\tclassName: 'hide fa fa-table'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\textend: 'print',\n\t\t\t\t\t\t\t\tclassName: 'hide fa fa-print'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t extend: 'excel',\n\t\t\t\t\t\t\t className: 'btn-sm'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\textend: 'pdfHtml5',\n\t\t\t\t\t\t\tclassName: 'btn-sm'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t});\n\n\t\t\t\t\t$('input#dateRange.date-picker').daterangepicker({\n\t\t\t\t\t\tsingleDatePicker: false,\n\t\t\t\t\t\topens: 'left',\n\t\t\t\t\t\tstartDate: {$startDate},\n\t\t\t\t\t\tendDate: {$endDate},\n\t\t\t\t\t\t\n\t\t\t\t\t\tcalender_style: 'picker_4',\n\t\t\t\t\t\tlocale: {\n\t\t\t\t\t\t\tformat: 'YYYY/MM/DD'\n\t\t\t\t\t\t}\n\t\t\t\t\t}, function (start, end, label) {\n\t\t\t\t\t\tconsole.log(start.toISOString(), end.toISOString(), label);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\t</script>\";\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\treturn $output;\n\t}", "protected function createFormFields() {\n\t}", "public function displayPageAddForm(){\n\n // Vérifie les données de champs dupliqués\n $this->handleDuplicateFields();\n\n // Vérifie les données post envoyées\n $this->handleAdd();\n\n // If there ia a modify var\n if(isset($_GET['modify']) && !empty($_GET['modify'])){\n\n $form = get_post($_GET['modify']);\n if($this->isForm($_GET['modify'])){\n\n $formMetas = get_post_meta($_GET['modify']);\n $formArgs = get_post_meta($_GET['modify'],'form-args');\n $formFields = get_post_meta($_GET['modify'],'form-fields');\n $submitArgs = get_post_meta($_GET['modify'],'form-submit-args');\n $formSendArgs = get_post_meta($_GET['modify'],'form-send-args');\n }else\n unset($form);\n\n }\n require_once __DIR__ . '/templates/add.php';\n\n }", "protected function _prepareForm()\r\n {\r\n /* @var $model Amasty_Xlanding_Model_Page */\r\n $model = Mage::registry('amlanding_page');\r\n\r\n /* @var $helper Amasty_Xlanding_Helper_Data */\r\n $helper = Mage::helper('amlanding');\r\n $attributeSets = $helper->getAvailableAttributeSets();\r\n $form = new Varien_Data_Form();\r\n\r\n $form->setHtmlIdPrefix('page_');\r\n\r\n $fieldset = $form->addFieldset('base_fieldset', array('legend' => $helper->__('Page Information')));\r\n\r\n if ($model->getPageId()) {\r\n $fieldset->addField('page_id', 'hidden', array(\r\n 'name' => 'page_id',\r\n ));\r\n }\r\n\r\n $fieldset->addField('title', 'text', array(\r\n 'name' => 'title',\r\n 'label' => $helper->__('Page Name'),\r\n 'title' => $helper->__('Page Name'),\r\n 'required' => true,\r\n ));\r\n\r\n $fieldset->addField('identifier', 'text', array(\r\n 'name' => 'identifier',\r\n 'label' => $helper->__('URL Key'),\r\n 'title' => $helper->__('URL Key'),\r\n 'required' => true,\r\n 'class' => 'validate-identifier',\r\n 'note' => $helper->__('Relative to Website Base URL'),\r\n ));\r\n\r\n /**\r\n * Check is single store mode\r\n */\r\n if (!Mage::app()->isSingleStoreMode()) {\r\n\r\n $fieldset->addField('store_id', 'multiselect', array(\r\n 'label' => $helper->__('Stores'),\r\n 'name' => 'stores[]',\r\n 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm()\r\n ));\r\n } else {\r\n $fieldset->addField('store_id', 'hidden', array(\r\n 'name' => 'stores[]',\r\n 'value' => Mage::app()->getStore(true)->getId()\r\n ));\r\n $model->setStoreId(Mage::app()->getStore(true)->getId());\r\n }\r\n\r\n $fieldset->addField('is_active', 'select', array(\r\n 'label' => $helper->__('Status'),\r\n 'title' => $helper->__('Page Status'),\r\n 'name' => 'is_active',\r\n 'required' => true,\r\n 'options' => $helper->getAvailableStatuses()\r\n ));\r\n\r\n /**\r\n * Adding field in the form to select the default attribute store used for optimization purposes\r\n */\r\n $fieldset->addField('default_attribute_set', 'select', array(\r\n 'label' => $helper->__('Default Attribute Set'),\r\n 'title' => $helper->__('Default Attribute Set'),\r\n 'name' => 'default_attribute_set',\r\n 'options' => $attributeSets,\r\n 'required' => true\r\n ));\r\n $form->setValues($model->getData());\r\n $this->setForm($form);\r\n\r\n }", "function create_form(){\n\t\n\t$table =\"<html>\";\n\t$table.=\"<head>\";\n\t$table.=\"\t<title>New Article Entry Page</title>\";\n\t$table.=\"</head>\";\n\t\n\t// URL for the wordpress post handling page\n\t$link_admin_post = admin_url('admin-post.php');\n\t$table.=\"<form name = 'myform' method=\\\"POST\\\" action='\" . $link_admin_post . \"' id = \\\"form1\\\">\";\n\n\t// Input for Faculty member\n\t$table.= \"\t<br>\";\n\t$table.= \" <div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Tag\\\">Faculty Member/Tag: </label></p>\";\n\t$list_of_names = wp_post_tag_names();\n\t$table.=\"\t<select name=\\\"Tag\\\">\" . $list_of_names . \"</select>\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for PMID\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"PMID\\\">PMID*: </label></p>\";\n\t$table.=\"\t<input type=\\\"number\\\" name=\\\"PMID\\\" id=\\\"PMID\\\" required>\";\n\t\n\t//autofill button\n\t$table.=' <a class=\"pmid\" data-test=\"hi\"><button id=\"autofill_btn\" type=\"button\" >Auto-Fill</button></a>';\n\t$table.=\"\t</div>\";\n\t\t\n\t// Input for Journal Issue\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label style=\\\"width: 200px;\\\" for=\\\"Journal_Issue\\\">Journal Issue: </label></p>\";\n\t$table.=\"\t<input id = 'issue' type=\\\"number\\\" name=\\\"Journal_Issue\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Volume\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Volume\\\">Journal Volume: </label></p>\";\n\t$table.=\"\t<input id = 'journal_volume' type=\\\"number\\\" name=\\\"Journal_Volume\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Title\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Title\\\">Journal Title: </label></p>\";\n\t$table.=\"\t<input id = 'journal_title' type=\\\"text\\\" name=\\\"Journal_Title\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Year\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Year\\\">Journal Year: </label></p>\";\n\t$table.=\"\t<input id = 'year' value=\\\"2000\\\" type=\\\"number\\\" name=\\\"Journal_Year\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Month\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Month\\\">Journal Month: </label></p>\";\n\t$table.=\"\t<select id='journal_month' name=\\\"Journal Month\\\">\";\n\t$table.=\"\t\t<option value=\\\"01\\\">Jan</option>\";\n\t$table.=\"\t\t<option value=\\\"02\\\">Feb</option>\";\n\t$table.=\"\t\t<option value=\\\"03\\\">Mar</option>\";\n\t$table.=\"\t\t<option value=\\\"04\\\">Apr</option>\";\n\t$table.=\"\t\t<option value=\\\"05\\\">May</option>\";\n\t$table.=\"\t\t<option value=\\\"06\\\">Jun</option>\";\n\t$table.=\"\t\t<option value=\\\"07\\\">Jul</option>\";\n\t$table.=\"\t\t<option value=\\\"08\\\">Aug</option>\";\n\t$table.=\"\t\t<option value=\\\"09\\\">Sep</option>\";\n\t$table.=\"\t\t<option value=\\\"10\\\">Oct</option>\";\n\t$table.=\"\t\t<option value=\\\"11\\\">Nov</option>\";\n\t$table.=\"\t\t<option value=\\\"12\\\">Dec</option>\";\n\t$table.=\"\t</select>\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Day\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Day\\\">Journal Day: </label></p>\";\n\t$table.=\"\t<input id = 'journal_day' type=\\\"text\\\" name=\\\"Journal_Day\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Date\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Date\\\">Journal Date: </label></p>\";\n\t$table.=\"\t<input id = 'journal_date' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Journal_Date\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Abbreviation\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Abbreviation\\\">Journal Abbreviation: </label></p>\";\n\t$table.=\"\t<input id = 'journal_ab' type=\\\"text\\\" name=\\\"Journal_Abbreviation\\\">\";\n\t$table.=\"\t</div>\";\n\n\t// Input for Journal Citation\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Citation\\\">Journal Citation: </label></p>\";\n\t$table.=\"\t<input id = 'journal_citation' type=\\\"text\\\" name=\\\"Journal_Citation\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Title\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Title\\\">Article Title: </label></p>\";\n\t$table.=\"\t<input id=\\\"article_title\\\" type=\\\"text\\\" name=\\\"Article_Title\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for article abstract\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Abstract\\\">Article Abstract: </label></p>\";\n\t$table.=\" <textarea id='abstract' rows = '4' cols = '60' name=\\\"Article_Abstract\\\"></textarea>\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article URL\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_URL\\\">Article URL: </label></p>\";\n\t$table.=\"\t<input id = 'article_url' type=\\\"text\\\" name=\\\"Article_URL\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Pagination\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Pagination\\\">Article Pagination: </label></p>\";\n\t$table.=\"\t<input id='pages' type=\\\"text\\\" name=\\\"Article_Pagination\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Date\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Date\\\">Article Date: </label></p>\";\n\t$table.=\"\t<input id='article_date' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Article_Date\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Authors\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Authors\\\">Article Authors: </label></p>\";\n\t$table.=\"\t<input id='article_authors' type=\\\"text\\\" name=\\\"Article_Authors\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Affiliations\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Affiliation\\\">Article Affiliation: </label></p>\";\n\t$table.=\"\t<input id = 'article_affiliation' type=\\\"text\\\" name=\\\"Article_Affiliation\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Date Created\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Date_Created\\\">Date Created: </label></p>\";\n\t$table.=\"\t<input id='date_created' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Date_Created\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Date Completed\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Date_Completed\\\">Date Completed: </label></p>\";\n\t$table.=\"\t<input id='date_completed' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Date_Completed\\\">\";\n\t$table.=\"\t</div>\";\n\n\t// Input for Date Revised\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Date_Revised\\\">Date Revised: </label></p>\";\n\t$table.=\"\t<input id='date_revised' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Date_Revised\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Hidden input (for specifying hook)\n\t$table.=\"\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"new_article_form\\\">\";\n\t\n\t// Submit and reset buttons\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div id=\\\"form_btns\\\">\"; \n\t$table.=\"\t<button class=\\\"form_btn\\\"><input type=\\\"reset\\\" value=\\\"Reset!\\\" onclick=\\\"window.location.reload()\\\"></button>\";\n\t$table.=\"\t<input class=\\\"form_btn\\\" type=\\\"submit\\\" value=\\\"Submit\\\">\"; \n\t$table.=\"\t</div>\";\n\t$table.=\"</form>\";\n\n\t// Styling of the form (needs to be put in a seperate stylesheet)\n\t$table.=\"<style type=\\\"text/css\\\">\";\n\t$table.=\"\t#form_btns {\";\n\t$table.=\"\t\tmargin-left: 150px;\";\n\t$table.=\"\t}\";\n\t$table.=\"\t.form_btn {\";\n\t$table.=\"\t\twidth: 80px;\";\n\t$table.=\"\t}\";\n\t$table.=\"\t.label {\";\n\t$table.=\"\t\twidth: 150px;\";\n\t$table.=\"\t\tmargin: 0;\";\n\t$table.=\"\t\tfloat: left;\";\n\t$table.=\"\t}\";\n\t$table.=\"\tinput::placeholder {\";\n\t$table.=\"\t\tcolor: #a4a4a4;\";\n\t$table.=\"\t}\";\n\t$table.=\"</style>\";\n\t\n\t$table.=\"<script type='text/javascript' src=\" . plugin_dir_url(__FILE__) . \"js/autofill_ajax.js></script>\";\n\n \techo $table;\n}", "protected function _getForm() \r\n\t{ \r\n\t\t$form = \"\";\r\n\t\t$allElementSets = $this->_getAllElementSets();\r\n\t\t$ignoreElements = array();\r\n\t\tforeach ($allElementSets as $elementSet) { //traverse each element set to create a form group for each\r\n\t\t\tif($elementSet['name'] != \"Item Type Metadata\") { // start with non item type metadata\r\n\t\t\t\t\r\n\t\t\t\t$form .= '<div id=\"' . text_to_id($elementSet['name']) . '-metadata\">';\r\n\t\t\t\t$form .= '<fieldset class=\"set\">';\r\n\t\t\t\t$form .= '<h2>' . __($elementSet['name']) . '</h2>';\r\n\t\t\t\t$form .= '<p class=\"element-set-description\" id=\"';\r\n\t\t\t\t$form .= html_escape(text_to_id($elementSet['name']) . '-description') . '\">';\r\n\t\t\t\t$form .= url_to_link(__($elementSet['description'])) . '</p>';\r\n\t\t\t\t\r\n\t\t\t\t$elements = $this->_getAllElementsInSet($elementSet['id']);\r\n\t\t\t\tforeach ($elements as $element) { //traverse each element in the set to create a form input for each in the form group\r\n\t\t\t\t\t$allElementValues = $this->_allElementValues($element['id'], $elements);\r\n\t\t\t\t\tif ((!in_array($element['id'], $ignoreElements)) && (count($allElementValues) > 1)) { // if the element has a value and has multiple inputs\r\n\t\t\t\t\t\t$form .= $this->_field($allElementValues, true);\r\n\t\t\t\t\t\tarray_push($ignoreElements, $element['id']);\r\n\t\t\t\t\t} else if (!in_array($element['id'], $ignoreElements)) { \r\n\t\t\t\t\t\t$form .= $this->_field($allElementValues, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$form .= \"</fieldset>\";\r\n\t\t\t\t$form .= \"</div>\";\r\n\t\t\t} else { // if item type metadata\r\n\t\t\t\t$item_types = get_records('ItemType', array('sort_field' => 'name'), 1000);\r\n\t\t\t\t$defaultItemType = $this->_helper->db->getTable('DefaultMetadataValue')->getDefaultItemType();\r\n\t\t\t\t$defaultItemTypeId = 0;\r\n\t\t\t\tif (!empty($defaultItemType)) {\r\n\t\t\t\t\t$defaultItemTypeId = intval($defaultItemType[0][\"text\"]);\r\n\t\t\t\t}\r\n\t\t\t\t$form .= '<div id=\"item-type-metadata-metadata\">';\r\n\t\t\t\t$form .= '<h2>' . __($elementSet['name']) . '</h2>';\r\n\t\t\t\t$form .= '<div class=\"field\" id=\"type-select\">';\r\n\t\t\t\t$form .= '<div class=\"two columns alpha\">';\r\n\t\t\t\t$form .= '<label for=\"item-type\">Item Type</label> </div>';\r\n\t\t\t\t$form .= '<div class=\"inputs five columns omega\">';\r\n\t\t\t\t$form .= '<select name=\"item_type_id\" id=\"item-type\">';\r\n\t\t\t\t$form .= '<option value=\"\">Select Below </option>';\r\n\t\t\t\tforeach ($item_types as $item_type) {\r\n\t\t\t\t\tif($item_type[\"id\"] == $defaultItemTypeId) {\r\n\t\t\t\t\t\t$form .= '<option value=\"' . $item_type['id'] . '\" selected=\"selected\">' . $item_type['name'] . '</option>';\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$form .= '<option value=\"' . $item_type['id'] . '\">' . $item_type['name'] . '</option>';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$form .= '</select> </div>';\r\n\t\t\t\t$form .= '<input type=\"submit\" name=\"change_type\" id=\"change_type\" value=\"Pick this type\" style=\"display: none;\">';\r\n\t\t\t\t$form .= '</div>';\r\n\t\t\t\t$form .= '<div id=\"type-metadata-form\">';\r\n\t\t\t\t$form .= '<div class=\"five columns offset-by-two omega\">';\r\n\t\t\t\t$form .= '<p class=\"element-set-description\">';\r\n\t\t\t\t$form .= '</p>';\r\n\t\t\t\t$form .= '</div>';\r\n\t\t\t\t$form .= '</div>';\r\n\t\t\t\t$form .= '</div>';\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n return $form;\r\n }", "public function generate_fields( $post ) {\n\t\t$datos = get_post_meta($post->ID, $this->idMetaBox, true);\n\t\twp_nonce_field( 'repeatable_meta_box_nonce-'.$this->idMetaBox, 'repeatable_meta_box_nonce-'.$this->idMetaBox );\n\t\t?>\n\t\t<table id=\"repeatable-fieldset-one_<?=$this->idMetaBox?>\" width=\"100%\">\n\t\t<?php\n\t\t$i = 0;\n\t\t//rellenamos con los datos que tenemos guardados\n\t\tif(!empty($datos)){\n\t\t\tforeach($datos as $dato){\t\n\t\t\t\t$output = '<tr>';\n\t\t\t\t$output .= '<td>\n\t\t\t\t\t\t<span class=\"sort hndle\" style=\"float:left;\">\n\t\t\t\t\t\t\t<img src=\"'.get_template_directory_uri().'/img/move.png\" />&nbsp;&nbsp;&nbsp;</span>\n\t\t\t\t\t\t\t<a class=\"button remove-row_'.$this->idMetaBox.'\" href=\"#\">-</a>\n\t\t\t\t\t</td>';\n\t\t\t\tforeach($this->fields as $field){\t\t\t\t\n\t\t\t\t\tswitch ( $field['type'] ) {\n\t\t\t\t\t\tcase 'media':\n\t\t\t\t\t\t\t$output .= sprintf(\n\t\t\t\t\t\t\t\t'<td>\n\t\t\t\t\t\t\t\t\t<input class=\"regular-text\" id=\"%s'.$i.'\" name=\"%s[]\" type=\"text\" value=\"%s\">\n\t\t\t\t\t\t\t\t\t<input class=\"button rational-metabox-media\" id=\"%s'.$i.'_button\" name=\"%s_button\" type=\"button\" value=\"Upload\" />\n\t\t\t\t\t\t\t\t</td>',\n\t\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t\t$dato[$field['id']],\n\t\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t\t$field['id']\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$output .= sprintf(\n\t\t\t\t\t\t\t\t'<td>\n\t\t\t\t\t\t\t\t\t<input %s id=\"%s'.$i.'\" name=\"%s[]\" type=\"%s\" value=\"%s\">\n\t\t\t\t\t\t\t\t</td>',\n\t\t\t\t\t\t\t\t$field['type'] !== 'color' ? 'class=\"regular-text\"' : '',\n\t\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\t\t\t$dato[$field['id']]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t\t$i++;\t\t\n\t\t\t\t$output .= '</tr>';\t\t\t\n\t\t\t\techo $output;\n\t\t\t}\n\t\t\t\n\t\t//si no tenemos datos mostramos los campos vacios\n\t\t}else{\n\t\t\t\n\t\t\t$input = '<tr>';\n\t\t\t$input = '<td>\n\t\t\t\t\t\t<span class=\"sort hndle\" style=\"float:left;\">\n\t\t\t\t\t\t\t<img src=\"'.get_template_directory_uri().'/img/move.png\" />&nbsp;&nbsp;&nbsp;</span>\n\t\t\t\t\t\t\t<a class=\"button remove-row_'.$this->idMetaBox.'\" href=\"#\">-</a>\n\t\t\t\t\t</td>';\n\t\t\tforeach($this->fields as $field){\t\t\t\t\n\t\t\t\tswitch ( $field['type'] ) {\n\t\t\t\t\tcase 'media':\n\t\t\t\t\t\t$input .= sprintf(\n\t\t\t\t\t\t\t'<td>\n\t\t\t\t\t\t\t\t<input class=\"regular-text\" id=\"%s'.$i.'\" name=\"%s[]\" type=\"text\" value=\"\">\n\t\t\t\t\t\t\t\t<input class=\"button rational-metabox-media\" id=\"%s'.$i.'_button\" name=\"%s_button\" type=\"button\" value=\"Upload\" />\n\t\t\t\t\t\t\t</td>',\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id']\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$input .= sprintf(\n\t\t\t\t\t\t\t'<td>\n\t\t\t\t\t\t\t\t<input %s id=\"%s'.$i.'\" name=\"%s[]\" type=\"%s\" value=\"\">\n\t\t\t\t\t\t\t</td>',\n\t\t\t\t\t\t\t$field['type'] !== 'color' ? 'class=\"regular-text\"' : '',\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['type']\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t$input .= '</tr>';\t\t\t\n\t\t\techo $input;\t\n\t\t\t$i++;\t\n\t\t}\n\t\t?>\n\t\t<tr class=\"empty-row screen-reader-text <?=$this->idMetaBox?>\" data-id=\"<?=$i?>\">\n\t\t<?php\n\t\t\t$input = '<td>\n\t\t\t\t\t\t<span class=\"sort hndle\" style=\"float:left;\">\n\t\t\t\t\t\t\t<img src=\"'.get_template_directory_uri().'/img/move.png\" />&nbsp;&nbsp;&nbsp;</span>\n\t\t\t\t\t\t\t<a class=\"button remove-row_'.$this->idMetaBox.'\" href=\"#\">-</a>\n\t\t\t\t\t</td>';\n\t\t\tforeach($this->fields as $field){\n\t\t\t\tswitch ( $field['type'] ) {\n\t\t\t\t\tcase 'media':\n\t\t\t\t\t\t$input .= sprintf(\n\t\t\t\t\t\t\t'<td>\n\t\t\t\t\t\t\t\t<input class=\"regular-text\" id=\"%s\" name=\"%s[]\" type=\"text\" value=\"\">\n\t\t\t\t\t\t\t\t<input class=\"button rational-metabox-media\" id=\"%s_button\" name=\"%s_button\" type=\"button\" value=\"Upload\" />\n\t\t\t\t\t\t\t</td>',\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id']\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$input .= sprintf(\n\t\t\t\t\t\t\t'<td>\n\t\t\t\t\t\t\t\t<input %s id=\"%s\" name=\"%s[]\" type=\"%s\" value=\"\">\n\t\t\t\t\t\t\t</td>',\n\t\t\t\t\t\t\t$field['type'] !== 'color' ? 'class=\"regular-text\"' : '',\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['type']\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\techo $input;\n\t\t?>\n\t\t</tr>\n\t\t</table>\n\t\t<p><a id=\"add-row_<?=$this->idMetaBox?>\" class=\"button\" href=\"#\">+</a></p>\n\t\t<?php\n\t}", "public function add_entry_form() {\n\n\t\t$entry = new_cmb2_box( array(\n\t\t\t'id'\t\t\t\t\t\t\t\t=> $this->meta_prefix,\n\t\t\t'title'\t\t\t\t\t\t\t=> __( 'Entries', 'nsa-entries-2016' ),\n\t\t\t'object_types'\t\t\t=> array( 'tm-events-entries' ),\n\t\t\t'context'\t\t\t\t\t\t=> 'normal',\n\t\t\t'priority'\t\t\t\t\t=> 'high',\n\t\t\t'show_names'\t\t\t\t=> 'true',\n\t\t) );\n\n\t\t$entry->add_field( array(\n\t\t\t'id'\t\t\t\t\t\t\t\t=> 'submitted_post_title',\n\t\t\t'name'\t\t\t\t\t\t\t=> __( 'Nominee&rsquo;s Name', 'nsa-entries-2016' ),\n\t\t\t'type'\t\t\t\t\t\t\t=> 'text',\n\t\t\t'default'\t\t\t\t\t\t=> array( $this, 'set_title' ),\n\t\t\t'attributes'\t\t\t\t=> array(\n\t\t\t'placeholder'\t\t\t\t=> __( 'eg, Jane Bloggs', 'nsa-entries-2016' ),\n\t\t\t'required'\t\t\t\t\t=> 'required',\n\t\t\t),\n\t\t) );\n\n\t\t$entry->add_field( array(\n\t\t\t'id'\t\t\t\t\t\t\t\t=> $this->meta_prefix . 'nominee_email',\n\t\t\t'name'\t\t\t\t\t\t\t=> __( 'Nominee&rsquo;s Email', 'nsa-entries-2016' ),\n\t\t\t'type'\t\t\t\t\t\t\t=> 'text_email',\n\t\t\t'default'\t\t\t\t\t\t=> array( $this, 'set_default' ),\n\t\t\t'attributes'\t\t\t\t=> array(\n\t\t\t'placeholder'\t\t\t\t=> __( 'eg, [email protected]', 'nsa-entries-2016' ),\n\t\t\t'required'\t\t\t\t\t=> 'required',\n\t\t\t),\n\t\t) );\n\n\t\t$entry->add_field( array(\n\t\t\t'id'\t\t\t\t\t\t\t\t=> $this->meta_prefix . 'nominee_phone',\n\t\t\t'name'\t\t\t\t\t\t\t=> __( 'Nominee&rsquo;s Phone Number', 'nsa-entries-2016' ),\n\t\t\t'type'\t\t\t\t\t\t\t=> 'text',\n\t\t\t'default'\t\t\t\t\t\t=> array( $this, 'set_default' ),\n\t\t\t'attributes'\t\t\t\t=> array(\n\t\t\t'placeholder'\t\t\t\t=> __( 'eg, 0121 123 4567', 'nsa-entries-2016' ),\n\t\t\t'required'\t\t\t\t\t=> 'required',\n\t\t\t),\n\t\t) );\n\n\t\t$entry->add_field( array(\n\t\t\t'id'\t\t\t\t\t\t\t\t=> $this->meta_prefix . 'nominee_award',\n\t\t\t'name'\t\t\t\t\t\t\t=> __( 'Awards Category', 'nsa-entries-2016' ),\n\t\t\t'desc'\t\t\t\t\t\t\t=> __( 'Choose the award(s) to enter.', 'nsa-entries-2016' ),\n\t\t\t'type'\t\t\t\t\t\t\t=> 'multicheck',\n\t\t\t'select_all_button'\t=> false,\n\t\t\t'attributes'\t\t\t\t=> array(),\n\t\t\t'options_cb'\t\t\t\t=> array( $this, 'get_awards' ),\n\t\t));\n\n\t\t$entry->add_field( array(\n\t\t\t'id'\t\t\t\t\t\t\t\t=> $this->meta_prefix . 'nominee_reason',\n\t\t\t'name'\t\t\t\t\t\t\t=> __( 'I would like to nominate the nominee for this award because&hellip;', 'nsa-entries-2016' ),\n\t\t\t'description'\t\t\t\t=> __( 'Maximum of 250 words.', 'nsa-entries-2016' ),\n\t\t\t'type'\t\t\t\t\t\t\t=> 'textarea',\n\t\t\t'default'\t\t\t\t\t\t=> array( $this, 'set_default' ),\n\t\t\t'attributes'\t\t\t\t=> array(\n\t\t\t'placeholder'\t\t\t\t=> __( 'I would like to nominate the nominee for this award because&hellip;', 'nsa-entries-2016' ),\n\t\t\t'required'\t\t\t\t\t=> 'required',\n\t\t\t'maxlength'\t\t\t\t\t\t\t\t=> 2000,\n\t\t\t),\n\t\t) );\n\n\t\t$entry->add_field( array(\n\t\t\t'id'\t\t\t\t\t\t\t\t=> $this->meta_prefix . 'nominator_name',\n\t\t\t'name'\t\t\t\t\t\t\t=> __( 'Your Name', 'nsa-entries-2016' ),\n\t\t\t'type'\t\t\t\t\t\t\t=> 'text',\n\t\t\t'default'\t\t\t\t\t\t=> array( $this, 'set_default' ),\n\t\t\t'attributes'\t\t\t\t=> array(\n\t\t\t'placeholder'\t\t\t\t=> __( 'eg, Jane Bloggs', 'nsa-entries-2016' ),\n\t\t\t'required'\t\t\t\t\t=> 'required',\n\t\t\t),\n\t\t) );\n\n\t\t$entry->add_field( array(\n\t\t\t'id'\t\t\t\t\t\t\t\t=> $this->meta_prefix . 'nominator_email',\n\t\t\t'name'\t\t\t\t\t\t\t=> __( 'Your Email', 'nsa-entries-2016' ),\n\t\t\t'type'\t\t\t\t\t\t\t=> 'text_email',\n\t\t\t'default'\t\t\t\t\t\t=> array( $this, 'set_default' ),\n\t\t\t'attributes'\t\t\t\t=> array(\n\t\t\t'placeholder'\t\t\t\t=> __( 'eg, [email protected]', 'nsa-entries-2016' ),\n\t\t\t'required'\t\t\t\t\t=> 'required',\n\t\t\t),\n\t\t) );\n\n\t\t$entry->add_field( array(\n\t\t\t'id'\t\t\t\t\t\t\t\t=> $this->meta_prefix . 'nominator_phone',\n\t\t\t'name'\t\t\t\t\t\t\t=> __( 'Your Phone Number', 'nsa-entries-2016' ),\n\t\t\t'type'\t\t\t\t\t\t\t=> 'text',\n\t\t\t'default'\t\t\t\t\t\t=> array( $this, 'set_default' ),\n\t\t\t'attributes'\t\t\t\t=> array(\n\t\t\t'placeholder'\t\t\t\t=> __( 'eg, 0121 123 4567', 'nsa-entries-2016' ),\n\t\t\t),\n\t\t) );\n\n\t\t$entry->add_field( array(\n\t\t\t'id'\t\t\t\t\t\t\t\t=> $this->meta_prefix . 'data_protection',\n\t\t\t'name'\t\t\t\t\t\t\t=> __( 'Communication', 'nsa-entries-2016' ),\n\t\t\t'type'\t\t\t\t\t\t\t=> 'multicheck',\n\t\t\t'select_all_button'\t=> false,\n\t\t\t'attributes'\t\t\t\t=> array(),\n\t\t\t'options'\t\t\t\t\t\t=> array(\n\t\t\t'third_parties'\t\t\t=> __( 'Trinity Mirror would like to allow selected third parties to contact you. If you object to receiving third party communications please tick the checkbox.', 'nsa-entries-2016' ),\n\t\t\t'publish-nomination'\t=> __( 'If you would prefer that your nomination is not featured in the manner described above. please tick the checkbox.', 'nsa-entries-2016' ),\n\t\t\t),\n\t\t));\n\n\t\t$entry->add_field( array(\n\t\t\t'id'\t\t\t\t\t\t\t\t=> $this->meta_prefix . 'hidden_check',\n\t\t\t'name'\t\t\t\t\t\t\t=> __( 'Please do not check this box', 'nsa-entries-2016' ),\n\t\t\t'type'\t\t\t\t\t\t\t=> 'checkbox',\n\t\t\t'select_all_button'\t=> false,\n\t\t\t'row_classes'\t\t\t\t=> 'hidden',\n\t\t\t'options'\t\t\t\t\t\t=> array(\n\t\t\ttrue\t\t\t\t\t\t\t\t=> 'check',\n\t\t\t),\n\t\t\t'attributes'\t\t\t\t=> array(\n\t\t\t'hidden'\t\t\t\t\t=> 'hidden',\n\t\t\t'class'\t\t\t\t\t\t=> 'hidden',\n\t\t\t),\n\t\t) );\n\n\t}", "public function cs_generate_form() {\n global $post;\n }", "protected function populateFields()\n {\n $currentLocale = TranslateLocale::current_locale();\n\n $fields = FieldList::create(TabSet::create('Root', Tab::create('Main')));\n\n $fields->push(HiddenField::create('Locale', 'Locale', $currentLocale));\n $fields->addFieldToTab('Root.Main', Language\\Fields\\LocaleSwitcher::create('LocaleSwitcher'));\n\n $groups = [];\n\n TranslateService::flush();\n\n ksort($this->translations);\n\n foreach ($this->translations as $entity => $translation) {\n list($group, $key) = explode('.', $entity);\n\n $groups[$group][$key] = TextField::create($entity, $this->niceLabel($key))\n ->setValue(TranslateService::lookup_translation($entity, $currentLocale))\n ->setDescription(Convert::raw2xml(TranslateService::translate($entity, $translation, null, 'en')));\n }\n\n foreach ($groups as $groupName => $subFields) {\n $fields->addFieldToTab('Root.Main', ToggleCompositeField::create($groupName, $groupName, $subFields));\n }\n\n $this->setFields($fields);\n }", "public function build_menu_page() {\n\n\t\t\t$tabindex = 0;\n\t\t\t$temp = array();\n\t\t\t$hidden = array();\n\t\t\t$this->data = get_option($this->slug.'_fields');\n\t\t\t\n\t\t\t$output = '';\n\t\t\t$output .= '<!-- wrap starts -->'.\"\\n\";\n\t\t\t$output .= \"\\t\".'<div class=\"wrap\">'.\"\\n\";\n\n\t\t\t$output .= '<h1>'.$this->options['title'].'</h1>'.\"\\n\";\n\n\t\t\t$output .= \"\\t\".'<form method=\"post\" action=\"'.$_SERVER['REQUEST_URI'].'\" enctype=\"multipart/form-data\">'.\"\\n\\n\";\n\n\t\t\tforeach ($this->data as $section => $fields) {\n\n\t\t\t\t$output .= \"\\t\".'<h2 class=\"title\" id=\"'.sanitize_title($section).'\">'.$section.'</h2>'.\"\\n\\n\";\n\n\t\t\t\t$output .= \"\\t\".'<table class=\"form-table theme-form-table\">'.\"\\n\";\n\t\t\t\t$output .= \"\\t\".'<tbody>'.\"\\n\";\n\n\t\t\t\tforeach ($fields as $id => $field) {\n\n\t\t\t\t\tif ($field['type'] != 'hidden') {\n\n\t\t\t\t\t\t$tabindex += 1;\n\t\t\t\t\t\t$temp += array($field['label'] => isset($field['value']) ? $field['value'] : '');\n\t\t\t\t\t\t$value = isset($_POST['updating']) ? Save::save_page($this->slug, $field) : Save::set_default_value($this->slug, $temp, $field);\n\n\t\t\t\t\t\t$description = (isset($field['description']) && !empty($field['description'])) ? '<span class=\"description\" id=\"'.Field::get_label_name($field['label']).'-info\">'.$field['description'].'</span>' : '';\n\t\t\t\t\t\t$toggle = (isset($field['description']) && !empty($field['description'])) ? '<a class=\"toggle\" data-toggle=\"form-description\" data-target=\"'.Field::get_label_name($field['label']).'-info\" title=\"'.__('Show info.', 'admin translation').'\">'.__('[+] Info', 'admin translation').'</a>' : '';\n\n\t\t\t\t\t\t$output .= \"\\t\".'<tr valign=\"top\">'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<th class=\"scope-one\" scope=\"row\"><label'.Field::get_label_error($field['label']).' for=\"'.Field::get_label_name($field['label']).'\">'.$field['name'].' <cite></cite></label></th>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td class=\"scope-two\">'.Field::get_field($this->slug, $field, $value).'<div class=\"field-info\">'.$description.'</div></td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td class=\"scope-three\">'.$toggle.'</td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td>&nbsp;</td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'</tr>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\tarray_push($hidden, $field);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t$output .= \"\\t\".'</tbody>'.\"\\n\";\n\t\t\t\t$output .= \"\\t\".'</table>'.\"\\n\\n\";\n\t\t\t\t$output .= \"\\t\".'<hr />'.\"\\n\\n\";\n\t\t\t}\n\n\t\t\t$output .= isset($_REQUEST['page']) ? \"\\t\".wp_nonce_field($_REQUEST['page']).\"\\n\" : '';\n\n\t\t\tforeach ($hidden as $id => $field) {\n\n\t\t\t\t$temp += array($field['label'] => isset($field['value']) ? $field['value'] : '');\n\t\t\t\t$value = isset($_POST['updating']) ? Save::save_page($this->slug, $field) : Save::set_default_value($this->slug, $temp, $field);\n\t\t\t\t\n\t\t\t\t$output .= Field::get_field($this->slug, $field, $value);\n\t\t\t}\n\t\t\t\n\t\t\t$output .= \"\\t\".'<input type=\"hidden\" id=\"updating\" name=\"updating\" value=\"1\" />'.\"\\n\";\n\t\t\t$output .= \"\\t\".'<p class=\"submit\"><input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary\" value=\"'.__('Save Changes', 'admin translation').'\" /></p>'.\"\\n\";\n\t\t\t$output .= \"\\t\".'</form>'.\"\\n\";\n\n\t\t\t$output .= \"\\t\".'</div>'.\"\\n\";\n\t\t\t$output .= '<!-- wrap ends -->'.\"\\n\\n\";\n\n\t\t\t$output .= Field::get_form_feedback();\n\t\t\t\n\t\t\tValidation::reset_error();\n\n\t\t\techo $output;\n\t\t}", "function formMeta_terms() {\n\t\t$output = $formField = \"\"; $status = 0;\n\t\t//this->schema = Info::DB_NAME;\n\t\t$getFields = ['id','meta_id','meta_key','meta_option','meta_value'];\n\n\t\t$stmtMetaLastValue = ['schema'=>$this->schema,'table'=>'meta_terms','arguments'=>['meta_key'=>$this->popupFormID],'pdoFetch'=>PDO::FETCH_ASSOC,'fields'=>['id','meta_id'],'extra'=>'ORDER BY meta_id desc LIMIT 1'];\n\t\t$getMetaLastValue = self::selectDB($stmtMetaLastValue);\n\t\t$thisMetaID = $getMetaLastValue[0]['meta_id'] + 1;\n\n\t\t$meta_id = $this->inputGroup(['label'=>'Option Details','type'=>'text','id'=>'meta_id','name'=>'meta_id','placeholder'=>'Meta ID','value'=>$thisMetaID]);\n\t\t$meta_option = $this->inputGroup(['type'=>'text','id'=>'meta_option','name'=>'meta_option','placeholder'=>'Meta Alias','value'=>'']);//$this->Params['middle_name']\n\t\t$meta_value = $this->inputGroup(['type'=>'text','id'=>'meta_value','name'=>'meta_value','placeholder'=>'Meta Name/Title','value'=>'']);//$this->Params['middle_name']\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='half'>\n\t\t\t\t<div class='form-group no-padding item'>\n\t\t\t\t\t<div class='col-md-4 col-sm-4 col-xs-12 no-padding col-2 alignRight'>{$meta_id}</div>\n\t\t\t\t\t<div class='col-md-3 col-sm-3 col-xs-12 no-padding'>{$meta_option}</div>\n\t\t\t\t\t<div class='col-md-5 col-sm-5 col-xs-12 no-padding'>{$meta_value}</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t</div>\n\n\t\t</div>\n\t\t</div>\n\t\t\";\n\n\t\t$output .= \"\n <form id='createRecords' data-toggle='validator' name='createMeta_terms' 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='meta_key' id='meta_key' value='{$this->popupFormID}' />\n\t\t\t\t<input type='hidden' name='schema' id='schema' value='{$this->schema}' />\n\t\t\t\t<input type='hidden' name='theID' id='theID' value='' />\n\t\t\t\t{$formField}\n\t\t\t</form>\n \";\n\n\t\t$output .= \"<script>\n\t\t\t$(document).ready(function() {\n\t\t\t\t//webshims.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\t\t</script>\";\n\t\treturn $output;\n\t}", "public function meta_box_form_items() {\n\t\t$vfb_post = '';\n\t\t// Run Create Post add-on\n\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) )\n\t\t\t$vfb_post = new VFB_Pro_Create_Post();\n\t?>\n\t\t<div class=\"taxonomydiv\">\n\t\t\t<p><strong><?php _e( 'Click or Drag' , 'visual-form-builder-pro'); ?></strong> <?php _e( 'to Add a Field' , 'visual-form-builder-pro'); ?> <img id=\"add-to-form\" alt=\"\" src=\"<?php echo admin_url( '/images/wpspin_light.gif' ); ?>\" class=\"waiting spinner\" /></p>\n\t\t\t<ul class=\"posttype-tabs add-menu-item-tabs\" id=\"vfb-field-tabs\">\n\t\t\t\t<li class=\"tabs\"><a href=\"#standard-fields\" class=\"nav-tab-link vfb-field-types\"><?php _e( 'Standard' , 'visual-form-builder-pro'); ?></a></li>\n\t\t\t\t<li><a href=\"#advanced-fields\" class=\"nav-tab-link vfb-field-types\"><?php _e( 'Advanced' , 'visual-form-builder-pro'); ?></a></li>\n\t\t\t\t<?php\n\t\t\t\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) && method_exists( $vfb_post, 'form_item_tab' ) )\n\t\t\t\t\t\t$vfb_post->form_item_tab();\n\t\t\t\t?>\n\t\t\t</ul>\n\t\t\t<div id=\"standard-fields\" class=\"tabs-panel tabs-panel-active\">\n\t\t\t\t<ul class=\"vfb-fields-col-1\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-fieldset\">Fieldset</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-text\"><b></b>Text</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-checkbox\"><b></b>Checkbox</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-select\"><b></b>Select</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-datepicker\"><b></b>Date</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-url\"><b></b>URL</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-digits\"><b></b>Number</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-phone\"><b></b>Phone</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-file\"><b></b>File Upload</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class=\"vfb-fields-col-2\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-section\">Section</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-textarea\"><b></b>Textarea</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-radio\"><b></b>Radio</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-address\"><b></b>Address</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-email\"><b></b>Email</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-currency\"><b></b>Currency</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-time\"><b></b>Time</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-html\"><b></b>HTML</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-instructions\"><b></b>Instructions</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div> <!-- #standard-fields -->\n\t\t\t<div id=\"advanced-fields\"class=\"tabs-panel tabs-panel-inactive\">\n\t\t\t\t<ul class=\"vfb-fields-col-1\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-username\"><b></b>Username</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-hidden\"><b></b>Hidden</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-autocomplete\"><b></b>Autocomplete</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-min\"><b></b>Min</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-range\"><b></b>Range</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-name\"><b></b>Name</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-likert\"><b></b>Likert</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class=\"vfb-fields-col-2\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-password\"><b></b>Password</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-color\"><b></b>Color Picker</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-ip\"><b></b>IP Address</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-max\"><b></b>Max</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-pagebreak\"><b></b>Page Break</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-rating\"><b></b>Rating</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div> <!-- #advanced-fields -->\n\t\t\t<?php\n\t\t\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) && method_exists( $vfb_post, 'form_items' ) )\n\t\t\t\t\t$vfb_post->form_items();\n\t\t\t?>\n\t\t</div> <!-- .taxonomydiv -->\n\t\t<div class=\"clear\"></div>\n\t<?php\n\t}", "function hs_add_review_page( $review_page, $form, $entry ) {\n\t \n\t# Enable the review page\n\t$review_page['is_enabled'] = true;\n\t\n # First thing to do is put the form's fields in variables for easier handling afterwards\n # So far I haven't found a loop to handle this but my PHP skills don't go that far\n # Tip also is to give the variables a clear name. I chose for this set up:\n # f = field, cp/d1/d2 the different sections on the form and then the field identifier\n # the :1.3, :3, ... are the field shortcodes. You can get them by entering the needed fields on a GF form's confirmation page.\n\t\n\t# On the first page of the form, general data is collected about the person filling in the application.\n\t# Depending on how many persons they choose, the next page is formed and there the application's names and other details are filled in.\n \n\t$f_cp_voornaam = GFCommon::replace_variables( '{:1.3}', $form, $entry );\n\t$f_cp_achternaam = GFCommon::replace_variables( '{:1.6}', $form, $entry );\n\t$f_cp_email = GFCommon::replace_variables( '{:3}', $form, $entry );\n\t$f_cp_telefoon = GFCommon::replace_variables( '{:4}', $form, $entry );\n\t$f_cp_adres = GFCommon::replace_variables( '{:5}', $form, $entry );\n\t$f_cp_postcode = GFCommon::replace_variables( '{:45}', $form, $entry );\n\t$f_cp_plaats = GFCommon::replace_variables( '{:46}', $form, $entry );\n\t$f_cp_sportkamp = GFCommon::replace_variables( '{:47}', $form, $entry );\n\t$f_cp_picknick = GFCommon::replace_variables( '{:49}', $form, $entry );\n\t$f_cp_aantalpersonen = GFCommon::replace_variables( '{:16}', $form, $entry );\n\t$f_cp_pppersoon = GFCommon::replace_variables( '{:50}', $form, $entry );\n\t$f_cp_totaal = GFCommon::replace_variables( '{:52}', $form, $entry );\n\n\t$f_d1_voornaam = GFCommon::replace_variables( '{:18.3}', $form, $entry );\n\t$f_d1_achternaam = GFCommon::replace_variables( '{:18.6}', $form, $entry );\n\t$f_d1_geslacht = GFCommon::replace_variables( '{:21}', $form, $entry );\n\t$f_d1_geboortedatum = GFCommon::replace_variables( '{:22}', $form, $entry );\n\n\t$f_d2_voornaam = GFCommon::replace_variables( '{:20.3}', $form, $entry );\n\t$f_d2_achternaam = GFCommon::replace_variables( '{:20.6}', $form, $entry );\n\t$f_d2_geslacht = GFCommon::replace_variables( '{:23}', $form, $entry );\n\t$f_d2_geboortedatum = GFCommon::replace_variables( '{:24}', $form, $entry );\n\n\t$f_d3_voornaam = GFCommon::replace_variables( '{:26.3}', $form, $entry );\n\t$f_d3_achternaam = GFCommon::replace_variables( '{:26.6}', $form, $entry );\n\t$f_d3_geslacht = GFCommon::replace_variables( '{:27}', $form, $entry );\n\t$f_d3_geboortedatum = GFCommon::replace_variables( '{:28}', $form, $entry );\n\n\t$f_d4_voornaam = GFCommon::replace_variables( '{:30.3}', $form, $entry );\n\t$f_d4_achternaam = GFCommon::replace_variables( '{:30.6}', $form, $entry );\n\t$f_d4_geslacht = GFCommon::replace_variables( '{:31}', $form, $entry );\n\t$f_d4_geboortedatum = GFCommon::replace_variables( '{:32}', $form, $entry );\n\n\t$f_d5_voornaam = GFCommon::replace_variables( '{:37.3}', $form, $entry );\n\t$f_d5_achternaam = GFCommon::replace_variables( '{:37.6}', $form, $entry );\n\t$f_d5_geslacht = GFCommon::replace_variables( '{:38}', $form, $entry );\n\t$f_d5_geboortedatum = GFCommon::replace_variables( '{:39}', $form, $entry );\n\n\t$f_d6_voornaam = GFCommon::replace_variables( '{:41.3}', $form, $entry );\n\t$f_d6_achternaam = GFCommon::replace_variables( '{:41.6}', $form, $entry );\n\t$f_d6_geslacht = GFCommon::replace_variables( '{:42}', $form, $entry );\n\t$f_d6_geboortedatum = GFCommon::replace_variables( '{:44}', $form, $entry );\n\t\n\t# After you collected all the fields in variables, it's time to create the output of the page with all necessary divs and css-classes.\n\t# In the end, they need to be merged into 1 variable that's outputted by the function.\n\t# As you can see, you can use all kinds of PHP functions (like the strpos function) to make sure all the necessary data is displayed.\n\n\t$o_cp = '<div class=\"o-cp o-block\"><h2>Contactpersoon</h2><p><span class=\"o-titel\">Naam: </span>' . $f_cp_voornaam . ' ' . $f_cp_achternaam .\n\t'<br /><span class=\"o-titel\">Email: </span>' . $f_cp_email .\n\t'<br /><span class=\"o-titel\">Telefoon: </span>' . $f_cp_telefoon .\n\t'<br /><span class=\"o-titel\">Adres: </span>' . $f_cp_adres .\n\t'<br /><span class=\"o-titel\">Plaats: </span>' . $f_cp_postcode . ' ' . $f_cp_plaats .\n\t'<br /><span class=\"o-titel\">Sportkamp: </span>' . $f_cp_sportkamp;\n\tif (strpos( $f_cp_sportkamp, 'Adventure') !== false ) {\n\t\t$o_cp = $o_cp .'<br /><span class=\"o-titel\">Picknick: </span>' . $f_cp_picknick;\n\t}\n\t$o_cp = $o_cp .'<br /><span class=\"o-titel\">Aantal personen: </span>' . $f_cp_aantalpersonen .\n\t'<br /><span class=\"o-titel\">Prijs per persoon: </span>' . $f_cp_pppersoon .\n\t'<br /><span class=\"o-titel\">Totaal te betalen: </span>' . $f_cp_totaal . '</p>' .\n\t'<p><input type=\\'button\\' id=\\'gform_previous_button_2_53\\' class=\\'gform_previous_button button\\' value=\\'Contactpersoon aanpassen\\' onclick=\\'jQuery(\"#gform_target_page_number_2\").val(\"1\"); jQuery(\"#gform_2\").trigger(\"submit\",[true]); \\' onkeypress=\\'if( event.keyCode == 13 ){ jQuery(\"#gform_target_page_number_2\").val(\"1\"); jQuery(\"#gform_2\").trigger(\"submit\",[true]); } \\' />' .\n\t\n\t'</div>';\n\n\t$o_deelnemers = '<div class=\"o-cp o-block\"><h2>Deelnemers</h2>' . \n\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d1_voornaam . ' ' . $f_d1_achternaam .\n\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d1_geslacht .\n\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d1_geboortedatum . '</p>';\n\n\tif ($f_cp_aantalpersonen > 1) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d2_voornaam . ' ' . $f_d2_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d2_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d2_geboortedatum . '</p>';\t} \n\tif ($f_cp_aantalpersonen > 2) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d3_voornaam . ' ' . $f_d3_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d3_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d3_geboortedatum . '</p>'; }\n\tif ($f_cp_aantalpersonen > 3) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d3_voornaam . ' ' . $f_d3_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d3_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d3_geboortedatum . '</p>'; }\n\tif ($f_cp_aantalpersonen > 4) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d4_voornaam . ' ' . $f_d4_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d4_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d4_geboortedatum . '</p>'; }\n\tif ($f_cp_aantalpersonen > 5) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d5_voornaam . ' ' . $f_d5_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d5_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d5_geboortedatum . '</p>'; }\n\tif ($f_cp_aantalpersonen >= 6) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d6_voornaam . ' ' . $f_d6_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d6_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d6_geboortedatum . '</p>'; }\n\t\n\t$o_deelnemers = $o_deelnemers . '<p><input type=\\'button\\' id=\\'gform_previous_button_2_53\\' class=\\'gform_previous_button button\\' value=\\'Deelnemers aanpassen\\' onclick=\\'jQuery(\"#gform_target_page_number_2\").val(\"2\"); jQuery(\"#gform_2\").trigger(\"submit\",[true]); \\' onkeypress=\\'if( event.keyCode == 13 ){ jQuery(\"#gform_target_page_number_2\").val(\"2\"); jQuery(\"#gform_2\").trigger(\"submit\",[true]); } \\' />' . '</div>';\n\t\n\t# The above code that defines the input button, is retrieved from the form itself and makes a shortcut button to one of the relevant pages on the form.\n\t\n\t# Eventually you need to populate the review page. Combine all the variables you filled earlier into 1 single variable that's returned.\n\t$review_page['content'] = $o_cp . $o_deelnemers;\n \n\treturn $review_page;\n\t}", "function date_tools_wizard_form() {\n \n $form = array();\n $form['type'] = array(\n '#type' => 'fieldset',\n '#title' => t('Content type'),\n );\n $form['type']['type_name'] = array(\n '#type' => 'textfield',\n '#default_value' => 'date',\n '#title' => t('Content type name'),\n '#description' => t('Machine-readable name. Allowed values: (a-z, 0-9, _). If this is not an existing content type, the content type will be created.'),\n ); \n $form['type']['name'] = array(\n '#type' => 'textfield',\n '#default_value' => t('Date'),\n '#title' => t('Content type label'),\n '#description' => t('The human-readable name for this content type. Only needed when creating a new content type.'),\n ); \n $form['type']['type_description'] = array(\n '#type' => 'textarea',\n '#default_value' => t('A date content type that is linked to a Views calendar.'),\n '#title' => t('Content type description'),\n '#description' => t('A description for the content type. Only needed when creating a new content type.'),\n ); \n $form['field'] = array(\n '#type' => 'fieldset',\n '#title' => t('Date field'),\n );\n $form['field']['field_name'] = array(\n '#type' => 'textfield',\n '#default_value' => 'date',\n '#field_prefix' => 'field_',\n '#title' => t('Date field name'),\n '#description' => t('Machine-readable name. Allowed values: (a-z, 0-9, _) Must not be an existing field name.'),\n );\n $form['field']['label'] = array(\n '#tree' => TRUE,\n '#type' => 'textfield',\n '#default_value' => t('Date'),\n '#title' => t('Date field label'),\n '#description' => t('The human-readable label for this field.'),\n );\n $form['field']['widget_type'] = array(\n '#type' => 'select',\n '#options' => date_tools_wizard_widget_types(),\n '#default_value' => 'date_select',\n '#title' => t('Date widget type'),\n );\n $form['field']['repeat'] = array(\n '#type' => 'select',\n '#default_value' => 0,\n '#options' => array(0 => t('No'), 1 => t('Yes')),\n '#title' => t('Show repeating date options'),\n ); \n $form['field']['advanced'] = array(\n '#type' => 'fieldset',\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#title' => t('Advanced options'),\n );\n $form['field']['advanced']['field_type'] = array(\n '#type' => 'select',\n '#options' => date_tools_wizard_field_types(),\n '#default_value' => 'datetime',\n '#title' => t('Date field type'),\n '#description' => t(\"The recommend type is Datetime, except for historical dates or dates with only year or month granularity. Older or incomplete dates should use the Date type (an ISO date).\"),\n );\n $form['field']['advanced']['granularity'] = array(\n '#type' => 'select',\n '#options' => date_granularity_names(),\n '#default_value' => array('month', 'day', 'year', 'hour', 'minute'),\n '#title' => t('Granularity'),\n '#multiple' => TRUE,\n ); \n $form['field']['advanced']['tz_handling'] = array(\n '#type' => 'select',\n '#options' => date_tools_wizard_tz_handling(),\n '#default_value' => 'site',\n '#title' => t('Date timezone handling'),\n '#description' => t(\"Timezone handling should be set to 'none' for granularity without time elements.\")\n );\n $form['calendar'] = array(\n '#type' => 'select',\n '#default_value' => 1,\n '#options' => array(0 => t('No'), 1 => t('Yes')),\n '#title' => t('Create a calendar for this date field'),\n ); \n $form['blocks'] = array(\n '#type' => 'select',\n '#options' => array(0 => t('No'), 1 => t('Yes')),\n '#default_value' => 0,\n '#title' => t('Add calendar blocks to the current theme'),\n ); \n \n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n ); \n return $form;\n}", "function _addMetadataFields()\n {\n $config =& NDB_Config::singleton();\n $this->dateOptions = array(\n 'language' => 'en',\n 'format' => 'YMd',\n 'minYear' => $config->getSetting('startYear'),\n 'maxYear' => $config->getSetting('endYear'),\n 'addEmptyOption' => true,\n 'emptyOptionValue' => null\n );\n\n $this->form->addElement('date', 'Date_taken', 'Date of Administration', $this->dateOptions);\n\n $examiners = $this->_getExaminerNames();\n $this->form->addElement('select', 'Examiner', 'Radiologist', $examiners);\n\n \t$this->form->addGroupRule('Date_taken', 'Date of Administration is required', 'required');\n\n $this->form->registerRule('checkdate', 'callback', '_checkDate');\n $this->form->addRule('Date_taken', 'Date of Administration is invalid', 'checkdate');\n\n $this->form->addRule('Examiner', 'Examiner is required', 'required');\n }", "protected function _prepareForm()\n {\n /** @var DataForm $form */\n /** @noinspection PhpUnhandledExceptionInspection */\n $form = $this->_formFactory->create();\n\n // define field set\n $fieldSet = $form->addFieldset('base_fieldset', ['legend' => __('Widget')]);\n\n // retrieve widget key\n $widgetKey = $this->widgetInstance->getWidgetKey();\n\n // add new field\n $fieldSet->addField(\n 'select_widget_type_' . $widgetKey,\n 'select',\n [\n 'label' => __('Widget Type'),\n 'title' => __('Widget Type'),\n 'name' => 'widget_type',\n 'required' => true,\n 'onchange' => \"$widgetKey.validateField()\",\n 'options' => $this->_getWidgetSelectOptions(),\n 'after_element_html' => $this->_getWidgetSelectAfterHtml()\n ]\n );\n\n // set form information\n /** @noinspection PhpUndefinedMethodInspection */\n $form->setUseContainer(true);\n /** @noinspection PhpUndefinedMethodInspection */\n $form->setId('widget_options_form' . '_' . $widgetKey);\n /** @noinspection PhpUndefinedMethodInspection */\n $form->setMethod('post');\n /** @noinspection PhpUndefinedMethodInspection */\n $form->setAction($this->getUrl('adminhtml/*/buildWidget'));\n $this->setForm($form);\n }", "function getDataCollectionForms()\n{\n $dataForms = array();\n foreach($this->getScreens() as $screenName => $screen){\n if('editscreen' == strtolower(get_class($screen))){\n //remove unnecessary properties?\n\n //filter out screens without editable fields (we might support screens with grids later)\n $fields = $screen->Fields;\n $dataFields = array();\n\n foreach($fields as $fieldName => $field){\n //determine which screen fields to show\n if($field->isEditable()){\n $moduleField = $this->ModuleFields[$fieldName];\n switch(strtolower(get_class($moduleField))){\n case 'tablefield':\n case 'remotefield':\n\n break;\n default:\n //non-saving field\n $field->nonSaving = true;\n break;\n }\n $field->phrase = $moduleField->phrase;\n $dataFields[$fieldName] = $field;\n }\n\t\t\t\tif(count($field->Fields) > 0){\n foreach($field->Fields as $subFieldName => $subField){\n\n if($subField->isEditable()){\n $moduleField = $this->ModuleFields[$subFieldName];\n switch(strtolower(get_class($moduleField))){\n case 'tablefield':\n case 'remotefield':\n\n break;\n default:\n //non-saving field\n $subField->nonSaving = true;\n break;\n }\n $subField->phrase = $moduleField->phrase;\n $dataFields[$subFieldName] = $subField;\n }\n }\n }\n }\n if(count($dataFields) > 0){\n $dataForms[$screenName]['phrase'] = $screen->phrase;\n $dataForms[$screenName]['fields'] = $dataFields;\n }\n if(count($screen->Grids) > 0){\n $grids = $screen->Grids;\n foreach($grids as $gridName => $grid){\n if('editgrid' == strtolower(get_class($grid)) && $grid->dataCollectionForm){\n $subModule =& $this->SubModules[$grid->moduleID];\n $gridFields = array();\n\n foreach($grid->FormFields as $fieldName => $field){\n //determine which screen fields to show\n if($field->isEditable()){\n $moduleField = $subModule->ModuleFields[$fieldName];\n switch(strtolower(get_class($moduleField))){\n case 'tablefield':\n case 'remotefield':\n\n break;\n default:\n //non-saving field\n $field->nonSaving = true;\n break;\n }\n $field->phrase = $moduleField->phrase;\n $gridFields[$fieldName] = $field;\n }\n }\n\n $dataForms[$screenName]['moduleName'] = $subModule->Name;\n $dataForms[$screenName]['phrase'] = $screen->phrase;\n $dataForms[$screenName]['sub'][$grid->moduleID] = array(\n $grid->phrase,\n $gridFields\n );\n\n }\n }\n }\n }\n }\n return $dataForms;\n}", "public function init_fields() {\r\n\r\n\t\tif ( $this->fields ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$scale = get_option( 'scale', 'sq ft' );\r\n\t\t$currency = get_option('listeo_currency');\r\n\t\t\r\n\t\t$this->fields = array(\r\n\t\t\t'basic_info' => array(\r\n\t\t\t\t'title' \t=> __('Basic Information','listeo_core'),\r\n\t\t\t\t'class' \t=> '',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-doc',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'listing_title' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Listing Title', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'name' => 'listing_title',\r\n\t\t\t\t\t\t\t'tooltip'\t => __( 'Type title that will also contains an unique feature of your listing (e.g. renovated, air contidioned)', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'required' => true,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'listing_category' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Category', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'term-select',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => 'listing_category',\r\n\t\t\t\t\t\t\t'taxonomy'\t => 'listing_category',\r\n\t\t\t\t\t\t\t'tooltip'\t => __( 'This is main listings category', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'default'\t => '',\r\n\t\t\t\t\t\t\t'render_row_col' => '4',\r\n\t\t\t\t\t\t\t'multi' \t => true,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// 'event_category' => array(\r\n\t\t\t\t\t\t// \t'label' => __( 'Event Category', 'listeo_core' ),\r\n\t\t\t\t\t\t// \t'type' => 'term-select',\r\n\t\t\t\t\t\t// \t'placeholder' => '',\r\n\t\t\t\t\t\t// \t'name' => 'event_category',\r\n\t\t\t\t\t\t// \t'taxonomy'\t => 'event_category',\r\n\t\t\t\t\t\t// \t'tooltip'\t => __( 'Those are categories related to your listing type', 'listeo_core' ),\r\n\t\t\t\t\t\t// \t'priority' => 10,\r\n\t\t\t\t\t\t// \t'before_row' => '',\r\n\t\t\t\t\t\t// \t'after_row' => '',\r\n\t\t\t\t\t\t// \t'default'\t => '',\r\n\t\t\t\t\t\t// \t'render_row_col' => '4',\r\n\t\t\t\t\t\t// \t'required' => false,\r\n\t\t\t\t\t\t// ),\r\n\t\t\t\t\t\t'service_category' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Service Category', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'term-select',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => 'service_category',\r\n\t\t\t\t\t\t\t'taxonomy'\t => 'service_category',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'before_row' => '',\r\n\t\t\t\t\t\t\t'after_row' => '',\r\n\t\t\t\t\t\t\t'default'\t => '',\r\n\t\t\t\t\t\t\t'render_row_col' => '4',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// 'rental_category' => array(\r\n\t\t\t\t\t\t// \t'label' => __( 'Rental Category', 'listeo_core' ),\r\n\t\t\t\t\t\t// \t'type' => 'term-select',\r\n\t\t\t\t\t\t// \t'placeholder' => '',\r\n\t\t\t\t\t\t// \t'name' => 'rental_category',\r\n\t\t\t\t\t\t// \t'taxonomy'\t => 'rental_category',\r\n\t\t\t\t\t\t// \t'priority' => 10,\r\n\t\t\t\t\t\t// \t'before_row' => '',\r\n\t\t\t\t\t\t// \t'after_row' => '',\r\n\t\t\t\t\t\t// \t'default'\t => '',\r\n\t\t\t\t\t\t// \t'render_row_col' => '4',\r\n\t\t\t\t\t\t// \t'required' => false,\r\n\t\t\t\t\t\t// ),\r\n\t\t\t\t\t\t'keywords' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Keywords', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'tooltip'\t => __( 'Maximum of 15 keywords related with your business, separated by coma' , 'listeo_core' ),\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => 'keywords',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'default'\t => '',\r\n\t\t\t\t\t\t\t'render_row_col' => '4',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'listing_feature' => array(\r\n\t\t\t\t\t\t\t'label' \t=> __( 'Other Features', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' \t=> 'term-checkboxes',\r\n\t\t\t\t\t\t\t'taxonomy'\t\t=> 'listing_feature',\r\n\t\t\t\t\t\t\t'name'\t\t\t=> 'listing_feature',\r\n\t\t\t\t\t\t\t'class'\t\t \t => 'chosen-select-no-single',\r\n\t\t\t\t\t\t\t'default' \t => '',\r\n\t\t\t\t\t\t\t'priority' \t => 2,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t/*'cancellation_policy' => array(\r\n\t\t\t\t'title' \t=> __('Cancellation policy','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-docs',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'cancellation_policy_description' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Description', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => 'cancellation_policy_description',\r\n\t\t\t\t\t\t\t'type' => 'wp-editor',\r\n\t\t\t\t\t\t\t'description' => __( 'Add Cancellation Policy Description .', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t),*/\r\n\t\t\t\t\t\t\r\n\t\t\t'location' => array(\r\n\t\t\t\t'title' \t=> __('Location','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-location',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\r\n\t\t\t\t\t'_address' => array(\r\n\t\t\t\t\t\t'label' => __( 'Address', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_address',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'priority' => 7,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t'_friendly_address' => array(\r\n\t\t\t\t\t\t'label' => __( 'Friendly Address', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_friendly_address',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'tooltip'\t => __('Human readable address, if not set, the Google address will be used', 'listeo_core'),\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'priority' => 8,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\t\r\n\t\t\t\t\t'region' => array(\r\n\t\t\t\t\t\t'label' => __( 'Region', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'term-select',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => 'region',\r\n\t\t\t\t\t\t'taxonomy' => 'region',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'priority' => 8,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t'_geolocation_long' => array(\r\n\t\t\t\t\t\t'label' => __( 'Longitude', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_geolocation_long',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t'_geolocation_lat' => array(\r\n\t\t\t\t\t\t'label' => __( 'Latitude', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_geolocation_lat',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'gallery' => array(\r\n\t\t\t\t'title' \t=> __('Gallery','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-picture',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_gallery' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Gallery', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => '_gallery',\r\n\t\t\t\t\t\t\t'type' => 'files',\r\n\t\t\t\t\t\t\t'description' => __( 'By selecting (clicking on a photo) one of the uploaded photos you will set it as Featured Image for this listing (marked by icon with star). Drag and drop thumbnails to re-order images in gallery.', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'placeholder' => 'Upload images',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'details' => array(\r\n\t\t\t\t'title' \t=> __('Details','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-docs',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'listing_description' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Description', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => 'listing_description',\r\n\t\t\t\t\t\t\t'type' => 'wp-editor',\r\n\t\t\t\t\t\t\t'description' => __( 'By selecting (clicking on a photo) one of the uploaded photos you will set it as Featured Image for this listing (marked by icon with star). Drag and drop thumbnails to re-order images in gallery.', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'placeholder' => 'Upload images',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => true,\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t'_video' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Video', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'name' => '_video',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => __( 'URL to oEmbed supported service', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 5,\r\n\t\t\t\t\t\t),\r\n\r\n\t\t\t\t\t\t'_phone' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Phone', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_phone',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t\t),\t\t\r\n\t\t\t\t\t\t'_website' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Website', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_website',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_email' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'E-mail', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_email',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_email_contact_widget' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Enable Contact Widget', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t'tooltip'\t => __('With 12 this option enabled listing will display Contact Form Widget that will send emails to this address', 'listeo_core'),\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_email_contact_widget',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_facebook' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-facebook-square\"></i> Facebook', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_facebook',\r\n\t\t\t\t\t\t\t'class'\t\t => 'fb-input',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\t'_twitter' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-twitter-square\"></i> Twitter', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_twitter',\r\n\t\t\t\t\t\t\t'class'\t\t => 'twitter-input',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_youtube' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-youtube-square\"></i> YouTube', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_youtube',\r\n\t\t\t\t\t\t\t'class'\t\t => 'youtube-input',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t'_instagram' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-instagram\"></i> Instagram', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_instagram',\r\n\t\t\t\t\t\t\t'class'\t\t => 'instagram-input',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_whatsapp' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-whatsapp\"></i> WhatsApp', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_whatsapp',\r\n\t\t\t\t\t\t\t'class'\t\t => 'whatsapp-input',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_skype' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-skype\"></i> Skype', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_skype',\r\n\t\t\t\t\t\t\t'class'\t\t => 'skype-input',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_price_min' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Minimum Price Range', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_price_min',\r\n\t\t\t\t\t\t\t'tooltip'\t => __('Set only minimum price to show \"Prices starts from \" instead of range', 'listeo_core'),\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '6',\r\n\t\t\t\t\t\t\t'atts' => array(\r\n\t\t\t\t\t\t\t\t'step' => 0.1,\r\n\t\t\t\t\t\t\t\t'min' => 0,\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_price_max' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Maximum Price Range', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'tooltip'\t => __('Set the maximum price for your service, used on filters in search form', 'listeo_core'),\r\n\t\t\t\t\t\t\t'name' => '_price_max',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '6',\r\n\t\t\t\t\t\t\t'atts' => array(\r\n\t\t\t\t\t\t\t\t'step' => 0.1,\r\n\t\t\t\t\t\t\t\t'min' => 0,\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t),\r\n\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\t'opening_hours' => array(\r\n\t\t\t\t'title' \t=> __('Opening Hours','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'onoff'\t\t=> true,\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-clock',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_opening_hours_status' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Opening Hours status', 'listeo_core' ),\r\n\t\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t\t'name' => '_opening_hours_status',\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_opening_hours' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Opening Hours', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => '_opening_hours',\r\n\t\t\t\t\t\t\t'type' => 'hours',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\t'_monday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_monday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_monday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_monday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\t'_tuesday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Tuesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_tuesday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_tuesday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_tuesday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\r\n\t\t\t\t\t\t'_wednesday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Wednesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_wednesday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_wednesday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Wednesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_wednesday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\r\n\t\t\t\t\t\t'_thursday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Thursday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_thursday_opening_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_thursday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Thursday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_thursday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_friday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Friday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_friday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_friday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Friday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_friday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_saturday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'saturday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_saturday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_saturday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'saturday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_saturday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_sunday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'sunday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_sunday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_sunday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'sunday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_sunday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'event' => array(\r\n\t\t\t\t'title'\t\t=> __( 'Event Date', 'listeo_core' ),\r\n\t\t\t\t//'class'\t\t=> 'margin-top-40',\r\n\t\t\t\t'icon'\t\t=> 'fa fa-money',\r\n\t\t\t\t'fields'\t=> array(\r\n\t\t\t\t\t'_event_date' => array(\r\n\t\t\t\t\t\t'label' => __( 'Event Date', 'listeo_core' ),\r\n\t\t\t\t\t\t'tooltip'\t => __('Select date when even will start', 'listeo_core'),\r\n\t\t\t\t\t\t'type' => 'text',\t\t\t\t\t\t\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_event_date',\r\n\t\t\t\t\t\t'class'\t\t => 'input-datetime',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'_event_date_end' => array(\r\n\t\t\t\t\t\t'label' => __( 'Event Date End', 'listeo_core' ),\r\n\t\t\t\t\t\t'tooltip'\t => __('Select date when even will end', 'listeo_core'),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_event_date_end',\r\n\t\t\t\t\t\t'class'\t\t => 'input-datetime',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t\r\n\t\t\t\t)\r\n\t\t\t),\r\n\t\t\t'menu' => array(\r\n\t\t\t\t'title' \t=> __('Pricing & Bookable Services','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'onoff'\t\t=> true,\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-book-open',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_menu_status' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Menu status', 'listeo_core' ),\r\n\t\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t\t'name' => '_menu_status',\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_menu' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Pricing', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => '_menu',\r\n\t\t\t\t\t\t\t'type' => 'pricing',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'booking' => array(\r\n\t\t\t\t'title' \t=> __('Booking','listeo_core'),\r\n\t\t\t\t'class' \t=> 'margin-top-40 booking-enable',\r\n\t\t\t\t'onoff'\t\t=> true,\r\n\t\t\t\t//'onoff_state' => 'on',\r\n\t\t\t\t'icon' \t\t=> 'fa fa-calendar-check-o',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t'_booking_status' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Booking status', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_booking_status',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t),\r\n\t\t\t\t)\r\n\t\t\t),\r\n\t\t\t'slots' => array(\r\n\t\t\t\t'title' \t=> __('Availability','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'onoff'\t\t=> true,\r\n\t\t\t\t'icon' \t\t=> 'fa fa-calendar-check-o',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_slots_status' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Booking status', 'listeo_core' ),\r\n\t\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t\t'name' => '_slots_status',\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_slots' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Availability Slots', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => '_slots',\r\n\t\t\t\t\t\t\t'type' => 'slots',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t\r\n\r\n\t\t\t'basic_prices' => array(\r\n\t\t\t\t'title'\t\t=> __('Booking prices and settings','listeo_core'),\r\n\t\t\t\t//'class'\t\t=> 'margin-top-40',\r\n\t\t\t\t'icon'\t\t=> 'fa fa-money',\r\n\t\t\t\t'fields'\t=> array(\r\n\t\t\t\t\t\r\n\t\t\t\t\t'_event_tickets' => array(\r\n\t\t\t\t\t\t'label' => __( 'Available Tickets', 'listeo_core' ),\r\n\t\t\t\t\t\t'tooltip'\t => __('How many ticekts you have to offer', 'listeo_core'),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_event_tickets',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\r\n\r\n\t\t\t\t\t'_normal_price' => array(\r\n\t\t\t\t\t\t'label' => __( 'Regular Price', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'tooltip'\t => __('Default price for booking on Monday - Friday', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'default' => '0',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'unit'\t\t => $currency,\r\n\t\t\t\t\t\t'name' => '_normal_price',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t),\t\r\n\r\n\t\t\t\t\t'_weekday_price' => array(\r\n\t\t\t\t\t\t'label' => __( 'Weekend Price', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'tooltip'\t => __('Default price for booking on weekend', 'listeo_core'),\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_weekday_price',\r\n\t\t\t\t\t\t'unit'\t\t => $currency,\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\t\r\n\t\t\t\t\t'_reservation_price' => array(\r\n\t\t\t\t\t\t'label' => __( 'Reservation Fee', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_reservation_price',\r\n\t\t\t\t\t\t'tooltip'\t => __('One time fee for booking', 'listeo_core'),\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'unit'\t\t => $currency,\r\n\t\t\t\t\t\t'default' => '0',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t'_expired_after' => array(\r\n\t\t\t\t\t\t'label' => __( 'Reservation expires after', 'listeo_core' ),\r\n\t\t\t\t\t\t'tooltip'\t => __('How many hours you can wait for clients payment', 'listeo_core'),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'default' => '48',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_expired_after',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'unit'\t\t => 'hours',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t'_instant_booking' => array(\r\n\t\t\t\t\t\t'label' => __( 'Enable Instant Booking', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t'tooltip'\t => __('With this option enabled booking request will be immediately approved ', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_instant_booking',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'_count_per_guest' => array(\r\n\t\t\t\t\t\t'label' => __( 'Enable Price per Guest', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t'tooltip'\t => __('With this option enabled regular price and weekend price will be multiplied by number of guests to estimate total cost', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_count_per_guest',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\t\r\n\t\t\t\t\t'_min_days' => array(\r\n\t\t\t\t\t\t'label' => __( 'Minimum stay', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'tooltip'\t => __('Set minimum number of days for reservation', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_min_days',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3',\r\n\t\t\t\t\t\t'for_type'\t => 'rental'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'_max_guests' => array(\r\n\t\t\t\t\t\t'label' => __( 'Maximum number of guests', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'tooltip'\t => __('Set maximum number of guests per reservation', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_max_guests',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\r\n\t\t\t'availability_calendar' => array(\r\n\t\t\t\t'title' \t=> __('Availability Calendar','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t//'onoff'\t\t=> true,\r\n\t\t\t\t'icon' \t\t=> 'fa fa-calendar-check-o',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_availability' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Click day in calendar to mark it as unavailable', 'listeo_core' ),\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'name' => '_availability_calendar',\r\n\t\t\t\t\t\t\t'type' => 'calendar',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\r\n\t\t);\r\n\r\n\t\t$this->fields = apply_filters('submit_listing_form_fields', $this->fields);\r\n\t\t// get listing type\r\n\t\tif ( ! $this->listing_type)\r\n\t\t{\r\n\t\t\t$listing_type_array = get_post_meta( $this->listing_id, '_listing_type' );\r\n\t\t\t$this->listing_type = $listing_type_array[0];\r\n\t\t}\r\n\t\t\r\n\t\t// disable opening hours everywhere outside services\r\n\t\tif ( $this->listing_type != 'service' && apply_filters('disable_opening_hours', true) ) \r\n\t\t\tunset( $this->fields['opening_hours'] );\r\n\r\n\t\t// disable slots everywhere outside services\r\n\t\tif ( $this->listing_type != 'service' && apply_filters('disable_slots', true) ) \r\n\t\t\tunset( $this->fields['slots'] );\r\n\r\n\t\t// disable availability calendar outside rent\r\n\t\tif ( $this->listing_type == 'event' && apply_filters('disable_availability_calendar', true) ) \r\n\t\t\tunset( $this->fields['availability_calendar'] );\r\n\r\n\t\t// disable event date calendar outside events\r\n\t\tif ( $this->listing_type != 'event' ) \r\n\t\t{\r\n\t\t\tunset( $this->fields['event']);\r\n\t\t\tunset( $this->fields['basic_prices']['fields']['_event_tickets'] );\r\n\t\t} else {\r\n\t\t\t// disable fields for events\r\n\t\t\t//unset( $this->fields['basic_prices']['fields']['_normal_price'] );\r\n\t\t\tunset( $this->fields['basic_prices']['fields']['_weekday_price'] );\r\n\t\t\tunset( $this->fields['basic_prices']['fields']['_count_per_guest'] );\r\n\t\t\tunset( $this->fields['basic_prices']['fields']['_max_guests'] );\r\n\r\n\t\t\t$this->fields['basic_prices']['fields']['_event_tickets']['render_row_col'] = 3;\r\n\t\t\t$this->fields['basic_prices']['fields']['_normal_price']['render_row_col'] = 3;\r\n\t\t\t$this->fields['basic_prices']['fields']['_normal_price']['label'] = esc_html__('Ticket Price','listeo_core');\r\n\t\t\t$this->fields['basic_prices']['fields']['_reservation_price']['render_row_col'] = 3;\r\n\t\t\t$this->fields['basic_prices']['fields']['_expired_after']['render_row_col'] = 3;\r\n\t\t}\r\n\r\n\t\t//\r\n\t\tif(isset( $this->fields['menu']['fields']['_menu'])){\r\n\t\t\t $this->fields['menu']['fields']['_hide_pricing_if_bookable'] = array(\r\n\t\t\t\t\t'type' => 'checkboxes',\r\n\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t'name' => '_hide_pricing_if_bookable',\r\n\t\t\t\t\t'label' => '',\r\n\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t'options'\t=> array(\r\n\t\t\t\t\t\t'hide' => __('Hide pricing table on listing page but show bookable services in booking widget', 'listeo_core' )\r\n\t\t\t\t\t),\r\n\t\t\t);\t\r\n\t\t}\r\n\r\n\t\tif(isset( $this->fields['opening_hours']['fields']['_opening_hours'])){\r\n\t\t\t $this->fields['opening_hours']['fields']['_monday_opening_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_monday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t $this->fields['opening_hours']['fields']['_monday_closing_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_monday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\t\r\n\t\t\t$this->fields['opening_hours']['fields']['_tuesday_opening_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Tuesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_tuesday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_tuesday_closing_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_tuesday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_wednesday_opening_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Wednesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_wednesday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_wednesday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Wednesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_wednesday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_thursday_opening_hour'] = array(\t\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Thursday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_thursday_opening_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_thursday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Thursday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_thursday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\t\r\n\t\t\t$this->fields['opening_hours']['fields']['_friday_opening_hour'] = array(\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Friday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_friday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_friday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Friday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_friday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_saturday_opening_hour'] = array(\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'saturday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_saturday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_saturday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'saturday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_saturday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_sunday_opening_hour'] = array(\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'sunday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_sunday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_sunday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'sunday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_sunday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t}\r\n\r\n\t\t$this->fields['basic_info']['fields']['product_id'] = array(\r\n\t\t\t\t\t\t\t'name' => 'product_id',\r\n\t\t\t\t\t\t\t'type' => 'hidden',\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t);\r\n\r\n\t\t$this->fields['gallery']['fields']['_thumbnail_id'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Thumbnail ID', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'hidden',\r\n\t\t\t\t\t\t\t'name' => '_thumbnail_id',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t);\r\n\r\n\t\tswitch ( $this->listing_type) {\r\n\t\t\tcase 'event':\r\n\t\t\t\tforeach ( $this->fields as $group_key => $group_fields ) {\r\n\t\t\t\t\tforeach ( $group_fields['fields'] as $key => $field ) {\r\n\t\t\t\t\t\tif ( !empty($field['for_type']) && in_array($field['for_type'],array('rental','service') ) ) {\r\n\t\t\t\t\t\t\tunset( $this->fields[$group_key]['fields'][$key] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t// \t\t//unset( $this->fields['fields']['event_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['service_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['rental_category']);\r\n\t\t\tbreak;\r\n\t\t\tcase 'service':\r\n\t\t\t\tforeach ( $this->fields as $group_key => $group_fields ) {\r\n\t\t\t\t\tforeach ( $group_fields['fields'] as $key => $field ) {\r\n\t\t\t\t\t\tif ( !empty($field['for_type']) && in_array($field['for_type'],array('rental','event') ) ) {\r\n\t\t\t\t\t\t\tunset($this->fields[$group_key]['fields'][$key]);\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\tunset( $this->fields['basic_info']['fields']['event_category']);\r\n\t\t// \t\t//unset( $this->fields['fields']['service_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['rental_category']);\r\n\t\t\tbreak;\r\n\t\t\tcase 'rental':\r\n\t\t\t\tforeach ( $this->fields as $group_key => $group_fields ) {\r\n\t\t\t\t\tforeach ( $group_fields['fields'] as $key => $field ) {\r\n\t\t\t\t\t\tif ( !empty($field['for_type']) && in_array($field['for_type'],array('event','service') ) ) {\r\n\t\t\t\t\t\t\tunset($this->fields[$group_key]['fields'][$key]);\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\tunset( $this->fields['basic_info']['fields']['event_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['service_category']);\r\n\t\t// \t\t//unset( $this->fields['fields']['rental_category']);\r\n\t\t \tbreak;\r\n\t\t\t\r\n\t\t \tdefault:\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['event_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['service_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['rental_category']);\r\n\t\t \t\tbreak;\r\n\t\t }\r\n\t\tif(get_option('listeo_bookings_disabled')){\r\n\t\t\tunset( $this->fields['booking'] );\r\n\t\t\tunset( $this->fields['slots'] );\r\n\t\t\tunset( $this->fields['basic_prices'] );\r\n\t\t\tunset( $this->fields['availability_calendar'] );\r\n\t\t}\r\n\t\t\r\n\t}", "private function makeform() {\n\n\t$form=new llform($this);\n\t$form->addFieldset('upload','Upload a New Image');\n\t$form->addFieldset('filter','Filter Images');\n\t$form->addFieldset('sort','Sort Order');\n\t$form->addFieldset('boundingbox','Bounding Box');\n\t$form->addFieldset('display','Display Options');\n\t$form->addFieldset('gotopage','Go to page');\n\t\n\t$form->addControl('upload',new ll_edit($form,'imagename',25,40,'Image name (leave blank for file name)'));\n\t$form->addControl('upload',new ll_file($form,'file',5*1024*1024));\n\t$form->addControl('upload',new ll_button($form,'upload','Upload'));\n\t\n\t$form->addControl('filter',$rgf=new ll_radiogroup($form,'filter'));\n\t$rgf->setOptionArrayDual(array('showall','byname'),array('Show All Entries','Show those whose name starts ...'));\n\t$form->addControl('filter',new ll_edit($form,'filterstring',12,20,'... with the following string:'));\n\t$form->addControl('sort',$rgs=new ll_radiogroup($form,'sorttype'));\n\t$rgs->setOptionArrayDual(array('newestfirst','oldestfirst','name'),array('Newest First','Oldest First','By Name'));\n\t$form->addControl('display',new ll_edit($form,'numperpage',3,3,'Number of images per page'));\n\t$form->addControl('display',new ll_button($form,'update','Update Display'));\n\t$form->addControl('display',new ll_button($form,'defaults','Restore Defaults'));\n\t$form->addControl('boundingbox',new ll_edit($form,'maxwidth',3,3,'Max Width'));\n\t$form->addControl('boundingbox',new ll_edit($form,'maxheight',3,3,'Max Height'));\n\t\n\t$form->addControl('gotopage',new ll_button($form,'firstpage','<<< First Page'));\n\t$form->addControl('gotopage',new ll_button($form,'prevpage','<< Prev Page'));\n\t$form->addControl('gotopage',new ll_dropdown($form,'pagenum'));\n\t$form->addControl('gotopage',new ll_button($form,'nextpage','Next Page >>'));\n\t$form->addControl('gotopage',new ll_button($form,'lastpage','Last Page >>>'));\n\t\n\treturn $form;\n}", "function InputForm()\n\t{\t\n\t\tif (!$data = $this->details)\n\t\t{\t$data = $_POST;\n\t\t\tif (!$data)\n\t\t\t{\t$data = array('live'=>1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$form = new Form('pageedit.php?id=' . (int)$this->id, 'pageedit');\n\t\t$form->AddTextInput('Page title', 'pagetitle', $this->InputSafeString($data['pagetitle']), '', 50);\n\t\t$form->AddCheckBox('Hide title on page', 'hideheader', 1, $data['hideheader']);\n\t\t\n\t\tif ($parents = $this->GetPossibleParents())\n\t\t{\t$form->AddSelectWithGroups('Parent page', 'parentid', $data['parentid'], '', $parents, 1, 0, '');\n\t\t\t$form->AddCheckBox('Display as section of parent', 'inparent', 1, $data['inparent']);\n\t\t}\n\t\t\n\t\t$form->AddTextInput('Order in menu', 'pageorder', (int)$data['pageorder'], 'num', 4);\n\t\tif ($this->CanAdminUser('technical'))\n\t\t{\t$form->AddTextInput('Extra page to include', 'includefile', $this->InputSafeString($data['includefile']), '', 50);\n\t\t\t$form->AddCheckBox('Allow galleries', 'galleries', 1, $data['galleries']);\n\t\t}\n\t\t$form->AddCheckBox('Make live', 'pagelive', 1, $data['pagelive']);\n\t\t$form->AddCheckBox('Leave out of search results', 'nosearch', 1, $data['nosearch']);\n\t\t$form->AddCheckBox('Show social media links?', 'socialbar', 1, $data['socialbar']);\n\t\t$form->AddCheckBox('In header menu?', 'headermenu', 1, $data['headermenu']);\n\t\tif ($this->CanAdminUser('technical'))\n\t\t{\t$form->AddTextInput('Class for header menu', 'menuclass', $this->InputSafeString($data['menuclass']), '', 50);\n\t\t}\n\t\t$form->AddCheckBox('In footer menu?', 'footermenu', 1, $data['footermenu']);\n\t\t$form->AddCheckBox('Header only (no content)', 'headeronly', 1, $data['headeronly']);\n\t\t$form->AddTextInput('Redirect link (full address if external)', 'redirectlink', $this->InputSafeString($data['redirectlink']), 'long', 255);\n\t\t\n\t\tif ($this->id)\n\t\t{\t$form->AddTextInput('Slug (for URL)', 'pagename', $this->InputSafeString($data['pagename']), 'long', 255);\n\t\t\tif ($link = $this->Link())\n\t\t\t{\t$form->AddRawText('<p><label>Link to page</label><span><a href=\"' . $link . '\" target=\"_blank\">' . $link . '</a></span><br /></p>');\n\t\t\t}\n\t\t}\n\t\t$form->AddCheckBox('Display block link in parent (if any)', 'blocklink', 1, $data['blocklink']);\n\t\t$form->AddTextArea('Block link text', $name = 'pageintro', stripslashes($data['pageintro']), 'tinymce', 0, 0, 10, 60);\n\t\t$form->AddTextArea('Page content', $name = 'pagetext', stripslashes($data['pagetext']), 'tinymce', 0, 0, 50, 60);\n\t\t$form->AddRawText('<p><label></label><a href=\"#\" onclick=\"javascript:window.open(\\'newsimagelist.php\\', \\'newsimages\\', \\'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=550\\'); return false;\">view available images</a></p>');\n\t\t$form->AddFileUpload('Subpage image:', 'imagefile');\n\t\tif ($src = $this->HasImage('thumbnail'))\n\t\t{\t$form->AddRawText('<label>Current image</label><img src=\"' . $src . '?' . time() . '\" height=\"200px\" /><br />');\n\t\t\t$form->AddCheckBox('Delete this', 'delphoto');\n\t\t}\n\t\t\n\t\tob_start();\n\t\techo '<label>Banner:</label><br /><label id=\"bannerPicked\">', ($data['banner'] && ($banner = new BannerSet($data['banner'])) && $banner->id) ? $this->InputSafeString($banner->details['title']) : 'none','</label><input type=\"hidden\" name=\"banner\" id=\"bannerValue\" value=\"', (int)$data['banner'], '\" /><span class=\"dataText\"><a onclick=\"BannerPicker();\">change this</a></span><br />';\n\t\t$form->AddRawText(ob_get_clean());\n\n\n\t\t$form->AddSubmitButton('', $this->id ? 'Save' : 'Create', 'submit');\n\t\techo $this->BannerPickerPopUp();\n\t\t\n\t\t$form->Output();\n\t}", "private function build_form()\n {\n $ldm = LaikaDataManager :: get_instance();\n\n // The Laika Scales\n $scales = $ldm->retrieve_laika_scales(null, null, null, new ObjectTableOrder(LaikaScale :: PROPERTY_TITLE));\n $scale_options = array();\n while ($scale = $scales->next_result())\n {\n $scale_options[$scale->get_id()] = $scale->get_title();\n }\n\n // The Laika Percentile Codes\n $codes = $ldm->retrieve_percentile_codes();\n $code_options = array();\n foreach ($codes as $code)\n {\n $code_options[$code] = $code;\n }\n\n $this->addElement('category', Translation :: get('Dates'));\n $this->add_timewindow(self :: GRAPH_FILTER_START_DATE, self :: GRAPH_FILTER_END_DATE, Translation :: get('StartTimeWindow'), Translation :: get('EndTimeWindow'), false);\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Groups', null, 'group'));\n\n $group_options = $this->get_groups();\n\n if (count($group_options) > 0)\n {\n if (count($group_options) < 10)\n {\n $count = count($group_options);\n }\n else\n {\n $count = 10;\n }\n\n $this->addElement('select', self :: GRAPH_FILTER_GROUP, Translation :: get('Group', null, Utilities::GROUP), $this->get_groups(), array('multiple', 'size' => $count));\n $this->addRule(self :: GRAPH_FILTER_GROUP, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n }\n else\n {\n $this->addElement('static', 'group_text', Translation :: get('Group'), Translation :: get('NoGroupsAvailable'));\n $this->addElement('hidden', self :: GRAPH_FILTER_GROUP, null);\n }\n\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Results'));\n $this->addElement('select', self :: GRAPH_FILTER_SCALE, Translation :: get('Scale'), $scale_options, array('multiple', 'size' => '10'));\n $this->addRule(self :: GRAPH_FILTER_SCALE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('select', self :: GRAPH_FILTER_CODE, Translation :: get('Code'), $code_options, array('multiple', 'size' => '4'));\n $this->addRule(self :: GRAPH_FILTER_CODE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Options'));\n\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraphAndTable'), LaikaGraphRenderer :: RENDER_GRAPH_AND_TABLE);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraph'), LaikaGraphRenderer :: RENDER_GRAPH);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderTable'), LaikaGraphRenderer :: RENDER_TABLE);\n $this->addGroup($group, self :: GRAPH_FILTER_TYPE, Translation :: get('RenderType'), '<br/>', false);\n\n $allow_save = PlatformSetting :: get('allow_save', LaikaManager :: APPLICATION_NAME);\n if ($allow_save == true)\n {\n $this->addElement('checkbox', self :: GRAPH_FILTER_SAVE, Translation :: get('SaveToRepository'));\n }\n\n $maximum_attempts = PlatformSetting :: get('maximum_attempts', LaikaManager :: APPLICATION_NAME);\n if ($maximum_attempts > 1)\n {\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeFirstAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_FIRST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeMostRecentAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_LAST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('IncludeAllAttempts'), LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n $this->addGroup($group, self :: GRAPH_FILTER_ATTEMPT, Translation :: get('AttemptsToInclude'), '<br/>', false);\n }\n else\n {\n $this->addElement('hidden', self :: GRAPH_FILTER_ATTEMPT, LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n }\n\n $this->addElement('category');\n\n $buttons = array();\n\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal search'));\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal empty'));\n\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "public function initContactDataForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t// name\n\t\t$ti = new ilTextInputGUI($lng->txt(\"name\"), \"inst_name\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// description\n\t\t$ti = new ilTextInputGUI($lng->txt(\"client_info\"), \"inst_info\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$this->form->addItem($ti);\n\n\t\t// institution\n\t\t$ti = new ilTextInputGUI($lng->txt(\"client_institution\"), \"inst_institution\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$this->form->addItem($ti);\n\n\t\t// contact data\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"contact_data\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// first name\n\t\t$ti = new ilTextInputGUI($lng->txt(\"firstname\"), \"admin_firstname\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// last name\n\t\t$ti = new ilTextInputGUI($lng->txt(\"lastname\"), \"admin_lastname\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t$fs = array (\n\t\t\t\"title\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"position\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"institution\" => array(\"max\" => 200, \"size\" => 30),\n\t\t\t\"street\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"zipcode\" => array(\"max\" => 10, \"size\" => 5),\n\t\t\t\"city\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"country\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"phone\" => array(\"max\" => 64, \"size\" => 30)\n\t\t\t);\n\t\tforeach ($fs as $f => $op)\n\t\t{\n\t\t\t// field\n\t\t\t$ti = new ilTextInputGUI($lng->txt($f), \"admin_\".$f);\n\t\t\t$ti->setMaxLength($op[\"max\"]);\n\t\t\t$ti->setSize($op[\"size\"]);\n\t\t\t$ti->setInfo($lng->txt(\"\"));\n\t\t\t$this->form->addItem($ti);\n\t\t}\n\n\t\t// email\n\t\t$ti = new ilEmailInputGUI($lng->txt(\"email\"), \"admin_email\");\n\t\t$ti->setRequired(true);\n\t\t$ti->allowRFC822(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// feedback recipient\n\t\t$ti = new ilEmailInputGUI($lng->txt(\"feedback_recipient\"), \"feedback_recipient\");\n\t\t$ti->setInfo($lng->txt(\"feedback_recipient_info\"));\n\t\t$ti->setRequired(true);\n\t\t$ti->allowRFC822(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// error recipient\n\t\t$ti = new ilEmailInputGUI($lng->txt(\"error_recipient\"), \"error_recipient\");\n\t\t$ti->allowRFC822(true);\n\t\t$this->form->addItem($ti);\n\n\t\t$this->form->addCommandButton(\"saveContact\", $lng->txt(\"save\"));\n\n\t\t$this->form->setTitle($lng->txt(\"client_data\"));\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\t}", "function calsteams_buildform_cb($post){\n\n global $mbox, $post;//bring in these variables from global scope\n\n $mbox_data = get_post_custom($post->ID); //get array containing metabox custom fields\n\n logit($mbox_data,'$mbox_data: ');\n\n wp_nonce_field( 'calsteams_update_field', 'calsteams_nonce');\n\n echo '<table class=\"form-table\">';\n\n foreach ($mbox['fields'] as $field) {\n\n $meta = get_post_meta($post->ID,$field['id'],true); //get meta-box data for current field\n\n echo '<tr>',\n '<th style=\"width:20%\"><label for=\"', $field['id'], '\">', $field['name'], '</label></th>',\n '<td>';\n\n switch ($field['type']) {\n case 'text':\n echo '<input type=\"text\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" />', '<br />', $field['desc'];\n break;\n\n default:\n echo 'uh oh, default case!';\n }\n\n echo '</td>',\n '</tr>';\n }\n echo '</table>';\n}", "function getCategoryFields() {\n\t\t\n\t\t$model = $this->getModel();\n\t\t$category_id = JRequest::getVar('id');\n\t\t$form = $model->getFieldForm($category_id, 'category');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\" >';\n\t\techo '<legend>New Category</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}", "public function buildFormFields()\n {\n $this->addField(\n SharpFormTextField::make('title')\n ->setLabel('Title')\n )->addField(\n SharpFormUploadField::make('cover')\n ->setLabel('Cover')\n ->setFileFilterImages()\n ->setCropRatio('1:1')\n ->setStorageBasePath('data/service')\n )->addField(\n SharpFormNumberField::make('price')\n ->setLabel('Price')\n )->addField(\n SharpFormMarkdownField::make('description')->setToolbar([\n SharpFormMarkdownField::B, SharpFormMarkdownField::I,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::IMG,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::A,\n ])\n )->addField(\n SharpFormTagsField::make('tags',\n Tag::orderBy('label')->get()->pluck('label', 'id')->all()\n )->setLabel('Tags')\n ->setCreatable(true)\n ->setCreateAttribute('name')\n );\n }", "protected function _prepareForm()\n {\n $model = $this->_coreRegistry->registry('current_amasty_finder_finder');\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('finder_');\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('General')]);\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', ['name' => 'id']);\n }\n $fieldset->addField(\n 'name',\n 'text',\n ['name' => 'name', 'label' => __('Title'), 'title' => __('Title'), 'required' => true]\n );\n\n if (!$model->getId()) {\n $fieldset->addField(\n 'cnt',\n 'text',\n [\n 'name' => 'cnt',\n 'label' => __('Number of Dropdowns'),\n 'title' => __('Number of Dropdowns'),\n 'class' => 'validate-greater-than-zero',\n 'required' => true\n ]\n );\n }\n\n $fieldset->addField(\n 'template',\n 'select',\n [\n 'name' => 'template',\n 'label' => __('Template'),\n 'title' => __('Template'),\n 'required' => false,\n 'values' => [\n ['value' => 'horizontal', 'label' => __('Horizontal')],\n ['value' => 'vertical', 'label' => __('Vertical')]\n ],\n 'note' => __('The `horizontal` option is responsive and set by default')\n ]\n );\n\n $fieldset->addField(\n 'custom_url',\n 'text',\n [\n 'name' => 'custom_url',\n 'label' => __('Custom Destination URL'),\n 'title' => __('Custom Destination URL'),\n 'required' => false,\n 'note' =>\n __(\n 'It determines the page the Finder will redirect customers to when the Find button is pressed. \n Enter category URL, e.g. special-category.html to redirect search results to one category.'\n )\n ]\n );\n\n $fieldset->addField(\n 'default_category',\n 'select',\n [\n 'name' => 'default_category',\n 'label' => __('Add Finder to the Default Category'),\n 'title' => __('Add Finder to the Default Category'),\n 'required' => false,\n 'values' => $this->yesno->toOptionArray(),\n 'note' =>\n __(\n 'Keep \\'Yes\\' to get the Finder working properly at the home and cms pages.'\n )\n ]\n );\n\n $fieldset->addField(\n 'hide_finder',\n 'select',\n [\n 'name' => 'hide_finder',\n 'label' => __('Finder block visibility on the Default Category'),\n 'title' => __('Finder block visibility on the Default Category'),\n 'required' => false,\n 'values' => [\n ['value' => 0, 'label' => __('Hide')],\n ['value' => 1, 'label' => __('Show')]\n ],\n 'note' =>\n __(\n 'Keep \\'Hide\\' to not display this finder block on the default category on the frontend. \n It is useful when there are several finders added to the default category but you need to \n display only one of them at the frontend.'\n )\n ]\n );\n\n $fieldset->addField(\n 'search_page',\n 'select',\n [\n 'name' => 'search_page',\n 'label' => __('Add Finder to the Search Page'),\n 'title' => __('Add Finder to the Search Page'),\n 'required' => false,\n 'values' => $this->yesno->toOptionArray()\n ]\n );\n\n $fieldset->addField(\n 'position',\n 'text',\n [\n 'name' => 'position',\n 'label' => __('Add the finder block in'),\n 'title' => __('Add the finder block in'),\n 'required' => false,\n 'note' =>\n __(\n 'Place the product finder in particular themes, categories, and other locations.\n Possible options: sidebar.main, content, content.top, footer.'\n )\n ]\n );\n\n $fieldset->addField(\n 'categories',\n 'multiselect',\n [\n 'name' => 'categories',\n 'label' => __('Categories'),\n 'title' => __('Categories'),\n 'style' => 'height: 500px; width: 300px;',\n 'values' => $this->categorySource->toOptionArray(),\n ]\n );\n\n if ($model->getId()) {\n $fieldset->addField(\n 'code_for_inserting',\n 'textarea',\n [\n 'label' => __('Code for inserting'),\n 'title' => __('Code for inserting'),\n 'disabled' => 1,\n 'note' =>\n 'Use this code if you want to put product finder in any CMS page or block.'\n ]\n );\n $fieldSettings = [\n 'label' => __('Code for inserting in Layout Update XML'),\n 'title' => __('Code for inserting in Layout Update XML'),\n 'disabled' => 1,\n ];\n\n if (version_compare($this->magentoVersion->get(), '2.3.4', '<')) {\n $fieldSettings['note'] = 'To add a product finder to a category manually, navigate to \n Catalog > Categories > Select your category (i.e. Wheels). \n In the Design section find Layout Update XML field and paste the code there.';\n }\n\n $fieldset->addField(\n 'code_for_inserting_in_layout',\n 'textarea',\n $fieldSettings\n );\n }\n\n if (!$model->getId()) {\n $form->addValues(\n [\n 'default_category' => 1,\n 'hide_finder' => 0\n ]\n );\n }\n\n $htmlIdPrefix = $form->getHtmlIdPrefix();\n\n $this->setChild(\n 'form_after',\n $this->getLayout()->createBlock(\\Magento\\Backend\\Block\\Widget\\Form\\Element\\Dependence::class)\n ->addFieldMap($htmlIdPrefix . 'default_category', 'default_category')\n ->addFieldMap($htmlIdPrefix . 'hide_finder', 'hide_finder')\n ->addFieldDependence('hide_finder', 'default_category', 1)\n );\n\n $form->setValues($model->getData());\n $form->addValues(\n [\n 'id' => $model->getId(),\n 'code_for_inserting' =>\n '{{block class=\"Amasty\\\\Finder\\\\Block\\\\Form\" block_id=\"finder_form\" '\n . 'location=\"cms\" id=\"' . $model->getId() . '\"}}',\n 'code_for_inserting_in_layout' => $model->getFinderXmlCode()\n ]\n );\n\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "function item_form()\n\t{\n\t\t$its = new item_search($this->pg);\n\t\t$its->action = $_SESSION['root_admin'].'utilities/preorder.php';\n\t\t$its->form_head();\n\t\t$its->upc();\n\t\t$its->title();\n\t\t$its->platform();\n\t\t$its->form_foot('upc');\n\t}", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "public function set_fields() {\n $this->fields = apply_filters('wpucommentmetas_fields', $this->fields);\n foreach ($this->fields as $id => $field) {\n if (!is_array($field)) {\n $this->fields[$id] = array();\n }\n if (!isset($field['label'])) {\n $this->fields[$id]['label'] = ucfirst($id);\n }\n if (!isset($field['admin_label'])) {\n $this->fields[$id]['admin_label'] = $this->fields[$id]['label'];\n }\n if (!isset($field['type'])) {\n $this->fields[$id]['type'] = 'text';\n }\n if (!isset($field['help'])) {\n $this->fields[$id]['help'] = '';\n }\n if (!isset($field['required'])) {\n $this->fields[$id]['required'] = false;\n }\n if (!isset($field['admin_visible'])) {\n $this->fields[$id]['admin_visible'] = true;\n }\n if (!isset($field['admin_column'])) {\n $this->fields[$id]['admin_column'] = false;\n }\n if (!isset($field['admin_list_visible'])) {\n $this->fields[$id]['admin_list_visible'] = false;\n }\n if (!isset($field['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array(\n 'comment_form_logged_in_after',\n 'comment_form_after_fields'\n );\n }\n if (!is_array($this->fields[$id]['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array($this->fields[$id]['display_hooks']);\n }\n }\n }", "function init()\n {\n\n $elements = array(\n 'page_id' => array('hidden')\n , 'name' => array('text', array('label' => 'Name', 'options' => array('StringLength' => array(false, array(1, 50)),), 'filters' => array('StringTrim'), 'required' => true))\n , 'title' => array('text', array('label' => 'Title', 'options' => array('StringLength' => array(false, array(4, 255)),),'filters' => array('StringTrim'), 'required' => true))\n , 'meta' => array('text', array('label' => 'meta', 'options' => array('StringLength' => array(false, array(4, 255))), 'filters' => array('StringTrim'),))\n , 'description' => array('textarea',array('label' => 'description', 'attribs' => array('rows' => 2), 'filters' => array('StringTrim'), 'required' => true))\n , 'body' => array('textarea',array('label' => 'body', 'attribs' => array('rows' => 7), 'filters' => array('StringTrim'), 'required' => true))\n );\n $this->addElements($elements);\n\n // --- Groups ----------------------------------------------\n $this->addDisplayGroup(array('name','title', 'meta'), 'display-head', array('legend'=>'display-head'));\n $this->addDisplayGroup(array('description', 'body'), 'display-body', array('legend'=>'display-body'));\n parent::init();\n }", "public function populateForm() {}", "public function buildFormLayout()\n {\n $this->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('title');\n })->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('cover');\n $column->withSingleField('description');\n $column->withSingleField('price');\n $column->withSingleField('tags');\n });\n }", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('item_');\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Select order')]);\n $fieldset->addField(\n 'direction',\n 'select',\n [\n 'name' => 'direction',\n 'label' => __('Direction'),\n 'title' => __('Direction'),\n 'required' => true,\n 'options' => ['shipment' => 'Store -> Customer', 'invert' => 'Customer -> Store', 'refund' => 'RMA (return)']\n ]\n );\n $fieldset->addField(\n 'order_id',\n 'text',\n [\n 'name' => 'order_id',\n 'label' => __('Order #'),\n 'title' => __('Order #'),\n 'required' => true\n ]\n );\n $this->setForm($form);\n return parent::_prepareForm();\n }", "protected function _prepareForm()\n {\n $model = Mage::registry('navision_customermapping');\n\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),\n 'method' => 'post'\n ));\n\n $fieldset = $form->addFieldset('base_fieldset', array(\n 'legend' => Mage::helper('checkout')->__('Customer Information'),\n 'class' => 'fieldset-wide',\n ));\n\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', array(\n 'name' => 'id',\n ));\n }\n\n $fieldset->addField('customeremail', 'text', array(\n 'name' => 'customeremail',\n 'label' => Mage::helper('checkout')->__('Customer Email'),\n 'title' => Mage::helper('checkout')->__('Customer Email'),\n 'required' => true,\n ));\n\n $fieldset->addField('magentocustomerid', 'text', array(\n 'name' => 'magentocustomerid',\n 'label' => Mage::helper('checkout')->__('Magento Customer ID'),\n 'title' => Mage::helper('checkout')->__('Magento Customer ID'),\n 'required' => true,\n ));\n $fieldset->addField('navisioncustomerid', 'text', array(\n 'name' => 'navisioncustomerid',\n 'label' => Mage::helper('checkout')->__('Navision Customer ID'),\n 'title' => Mage::helper('checkout')->__('Navision Customer ID'),\n 'required' => true,\n ));\n\n$fieldset->addField('createdby', 'text', array(\n 'name' => 'createdby',\n 'label' => Mage::helper('checkout')->__('Created By'),\n 'title' => Mage::helper('checkout')->__('Created By'),\n 'required' => true,\n ));\n\n $fieldset->addField('needsync', 'checkbox', array(\n \n\n 'name' => 'needsync',\n 'label' => Mage::helper('checkout')->__('Need Sync'),\n\t\t'onclick' => 'this.value = this.checked ? 1 : 0;',\n 'title' => Mage::helper('checkout')->__('Need Sync'),\n 'required' => true,\n ));\n\n\n $form->setValues($model->getData());\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "public function create_fields() {\n\t\tif ( count( $this->sections ) > 0 ) {\n\t\t\tforeach ( $this->fields as $k => $v ) {\n\t\t\t\t$method = $this->determine_method( $v, 'form' );\n\t\t\t\t$name = $v['name'];\n\t\t\t\tif ( $v['type'] == 'info' ) { $name = ''; }\n\t\t\t\tadd_settings_field( $k, $name, $method, $this->token, $v['section'], array( 'key' => $k, 'data' => $v ) );\n\n\t\t\t\t// Let the API know that we have a colourpicker field.\n\t\t\t\tif ( $v['type'] == 'range' && $this->_has_range == false ) { $this->_has_range = true; }\n\t\t\t}\n\t\t}\n\t}", "function ting_extended_search_settings_display_form($form, &$form_state) {\n $form = array(\n '#tree' => TRUE,\n );\n\n $form['display'] = array(\n '#type' => 'fieldset',\n '#title' => t('Fields'),\n '#theme' => 'ting_ext_search_display_table',\n '#header' => array(\n t('Field'),\n t('Column'),\n t('Sort'),\n t('Status'),\n t('Weight'),\n ),\n );\n\n $fields = variable_get('ting_ext_search_fields_settings', array());\n $form_state['fields'] = $fields;\n\n if (!isset($form_state['fields_count'])) {\n $form_state['fields_count'] = empty($fields) ? 0 : count($fields);\n }\n $fields_count = $form_state['fields_count'];\n\n $columns = array(\n 'left' => t('Left'),\n 'right' => t('Right'),\n );\n\n $sort_types = array(\n 'alphabetic_asc' => t('Alphabetic'),\n 'alphabetic_desc' => t('Alphabetic(reverse)'),\n 'numeric_asc' => t('Numeric'),\n 'numeric_desc' => t('Numeric(reverse)'),\n );\n\n for ($i = 0; $i < $fields_count; $i++) {\n $form['display'][$i]['title'] = array(\n '#type' => 'textfield',\n '#disabled' => TRUE,\n '#default_value' => isset($fields[$i]['title']) ? $fields[$i]['title'] : '',\n );\n\n $form['display'][$i]['column'] = array(\n '#type' => 'radios',\n '#options' => $columns,\n '#default_value' => isset($fields[$i]['column']) ? $fields[$i]['column'] : 'left',\n );\n\n $form['display'][$i]['sort'] = array(\n '#type' => 'select',\n '#options' => $sort_types,\n '#default_value' => isset($fields[$i]['sort']) ? $fields[$i]['sort'] : 'alphabetic_asc',\n );\n\n $form['display'][$i]['status'] = array(\n '#type' => 'checkbox',\n '#default_value' => isset($fields[$i]['status']) ? $fields[$i]['status'] : 1,\n );\n $form['display'][$i]['weight'] = array(\n '#type' => 'weight',\n '#default_value' => (isset($fields[$i]['weight'])) ? $fields[$i]['weight'] : 0,\n '#attributes' => array(\n 'class' => array('display-weight'),\n )\n );\n $form['display'][$i]['machine_name'] = array(\n '#type' => 'hidden',\n '#value' => $fields[$i]['machine_name'],\n );\n }\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n return $form;\n}", "public function html()\r\n\t{\r\n\t\t$nonce = wp_create_nonce('wpgmza');\r\n\t\t\r\n\t\t?>\r\n\t\t\r\n\t\t<form id=\"wpgmza-custom-fields\" \r\n\t\t\taction=\"<?php echo admin_url('admin-post.php'); ?>\" \r\n\t\t\tmethod=\"POST\">\r\n\t\t\t\r\n\t\t\t<input name=\"action\" value=\"wpgmza_save_custom_fields\" type=\"hidden\"/>\r\n\t\t\t<input name=\"security\" value=\"<?php echo $nonce; ?>\" type=\"hidden\"/>\r\n\t\t\t\r\n\t\t\t<h1>\r\n\t\t\t\t<?php\r\n\t\t\t\t_e('WP Google Maps - Custom Fields', 'wp-google-maps');\r\n\t\t\t\t?>\r\n\t\t\t</h1>\r\n\t\t\t\r\n\t\t\t<table class=\"wp-list-table widefat fixed striped pages\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th scope=\"col\" id=\"id\" class =\"manage-column column-id\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t_e('ID', 'wp-google-maps');\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<th scope=\"col\" id=\"id\" class =\"manage-column column-id\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t_e('Name', 'wp-google-maps');\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t_e('Icon', 'wp-google-maps');\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t_e('Attributes', 'wp-google-maps');\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t_e('Filter Type', 'wp-google-maps');\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t_e('Actions', 'wp-google-maps');\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead>\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t$this->tableBodyHTML();\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<tr id=\"wpgmza-new-custom-field\">\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input \r\n\t\t\t\t\t\t\t\tname=\"ids[]\"\r\n\t\t\t\t\t\t\t\tvalue=\"-1\"\r\n\t\t\t\t\t\t\t\treadonly\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\tname=\"names[]\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input name=\"icons[]\" class=\"wpgmza-fontawesome-iconpicker\"/>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input name=\"attributes[]\" type=\"hidden\"/>\r\n\t\t\t\t\t\t\t<table class=\"attributes\">\r\n\t\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"<?php _e('Name', 'wp-google-maps'); ?>\"\r\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"attribute-name\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t<input \r\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"<?php _e('Value', 'wp-google-maps'); ?>\"\r\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"attribute-value\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<select name=\"widget_types[]\">\r\n\t\t\t\t\t\t\t\t<option value=\"none\">\r\n\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t_e('None', 'wp-google-maps');\r\n\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t<option value=\"text\">\r\n\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t_e('Text', 'wp-google-maps');\r\n\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t<option value=\"dropdown\">\r\n\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t_e('Dropdown', 'wp-google-maps');\r\n\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t<option value=\"checkboxes\">\r\n\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t_e('Checkboxes', 'wp-google-maps');\r\n\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t// Use this filter to add options to the dropdown\r\n\t\t\t\t\t\t\t\techo apply_filters('wpgmza_custom_fields_widget_type_options', '');\r\n\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<button type=\"submit\" class=\"button button-primary wpgmza-add-custom-field\">\r\n\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t_e('Add', 'wp-google-maps');\r\n\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t\t\r\n\t\t\t<p style=\"text-align: center;\">\r\n\t\t\t\t<input \r\n\t\t\t\t\ttype=\"submit\" \r\n\t\t\t\t\tclass=\"button button-primary\" \r\n\t\t\t\t\tvalue=\"<?php _e('Save', 'wp-google-maps'); ?>\"\r\n\t\t\t\t\t/>\r\n\t\t\t</p>\r\n\t\t</form>\r\n\t\t\r\n\t\t<?php\r\n\t}", "function DBDataForm()\n {\n $this->ItemData();\n $this->ItemDataGroups();\n \n $this->InitActions();\n $this->SetPertains();\n\n return\n $this->ItemsForm_Run\n (\n array\n (\n \"FormTitle\" => $this->DBDataFormTitle(),\n \"ID\" => 2,\n \"Name\" => \"Datas\",\n \"Method\" => \"post\",\n \"Action\" => \n \"?Unit=\".$this->GetCGIVarValue(\"Unit\").\n \"&ModuleName=Events&Action=\".\n $this->CGI_Get(\"Action\").\n \"&Event=\".\n $this->GetGET(\"Event\")\n ,\n\n \"Anchor\" => \"TOP\",\n \"Uploads\" => FALSE,\n \"CGIGETVars\" => array(\"Group\",\"Datas\",\"Datas_Sort\",\"Datas_Reverse\"),\n\n\n \"Edit\" => 1,\n \"Update\" => 1,\n\n \"RowMethod\" => \"\",\n \"RowsMethod\" => \"Table_Rows\",\n \"RowMethod\" => \"\",\n \"RowsMethod\" => \"ItemsForm_ItemRows\",\n\n \"DefaultSorts\" => array(\"SortOrder\",\"ID\"),\n \"ReadWhere\" => array\n (\n \"Event\" => $this->Event(\"ID\"),\n \"Pertains\" => $this->ApplicationObj()->Pertains,\n ),\n\n \"IgnoreGETVars\" => array(\"CreateTable\"),\n \"UpdateCGIVar\" => \"Update\",\n \"UpdateCGIValue\" => 1,\n \"UpdateItems\" => array(),\n\n\n \"Group\" => $this->DBDataFormDataGroup(),\n\n \"Edit\" => 1,\n\n \"Items\" => array(),\n \"AddGroup\" => \"Basic\",\n \"AddItem\" => array\n (\n \"Unit\" => $this->Unit(\"ID\"),\n \"Event\" => $this->Event(\"ID\"),\n \"Pertains\" => $this->ApplicationObj()->Pertains,\n \"Friend\" => 3, //default access to friend is edit\n ),\n \"AddDatas\" => array(\"Pertains\",\"DataGroup\",\"SqlKey\",\"Type\",\"SortOrder\",\"Text\",\"Text_UK\"),\n \"UniqueDatas\" => array(\"SqlKey\"),\n \"NCols\" => 20,\n \n \"DetailsMethod\" => \"DBDataFormDetailsCell\",\n \"DetailsSGroups\" => \"GetDetailsSGroups\",\n )\n ).\n $this->DBDataQuest().\n \"\";\n }", "function time_tracker_activity_table_form() {\n\n // Grab all the activities ordered by weight\n $activities = entity_load('time_tracker_activity');\n\n // Setup the form\n $form = array(\n '#tree' => TRUE,\n '#theme' => 'time_tracker_activity_table'\n );\n\n $form['add_new_activity'] = array(\n '#type' => 'fieldset',\n '#title' => t('Add a new Activity'),\n '#tree' => TRUE,\n );\n\n $form['add_new_activity']['new_activity_name'] = array(\n '#type' => 'textfield',\n '#title' => t('Activity Name'),\n '#size' => 30,\n '#description' => t('Add an activity that time can be tracked for.'),\n '#default_value' => '',\n );\n\n // Loop through the activites and add them to the form.\n if (!empty($activities)) {\n foreach ($activities as $activity) {\n $form['activities'][$activity->taid]['#activity'] = (array)$activity;\n // The activity name\n $form['activities'][$activity->taid]['name'] = array(\n '#type' => 'textfield',\n '#default_value' => check_plain($activity->name),\n );\n // The weight (this is for the tabledrag we'll add in the theme function\n $form['activities'][$activity->taid]['weight'] = array(\n '#type' => 'textfield',\n '#delta' => 10,\n '#default_value' => $activity->weight\n );\n // Is this activity enabled?\n $form['activities'][$activity->taid]['status'] = array(\n '#type' => 'checkbox',\n '#title' => t('enabled'),\n '#default_value' => $activity->status ? TRUE : FALSE,\n );\n // The Edit link to edit the activity\n $form['activities'][$activity->taid]['delete'] = array(\n '#markup' => l(t('delete'), \"admin/config/time_tracker/activity/delete/$activity->taid\")\n );\n }\n }\n elseif (isset($activity)) {\n unset($form[$activity->taid]['weight']);\n }\n\n // The submit button for the form\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#submit' => array('time_tracker_activity_table_form_submit'),\n );\n\n // Return the form\n return $form;\n}", "public function buildFormFields()\n {\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"titre\")\n ->setLabel(\"Titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"soustitre\")\n ->setLabel(\"Sous-titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"slug\")\n ->setLabel(\"Slug\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"url\")\n ->setLabel(\"URL du projet\")\n );\n\n $this->addFormField(\n SharpMarkdownFormFieldConfig::create(\"texte\")\n ->setLabel(\"Texte\")\n ->showToolbar(true)\n );\n\n $this->addFormField(\n SharpCheckFormFieldConfig::create(\"is_open_source\")\n ->setText(\"Projet Open-source\")\n );\n\n $this->addFormField(\n SharpPivotFormFieldConfig::create(\"technos\", SharpTechnoRepository::class)\n ->setLabel(\"Technologies\")\n ->setAddable(true)\n ->setSortable(true)\n ->setOrderAttribute(\"ordre\")\n ->setCreateAttribute(\"nom\")\n );\n\n $this->addFormField(\n SharpListFormFieldConfig::create(\"screenshots\")\n ->setLabel(\"Screenshots\")\n ->setSortable(true)->setOrderAttribute(\"ordre\")\n ->setAddable(true)->setAddButtonText(\"Ajouter un screenshot\")\n ->setRemovable(true)->setRemoveButtonText(\"Supprimer\")\n ->addItemFormField(\n SharpFileFormFieldConfig::create(\"fichier\")\n ->setFileFilterImages()\n ->setMaxFileSize(5)\n ->setThumbnail(\"100x100\")\n ->addGeneratedThumbnail(\"600x\"))\n ->addItemFormField(\n SharpTextFormFieldConfig::create(\"tag\")\n ->addAttribute(\"placeholder\", \"Tag\"))\n ->addItemFormField(\n SharpTextareaFormFieldConfig::create(\"legende\")\n ->setRows(3))\n ->setItemFormTemplate(\n SharpListItemFormTemplateConfig::create()\n ->addField(\"fichier\")\n ->addField(\"tag\")\n ->addField(\"legende\")\n )\n );\n\n $this->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(7)\n ->addField(\"titre\")\n ->addField(\"soustitre\")\n ->addField([\"slug:5\", \"url:7\"])\n ->addField(\"technos\")\n ->addField(\"is_open_source\")\n\n )->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(5)\n ->addField(\"texte\")\n ->addField(\"screenshots\")\n );\n }", "function getMainForm()\r\n\t{\r\n\t\t// mendapatkan form-form nya row per row.\r\n\t\t// dan kemudian memasukkan value dari query database kedalam input form masing2 yang sesuai\r\n\t\t$i = 0;\r\n\t\t$arrData = array();\r\n\t\t$out = '<tbody>';\r\n\t\t$this->arrInput = get_object_vars($this->input);\r\n\t\twhile ($arrResult = $this->nav->fetch())\r\n\t\t{\r\n\t\t\t$this->arrResult = $arrResult;\r\n\t\t\t$tableId = $this->arrResult[$this->tableId];\r\n\t\t\t$out .= '<tr data-id=\"'.$tableId.'\">';\r\n\t\t\tforeach($this->arrInput AS $input)\r\n\t\t\t{\r\n\t\t\t\tif (!$input->isInsideMultiInput && !$input->isHeader)\r\n\t\t\t\t{\r\n\t\t\t\t\t// digunakan pada sqllinks\r\n\t\t\t\t\tif (preg_match ('~ as ~is',$this->tableId))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (preg_match('~(.*) (as) (.*)~is', $this->tableId, $match))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->tableId=$match[3];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($this->isMultiLanguage && !isset($this->load_lang[$i]) && !empty($this->strField2Lang))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$q = \"SELECT `lang_id`, `\".implode('`, `', $this->strField2Lang).\"` FROM `$this->LanguageTable` WHERE `$this->LanguageTableId`={$tableId}\".$this->LanguageTableWhere;\r\n\t\t\t\t\t\t$this->load_lang[$i] = 1;\r\n\t\t\t\t\t\t$r = $this->db->getAll($q);\r\n\t\t\t\t\t\tforeach($r AS $d)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tforeach($this->strField2Lang AS $f)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$arrResult[$f][$d['lang_id']] = $d[$f];\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\t$arrResult[$input->objectName] = $this->getDefaultValue($input, $arrResult, $i);\r\n\t\t\t\t\t// dapatkan array data report\r\n\t\t\t\t\tif ($this->isReportOn && $input->isIncludedInReport)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$irow = $input->getReportOutput($arrResult[$input->objectName]);\r\n\t\t\t\t\t\tif ($input->reportFunction && is_callable($input->displayFunction))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$irow = call_user_func_array($input->displayFunction, array($irow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_callable($input->exportFunction))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$irow = call_user_func_array($input->exportFunction, array($irow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$arrData[$i][]\t= $irow;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ($input->isInsideRow)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$out\t.= '<td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$str_value = in_array($input->objectName, ['system_delete_tool']) ? $arrResult[$this->tableId] : $arrResult[$input->objectName];\r\n\t\t\t\t\t$tmp = $input->getOutput($str_value, $input->name.'['.$i.']', $this->setDefaultExtra($input));\r\n\t\t\t\t\tif (!empty($this->disableInput[$input->objectName]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$is_disable = false;\r\n\t\t\t\t\t\tforeach ((array)$this->disableInput[$input->objectName] as $exec)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$comparator = is_array($arrResult[$exec[2]]) ? current($arrResult[$exec[2]]) : $arrResult[$exec[2]];\r\n\t\t\t\t\t\t\teval('if($exec[1] '.$exec[0].' $comparator){$is_disable=true;}');\r\n\t\t\t\t\t\t\tif ($is_disable)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ($is_disable)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$tmp = preg_replace(array('~(<input\\s?)~is', '~(<select\\s?)~is', '~(<textarea\\s?)~is'), '$1 disabled ', $tmp);\r\n\t\t\t\t\t\t\tif ($input->objectName != 'system_delete_tool')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$tmp.= $this->setDisableInputRecovery($arrResult[$input->objectName], $input->name.'['.$i.']', $tmp);\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\tif ($input->isInsideRow)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$out\t.= $tmp.'</td>';\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif (!empty($tmp) && preg_match('~hidden~is', $tmp))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$out .= $tmp;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$out .= '<div class=\"hidden\">'.$tmp.'</div>';\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} // end foreach\r\n\t\t\t$out .= '</tr>';\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t$out .= '</tbody>';\r\n\t\tif ($this->isReportOn)\r\n\t\t{\r\n\t\t\t$this->reportData['data'] = $arrData;\r\n\t\t}\r\n\t\treturn $out;\r\n\t}", "protected function _prepareForm()\n {\n $model = $this->_coreRegistry->registry('current_dcs_faq_items');\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('item_');\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('FAQ Information')]);\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', ['name' => 'id']);\n }\n $fieldset->addField(\n 'question',\n 'text',\n ['name' => 'question', 'label' => __('Question'), 'title' => __('Question'), 'required' => true]\n );\n \n $wysiwygConfig = $this->_wysiwygConfig->getConfig();\n $fieldset->addField(\n 'answer',\n 'editor',\n [\n 'name' => 'answer',\n 'label' => __('Answer'), \n 'title' => __('Answer'), \n 'required' => true ,\n 'config' => $wysiwygConfig \n ]\n );\n\n $fieldset->addField(\n 'category',\n 'select',\n ['name' => 'category',\n 'label' => __('Select Category'),\n 'title' => __('Select Category'),\n 'required' => false ,\n 'options' => $this->_catData->getLoadedFaqCategoryCollection()\n ]\n );\n \n /*$fieldset->addField(\n 'Answer',\n 'editor',\n ['name' => 'answer', 'label' => __('Answer'), 'title' => __('Answer'), 'required' => true, 'style' => 'height:36em',\n 'required' => true]\n );*/\n \n $fieldset->addField(\n 'rank',\n 'text',\n ['name' => 'rank', 'label' => __('Rank'), 'title' => __('Rank'), 'required' => true, 'class' => 'required-entry validate-number validate-greater-than-zero']\n );\n $fieldset->addField(\n 'status',\n 'select',\n ['name' => 'status', 'label' => __('Publish'), 'title' => __('Publish'), 'required' => true, 'options' => $this->_options->getOptionArray()]\n );\n $form->setValues($model->getData());\n $this->setForm($form);\n return parent::_prepareForm();\n }", "public function pi_forms_menu_page(){\n\t\t$args = array(\n\t\t\t'posts_per_page' => -1,\n\t\t\t'offset' => 0,\n\t\t\t'orderby' => 'post_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'post_type' => 'pi_form',\n\t\t\t'post_status' => 'publish',\n\t\t\t'suppress_filters' => true \n\t\t);\n\t\t$posts = get_posts($args);\n\t\t/*Start count at 1*/\n\t\t$count = 1;\n\t\techo '<div class=\"pi-admin-show wrap\">';\n\t\t\techo '<h1 class=\"widefat\">Form Reports: </h1><hr style=\"margin-bottom: 40px;\">';\n\t\t\techo '<p>View Form Summary Reports</p>';\n\t\t\t/*Present the data*/\n\t\t\tforeach ($posts as $post) {\n\t\t\t\t$post_meta = get_post_meta( $post->ID );\n\t\t\t\techo '<h3>Submission ' . $count . ':</h3>'; \n\t\t\t\t\techo '<ul class=\"pi-data-show\">';\n\t\t\t\t\t\tforeach ($post_meta as $field => $value) {\n\t\t\t\t\t\t\techo '<li>'. $field .': '. $value[0] .'</li>';\n\t\t\t\t\t\t}\n\t\t\t\t\techo '</ul>';\n\t\t\t\techo '<hr>';\n\t\t\t\t/*Increment the count only within this loop*/\n\t\t\t\t$count ++;\n\t\t\t}\n\t\techo '</div>';\n\t}", "function post_meta_setup(){\n\t\t$type_meta_array = array(\n\t\t\t'settings' => array(\n\t\t\t\t'type' => 'multi_option',\n\t\t\t\t'title' => __( 'Single '.$this->single_up.' Options', 'pagelines' ),\n\t\t\t\t'shortexp' => __( 'Parameters', 'pagelines' ),\n\t\t\t\t'exp' => __( '<strong>Single '.$this->single_up.' Options</strong><br>Add '.$this->single_up.' Metadata that will be used on the page.<br><strong>HEADS UP:<strong> Each template uses different set of metadata. Check out <a href=\"http://bestrag.net/'.$this->multiple.'-lud\" target=\"_blank\">demo page</a> for more information.', 'pagelines' ),\n\t\t\t\t'selectvalues' => array(\n\t\t\t\t\t'client_name' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Client Name', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'client_name_url' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Client Name URL (eg: http://www.client.co)', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'partner' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Partner Company Name', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'partner_url' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Partner Company URL', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'project_slogan' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Project Slogan', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'img1' => array(\n\t\t\t\t\t\t'inputlabel' => __( 'Associate an image with this '.$this->single, 'pagelines' ),\n\t\t\t\t\t\t'type' => 'thickbox_image'\n\t\t\t\t\t),\n\t\t\t\t\t'img2' => array(\n\t\t\t\t\t\t'inputlabel' => __( 'Associate an image with this '.$this->single, 'pagelines' ),\n\t\t\t\t\t\t'type' => 'thickbox_image'\n\t\t\t\t\t),\n\t\t\t\t\t'custom_text1' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Custom Text/HTML/Shortcode 1', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'custom_text2' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Custom Text/HTML/Shortcode 2', 'pagelines' )\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t );\n\t\t$fields = $type_meta_array['settings']['selectvalues'];\n\t\t$figo = array(); $findex = 0;\n\n\t\tforeach ($fields as $key => $value) {\n\t\t\t$figo[$findex] = array(\n\t\t\t\t'name' => $value['inputlabel'],\n\t\t\t\t'id' => $key,\n\t\t\t\t'type' => $value['type'],\n\t\t\t\t'std' => '',\n\t\t\t\t'class' => 'custom-class',\n\t\t\t\t'clone' => false\n\t\t\t);\n\t\t\t$findex++;\n\t\t}\n\t\t$metabox = array(\n\t\t\t'id' => 'projectal',\n\t\t\t'title' => 'Projectal Information',\n\t\t\t'pages' => array( $this->multiple ),\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'high',\n\t\t\t'fields' => $figo\n\t\t);\n\t\t new RW_Meta_Box($metabox);\n\t}", "function tower_build_meta_box($post, $fields) {\n // include nonce\n wp_nonce_field(basename(__FILE__), 'tower_nonce');\n\n if (! is_array($fields)) return;\n\n echo '<table style=\"width: 100%\">';\n foreach ($fields as $field) {\n // find value\n $field_value = esc_html(get_post_meta($post->ID, $field['name'], true));\n $html = '';\n switch ($field['type']) {\n case 'textarea':\n $html = \"<textarea name='{$field['name']}' \n id='{$field['name']}' \n rows='5' \n placeholder='{$field['description']}'\n style='width:100%;' \n maxlength='1500'\n >{$field_value}</textarea>\";\n break;\n\n default:\n $html = \"<input \n type='{$field['type']}' \n name='{$field['name']}' \n id='{$field['name']}' \n placeholder='{$field['description']}'\n maxlength='250'\n value='{$field_value}'\n required />\";\n }\n echo <<<EOL\n <tr>\n <td style=\"vertical-align: top; background: #FEFEFE; padding: 5px 10px;\">\n <label for=\"{$field['name']}\">{$field['title']}</label>\n </td>\n <td>{$html}</td>\n </tr>\n EOL;\n }\n echo '</table/>';\n}", "public function init_form_fields() {\n\n\t\t// Get all pages to select Public offer agreement pages\n\t\t$term_posts = array( '' => __( 'Select Public offer agreement Page', AGW_GATEWAY_NAME ));\n\t\t$args = array(\n\t\t\t'post_type' => 'page',\n\t\t\t'post_status' => 'publish',\n\t\t\t'orderby' => 'title', \n\t\t\t'order' => 'ASC',\n\t\t\t'nopaging' => true\n\t\t);\n\t\t$query = new WP_Query;\n\t\t$posts = $query->query( $args );\n\t\tforeach( $posts as $post ) {\n\t\t\t$term_posts[$post->ID] = $post->post_title;\n\t\t}\n\n\t\t$this->form_fields = array(\n\n\t\t\t'enabled' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Enable/Disable', AGW_GATEWAY_NAME ),\n\t\t\t\t'label'\t\t\t=> __( 'Enable payments via AcquiroPay.com', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> '',\n\t\t\t\t'type'\t\t\t=> 'checkbox',\n\t\t\t\t'default'\t\t=> 'no'\n\t\t\t),\n\n\t\t\t'title' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Title', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'This controls the title for the payment method the customer sees on the Checkout page.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> __( 'Credit Card payment', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'description' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Description', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'Payment method description that the customer will see on the Checkout page.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> __( 'Pay by credit card via secure service AcquiroPay.com', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'textarea',\n\t\t\t),\n\n\t\t\t'instructions' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Instructions', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'Instructions that will be added to the \"Thank you\" page and emails.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> __( 'Click \"Continue\" to go to the payment page on AcquiroPay.com', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'textarea',\n\t\t\t),\n\n\t\t\t'pay_button_title' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Pay Button title', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'Text on the button on the Checkout page to go to the external Payment page.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> __( 'Pay by card', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'terms_page_prefix' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Text before Public offer agreement link', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'This text with a link to the Public offer agreement placed next to Pay Button on the Checkout page.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> __( 'I have read and accept the conditions of the', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'terms_page_id' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Public offer agreement', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'Public offer to conclude with the Seller a contract for the sale of goods remotely. The customer sees a link to this page on the Checkout page.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> false,\n\t\t\t\t'type'\t\t\t=> 'select',\n\t\t\t\t'options'\t\t=> $term_posts\n\t\t\t),\n\n\t\t\t'product_order_purpose' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Order purpose', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'Purpose of a payment in AcquiroPay form. Insert \\'%s\\' to replace by Order ID.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> __( 'Payment for an Order: %s', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'integration_settings_sectionstart' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Integration Settings', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'You need to register on <a href=\"https://acquiropay.com/?from=acquiropay-gateway-woocommerce\" target=\"_blank\">AcquiroPay.com</a> and get these parameters from your AcquiroPay account.', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'title',\n\t\t\t),\n\n\t\t\t'secret_word' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Secret Word', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> '',\n\t\t\t\t'default'\t\t=> '',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'merchant_id' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Merchant ID', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> '',\n\t\t\t\t'default'\t\t=> '',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'product_id' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Product ID', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> '',\n\t\t\t\t'default'\t\t=> '',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'pay_url' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Processing HTTP URL', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'AcquiroPay payment processing API URL.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> 'https://secure.ipsp.com/',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'check_pay_status_url' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Check Pay HTTP URL', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'AcquiroPay payment checking API URL.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> 'https://gateway.ipsp.com/',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'technical_settings_sectionstart' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Technical Settings', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> '',\n\t\t\t\t'type'\t\t\t=> 'title',\n\t\t\t),\n\n\t\t\t'hiding_by_cookie_enabled' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Hide Payment option', AGW_GATEWAY_NAME ),\n\t\t\t\t'label'\t\t\t=> __( 'Hide AcquiroPay Card Payment Option for all customers. This will be useful for safe testing purposes.', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> '',\n\t\t\t\t'type'\t\t\t=> 'checkbox',\n\t\t\t\t'default'\t\t=> 'yes'\n\t\t\t),\n\n\t\t\t'hiding_cookie_rule' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Show Payment Option if Cookie exists', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'Only customers who have added this non-empty cookie to their browser will see AcquiroPay Payment Option. You can add this cookie in your browser inspector by pressing F12 in Chrome for example.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> $this->id . '_enabled',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'enable_debug_log' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Enable debug log', AGW_GATEWAY_NAME ),\n\t\t\t\t'label'\t\t\t=> __( 'Send debug info into system debug log file', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> 'Define WP_DEBUG, WP_DEBUG_LOG, WP_DEBUG_DISPLAY in wp-config.php to see debug info from plugin.',\n\t\t\t\t'type'\t\t\t=> 'checkbox',\n\t\t\t\t'default'\t\t=> 'yes'\n\t\t\t),\n\n\t\t\t'test_total_price_value' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Order Total Test Value', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'You can set any non-zero price value for all orders for testing purposes. If field is empty, the real price value will be used.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> '',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\t\t);\n\n\t\t$this->log( 'Form Fields initialized' );\n\t}", "public function submission_form_fields() {\n\n\t\t$fields = $this->get_custom_fields();\n\n\t\tif ( ! empty( $fields ) ) {\n\n\t\t\tforeach ( $fields as $name => $field ) {\n\n\t\t\t\t/* Do not display core fields */\n\t\t\t\tif ( true === $field['args']['core'] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$this_field = new CustomField( $name, $field );\n\t\t\t\t$output = $this_field->get_output();\n\n\t\t\t\techo $output;\n\n\t\t\t}\n\n\t\t}\n\n\t}", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n [\n 'data' => [\n 'id' => 'edit_form',\n 'action' => $this->getUrl('reverbsync/reverbsync_field/save'),\n 'method' => 'post',\n\t\t\t\t\t'enctype' => 'multipart/form-data',\n ],\n ]\n );\n $form->setUseContainer(true);\n\t\t$model = $this->_coreRegistry->registry('reverbsync_field_mapping');\n\t\t$fieldset = $form->addFieldset(\n 'base_fieldset',\n array('legend' => __('Magento-Reverb Field Mapping'), 'class'=>'fieldset-wide')\n );\n\t\t\n\t\tif ($model->getMappingId()) {\n $fieldset->addField(\n\t\t\t\t'mapping_id',\n\t\t\t\t'hidden', \n\t\t\t\t['name' => 'mapping_id']\n\t\t\t);\n }\n\t\t$fieldset->addField(\n 'magento_attribute_code',\n 'select',\n [\n\t\t\t\t'name' => 'magento_attribute_code', \n\t\t\t\t'label' => __('Magento Attribute'), \n\t\t\t\t'title' => __('Magento Attribute Code'),\n\t\t\t\t'values' => $this->_productAttribute->toOptionArray(),\n\t\t\t\t'required' => true\n\t\t\t]\n );\n\t\t$fieldset->addField(\n 'reverb_api_field',\n 'text',\n [\n\t\t\t\t'name' => 'reverb_api_field', \n\t\t\t\t'label' => __('Reverb API Field'), \n\t\t\t\t'title' => __('Reverb API Field'), \n\t\t\t\t'required' => true\n\t\t\t]\n );\n\t\t$form->setValues($model->getData());\n $this->setForm($form);\n return parent::_prepareForm();\n }", "public function WidgetSubmissionForm()\n {\n $formSectionData = new DataObject();\n $formSectionData->Form = $this->AddForm($this->extensionType);\n $formSectionData->Content = $this->dataRecord->AddContent;\n return $formSectionData;\n }", "function getFormHTML()\n\t{\n\t\tstatic $id_num = 1000;\n\n\t\t$type = $this->type;\n\t\t$name = $this->name;\n\t\t$value = $this->_getTypeValue($this->type, $this->value);\n\t\t$default = $this->_getTypeValue($this->type, $this->default);\n\t\t$column_name = 'extra_vars' . $this->idx;\n\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t$buff = array();\n\t\tswitch($type)\n\t\t{\n\t\t\t// Homepage\n\t\t\tcase 'homepage' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"homepage\" />';\n\t\t\t\tbreak;\n\t\t\t// Email Address\n\t\t\tcase 'email_address' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"email_address\" />';\n\t\t\t\tbreak;\n\t\t\t// Phone Number\n\t\t\tcase 'tel' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[0] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[1] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[2] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\tbreak;\n\t\t\t// textarea\n\t\t\tcase 'textarea' :\n\t\t\t\t$buff[] = '<textarea name=\"' . $column_name . '\" rows=\"8\" cols=\"42\">' . $value . '</textarea>';\n\t\t\t\tbreak;\n\t\t\t// multiple choice\n\t\t\tcase 'checkbox' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] =' <li><input type=\"checkbox\" name=\"' . $column_name . '[]\" id=\"' . $tmp_id . '\" value=\"' . htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '\" ' . $checked . ' /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// single choice\n\t\t\tcase 'select' :\n\t\t\t\t$buff[] = '<select name=\"' . $column_name . '\" class=\"select\">';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$selected = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected = ' selected=\"selected\"';\n\t\t\t\t\t}\n\t\t\t\t\t$buff[] = ' <option value=\"' . $v . '\" ' . $selected . '>' . $v . '</option>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</select>';\n\t\t\t\tbreak;\n\t\t\t// radio\n\t\t\tcase 'radio' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] = '<li><input type=\"radio\" name=\"' . $column_name . '\" id=\"' . $tmp_id . '\" ' . $checked . ' value=\"' . $v . '\" class=\"radio\" /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// date\n\t\t\tcase 'date' :\n\t\t\t\t// datepicker javascript plugin load\n\t\t\t\tContext::loadJavascriptPlugin('ui.datepicker');\n\n\t\t\t\t$buff[] = '<input type=\"hidden\" name=\"' . $column_name . '\" value=\"' . $value . '\" />'; \n\t\t\t\t$buff[] =\t'<input type=\"text\" id=\"date_' . $column_name . '\" value=\"' . zdate($value, 'Y-m-d') . '\" class=\"date\" />';\n\t\t\t\t$buff[] =\t'<input type=\"button\" value=\"' . Context::getLang('cmd_delete') . '\" class=\"btn\" id=\"dateRemover_' . $column_name . '\" />';\n\t\t\t\t$buff[] =\t'<script type=\"text/javascript\">';\n\t\t\t\t$buff[] = '//<![CDATA[';\n\t\t\t\t$buff[] =\t'(function($){';\n\t\t\t\t$buff[] =\t'$(function(){';\n\t\t\t\t$buff[] =\t' var option = { dateFormat: \"yy-mm-dd\", changeMonth:true, changeYear:true, gotoCurrent:false, yearRange:\\'-100:+10\\', onSelect:function(){';\n\t\t\t\t$buff[] =\t' $(this).prev(\\'input[type=\"hidden\"]\\').val(this.value.replace(/-/g,\"\"))}';\n\t\t\t\t$buff[] =\t' };';\n\t\t\t\t$buff[] =\t' $.extend(option,$.datepicker.regional[\\'' . Context::getLangType() . '\\']);';\n\t\t\t\t$buff[] =\t' $(\"#date_' . $column_name . '\").datepicker(option);';\n\t\t\t\t$buff[] =\t' $(\"#dateRemover_' . $column_name . '\").click(function(){';\n\t\t\t\t$buff[] =\t' $(this).siblings(\"input\").val(\"\");';\n\t\t\t\t$buff[] =\t' return false;';\n\t\t\t\t$buff[] =\t' })';\n\t\t\t\t$buff[] =\t'});';\n\t\t\t\t$buff[] =\t'})(jQuery);';\n\t\t\t\t$buff[] = '//]]>';\n\t\t\t\t$buff[] = '</script>';\n\t\t\t\tbreak;\n\t\t\t// address\n\t\t\tcase \"kr_zip\" :\n\t\t\t\tif(($oKrzipModel = getModel('krzip')) && method_exists($oKrzipModel , 'getKrzipCodeSearchHtml' ))\n\t\t\t\t{\n\t\t\t\t\t$buff[] = $oKrzipModel->getKrzipCodeSearchHtml($column_name, $value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t// General text\n\t\t\tdefault :\n\t\t\t\t$buff[] =' <input type=\"text\" name=\"' . $column_name . '\" value=\"' . ($value ? $value : $default) . '\" class=\"text\" />';\n\t\t}\n\t\tif($this->desc)\n\t\t{\n\t\t\t$oModuleController = getController('module');\n\t\t\t$oModuleController->replaceDefinedLangCode($this->desc);\n\t\t\t$buff[] = '<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '</p>';\n\t\t}\n\t\t\n\t\treturn join(PHP_EOL, $buff);\n\t}", "function replaceTemplateTags( $page, &$templateData ) \n {\n /*\n * insert common tags here \n */\n $templateData = $this->replaceCommonTags( $templateData );\n \n // insert Page Prefix Name \n $tag = ModuleCreator::TAG_PAGE_PREFIXNAME;\n $data = $page->getPagePrefixName();\n $templateData = str_replace($tag, $data, $templateData );\n \n // insert Page Name \n $tag = ModuleCreator::TAG_PAGE_NAME;\n $data = $page->getPageName();\n $templateData = str_replace($tag, $data, $templateData );\n \n // insert Page Description \n $tag = ModuleCreator::TAG_PAGE_DESCRIPTION;\n $data = $page->getDescription();\n $templateData = str_replace($tag, $data, $templateData );\n \n /*\n * Process Form Portions of the Templates\n */\n // Gather Form Field entry data...\n $fieldList = '';\n $formEntryList = '';\n \n // $formDateFieldList is used to create the startYear and endYear data \n // to pass to the form templates (formEntrySingle, Adminbox, ...)\n $formDateFieldList = array(); \n \n // fieldListEntries is used to make sure we don't duplicate entries in \n // the field list when we add foreign key information to it.\n $fieldListEntries = array(); \n $formFieldList = $page->getFormFieldList();\n $formFieldList->setFirst();\n while ( $field = $formFieldList->getNextDataField() ) {\n \n if ($fieldList != '') {\n $fieldList .= ',';\n }\n $fieldList .= $field->getFieldTypeEntry();\n \n if ($formEntryList != '') {\n $formEntryList .= ',';\n }\n $formEntryList .= $field->getFormEntryType();\n \n // if this field is a date type\n if ($field->isDateType()) {\n \n $formDateFieldList[] = $field->getname();\n \n }\n \n // save the name of this entry in the fieldListEntries\n $name = $field->getName();\n $fieldListEntries[ $name ] = $name;\n }\n \n \n // step through each field of the formDAObj to see if it contains\n // any foreign keys\n $foreignKeyInfo = array();\n $foreignKeyInit = '// save the value of the Foriegn Key(s)';\n $formDAObj = $page->getFormDAObj();\n $formFields = $formDAObj->getFieldList();\n $formFields->setFirst();\n while( $field = $formFields->getNext() ) {\n\n // if current field is a foreign key\n if ( $field->isForeignKey() ) {\n \n // compile foreign Key init statements\n if ($foreignKeyInit != '') {\n $foreignKeyInit .= \"\\n\";\n }\n $name = $field->getName();\n $foreignKeyInit .= ' $this->formValues[ \\''.$name.'\\' ] = $this->'.$name.';';\n \n\n // Store additional foreign key param info\n $info['name'] = $name;\n $info['type'] = $field->getType();\n $foreignKeyInfo[] = $info;\n\n // if current field is NOT already in field list then add it\n if ( !array_key_exists( $name, $fieldListEntries) ) {\n \n // mark entry to be skipped for is data valid operations\n if ($fieldList != '') {\n $fieldList .= ',';\n }\n $fieldList .= $name.'|T|<skip>';\n \n // mark entry as not being displayed on a form\n if ($formEntryList != '') {\n $formEntryList .= ',';\n }\n $formEntryList .= '-';\n \n } // end if field NOT in field list\n \n } // end if foreign key\n\n } // next field\n \n \n // To find the Form's Data Manager's Init Variable we find the \n // primary key field for the form:\n $formInitVar = 'You Did not select a primary key for this DAObj';\n $formDAObj = $page->getFormDAObj();\n $formFields = $formDAObj->getFieldList();\n $formFields->setFirst();\n while( $field = $formFields->getNext() ) {\n \n if( $field->isPrimaryKey() ) {\n $formInitVar = $field->getName();\n }\n \n }\n \n // insert Field Type List\n $tag = ModuleCreator::TAG_PAGE_FORMFIELDTYPE;\n $data = $fieldList;\n $templateData = str_replace($tag, $data, $templateData );\n \n // insert Form Entry Type List\n $tag = ModuleCreator::TAG_PAGE_FORMENTRYTYPE;\n $data = $formEntryList;\n $templateData = str_replace($tag, $data, $templateData );\n \n // data Manager's Init Variable Name\n $tag = ModuleCreator::TAG_FORM_INIT_NAME;\n $data = $formInitVar;\n $templateData = str_replace($tag, $data, $templateData );\n \n // data Manager Object\n $dataManager = $page->getFormDAObj();\n $tag = ModuleCreator::TAG_PAGE_DATAMANAGER;\n $data = $dataManager->getManagerName();\n $templateData = str_replace($tag, $data, $templateData );\n \n // Foreign Key Initialization (for Admin Boxes)\n $tag = ModuleCreator::TAG_PAGE_FOREIGNKEY;\n $data = $foreignKeyInit.\"\\n \".$tag;\n $templateData = str_replace($tag, $data, $templateData );\n \n // Form button Text update\n $tag = '[RAD_BUTTONLABEL]';\n if ( $page->isAddType() ) {\n $data = '[Add]';\n } else {\n $data = '[Update]';\n }\n $templateData = str_replace($tag, $data, $templateData );\n \n \n // Insert the Date Field's startYear and endYear Values\n $data = '';\n for( $indx=0; $indx<count($formDateFieldList); $indx++) {\n $name = $formDateFieldList[ $indx ];\n $data .= ' $this->template->set( \\'startYear_'.$name.'\\', 2000);\n $this->template->set( \\'endYear_'.$name.'\\', 2010);'.\"\\n\\n\";\n }\n $tag = ModuleCreator::TAG_PAGE_DATE_PARAM;\n $templateData = str_replace($tag, $data, $templateData );\n \n \n /*\n * Form Grid Updates\n */\n \n $formGridListInitName = '';\n $formGridLabelFieldName = ''; \n $formDAObj = $page->getFormDAObj();\n $formFields = $formDAObj->getFieldList();\n $formFields->setFirst();\n while( $field = $formFields->getNext() ) {\n \n if( $field->isListInit() ) {\n $formGridListInitName = $field->getName();\n }\n \n if( $field->isLabelName() ) {\n $formGridLabelFieldName = $field->getName();\n }\n \n }\n \n // Insert the name of the ListIterator Object name\n $tag = ModuleCreator::TAG_FORMGRID_LIST_OBJ_NAME;\n $data = $formDAObj->getListIteratorName();\n $templateData = str_replace($tag, $data, $templateData );\n \n // Insert the name of the ListIterator's InitVar name\n $tag = ModuleCreator::TAG_FORMGRID_LIST_INIT_NAME;\n $data = $formGridListInitName;\n $templateData = str_replace($tag, $data, $templateData );\n \n // Insert the name of the ListIterator's InitVar name\n $tag = ModuleCreator::TAG_FORMGRID_LABEL_NAME;\n $data = $formGridLabelFieldName;\n $templateData = str_replace($tag, $data, $templateData );\n \n \n \n /*\n * Process Data List Information\n */\n $fieldList = '';\n $listFieldList = $page->getListFieldList();\n $listFieldList->setFirst();\n while ( $field = $listFieldList->getNextDataField() ) {\n \n if ($fieldList != '') {\n $fieldList .= ',';\n }\n $fieldList .= $field->getName();\n\n }\n \n // to find the listInitVarName we step through all the fields of the \n // list DAObj to find the listInit's\n $listInitVarName = array();\n $listDAObj = $page->getListDAObj();\n $listDAObjFields = $listDAObj->getFieldList();\n $listDAObjFields->setFirst();\n while( $field = $listDAObjFields->getNext() ) {\n \n if ( $field->isListInit() ) {\n $listInitVarName[] = $field->getName();\n }\n }\n \n \n // get primary Key info\n $primaryKeyName = 'You Did not select a primary key for this DAObj';\n $listDAObj = $page->getListDAObj();\n $listFields = $listDAObj->getFieldList();\n $listFields->setFirst();\n while( $field = $listFields->getNext() ) {\n \n if( $field->isPrimaryKey() ) {\n $primaryKeyName = $field->getName();\n }\n \n }\n \n // insert Display Field List\n $tag = ModuleCreator::TAG_PAGE_LIST_FIELDS;\n $data = $fieldList;\n $templateData = str_replace($tag, $data, $templateData );\n \n // data List Object's RowManager Name\n $tag = ModuleCreator::TAG_PAGE_LIST_ROWMANAGER;\n $data = $listDAObj->getManagerName();\n $templateData = str_replace($tag, $data, $templateData );\n \n // data List object Name\n $listManager = $page->getListDAObj();\n $tag = ModuleCreator::TAG_PAGE_LISTMANAGER;\n $data = $listManager->getListIteratorName();\n $templateData = str_replace($tag, $data, $templateData );\n \n /*\n * Update the Data List Initialization Data ...\n */\n // Data List Init Variable Name (define the variable)\n $tag = ModuleCreator::TAG_LIST_INIT_NAME;\n $data = '/* no List Init Variable defined for this DAObj */';\n if (count($listInitVarName) > 0) {\n $data = '';\n for( $indx=0; $indx<count($listInitVarName); $indx++) {\n if ($data != '') {\n $data .= \"\\n\\n\";\n }\n $data .= \" /** @var [STRING] The initialization variable for the dataList */\n protected $\".$listInitVarName[$indx].\";\";\n }\n }\n $templateData = str_replace($tag, $data, $templateData );\n \n // Documentation Header\n $tag = ModuleCreator::TAG_LIST_INIT_DOC;\n $data = '';\n for( $indx=0; $indx<count($listInitVarName); $indx++) {\n $data .= '\t * @param $'.$listInitVarName[$indx].' [STRING] The init data for the dataList obj'.\"\\n\";\n }\n $templateData = str_replace($tag, $data, $templateData );\n \n // Parameter Entry\n $tag = ModuleCreator::TAG_LIST_INIT_PARAM;\n $data = '';\n for( $indx=0; $indx<count($listInitVarName); $indx++) {\n $data .= ', $'.$listInitVarName[$indx].'=\"\"';\n }\n $templateData = str_replace($tag, $data, $templateData );\n \n // Module Variable Initilization \n $tag = ModuleCreator::TAG_LIST_INIT_VAR_INIT;\n $data = '';\n for( $indx=0; $indx<count($listInitVarName); $indx++) {\n $data .= ' $this->'.$listInitVarName[$indx].' = $'.$listInitVarName[$indx].';'.\"\\n\";\n }\n $templateData = str_replace($tag, $data, $templateData );\n \n // DAObj Parameter Initilization \n $tag = ModuleCreator::TAG_LIST_INIT_DAOBJ_PARAM;\n $data = '';\n for( $indx=0; $indx<count($listInitVarName); $indx++) {\n $data .= '$this->'.$listInitVarName[$indx].', ';\n }\n $templateData = str_replace($tag, $data, $templateData );\n \n // data List Object's primary key\n $tag = ModuleCreator::TAG_PAGE_LIST_PRIMARYKEY;\n $data = $primaryKeyName;\n $templateData = str_replace($tag, $data, $templateData );\n \n \n // now create the parameters for the foreign keys\n // make sure to not include the data list init value\n $paramVariables = '';\n $paramDocumentation = '';\n $paramList = '';\n $paramSave = '';\n for( $indx=0; $indx<count($foreignKeyInfo); $indx ++ ) {\n \n $name = $foreignKeyInfo[$indx]['name'];\n $type = $foreignKeyInfo[$indx]['type'];\n \n // current foriegn key != data list Init Variable\n if (!in_array($name, $listInitVarName) ) {\n \n // compile variable definition\n if ($paramVariables != '') {\n $paramVariables .= \"\\n\\n\";\n }\n $paramVariables .= '\t/** @var ['.$type.'] Foreign Key needed by Data Manager */\n\tprotected $'.$name.';';\n\t \n\t // compile parameter documentation\n\t $paramDocumentation .= '\t * @param $'.$name.' ['.$type.'] The foreign key data for the data Manager'.\"\\n\";\n\t \n\t // compile parameter list\n\t $paramList .= ', $'.$name.\"=''\";\n\t \n\t $paramSave .= ' $this->'.$name.' = $'.$name.\";\\n\";\n\t \n } // end if not data list init var\n \n } // next foreign key data item\n \n // now replace them in the document\n // insert parameter Variable definitions\n $tag = ModuleCreator::TAG_PAGE_FOREIGNKEY_VARIABLE;\n $data = $paramVariables;\n $templateData = str_replace($tag, $data, $templateData );\n \n // insert Foreign Key parameter Variable documentation\n $tag = ModuleCreator::TAG_PAGE_FOREIGNKEY_DOCUMENTATION;\n $data = $paramDocumentation;\n $templateData = str_replace($tag, $data, $templateData );\n \n // insert Foreign Key parameter parameter entry\n $tag = ModuleCreator::TAG_PAGE_FOREIGNKEY_PARAM;\n $data = $paramList . ')';\n $templateData = str_replace($tag, $data, $templateData );\n \n // insert Foreign Key parameter saving entry\n $tag = ModuleCreator::TAG_PAGE_FOREIGNKEY_SAVE;\n $data = $paramSave;\n $templateData = str_replace($tag, $data, $templateData );\n \n \n // Now finally replace the name of the Site Template to reference\n // by default\n $tag = ModuleCreator::TAG_PAGE_TEMPLATE_DEFAULT;\n $data = $page->getSiteTemplateName();\n $templateData = str_replace($tag, $data, $templateData );\n \n }", "public function get_new_entry_form() {\n $elements = $this->new_entry_definition();\n // Wrap with entriesview.\n array_unshift($elements, \\html_writer::start_tag('div', array('class' => 'entriesview')));\n array_push($elements, \\html_writer::end_tag('div'));\n\n $options = array('elements' => $elements, 'editentries' => -1);\n return $this->get_entries_form($options);\n }", "function extraFields() {\n\t\n\t\t$file_id = JRequest::getVar('id');\n\t\t$filename = JRequest::getVar('filename');\n\t\t\n\t\tif (!$filename) {\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$model = $this->getModel();\n\t\t$form = $model->getFieldForm($file_id, 'bulk');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\">';\n\t\techo '<legend>Edit '.$filename.'</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n // 'action' => $this->getUrl('*/*/courseOrder'),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n )\n );\n\n\n\n $fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('adminhtml')->__('导出报表')));\n $dateFormatIso = 'yyyy-MM-dd';\n $fieldset->addField('begin_time', 'date', array(\n 'name' => 'begin_time',\n 'label' => Mage::helper('adminhtml')->__('订单开始时间'),\n 'time' => true,\n 'image' => $this->getSkinUrl('images/grid-cal.gif'),\n 'format' => $dateFormatIso,\n 'note' => '格式(0000-00-00)'\n ));\n\n $fieldset->addField('end_time', 'date', array(\n 'name' => 'end_time',\n 'label' =>Mage::helper('adminhtml')->__('订单结束时间'),\n 'time' => true,\n 'image' => $this->getSkinUrl('images/grid-cal.gif'),\n 'format' => $dateFormatIso,\n 'note' => '格式(0000-00-00)'\n ));\n /* $fieldset->addField('startDate', 'text', array(\n 'name' => 'startDate',\n 'label' => Mage::helper('adminhtml')->__('开始日期'),\n 'title' => Mage::helper('adminhtml')->__('开始日期'),\n //'style' => 'width:600px;height:350px;',\n 'required' => true,\n 'after_element_html' => '<br/>请选择一个开始日期',\n )\n );\n\n $fieldset->addField('endtDate', 'text', array(\n 'name' => 'endtDate',\n 'label' => Mage::helper('adminhtml')->__('结束日期'),\n 'title' => Mage::helper('adminhtml')->__('结束日期'),\n //'style' => 'width:600px;height:350px;',\n 'required' => true,\n 'after_element_html' => '<br/>请选择一个开结束日期',\n )\n );*/\n /* $fieldset->addField('psubmit', 'submit', array(\n 'name' => 'psubmit',\n 'label' => '',\n 'value' => '检查数据',\n 'after_element_html' => '',\n )\n );*/\n // $form->setMethod('post');\n\n $form->setUseContainer(true);\n // $form->setAction(true);\n // $form->setEnctype('multipart/form-data');\n\n $this->setForm($form);\n\n return parent::_prepareForm();\n\n }", "function prepare_items()\n {\n global $wpdb;\n $table_name = $wpdb->prefix . 'google_location_form'; // do not forget about tables prefix\n\n $per_page = 50; // constant, how much records will be shown per page\n\n $columns = $this->get_columns();\n $hidden = array();\n $sortable = $this->get_sortable_columns();\n\n // here we configure table headers, defined in our methods\n $this->_column_headers = array($columns, $hidden, $sortable);\n\n // [OPTIONAL] process bulk action if any\n $this->process_bulk_action();\n //select only user own records if does not have activate_plugins capability\n// global $hb_current_user_can_ap;\n// if ($hb_current_user_can_ap == true) {\n// $user_sort=filter_var(@$_GET['s'], FILTER_VALIDATE_INT);\n// if (!empty($user_sort)) {$wherestatement = ' where wp_userid = '.$user_sort;}\n// else {$wherestatement='';}\n// }\n// else {\n// global $hb_current_user_id;\n// $wherestatement = ' where wp_userid = '.$hb_current_user_id;\n// }\n $wherestatement = '';\n// will be used in pagination settings\n $total_items = $wpdb->get_var(\"SELECT COUNT(id) FROM $table_name $wherestatement\");\n\n // prepare query params, as usual current page, order by and order direction\n //$paged = isset($_REQUEST['paged']) ? max(3, intval($_REQUEST['paged']) - 1) : 0;\n if(isset($_REQUEST['paged']))\n {$offset= (intval($_REQUEST['paged'])-1) * $per_page;}\n else {$offset = 0;} \n $orderby = (isset($_REQUEST['orderby']) && in_array($_REQUEST['orderby'], array_keys($this->get_sortable_columns()))) ? $_REQUEST['orderby'] : 'id';\n $order = (isset($_REQUEST['order']) && in_array($_REQUEST['order'], array('asc', 'desc'))) ? $_REQUEST['order'] : 'desc';\n \n // [REQUIRED] define $items array\n // notice that last argument is ARRAY_A, so we will retrieve associative array\n $this->items = $wpdb->get_results($wpdb->prepare(\"SELECT * FROM $table_name $wherestatement ORDER BY $orderby $order LIMIT %d, %d\", $offset , $per_page), ARRAY_A);\n // [REQUIRED] configure pagination\n $this->set_pagination_args(array(\n 'total_items' => $total_items, // total items defined above\n 'per_page' => $per_page, // per page constant defined at top of method\n 'total_pages' => ceil($total_items / $per_page) // calculate pages count\n ));\n }", "public function form( $instance ) {\n\n $title = !empty($instance['title']) ? $instance['title'] : 'Related content';\n $limit = isset($instance['limit']) ? $instance['limit'] : -1;\n $type = isset($instance['type']) ? $instance['type'] : 'dataset';\n\t\t$template = isset($instance['template']) ? $instance['template'] : 'default';\n $max_height = isset($instance['max_height']) ? $instance['max_height'] : '200';\n\t\t?>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('title');?>\"><?php _e('Title:');?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('title');?>\" name=\"<?php echo $this->get_field_name('title');?>\" type=\"text\" value=\"<?php _e($title,'odm');?>\">\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'type' ); ?>\"><?php _e( 'Select content type:' ); ?></label>\n\t\t\t<select class='widefat type' id=\"<?php echo $this->get_field_id('type'); ?>\" name=\"<?php echo $this->get_field_name('type'); ?>\" type=\"text\">\n\t\t\t\t<?php foreach ( $this->types as $key => $available_type ): ?>\n\t\t\t\t\t<option <?php if ($type == $available_type[\"label\"]) { echo \" selected\"; } ?> value=\"<?php echo $key ?>\"><?php echo $available_type[\"label\"] ?></option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</select>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'template' ); ?>\"><?php _e( 'Select layout:' ); ?></label>\n\t\t\t<select class='widefat template' id=\"<?php echo $this->get_field_id('template'); ?>\" name=\"<?php echo $this->get_field_name('template'); ?>\" type=\"text\">\n\t\t\t\t<?php\n $current_type = $this->types[$type];\n foreach ( $current_type[\"templates\"] as $key => $available_template ): ?>\n\t\t\t\t\t<option <?php if ($template == $available_template) { echo \" selected\"; } ?> value=\"<?php echo $available_template ?>\"><?php echo $available_template ?></option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</select>\n\t\t</p>\n\t\t<?php $limit = !empty($instance['limit']) ? $instance['limit'] : -1 ?>\n\t\t<p class=\"<?php echo $this->get_field_id('limit');?>\">\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'limit' ); ?>\"><?php _e( 'Select max number of posts to list (-1 to show all):' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('limit');?>\" name=\"<?php echo $this->get_field_name('limit');?>\" type=\"number\" value=\"<?php echo $limit;?>\">\n\t\t</p>\n\t\t\t<?php $max_height = !empty($instance['max_height']) ? $instance['max_height'] : '200' ?>\n\t\t<p class=\"<?php echo $this->get_field_id('max_height');?>\">\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'max_height' ); ?>\"><?php _e( 'Define the max height of container:' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('max_height');?>\" name=\"<?php echo $this->get_field_name('max_height');?>\" type=\"number\" value=\"<?php echo $max_height;?>\">\n\t\t</p>\n\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery(function($) {\n\t\t\t\tvar $select_template = \"<?php echo $this->get_field_id('template'); ?>\";\n\t\t\t\tdisplay_max_height();\n\t\t\t\t$('#'+$select_template).change(function(){\n\t\t\t\t\tdisplay_max_height();\n\t\t\t\t});\n\n\t\t\t\tfunction display_max_height (){\n\t\t\t\t\tvar $p_limit = \"<?php echo $this->get_field_id('limit');?>\";\n\t\t\t\t\tvar $p_max_height = \"<?php echo $this->get_field_id('max_height');?>\";\n\t\t\t\t\tif($('#'+$select_template).val() == \"html\"){\n\t\t\t\t\t\t$('.'+$p_limit).hide();\n\t\t\t\t\t\t$('.'+$p_max_height).show();\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$('.'+$p_limit).show();\n\t\t\t\t\t\t$('.'+$p_max_height).hide();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t </script>\n\n\t\t<?php\n\t}", "public function getCMSFields() {\n\t\t$fields = parent::getCMSFields();\n\n\t\t// Hide these from editing\n\t\t$fields->removeByName('ParentID');\n\t\t$fields->removeByName('Sort');\n\n\t\t//Remove to re-add\n\t\t$fields->removeByName('Type');\n\n\t\t$content = $fields->dataFieldByName('Content');\n\t\t$numberToDisplay = $fields->dataFieldByName('NumberToDisplay');\n\t\t$html = $fields->dataFieldByName('HTML');\n\t\t$subtitle = $fields->dataFieldByName('SubTitle');\n\n\t\t// $fields->dataFieldByName('Width');\n\n\t\t$fields->replaceField('Width',\n\t\t\t$width = DropdownField::create('Width', 'Width', $this->getColumns())\n\t\t);\n\n\t\t$width->setDescription(\"Width of panel at desktop size\");\n\n\n\t\t$html->setRows(20);\n\n\t\t$fields->insertAfter(\n\t\t\t$link = LinkField::create('LinkID', 'Link'),\n\t\t\t'Content'\n\t\t);\n\n\t\t$image = $fields->dataFieldByName('Image');\n\t\t$image->setFolderName('Uploads/Small-Images');\n\n\t\t$fields->removeByName('Image');\n\n\t\t$fields->insertAfter(\n\t\t\t$type = OptionSetField::create(\n\t\t\t\t\"Type\", \"Type\",\n\t\t\t\t$this->dbObject('Type')->enumValues()\n\t\t\t), \"Width\"\n\t\t);\n\n\t\t$type->addExtraClass('inline-short-list');\n\n\t\t$fields->insertAfter($imageUpload = DisplayLogicWrapper::create($image), 'LinkID');\n\t\t$imageUpload->hideUnless(\"Type\")->isEqualTo(\"Content\")->orIf(\"Type\")->isEqualTo(\"Image\");\n\n\t\t$html->hideUnless(\"Type\")->isEqualTo(\"HTML\");\n\t\t$subtitle->hideUnless(\"Type\")->isEqualTo(\"HTML\");\n\n\t\t$link->hideUnless(\"Type\")->isEqualTo(\"Content\")->orIf(\"Type\")->isEqualTo(\"Image\");\n\n\t\t$numberToDisplay->hideUnless(\"Type\")->isEqualTo(\"News\");\n\n\t\t$content->hideUnless(\"Type\")->isEqualTo(\"Content\");\n\n\t\t// Archived\n\t\t$fields->removeByName('Archived');\n\t\t$fields->addFieldToTab('Root.Main', $group = new CompositeField(\n\t\t\t$label = new LabelField(\"LabelArchive\",\"Archive this feature?\"),\n\t\t\tnew CheckboxField('Archived', '')\n\t\t));\n\n\t\t$group->addExtraClass(\"special field\");\n\t\t$label->addExtraClass(\"left\");\n\n\t\treturn $fields;\n\t}", "public function builder_export(){\n\n\t\t// function verifies the AJAX request, to prevent any processing of requests which are passed in by third-party sites or systems\n\n\t\tcheck_ajax_referer( 'mfn-builder-nonce', 'mfn-builder-nonce' );\n\n\t\t// variables\n\n\t\t$mfn_items = array();\n\t\t$mfn_wraps = array();\n\n\t\t// LOOP sections\n\n\t\tif (key_exists('mfn-row-id', $_POST) && is_array($_POST['mfn-row-id'])) {\n\n\t\t\tforeach ($_POST['mfn-row-id'] as $sectionID_k => $sectionID) {\n\n\t\t\t\t$section = array();\n\n\t\t\t\t$section['uid'] = $_POST['mfn-row-id'][$sectionID_k];\n\n\t\t\t\t// $section['attr'] - section attributes\n\n\t\t\t\tif (key_exists('mfn-rows', $_POST) && is_array($_POST['mfn-rows'])) {\n\t\t\t\t\tforeach ($_POST['mfn-rows'] as $section_attr_k => $section_attr) {\n\t\t\t\t\t\t$section['attr'][$section_attr_k] = stripslashes($section_attr[$sectionID_k]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$section['wraps'] = ''; // $section['wraps'] - section wraps will be added in next loop\n\n\t\t\t\t$mfn_items[] = $section;\n\t\t\t}\n\n\t\t\t$row_IDs = $_POST['mfn-row-id'];\n\t\t\t$row_IDs_key = array_flip($row_IDs);\n\t\t}\n\n\t\t// LOOP wraps\n\n\t\tif (key_exists('mfn-wrap-id', $_POST) && is_array($_POST['mfn-wrap-id'])) {\n\n\t\t\tforeach ($_POST['mfn-wrap-id'] as $wrapID_k => $wrapID) {\n\n\t\t\t\t$wrap = array();\n\n\t\t\t\t$wrap['uid'] = $_POST['mfn-wrap-id'][$wrapID_k];\n\t\t\t\t$wrap['size'] = $_POST['mfn-wrap-size'][$wrapID_k];\n\t\t\t\t$wrap['items'] = ''; // $wrap['items'] - items will be added in the next loop\n\n\t\t\t\t// $wrap['attr'] - wrap attributes\n\n\t\t\t\tif (key_exists('mfn-wraps', $_POST) && is_array($_POST['mfn-wraps'])) {\n\t\t\t\t\tforeach ($_POST['mfn-wraps'] as $wrap_attr_k => $wrap_attr) {\n\t\t\t\t\t\t$wrap['attr'][$wrap_attr_k] = $wrap_attr[$wrapID_k];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$mfn_wraps[$wrapID] = $wrap;\n\t\t\t}\n\n\t\t\t$wrap_IDs = $_POST['mfn-wrap-id'];\n\t\t\t$wrap_IDs_key = array_flip($wrap_IDs);\n\t\t\t$wrap_parents = $_POST['mfn-wrap-parent'];\n\t\t}\n\n\t\t// LOOP items\n\n\t\tif (key_exists('mfn-item-type', $_POST) && is_array($_POST['mfn-item-type'])) {\n\n\t\t\t$count = array();\n\t\t\t$tabs_count = array();\n\n\t\t\tforeach ($_POST['mfn-item-type'] as $type_k => $type) {\n\n\t\t\t\t$item = array();\n\t\t\t\t$item['type'] = $type;\n\t\t\t\t$item['uid'] = $_POST['mfn-item-id'][$type_k];\n\t\t\t\t$item['size'] = $_POST['mfn-item-size'][$type_k];\n\n\t\t\t\t// init count for specified item type\n\n\t\t\t\tif (! key_exists($type, $count)) {\n\t\t\t\t\t$count[$type] = 0;\n\t\t\t\t}\n\n\t\t\t\t// init count for specified tab type\n\n\t\t\t\tif (! key_exists($type, $tabs_count)) {\n\t\t\t\t\t$tabs_count[$type] = 0;\n\t\t\t\t}\n\n\t\t\t\tif (key_exists($type, $_POST['mfn-items'])) {\n\t\t\t\t\tforeach ((array) $_POST['mfn-items'][$type] as $attr_k => $attr) {\n\n\t\t\t\t\t\tif ($attr_k == 'tabs') {\n\n\t\t\t\t\t\t\t// accordion, FAQ & tabs\n\n\t\t\t\t\t\t\t$item['fields']['count'] = $attr['count'][$count[$type]];\n\n\t\t\t\t\t\t\tif ($item['fields']['count']) {\n\t\t\t\t\t\t\t\tfor ($i = 0; $i < $item['fields']['count']; $i++) {\n\n\t\t\t\t\t\t\t\t\t$tab = array();\n\t\t\t\t\t\t\t\t\t$tab['title'] = stripslashes($attr['title'][$tabs_count[$type]]);\n\t\t\t\t\t\t\t\t\t$tab['content'] = stripslashes($attr['content'][$tabs_count[$type]]);\n\n\t\t\t\t\t\t\t\t\t$item['fields']['tabs'][] = $tab;\n\n\t\t\t\t\t\t\t\t\t$tabs_count[$type]++;\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} else {\n\n\t\t\t\t\t\t\t// all other items\n\n\t\t\t\t\t\t\t$item['fields'][$attr_k] = stripslashes($attr[$count[$type]]);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// increase count for specified item type\n\n\t\t\t\t$count[$type] ++;\n\n\t\t\t\t// parent wrap\n\n\t\t\t\t$parent_wrap_ID = $_POST['mfn-item-parent'][$type_k];\n\n\t\t\t\tif (! isset($mfn_wraps[ $parent_wrap_ID ]['items']) || ! is_array($mfn_wraps[ $parent_wrap_ID ]['items'])) {\n\t\t\t\t\t$mfn_wraps[ $parent_wrap_ID ]['items'] = array();\n\t\t\t\t}\n\t\t\t\t$mfn_wraps[ $parent_wrap_ID ]['items'][] = $item;\n\t\t\t}\n\t\t}\n\n\t\t// assign wraps with items to sections\n\n\t\tforeach ($mfn_wraps as $wrap_ID => $wrap) {\n\n\t\t\t$wrap_key = $wrap_IDs_key[ $wrap_ID ];\n\t\t\t$section_ID = $wrap_parents[ $wrap_key ];\n\t\t\t$section_key = $row_IDs_key[ $section_ID ];\n\n\t\t\tif (! isset($mfn_items[ $section_key ]['wraps']) || ! is_array($mfn_items[ $section_key ]['wraps'])) {\n\t\t\t\t$mfn_items[ $section_key ]['wraps'] = array();\n\t\t\t}\n\t\t\t$mfn_items[ $section_key ]['wraps'][] = $wrap;\n\n\t\t}\n\n\t\t// prepare data to save\n\n\t\tif ($mfn_items) {\n\t\t\t$mfn_items = call_user_func('base'.'64_encode', serialize($mfn_items));\n\t\t\tprint_r($mfn_items);\n\t\t}\n\n\t\texit;\n\n\t}", "function form( $instance ) {\n\t\t$title = esc_attr($instance['title']);\n\t\t$feed_url = esc_attr($instance['feed_url']);\n\t\t$checkExcerpt = $instance['checkExcerpt'];\n\t\t$checkAuthor = $instance['checkAuthor'];\n\t\t$checkDate = $instance['checkDate'];\n\t\t$checkCats = $instance['checkCats'];\n\t\t$checkPages = $instance['checkPages'];\n\t\tif ( !$number = (int) $instance['number'] )\n\t\t\t$number = 4;\n\t\t\n\t\t$cats = get_categories('hide_empty=1&orderby=name&order=asc');\n\t\t$pages = get_pages('orderby=name&order=asc');\n?>\n\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('title'); ?>\"><?php _e('Title'); ?>\n\t\t\t<input class=\"widefat\"\n\t\t\tid=\"<?php echo $this->get_field_id('title'); ?>\"\n\t\t\tname=\"<?php echo $this->get_field_name('title'); ?>\"\n\t\t\ttype=\"text\"\n\t\t\tvalue=\"<?php echo attribute_escape($title); ?>\" />\n\t\t\t</label>\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('feed_url'); ?>\"><?php _e('Feed URL'); ?>\n\t\t\t<input class=\"widefat\"\n\t\t\tid=\"<?php echo $this->get_field_id('feed_url'); ?>\"\n\t\t\tname=\"<?php echo $this->get_field_name('feed_url'); ?>\"\n\t\t\ttype=\"text\"\n\t\t\tvalue=\"<?php echo $feed_url; ?>\" />\n\t\t\t</label>\n\t\t</p>\n\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('number'); ?>\"><?php _e('Show'); ?>\n\t\t\t\t<input\n\t\t\t\tid=\"<?php echo $this->get_field_id('number'); ?>\"\n\t\t\t\tname=\"<?php echo $this->get_field_name('number'); ?>\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tvalue=\"<?php echo $number; ?>\"\n\t\t\t\tstyle=\"width:30px;\" />\t\n\t\t\t\t<?php _e('entries'); ?>.\t\t\t\n\t\t\t</label>\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('checkExcerpt'); ?>\">\n\t\t\t\t<input class=\"checkbox\"\n\t\t\t\tid=\"<?php echo $this->get_field_id('checkExcerpt'); ?>\"\n\t\t\t\tname=\"<?php echo $this->get_field_name('checkExcerpt'); ?>\"\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\tvalue=\"excerpt\"\n\t\t\t\t<?php if ( 'excerpt' == $instance['checkExcerpt'] ) echo 'checked=\"checked\"'; ?>\n\t\t\t\t />\n\t\t\t\t<?php _e('Show excerpt'); ?>\n\t\t\t</label>\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('checkAuthor'); ?>\">\n\t\t\t\t<input class=\"checkbox\"\n\t\t\t\tid=\"<?php echo $this->get_field_id('checkAuthor'); ?>\"\n\t\t\t\tname=\"<?php echo $this->get_field_name('checkAuthor'); ?>\"\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\tvalue=\"author\"\n\t\t\t\t<?php if ( 'author' == $instance['checkAuthor'] ) echo 'checked=\"checked\"'; ?>\n\t\t\t\t />\n\t\t\t\t<?php _e('Show author'); ?>\n\t\t\t</label>\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('checkDate'); ?>\">\n\t\t\t\t<input class=\"checkbox\"\n\t\t\t\tid=\"<?php echo $this->get_field_id('checkDate'); ?>\"\n\t\t\t\tname=\"<?php echo $this->get_field_name('checkDate'); ?>\"\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\tvalue=\"date\"\n\t\t\t\t<?php if ( 'date' == $instance['checkDate'] ) echo 'checked=\"checked\"'; ?>\n\t\t\t\t />\n\t\t\t\t<?php _e('Show date'); ?>\n\t\t\t</label>\n\t\t</p>\n\t\t\n\t\t\n\t\t\n\t\t\t<div id=\"<?php echo $this->get_field_id('title'); ?>-selector\" class=\"selector-container\">\n\t\t\t\t<p><?php _e('Display on selected categories and pages only'); ?></p>\n\t\t\t\t\n\t\t\t\t<div id=\"<?php echo $this->get_field_id('title'); ?>-categories\" class=\"select-categories select-content\">\n\t\t\t\t\t<?php _e('Categories'); ?>\n\t\t\t\t\t<ul class=\"selectlist list:category categorychecklist form-no-clear\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"\" value=\"0\" />\t\t\t\t\t\t\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t// Above - hidden input: Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.\t\t\t\t\n\t\t\t\t\t\t// Solution for saving checkboxes: http://wordpress.org/support/topic/widget-checkbox-group-not-registering?replies=3\n\t\t\t\t\t\tforeach ($cats as $cat) {\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<li>\t\t\t\t\t\t \n\t\t\t\t\t\t\t<label for=\"<?php $this->get_field_id( 'checkCats' ) .'[]'; ?>\"><?php \n\t\t\t\t\t\t\t$option='<input type=\"checkbox\" id=\"'. $this->get_field_id( 'checkCats' ) .'[]\" name=\"'. $this->get_field_name( 'checkCats' ) .'[]\"';\n\t\t\t\t\t\t\tif (is_array($instance['checkCats'])) {\n\t\t\t\t\t\t\t\tforeach ($instance['checkCats'] as $cats) {\n\t\t\t\t\t\t\t\t\tif($cats==$cat->term_id) {\n\t\t\t\t\t\t\t\t\t\t$option=$option.' checked=\"checked\"';\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$option .= ' value=\"'.$cat->term_id.'\" /> ';\n\t \t $option .= $cat->cat_name;\n \t \techo $option;\n\t\t\t\t\t\t \t?></label>\n\t\t\t\t\t\t</li>\n\t\t\t\t\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t?>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div id=\"<?php echo $this->get_field_id('title'); ?>-pages\" class=\"select-pages select-content\">\n\t\t\t\t\t<?php _e('Pages'); ?>\n\t\t\t\t\t<ul class=\"selectlist list:pages pageschecklist form-no-clear\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"\" value=\"0\" />\t\t\t\t\t\t\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t// Above - hidden input: Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.\t\t\t\t\n\t\t\t\t\t\t// Solution for saving checkboxes: http://wordpress.org/support/topic/widget-checkbox-group-not-registering?replies=3\n\t\t\t\t\t\tforeach ($pages as $page) {\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<li>\t\t\t\t\t\t \n\t\t\t\t\t\t\t<label for=\"<?php $this->get_field_id( 'checkPages' ) .'[]'; ?>\"><?php \n\t\t\t\t\t\t\t$option='<input type=\"checkbox\" id=\"'. $this->get_field_id( 'checkPages' ) .'[]\" name=\"'. $this->get_field_name( 'checkPages' ) .'[]\"';\n\t\t\t\t\t\t\tif (is_array($instance['checkPages'])) {\n\t\t\t\t\t\t\t\tforeach ($instance['checkPages'] as $pages) {\n\t\t\t\t\t\t\t\t\tif($pages==$page->ID) {\n\t\t\t\t\t\t\t\t\t\t$option=$option.' checked=\"checked\"';\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$option .= ' value=\"'.$page->ID.'\" /> ';\n\t \t $option .= $page->post_title;\n \t \techo $option;\n\t\t\t\t\t\t \t?></label>\n\t\t\t\t\t\t</li>\n\t\t\t\t\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t?>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t</div>\n\n<?php\n\t}", "function add_unsorted_form($data)\n{\n $prepared_data = [\n 'source_uid' => time() . rand(1, 100),\n 'created_at' => time(),\n 'source_name' => 'form',\n 'incoming_entities' => array(),\n 'incoming_lead_info' => array(\n 'form_id' => 'template form_id',\n 'form_page' => !empty($data['lead']['name']) ? $data['lead']['name'] : 'Без названия',\n 'ip' => 'template ip',\n 'service_code' => 'template code',\n ),\n ];\n\n if (isset($data['lead'])) {\n $lead = prepare_data('lead', $data['lead'], false);\n if ($lead) {\n if (!empty($data['lead']['notes'])) {\n $lead['notes'] = $data['lead']['notes'];\n }\n\n $prepared_data['incoming_entities']['leads'][] = $lead;\n }\n }\n\n if (isset($data['contact'])) {\n $contact = prepare_data('contact', $data['contact'], false);\n\n if ($contact) {\n if (!empty($data['contact']['notes'])) {\n $contact['notes'] = $data['contact']['notes'];\n }\n\n $prepared_data['incoming_entities']['contacts'][] = $contact;\n }\n }\n\n if (isset($data['lead_info'])) {\n foreach ($data['lead_info'] as $key => $value) {\n $prepared_data['incoming_lead_info'][$key] = $value;\n }\n }\n\n if (isset($data['pipeline_id']) || $data['lead']['pipeline_id']) {\n $prepared_data['pipeline_id'] = isset($data['pipeline_id']) ? $data['pipeline_id'] : $data['lead']['pipeline_id'];\n }\n\n $data = array(\n 'add' => [$prepared_data],\n );\n\n $api = unserialize(API);\n $link = 'incoming_leads/form?login=' . $api['login'] . '&api_key=' . $api['api_key'];\n // debug($data);\n $output = run_curl($link, $data);\n\n return $output;\n}", "function create_custom_fields() {\n // Get all components to be listed\n $this->get_components();\n // Add components meta box\n if ( function_exists( 'add_meta_box' ) ) {\n foreach ( $this->postTypes as $postType ) {\n add_meta_box( 'wpnext', 'WPNext Builder', array( &$this, 'display_custom_fields' ), $postType, 'normal', 'high' );\n }\n }\n }", "public function prepareForm() {\n $fieldFactory = FieldFactory::getInstance();\n $translator = I18n::getInstance()->getTranslator();\n\n $profileList = array();\n $profiles = $this->wizard->getInstaller()->getProfiles();\n foreach ($profiles as $profileName => $profile) {\n $profileList[$profileName] = $profile->getName($translator) . '<span>' . $profile->getDescription($translator) . '</span>';\n }\n\n $profile = $this->wizard->getProfile();\n\n $profileField = $fieldFactory->createField(FieldFactory::TYPE_OPTION, self::FIELD_PROFILE, $profile);\n $profileField->setOptions($profileList);\n $profileField->addValidator(new RequiredValidator());\n\n $this->wizard->addField($profileField);\n }", "function gatherFormFields($submitType)\n{\n\t// then pass the data to the appropriate function for\n\t// editing or insertion.\n\t\n\t$arrFields = array(); // To hold the sanitized values\n\t\n\t// Field: ID\n\tif (isset($_POST['dealid']))\n\t{\n\t\t$id = (int)$_POST['dealid'];\n\t}\n\telse\n\t{\n\t\t$submitType = 'new';\t// Even if this was submitted as an edit, if no dealid was provided, create a new record.\n\t}\n\t\n\t// Field: company\n\tif (isset($_POST['edit_company']))\n\t{\n\t\t$arrFields['store'] = intval($_POST['edit_company']);\n\t}\n\telse\n\t{\n\t\t$arrFields['store'] = null;\n\t}\n\t\n\t// Field: dealurl\n\tif (isset($_POST['edit_dealurl']))\n\t{\n\t\t$arrFields['dealurl'] = mysql_real_escape_string($_POST['edit_dealurl']);\n\t}\n\telse\n\t{\n\t\t$arrFields['dealurl'] = '';\n\t}\n\n\t// Field: img\n\tif (isset($_POST['edit_image']))\n\t{\n\t\t$arrFields['img'] = mysql_real_escape_string($_POST['edit_image']);\n\t}\n\telse\n\t{\n\t\t$arrFields['img'] = '';\n\t}\n\n\t// Field: imgurl\n\tif (isset($_POST['edit_imageurl']))\n\t{\n\t\t$arrFields['imgurl'] = mysql_real_escape_string($_POST['edit_imageurl']);\n\t}\n\telse\n\t{\n\t\t$arrFields['imgurl'] = '';\n\t}\n\n\t// Field: showdate\n\tif (isset($_POST['edit_show_date']))\n\t{\n\t\t$arrFields['showdate'] = mysql_real_escape_string($_POST['edit_show_date']);\n\t}\n\telse\n\t{\n\t\t$arrFields['showdate'] = date('Y-m-d H:i:s');\n\t}\n\n\t// Field: expire\n\tif (isset($_POST['edit_expiration_date']))\n\t{\n\t\t$arrFields['expire'] = mysql_real_escape_string($_POST['edit_expiration_date']);\n\t}\n\telse\n\t{\n\t\t$arrFields['expire'] = null;\n\t}\n\n\t// Field: valid\n\tif (isset($_POST['edit_valid']))\n\t{\n\t\t$arrFields['valid'] = intval($_POST['edit_valid']);\n\t}\n\telse\n\t{\n\t\t$arrFields['valid'] = 1;\n\t}\n\t\n\t// Field: invalidreason\n\tif (isset($_POST['edit_invalidreason']))\n\t{\n\t\t$arrFields['invalidreason'] = mysql_real_escape_string($_POST['edit_invalidreason']);\n\t}\n\telse\n\t{\n\t\t$arrFields['invalidreason'] = '';\n\t}\n\t\n\t// Field: subject\n\tif (isset($_POST['edit_subject']))\n\t{\n\t\t$arrFields['subject'] = mysql_real_escape_string($_POST['edit_subject']);\n\t}\n\telse\n\t{\n\t\t$arrFields['subject'] = '';\n\t}\n\t\n\t// Field: brief\n\tif (isset($_POST['edit_brief']))\n\t{\n\t\t$arrFields['brief'] = mysql_real_escape_string($_POST['edit_brief']);\n\t\t$arrFields['verbose'] = mysql_real_escape_string($_POST['edit_brief']);\n\t}\n\telse\n\t{\n\t\t$arrFields['brief'] = '';\n\t\t$arrFields['verbose'] = '';\n\t}\n\n\t// Field: updated\n\t$arrFields['updated']\t\t= date('Y-m-d H:i:s');\n\t$arrFields['whoupdated']\t= $_SESSION['firstname'];\n\t\n\tif ($submitType == 'edit')\n\t{\n\t\tsaveEdit($arrFields, $id);\n\t}\n\telse\n\t{\n\t\tsaveNew($arrFields);\n\t}\n}", "function form_init_elements()\r\n {\r\n $this->add_hidden_element(\"swimmeetid\") ;\r\n\r\n // This is used to remember the action\r\n // which originated from the GUIDataList.\r\n \r\n $this->add_hidden_element(\"_action\") ;\r\n\r\n\t\t// Org Code field\r\n\r\n $orgcode = new FEListBox(\"Organization\", true, \"150px\");\r\n $orgcode->set_list_data(SDIFCodeTableMappings::GetOrgCodes()) ;\r\n $this->add_element($orgcode) ;\r\n\r\n\t\t// Meet Name field\r\n\r\n $meetname = new FEText(\"Meet Name\", true, \"300px\");\r\n $this->add_element($meetname) ;\r\n\r\n\t\t// Meet Address 1 field\r\n\r\n $meetaddress1 = new FEText(\"Meet Address 1\", false, \"300px\");\r\n $this->add_element($meetaddress1) ;\r\n\r\n\t\t// Meet Address 2 field\r\n\r\n $meetaddress2 = new FEText(\"Meet Address 2\", false, \"300px\");\r\n $this->add_element($meetaddress2) ;\r\n\r\n // Meet State\r\n\r\n $meetstate = new FEUnitedStates(\"Meet State\", FT_US_ONLY, \"150px\");\r\n $this->add_element($meetstate) ;\r\n\r\n\t\t// Meet Postal Code field\r\n\r\n $meetpostalcode = new FEText(\"Meet Postal Code\", false, \"200px\");\r\n $this->add_element($meetpostalcode) ;\r\n\r\n // Meet Country\r\n\r\n $meetcountry = new FEListBox(\"Meet Country\", true, \"250px\");\r\n $meetcountry->set_list_data(SDIFCodeTableMappings::GetCountryCodes()) ;\r\n $meetcountry->set_readonly(FT_US_ONLY) ;\r\n $this->add_element($meetcountry) ;\r\n\r\n\t\t// Meet Code field\r\n\r\n $meetcode = new FEListBox(\"Meet Code\", true, \"150px\");\r\n $meetcode->set_list_data(SDIFCodeTableMappings::GetMeetCodes()) ;\r\n $this->add_element($meetcode) ;\r\n\r\n // Meet Start Field\r\n\r\n $meetstart = new FEDate(\"Meet Start\", true, null, null,\r\n \"Fdy\", date(\"Y\") - 3, date(\"Y\") + 7) ;\r\n $this->add_element($meetstart) ;\r\n\r\n // Meet End Field\r\n\r\n $meetend = new FEDate(\"Meet End\", true, null, null,\r\n \"Fdy\", date(\"Y\") - 3, date(\"Y\") + 7) ;\r\n $this->add_element($meetend) ;\r\n\r\n\t\t// Pool Altitude field\r\n\r\n $poolaltitude = new FENumber(\"Pool Altitude\", true, \"150px\") ;\r\n $this->add_element($poolaltitude) ;\r\n\r\n\t\t// Course Code field\r\n\r\n $coursecode = new FEListBox(\"Course Code\", true, \"150px\");\r\n $coursecode->set_list_data(SDIFCodeTableMappings::GetCourseCodes()) ;\r\n $this->add_element($coursecode) ;\r\n }", "function show() {\n global $post;\n \t\t/**\n\t\t * Use nonce for verification.\n\t\t */\n echo '<input type=\"hidden\" name=\"weddingvendor_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n echo '<table class=\"form-table\">';\n\t\t\n foreach ($this->_meta_box['fields'] as $field) { \n\t\t\t/**\n\t\t\t * get current post meta data.\n\t\t\t */\n $meta = get_post_meta($post->ID, $field['id'], true);\n\t\t\tif( isset( $field['desc'] ) ) {\n\t\t\t\t$meta_description = $field['desc'];\n\t\t\t}\n\t\t\t\n echo '<tr><th style=\"width:20%\"><label for=\"',esc_attr($field['id']), '\">', esc_html($field['name']), '</label></th><td>';\n\t\t\t\n switch ($field['type']) {\n\t\t\t /**\n\t\t\t\t * Meta-box Text Field.\n\t\t\t\t */\t\n case 'text':\n \t echo '<input type=\"text\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" />',\n '<br /><small>', $meta_description.'</small>';\n break;\t\n\t\n\n\t\t\t /**\n\t\t\t\t * Meta-box date Field.\n\t\t\t\t */\t\n case 'date':\n \t echo '<input type=\"text\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" class=\"check_date date\" />',\n '<br /><small>', $meta_description.'</small>';\n break;\t\t\t\t\t \t\t\t\t\n\t\t\t /**\n\t\t\t\t * Meta-box Color Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'color':\n\t\t\t\t echo '<input class=\"color-field\" type=\"text\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" value=\"', $meta ? $meta : $field['std'], '\" />',\n '<br /><small>', $meta_description.'</small>';\n\t\t\t\tbreak;\n\t\t\t /**\n\t\t\t\t * Meta-box Textarea Field.\n\t\t\t\t */\t\n case 'textarea':\n echo '<textarea name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" cols=\"60\" rows=\"4\" style=\"width:97%\">', $meta ? $meta : $field['std'], '</textarea>',\n '<br /><small>', $meta_description.'</small>';\n break;\n\t\t\t /**\n\t\t\t\t * Meta-box Select Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'select':\t\t\t\t\t\n\t\t\t\t\t echo '<select name=\"'.esc_attr($field['id']).'\" id=\"'.esc_attr($field['id']).'\">';\n\t\t\t\t\t\t foreach ($field['options'] as $option) {\n\t\t\t\t\t\t \t echo '<option', $meta == $option['value'] ? ' selected=\"selected\"' : '', ' value=\"'.$option['value'].'\">'.$option['label'].'</option>';\n\t\t\t\t\t \t } \n\t\t\t\t\t echo '</select><br /><span class=\"description\">'.$meta_description.'</span>';\n break;\n\t\t\t /**\n\t\t\t\t * Meta-box Radio Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'radio':\n\t\t\t\t\t foreach ( $field['options'] as $option ) {\n\t\t\t\t\t\t echo '<input type=\"radio\" name=\"'.esc_attr($field['id']).'\" id=\"'.$option['value'].'\" \n\t\t\t\t\t\t\t value=\"'.$option['value'].'\" ',$meta == $option['value'] ? ' checked=\"checked\"' : '',' />\n\t\t\t\t\t\t\t <label for=\"'.$option['value'].'\">'.$option['name'].'</label><br />';\n\t\t\t\t\t }\n\t\t\t\t\t echo '<span class=\"description\">'.$meta_description.'</span>';\n\t\t\t\tbreak;\n\t\t\t /**\n\t\t\t\t * Meta-box Checkbox Field.\n\t\t\t\t */\t\n\t case 'checkbox':\n \t echo '<input type=\"checkbox\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\"', $meta ? ' checked=\"checked\"' : '', ' />';\n\t\t\t\t\t echo '<span class=\"description\">'.$meta_description.'</span>';\n break;\n\t\t\t /**\n\t\t\t\t * Meta-box Checkbox-group Field.\n\t\t\t\t */\t\n\t\t\t case 'checkbox_group':\n\t\t\t\t\t foreach ($field['options'] as $option) {\n\t\t\t\t\t echo '<input type=\"checkbox\" value=\"',$option['value'],'\" name=\"',esc_html($field['id']),'[]\" \n\t\t\t\t\t\t id=\"',$option['value'],'\"',$meta && in_array($option['value'], $meta) ? ' checked=\"checked\"' : '',' />\n\t\t\t\t\t\t <label for=\"'.$option['value'].'\">'.$option['name'].'</label><br />';\n\t\t\t\t\t }\n\t\t\t\t\t echo '<span class=\"description\">'.$meta_description.'</span>';\n\t\t\t\t\tbreak;\n\t\t\t /**\n\t\t\t\t * Meta-box Image Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'image':\n\t\t\t\t\t echo '<span class=\"upload\">';\n\t\t\t\t\t if( $meta ) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t echo '<input type=\"hidden\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" \n\t\t\t\t\t\t\t\t class=\"regular-text form-control text-upload\" value=\"',$meta,'\" />';\t\t\t\t\t\t\t\n\t\t\t\t\t\t echo '<img style=\"width:150px; display:block;\" src= \"'.$meta.'\" class=\"preview-upload\" />';\n\t\t\t\t\t\t echo '<input type=\"button\" class=\"button button-upload\" id=\"logo_upload\" value=\"'.esc_html__('Upload an image','weddingvendor').'\"/></br>';\t\t\n\t\t\t\t\t\t echo '<input type=\"button\" class=\"button-remove\" id=\"remove\" value=\"'.esc_html__('Remove','weddingvendor').'\" /> ';\n\t\t\t\t\t }else {\n\t\t\t\t\t\t echo '<input type=\"hidden\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" \n\t\t\t\t\t\t\t\t\tclass=\"regular-text form-control text-upload\" value=\"',$meta,'\" />';\t\t\t\t\t\t\t\n\t\t\t\t\t\t echo '<img style=\"\" src= \"'.$meta.'\" class=\"preview-upload\" />';\n\t\t\t\t\t\t echo '<input type=\"button\" class=\"button button-upload\" id=\"logo_upload\" value=\"'.esc_html__('Upload an image','weddingvendor').'\"/></br>';\t\t\n\t\t\t\t\t\t echo '<input type=\"button\" style=\"display:none;\" id=\"remove\" class=\"button-remove\" value=\"\" /> ';\n\t\t\t\t\t } echo '</span><span class=\"description\">'.$meta_description.'</span>';\t\t\n\t\t\t\tbreak;\n\t\t\t\t\t\n }\n echo '<td></tr>';\n }\n echo '</table>';\n }", "function renderFieldsForm($item)\n\t{\n\t\t$noplugin = '<div class=\"fc-mssg-inline fc-warning\" style=\"margin:0 2px 6px 2px; max-width: unset;\">'.JText::_( 'FLEXI_PLEASE_PUBLISH_THIS_PLUGIN' ).'</div>';\n\t\t$hide_ifempty_fields = array('fcloadmodule', 'fcpagenav', 'toolbar', 'comments');\n\t\t$row_k = 0;\n\n\t\t$lbl_class = ' ' . $item->parameters->get(JFactory::getApplication()->isClient('administrator') ? 'form_lbl_class_be' : 'form_lbl_class_fe');\n\t\t$tip_class = ' hasTooltip';\n\n\t\t$FC_jfields_html['images'] = '<span class=\"alert alert-info\">Edit in \\'Image and links\\' TABs</span>';\n\t\t$FC_jfields_html['urls'] = '<span class=\"alert alert-info\">Edit in \\'Image and links\\' TABs</span>';\n\t\tob_start();\n\t\tforeach ($item->fields as $field)\n\t\t{\n\t\t\tif (\n\t\t\t\t// SKIP backend hidden fields from this listing\n\t\t\t\t($field->iscore && $field->field_type!='maintext') || $field->parameters->get('backend_hidden') || in_array($field->formhidden, array(2,3)) ||\n\n\t\t\t\t// Skip hide-if-empty fields from this listing\n\t\t\t\t( empty($field->html) && ($field->formhidden==4 || in_array($field->field_type, $hide_ifempty_fields)) )\n\t\t\t) continue;\n\n\t\t\t// check to SKIP (hide) field e.g. description field ('maintext'), alias field etc\n\t\t\tif ( $item->tparams->get('hide_'.$field->field_type) ) continue;\n\n\t\t\t$not_in_tabs = \"\";\n\t\t\tif ($field->field_type=='custom_form_html')\n\t\t\t{\n\t\t\t\techo $field->html;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\n\t\t\telse if ($field->field_type=='coreprops')\n\t\t\t{\n\t\t\t\t// not used in backend (yet?)\n\t\t\t\tcontinue;\n\t\t\t}\n\n\n\t\t\telse if ($field->field_type=='maintext')\n\t\t\t{\n\t\t\t\t// placed in separate TAB\n\t\t\t\tcontinue;\n\t\t\t}\n\n\n\t\t\telse if ($field->field_type=='image')\n\t\t\t{\n\t\t\t\tif ($field->parameters->get('image_source')==-1)\n\t\t\t\t{\n\t\t\t\t\t$replace_txt = !empty($FC_jfields_html['images']) ? $FC_jfields_html['images'] : '<span class=\"alert alert-warning fc-small fc-iblock\">'.JText::_('FLEXI_ENABLE_INTRO_FULL_IMAGES_IN_TYPE_CONFIGURATION').'</span>';\n\t\t\t\t\tunset($FC_jfields_html['images']);\n\t\t\t\t\t$field->html = str_replace('_INTRO_FULL_IMAGES_HTML_', $replace_txt, $field->html);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\telse if ($field->field_type=='weblink')\n\t\t\t{\n\t\t\t\tif ($field->parameters->get('link_source')==-1)\n\t\t\t\t{\n\t\t\t\t\t$replace_txt = !empty($FC_jfields_html['urls']) ? $FC_jfields_html['urls'] : '<span class=\"alert alert-warning\">'.JText::_('FLEXI_ENABLE_LINKS_IN_TYPE_CONFIGURATION').'</span>';\n\t\t\t\t\tunset($FC_jfields_html['urls']);\n\t\t\t\t\t$field->html = str_replace('_JOOMLA_ARTICLE_LINKS_HTML_', $replace_txt, $field->html);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// field has tooltip\n\t\t\t$edithelp = $field->edithelp ? $field->edithelp : 1;\n\t\t\t//$label_class = \"pull-left label-fcinner label-toplevel\";\n\t\t\t$label_class = \"control\";\n\t\t\tif ( $field->description && ($edithelp==1 || $edithelp==2) )\n\t\t\t{\n\t\t\t\t$label_attrs = 'class=\"' . $tip_class . ($edithelp==2 ? ' fc_tooltip_icon' : '') . $lbl_class . ' ' . $label_class . '\" title=\"'.flexicontent_html::getToolTip(null, $field->description, 0, 1).'\"';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$label_attrs = 'class=\"' . $lbl_class . ' ' . $label_class . '\"';\n\t\t\t}\n\n\t\t\t// Some fields may force a container width ?\n\t\t\t$display_label_form = $field->parameters->get('display_label_form', 1);\n\t\t\t$row_k = 1 - $row_k;\n\t\t\t$full_width = $display_label_form==0 || $display_label_form==2 || $display_label_form==-1;\n\t\t\t$width = $field->parameters->get('container_width', ($full_width ? '100%!important;' : false) );\n\t\t\t$container_width = empty($width) ? '' : 'width:' .$width. ($width != (int)$width ? 'px!important;' : '');\n\t\t\t//$container_class = \"fcfield_row\".$row_k.\" container_fcfield container_fcfield_id_\".$field->id.\" container_fcfield_name_\".$field->name;\n\t\t\t$container_class = \"controls container_fcfield\";\n\t\t\t?>\n\n\t\t<div class=\"control-group\">\n\t\t\t<div class=\"control-label\">\n\t\t\t\t<!--span class=\"label-fcouter\" id=\"label_outer_fcfield_<?php echo $field->id; ?>\" style=\"<?php echo $display_label_form < 1 ? 'display:none;' : '' ?>\" -->\n\t\t\t\t<label id=\"label_fcfield_<?php echo $field->id; ?>\" data-for=\"<?php echo 'custom_'.$field->name;?>\" <?php echo $label_attrs;?> >\n\t\t\t\t\t<?php echo $field->label; ?>\n\t\t\t\t</label>\n\t\t\t\t<!--/span-->\n\t\t\t</div>\n\n\t\t\t<div style=\"<?php echo $container_width; ?>\" class=\"<?php echo $container_class;?>\" id=\"container_fcfield_<?php echo $field->id;?>\">\n\t\t\t\t<?php\n\t\t\t\techo ($field->description && $edithelp==3) ? '<div class=\"alert fc-small fc-iblock\">'.$field->description.'</div>' : '';\n\t\t\t\techo isset($field->html) ? $field->html : $noplugin;\n\t\t\t\t?>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<?php\n\t\t}\n\t\t$fields_html = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $fields_html;\n\t}", "function makeForm() {\n if($this->table_title != '' ) {\n $db_obj = new db_class();\n $desc_table = $db_obj->tableDescription($this->table_title);\n $db_obj->closeDB();\n \n// showArray($desc_table);\n echo '<form id=\"generic_edit_form\" method=\"POST\" >';\n echo '<input type=\"hidden\" name=\"title_input\" value=\"name\"> '; // THIS MUST BE HERE FOR CLONABLE FORMS!!!\n echo '<input type=\"hidden\" name=\"table\" value=\"vendors\">'; // THE TABLE MUST BE LABELED\n echo '<b>This is a generic input</b> <input type=\"text\" name=\"generic\">' . \"\\n\";\n \n echo '<br><br><input type=\"submit\" >';\n echo '</form>';\n } else {\n echo '<h2>hello, form<h2>';\n }\n }", "function ting_extended_search_settings_fields_form_submit($form, &$form_state) {\n $fields = $form_state['values']['fields'];\n unset($fields['more']);\n $display = $form_state['fields'];\n\n for ($i = 0; $i < count($fields); $i++) {\n if (isset($display[$i]) && ($display[$i]['machine_name'] == $fields[$i]['machine_name'])) {\n $display[$i]['title'] = $fields[$i]['title'];\n $display[$i]['placeholder'] = $fields[$i]['placeholder'];\n $display[$i]['index'] = $fields[$i]['index'];\n $display[$i]['type'] = $fields[$i]['type'];\n $display[$i]['values'] = $fields[$i]['values'];\n }\n elseif (!isset($display[$i])) {\n // Add new items.\n $display[$i]['machine_name'] = $fields[$i]['machine_name'];\n $display[$i]['title'] = $fields[$i]['title'];\n $display[$i]['placeholder'] = $fields[$i]['placeholder'];\n $display[$i]['index'] = $fields[$i]['index'];\n $display[$i]['type'] = $fields[$i]['type'];\n $display[$i]['values'] = $fields[$i]['values'];\n }\n }\n\n $display = array_filter($display, function($f) {\n return !empty($f['title']) && !empty($f['placeholder']) && !empty($f['index']);\n });\n\n $display = array_values($display);\n variable_set('ting_ext_search_fields_settings', $display);\n}", "protected function _prepareForm()\n {\n /**\n * @var $value \\Amasty\\Finder\\Model\\Value\n */\n $value = $this->_coreRegistry->registry('current_amasty_finder_value');\n $finder = $this->_coreRegistry->registry('current_amasty_finder_finder');\n $settingData = [];\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n [\n 'data' => [\n 'id' => 'edit_form',\n 'action' => $this->getUrl('amasty_finder/value/save', ['id' => $this->getRequest()->getParam('id'), 'finder_id'=>$finder->getId()]),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data',\n ],\n ]\n );\n $form->setUseContainer(true);\n $this->setForm($form);\n\n $fieldset = $form->addFieldset('set', array('legend'=> __('General')));\n $fieldset->addField('sku', 'text', [\n 'label' => __('SKU'),\n 'title' => __('SKU'),\n 'name' => 'sku',\n ]);\n\n if($value->getId()) {\n $settingData['sku'] = $value->getSkuById($this->getRequest()->getParam('id'), $value->getId());\n }\n $currentId = $value->getId();\n\n\n $fields = [];\n while($currentId) {\n $alias_name = 'name_' . $currentId;\n $alias_label = 'label_'.$currentId;\n\n $model = clone $value;\n $model->load($currentId);\n $currentId = $model->getParentId();\n $dropdownId = $model->getDropdownId();\n $dropdown = $this->_objectManager->create('Amasty\\Finder\\Model\\Dropdown')->load($dropdownId);\n $dropdownName = $dropdown->getName();\n $settingData[$alias_name] = $model->getName();\n $fields[$alias_name] = [\n 'label' => __($dropdownName),\n 'title' => __($dropdownName),\n 'name' => $alias_label\n ];\n }\n\n $fields = array_reverse($fields);\n\n foreach($fields as $alias_name=>$fieldData) {\n $fieldset->addField($alias_name, 'text', $fieldData);\n }\n\n if(!$value->getId()) {\n $finder = $value->getFinder();\n\n foreach ($finder->getDropdowns() as $drop){\n $alias_name = 'name_'.$drop->getId();\n $alias_label = 'label_'.$drop->getId();\n $fieldset->addField($alias_name, 'text', [\n 'label' => __($drop->getName()),\n 'title' => __($drop->getName()),\n 'name' => $alias_label\n ]);\n }\n\n $fieldset->addField('new_finder', 'hidden', ['name' => 'new_finder']);\n $settingData['new_finder'] = 1;\n }\n\n\n //set form values\n $form->setValues($settingData);\n\n return parent::_prepareForm();\n }", "function createFieldForm($arrLang)\n{\n\n $arrFields = array(\"conference_name\" => array(\"LABEL\" => $arrLang['Conference Name'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:300px;\"),\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"conference_owner\" => array(\"LABEL\" => $arrLang['Conference Owner'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"conference_number\" => array(\"LABEL\" => $arrLang['Conference Number'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"moderator_pin\" => array(\"LABEL\" => $arrLang['Moderator PIN'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"moderator_options_1\" => array(\"LABEL\" => $arrLang['Moderator Options'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"moderator_options_2\" => array(\"LABEL\" => \"\",\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_pin\" => array(\"LABEL\" => $arrLang['User PIN'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_options_1\" => array(\"LABEL\" => $arrLang['User Options'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_options_2\" => array(\"LABEL\" => \"\",\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_options_3\" => array(\"LABEL\" => \"\",\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"start_time\" => array(\"LABEL\" => $arrLang['Start Time (PST/PDT)'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"DATE\",\n \"INPUT_EXTRA_PARAM\" => array(\"TIME\" => true, \"FORMAT\" => \"%Y-%m-%d %H:%M\",\"TIMEFORMAT\" => \"12\"),\n \"VALIDATION_TYPE\" => \"ereg\",\n \"VALIDATION_EXTRA_PARAM\" => \"^(([1-2][0,9][0-9][0-9])-((0[1-9])|(1[0-2]))-((0[1-9])|([1-2][0-9])|(3[0-1]))) (([0-1][0-9]|2[0-3]):[0-5][0-9])$\"),\n \"duration\" => array(\"LABEL\" => $arrLang['Duration (HH:MM)'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:20px;text-align:center\",\"maxlength\" =>\"2\"),\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"duration_min\" => array(\"LABEL\" => $arrLang['Duration (HH:MM)'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:20px;text-align:center\",\"maxlength\" =>\"2\"),\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n/*\n \"recurs\" => array(\"LABEL\" => $arrLang['Recurs'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"reoccurs_period\" => array(\"LABEL\" => $arrLang[\"Reoccurs\"],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"SELECT\",\n \"INPUT_EXTRA_PARAM\" => $arrReoccurs_period,\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\",\n \"EDITABLE\" => \"no\",\n \"SIZE\" => \"1\"),\n \"reoccurs_days\" => array(\"LABEL\" => $arrLang[\"for\"],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"SELECT\",\n \"INPUT_EXTRA_PARAM\" => $arrReoccurs_days,\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\",\n \"EDITABLE\" => \"no\",\n \"SIZE\" => \"1\"),\n*/\n \"max_participants\" => array(\"LABEL\" => $arrLang['Max Participants'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:50px;\"),\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n );\n return $arrFields;\n}", "function getFields( $type ) {\r\n\t\r\n\tglobal $db, $site, $gallerySettings;\r\n\t\r\n\t$fieldTitles = array( 'title' => 'Title',\r\n\t\t\t\t\t\t 'description' => 'Description',\r\n\t\t\t\t\t\t 'items_count' => 'Count Items in Category',\r\n\t\t\t\t\t\t 'category_title' => 'Category Title',\r\n\t\t\t\t\t\t 'price' => 'Price',\r\n\t\t\t\t\t\t 'quantity' => 'Quantity in Stock',\r\n\t\t\t\t\t\t 'add_to_cart' => 'Add To Cart',\r\n\t\t\t\t\t\t 'manufacturer' => 'Manufacturer' );\r\n\t\r\n\tif ( $type == 'cat_thumb' ) \r\n\t\t$fieldsToDisplay = array( 'items_count', 'category_title' );\r\n\telse\r\n\t\t$fieldsToDisplay = array( 'title', 'description' );\r\n\t\r\n\tif ( $gallerySettings['useEcommerce'] == 'yes' && $type != 'cat_thumb' ) {\r\n\t\t\r\n\t\t$fieldsToDisplay = array_append( $fieldsToDisplay, array( 'price', 'quantity', 'manufacturer', 'add_to_cart' ) );\r\n\t\t\r\n\t\t$attributes = $db->getAll( 'select a.id as a_id, a.name, a._default, d.* from '. ATTRIBUTES_TABLE. \" a left join \". DISPLAYOPTIONS_TABLE.\" d on a.id=d.field_id and d.type='$type' and d.site_key='$site' where a.site_key='$site' and a.visible=1\" );\r\n\t\t//print_r( $attributes );\r\n\t\tforeach ( $attributes as $num=>$attr ) {\r\n\t\t\tif ( $attr[id] == '' ) {\r\n\t\t\t\t$row = $db->getOne( 'select max(row) from '. DISPLAYOPTIONS_TABLE.\" where site_key='$site' and type='$type' and visible=1\" );\r\n\t\t\t\t$row++;\r\n\t\t\t\t$db->query( 'insert into '.DISPLAYOPTIONS_TABLE.\" (section, field_id, type, row, layout, style, visible, site_key) values ( 'top', '$attr[a_id]', '$type', '$row', '{\\$name}: {\\$value}', '', '0', '$site') \" );\r\n\t\t\t}\r\n\t\t\t$fieldsToDisplay[] = $attr[a_id];\r\n\t\t}\r\n\t\r\n\t}\r\n\t$fieldsToDisplay = '\\''.implode( '\\', \\'', $fieldsToDisplay ).'\\'';\r\n\t\r\n\t$items = $db->getAll( 'select 1 as canLeft, 1 as canRight, d.*, a.name from '. DISPLAYOPTIONS_TABLE.\" d left join \". ATTRIBUTES_TABLE.\" a on d.field_id=a.id where d.field_id in ($fieldsToDisplay) and d.type='$type' and d.site_key='$site' order by d.visible desc, d.section asc, d.row, d.row_position\" );\r\n\tforeach ( $items as $num=>$item ) {\r\n\t\t\r\n\t\tif ( in_array( $item['field_id'], array_keys( $fieldTitles ) ) )\r\n\t\t\t$items[$num]['name'] = $fieldTitles[$item['field_id']];\r\n\t\t\t\r\n\t\tif ( $num == 0 ) {\r\n\t\t\t$items[$num]['canLeft'] = 0;\r\n\t\t\t$prevSection = $items[$num]['section'];\r\n\t\t\t$prevRow = $items[$num]['row'];\r\n\t\t}\r\n\t\t\t\r\n\t\tif ( ($items[$num]['section'] != $prevSection || $items[$num]['row'] != $prevRow) && $num!=0 ) {\r\n\t\t\t$items[$num-1]['canRight'] = 0;\r\n\t\t\t$items[$num]['canLeft'] = 0;\r\n\t\t\t$prevSection = $items[$num]['section'];\r\n\t\t\t$prevRow = $items[$num]['row'];\r\n\t\t}\r\n\t\t\r\n\t\tif ( !$items[$num]['visible'] )\r\n\t\t\t$items[$num-1]['canRight'] = 0;\r\n\t}\r\n\t\r\n\t$items[count( $items) - 1]['canRight'] = 0;\r\n\t\r\n\treturn $items;\r\n\r\n}", "public function page_init()\n {\n register_setting(\n 'mj_groups_fields', // group name\n 'mj_option_theme',\n array($this, 'sanitize') // sanitize\n );\n\n add_settings_section(\n 'section_default',\n '',\n '',\n 'config-theme-options'\n );\n\n foreach ($this->formRenderInputs as $key => $value) {\n add_settings_field(\n $value['args']['atributos']['name'],\n $value['titulo'],\n array($this, 'render_field_input'),\n 'config-theme-options',\n 'section_default',\n array('valores' => $value)\n );\n }\n }", "function form($instance) {\n $instance = wp_parse_args( (array) $instance, array( 'title' => 'WP-Popular Posts Tool', 'itemsQuantity' => 5, 'catId' => 0 ) );\n $title = strip_tags($instance['title']);\n $itemsQuantity = absint($instance['itemsQuantity']);\n $catId = absint($instance['catId']);\n $displayMode = absint($instance['displayMode']);\n $disableCommentCount = absint($instance['disableCommentCount']);\n $barsLocation = absint($instance['barsLocation']);\n ?>\n \n <p><label for=\"<?php echo $this->get_field_id('title'); ?>\">\n <?php echo esc_html__('Title'); ?>: \n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\" \n type=\"text\" value=\"<?php echo attribute_escape($title); ?>\" />\n </label></p>\n \n <p><label for=\"<?php echo $this->get_field_id('itemsQuantity'); ?>\">\n <?php echo esc_html__('Number of items to show'); ?>: \n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('itemsQuantity'); ?>\" name=\"<?php echo $this->get_field_name('itemsQuantity'); ?>\" \n type=\"text\" value=\"<?php echo attribute_escape($itemsQuantity); ?>\" />\n </label></p> \n \n <p><label for=\"<?php echo $this->get_field_id('catId'); ?>\">\n <?php echo esc_html__('Id of the cateogory or tag (leave it blank for automatic detection)'); ?>: \n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('catId'); ?>\" name=\"<?php echo $this->get_field_name('catId'); ?>\" \n type=\"text\" value=\"<?php echo attribute_escape($catId); ?>\" />\n </label></p>\n \n <p><label for=\"<?php echo $this->get_field_id('displayMode'); ?>\">\n <?php echo esc_html__('Display mode'); ?>: \n <select class=\"widefat\" id=\"<?php echo $this->get_field_id('displayMode'); ?>\" name=\"<?php echo $this->get_field_name('displayMode'); ?>\" \n type=\"text\">\n <option value=\"0\" <?php if($displayMode == 0) echo 'selected'; ?>>Text Only</option>\n <option value=\"1\" <?php if($displayMode == 1) echo 'selected'; ?>>Graphic</option>\n </select>\n </label></p>\n \n <p><label for=\"<?php echo $this->get_field_id('barsLocation'); ?>\">\n <?php echo esc_html__('Bars Location (if mode = Graphic)'); ?>: \n <select class=\"widefat\" id=\"<?php echo $this->get_field_id('barsLocation'); ?>\" name=\"<?php echo $this->get_field_name('barsLocation'); ?>\" \n type=\"text\">\n <option value=\"0\" <?php if($barsLocation == 0) echo 'selected'; ?>>Left</option>\n <option value=\"1\" <?php if($barsLocation == 1) echo 'selected'; ?>>Right</option>\n </select>\n </label></p> \n \n <p><label for=\"<?php echo $this->get_field_id('disableCommentCount'); ?>\">\n <?php echo esc_html__('Disable comment count'); ?>: \n <select class=\"widefat\" id=\"<?php echo $this->get_field_id('disableCommentCount'); ?>\" name=\"<?php echo $this->get_field_name('disableCommentCount'); ?>\" \n type=\"text\">\n <option value=\"0\" <?php if($disableCommentCount == 0) echo 'selected'; ?>>No</option>\n <option value=\"1\" <?php if($disableCommentCount == 1) echo 'selected'; ?>>Yes</option>\n </select>\n </label></p> \n \n <?php\n }", "public function addMetaFieldsToAddForm()\n\t{\n\t\t$interval = $this->getMetaFields('interval');\n\t\t$animation = $this->getMetaFields('animation');\n\n\t\t?>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"interval\">Tijd tussen slides</label>\n\t\t\t\t<input name=\"interval\" id=\"interval\" type=\"text\" value=\"<?php echo $interval;?>\" size=\"40\">\n\t\t\t\t<p class=\"description\">De tijd tussen slides in milliseconden (1000ms = 1s).</p>\n\t\t\t</div>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"animation\">Animatie</label>\n\t\t\t\t<select name=\"animation\" id=\"animation\">\n\t\t\t\t\t<option <?php selected($animation, 'slide'); ?> value=\"slide\">Slide</option>\n\t\t\t\t\t<option <?php selected($animation, 'fade'); ?> value=\"fade\">Fade</option>\n\t\t\t\t</select>\n\t\t\t\t<p class=\"description\">Selecteer de animatie die gebruikt wordt door de slideshow.</p>\n\t\t\t</div>\n\t\t<?php\n\t}", "public function createMetasPages($meta)\n\t {\n\t \tif ( isset($_GET['post']) || isset($_POST['post_ID']) )\n\t\t \t$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'];\n\t\t else\n\t\t \t$post_id = null;\n\n\t\t $nameMetaBox = '';\n\t\t $titleMetaBox = '';\n\t\t $noInputs = '';\n\t\t $noEditors = '';\n\t\t $imgFeatured = '';\n\t\t $videoFeatured = '';\n\t\t $documentFeatured = '';\n\t\t $gallery = '';\n\n\t\t if (isset($meta['_title_meta_box'])) {\n\t\t \t$titleMetaBox = $meta['_title_meta_box'];\n\t\t }\n\n\t\t if (isset($meta['_no_inputs'])) {\n\t\t \t$noInputs = $meta['_no_inputs'];\n\t\t }\n\t\t \t\n\t\t if (isset($meta['_no_editors'])) {\n\t\t \t$noEditors = $meta['_no_editors'];\n\t\t }\n\n\t\t if (isset($meta['_name_meta_box'])) {\n\t\t \t$nameMetaBox = $meta['_name_meta_box']; \t\n\t\t }\n\n\t\t if ( isset($meta['_img_featured']) && $meta['_img_featured'] == 'yes' ) {\n\t\t \t$imgFeatured = $meta['_img_featured']; \t\n\t\t }\n\n\t\t if ( isset($meta['_video_featured']) && $meta['_video_featured'] == 'yes' ) {\n\t\t \t$videoFeatured = $meta['_video_featured']; \t\n\t\t }\n\n\t\t if ( isset($meta['_document_featured']) && $meta['_document_featured'] == 'yes' ) {\n\t\t \t$documentFeatured = $meta['_document_featured']; \t\n\t\t }\n\n\t\t if ( isset($meta['_gallery']) && $meta['_gallery'] == 'yes' ) {\n\t\t \t$gallery = $meta['_gallery']; \t\n\t\t }\n\n\t\t foreach ($meta['_pages'] as $key => $value) {\n\t\t \t$createMeta = false;\n\t\t \tif ($post_id == $value) {\n\t\t \t\t$createMeta = true;\n\t\t \t} else if( $value == 'all' ) {\n\t\t \t\t$createMeta = true;\n\t\t \t}\n\n\t\t \tif ($createMeta) {\n\t\t \t\tself::addMetaBox($nameMetaBox, $titleMetaBox, 'page' , $noInputs, $noEditors, $imgFeatured, $videoFeatured, $documentFeatured, $gallery);\n\t\t \t}\n\t\t }\n\t }", "function\n\tMvDetailedQueryForm()\n\t{\n\t\t//$catNumber = new QueryField;\n\t\t//$catNumber->ColName = 'CatNumber';\n\t\t//$catNumber->ColType = 'integer';\n\n\t\t$this->Fields = \n\t\t\tarray(\t\n\t\t\t'ColCategory',\n\t\t\t'ColScientificGroup',\n\t\t\t'ColDiscipline',\n\t\t\t'ColRegPrefix',\n\t\t\t'ColRegNumber',\n\t\t\t'ColRegPart',\n\t\t\t//'ColRecordCategory',\n\t\t\t'ColCollectionName_tab',\n\n\n\t\t\t//$catNumber,\n\t\t\t//'TitMainTitle',\n\t\t\t//'CreCreatorLocal_tab',\n\t\t\t//'LocCurrentLocationRef->elocations->SummaryData',\n\t\t\t//'PhyMedium',\n\t\t\t);\n\n\t\t$this->Hints = \n\t\t\tarray(\t\n\t\t\t'ColCategory'\t\t=> '[ eg. Natural Sciences ]',\n\t\t\t'ColScientificGroup'\t=> '[ eg. Zoology ]',\n\t\t\t'ColDiscipline'\t\t=> '[ eg. Anthropology ]',\n\t\t\t'ColRegPrefix' \t\t=> '[ eg. x ]',\n\t\t\t'ColRegNumber' \t\t=> '[ eg. A number ]',\n\t\t\t'ColRegPart' \t\t=> '[ eg. A number ]',\n\t\t\t//'ColRecordCategory'\t=> '[ eg. Registered ]',\n\t\t\t'ColCollectionName_tab'\t=> '[ Select from the list ]',\n\t\t\t);\n\n\t\t$this->DropDownLists = \n\t\t\tarray(\t\n\t\t\t//'PhyMedium' => '|Painting|Satin|Cardboard|Silk|Paper|Ink',\n\t\t\t//'CreCountry_tab' => 'eluts:Location',\n\t\t\t'ColCollectionName_tab'\t=> 'eluts:Collection Name',\n\t\t\t);\n\n\t\t$this->LookupLists = \n\t\t\tarray (\n\t\t\t//'TitCollectionTitle' => 'Collection Title',\n\t\t\t);\n\n\t\t$this->BaseDetailedQueryForm();\n\t}", "function bab_pm_makeform()\n{\n global $prefs;\n\n $bab_hidden_input = '';\n $event = gps('event');\n $step = gps('step');\n\n if (!$event) {\n $event = 'postmaster';\n }\n\n if (!$step) {\n $step = 'subscribers';\n }\n\n if ($step == 'subscribers') {\n $bab_columns = array(\n 'subscriberFirstName',\n 'subscriberLastName',\n 'subscriberEmail',\n 'subscriberLists',\n );\n\n for ($i = 1; $i <= BAB_CUSTOM_FIELD_COUNT; $i++) {\n $bab_columns[] = \"subscriberCustom{$i}\";\n }\n\n $bab_submit_value = 'Add Subscriber';\n $bab_prefix = 'new';\n $subscriberToEdit = gps('subscriber');\n\n if ($subscriberToEdit) {\n $bab_hidden_input = '<input type=\"hidden\" name=\"editSubscriberId\" value=\"' . doSpecial($subscriberToEdit) . '\">';\n $bab_prefix = 'edit';\n $bab_submit_value = 'Update Subscriber Information';\n\n $row = safe_row('*', 'bab_pm_subscribers', \"subscriberID=\" . doSlash($subscriberToEdit));\n $subscriber_lists = safe_rows('*', 'bab_pm_subscribers_list', \"subscriber_id = \" . doSlash($row['subscriberID']));\n $fname = doSpecial($row['subscriberFirstName']);\n $lname = doSpecial($row['subscriberLastName']);\n echo \"<fieldset id=bab_pm_edit><legend><span class=bab_pm_underhed>Editing Subscriber: $fname $lname</span></legend>\";\n } else {\n $subscriber_lists = array();\n }\n\n $lists = safe_rows('*', 'bab_pm_list_prefs', '1=1 order by listName');\n }\n\n if ($step == 'lists') {\n $bab_columns = array('listName', 'listAdminEmail','listDescription','listUnsubscribeUrl','listEmailForm','listSubjectLine');\n $bab_submit_value = 'Add List';\n $bab_prefix = 'new';\n\n if ($listToEdit = gps('list')) {\n $bab_hidden_input = '<input type=\"hidden\" name=\"editListID\" value=\"' . $listToEdit . '\">';\n $bab_prefix = 'edit';\n $bab_submit_value = 'Update List Information';\n $bab_prefix = 'edit';\n\n $row = safe_row('*', 'bab_pm_list_prefs', \"listID=\" . doSlash($listToEdit));\n echo \"<fieldset id=bab_pm_edit><legend>Editing List: $row[listName]</legend>\";\n }\n\n $form_prefix = $prefs[_bab_prefix_key('form_select_prefix')];\n\n $forms = safe_column('name', 'txp_form',\"name LIKE '\". doSlash($form_prefix) . \"%'\");\n $form_select = selectInput($bab_prefix.ucfirst('listEmailForm'), $forms, @$row['listEmailForm']);\n // replace class\n $form_select = str_replace('class=\"list\"', 'class=\"bab_pm_input\"', $form_select);\n }\n\n // build form\n\n echo '<form method=\"POST\" id=\"subscriber_edit_form\">';\n\n foreach ($bab_columns as $column) {\n echo '<dl class=\"bab_pm_form_input\"><dt>'.bab_pm_preferences($column).'</dt><dd>';\n $bab_input_name = $bab_prefix . ucfirst($column);\n\n switch ($column) {\n case 'listEmailForm':\n echo $form_select;\n break;\n case 'listSubjectLine':\n $checkbox_text = 'Use Article Title for Subject';\n case 'listUnsubscribeUrl':\n if (empty($checkbox_text)) {\n $checkbox_text = 'Use Default';\n }\n\n $checked = empty($row[$column]) ? 'checked=\"checked\" ' : '';\n $js = <<<eojs\n<script>\n$(document).ready(function () {\n $('#{$column}_checkbox').change(function(){\n if ($(this).is(':checked')) {\n $('input[name={$bab_input_name}]').attr('disabled', true).val('');\n }\n else {\n $('input[name={$bab_input_name}]').attr('disabled', false);\n }\n });\n});\n</script>\n\neojs;\n\n echo $js . '<input id=\"'.$column.'_checkbox\" type=\"checkbox\" class=\"bab_pm_input\" ' . $checked . '/>'.$checkbox_text.'</dd><dd>' .\n '<input type=\"text\" name=\"' . $bab_input_name . '\" value=\"' . doSpecial(@$row[$column]) . '\"' .\n (!empty($checked) ? ' disabled=\"disabled\"' : '') . ' />' .\n '</dd>';\n break;\n case 'subscriberLists':\n foreach ($lists as $list) {\n $checked = '';\n\n foreach ($subscriber_lists as $slist) {\n if ($list['listID'] == $slist['list_id']) {\n $checked = 'checked=\"checked\" ';\n break;\n }\n }\n\n echo '<input type=\"checkbox\" name=\"'. $bab_input_name .'[]\" value=\"'.$list['listID'].'\"' . $checked . '/>'\n . doSpecial($list['listName']) . \"<br>\";\n }\n break;\n default:\n echo '<input type=\"text\" name=\"' . $bab_input_name . '\" value=\"' . doSpecial(@$row[$column]) . '\" class=\"bab_pm_input\">';\n break;\n }\n\n echo '</dd></dl>';\n }\n\n echo $bab_hidden_input;\n echo '<input type=\"submit\" value=\"' . doSpecial($bab_submit_value) . '\" class=\"publish\">';\n echo '</form>';\n}", "function bnk_build_slide_metabox() {\r\n\tglobal $slide_meta, $post;\r\n\r\n\t// Use nonce for verification\r\n\techo '<input type=\"hidden\" name=\"bnk_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\r\n \r\n\techo '<table class=\"form-table\">';\r\n \r\n\tforeach ($slide_meta['fields'] as $field) {\r\n\t\t// get current post meta data\r\n\t\t$meta = get_post_meta($post->ID, $field['id'], true);\r\n\t\tswitch ($field['type']) {\r\n\t\t\t\r\n\t\t\t//If Text\t\t\r\n\t\t\tcase 'text':\r\n\t\t\t\r\n\t\t\techo '<tr style=\"border-top:1px solid #eeeeee;\">',\r\n\t\t\t\t'<th style=\"width:38%\"><label for=\"', $field['id'], '\"><strong>', $field['name'], '</strong><span style=\" display:block; color:#666; line-height: 1.6; margin:4px 0;\">'. $field['desc'].'</span></label></th>',\r\n\t\t\t\t'<td>';\r\n\t\t\techo '<input type=\"text\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" value=\"', $meta ? $meta : stripslashes(htmlspecialchars(( $field['std']), ENT_QUOTES)), '\" size=\"30\" style=\"width:95%; margin-right: 20px; float:left;\" />';\r\n\t\t\tbreak;\r\n \r\n\t\t}\r\n\r\n\t}\r\n \r\n\techo '</table>';\r\n}", "public function postPartnerFormEdits()\n {\n $input_array = array();\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\")\n {\n $input_array['title'] = $this->test_input($_POST['title']);\n $input_array['sub_title'] = $this->test_input($_POST['sub-title']);\n $input_array['desc_head'] = $this->test_input($_POST['desc-head']);\n $input_array['desc_body'] = $this->test_input($_POST['desc-body']);\n $input_array['desc_list_head'] = $this->test_input($_POST['desc-list-head']);\n $input_array['desc_list_data'] = $this->test_input($_POST['desc-list-data']);\n $input_array['desc_footer_head'] = $this->test_input($_POST['desc-footer-head']);\n $input_array['desc_footer_body'] = $this->test_input($_POST['desc-footer-body']);\n $input_array['info_head'] = $this->test_input($_POST['info-head']);\n $input_array['info_body'] = $this->test_input($_POST['info-body']);\n $input_array['info_list_head'] = $this->test_input($_POST['info-list-head']);\n $input_array['info_list_data'] = $this->test_input($_POST['info-list-data']);\n $input_array['info_footer_head'] = $this->test_input($_POST['info-footer-head']);\n $input_array['info_footer_body'] = $this->test_input($_POST['info-footer-body']);\n $input_array['footer_head'] = $this->test_input($_POST['footer-head']);\n $input_array['footer_body'] = $this->test_input($_POST['footer-body']);\n $input_array['footer_list_head'] = $this->test_input($_POST['footer-list-head']);\n $input_array['footer_list_data'] = $this->test_input($_POST['footer-list-data']);\n $input_array['contact_name'] = $this->test_input($_POST['contact-name']);\n $input_array['contact_title'] = $this->test_input($_POST['contact-title']);\n $input_array['contact_desc'] = $this->test_input($_POST['contact-desc']);\n $input_array['contact_phone'] = $this->test_input($_POST['contact-phone']);\n $input_array['contact_email'] = $this->test_input($_POST['contact-email']);\n\n if(!empty($_FILES[\"usr-file-upload\"][\"name\"]))\n {\n $img_path = $this->fileUpload();\n\n if(!is_array($img_path))\n {\n $input_array['img_path'] = $img_path;\n }\n else\n {\n $this->_errors = $img_path;\n }\n }\n else\n {\n $input_array['img_path'] = $this->test_input($_POST['img-path']);\n }\n $input_array['link'] = $this->test_input($_POST['link']);\n $input_array['link_text'] = $this->test_input($_POST['link-text']);\n }\n\n if(is_array($img_path))\n {\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo '<div class=\"container-fluid\">';\n echo '<div class=\"alert alert-danger\">';\n echo '<strong>Danger!</strong>';\n if(is_array($img_path))\n {\n foreach ($img_path as $error)\n {\n echo '<p>' . $error . '</p>';\n }\n }\n echo '</div>';\n echo '</div>';\n }\n else\n {\n $database = new Database();\n\n if($database->updatePartner($input_array, $this->_params['id']))\n {\n $url = '/Admin/edit-partner/' . $this->_params['id'];\n $this->_f3->reroute($url . '/success');\n }\n else\n {\n $errors = $database->getErrors();\n\n if(!empty($errors))\n {\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo '<div class=\"container-fluid\">';\n echo '<div class=\"alert alert-danger\">';\n echo '<strong>Danger!</strong>';\n foreach($errors as $error)\n {\n echo '<p>' . $error . '</p>';\n }\n echo '</div>';\n echo '</div>';\n }\n }\n }\n }", "protected function _prepareForm()\n {\n $model = $this->_coreRegistry->registry('current_lapisbard_storelocator_locations');\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('item_');\n\n $countries = [['value' => 'UK', 'label' => __('UK')], ['value' => 'India', 'label' => __('India')]];\n $yesno = [['value' => 'Enabled', 'label' => __('Enabled')], ['value' => 'Disabled', 'label' => __('Disabled')]];\n\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Location Information')]);\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', ['name' => 'id']);\n }\n\n $fieldset->addField(\n 'store_title',\n 'text',\n ['name' => 'store_title', 'label' => __('Store Title'), 'title' => __('Store Title'), 'required' => true]\n );\n $fieldset->addField(\n 'address',\n 'text',\n ['name' => 'address', 'label' => __('Address'), 'title' => __('Address'), 'required' => true]\n );\n $fieldset->addField(\n 'city',\n 'text',\n ['name' => 'city', 'label' => __('City'), 'title' => __('City'), 'required' => false]\n );\n $fieldset->addField(\n 'state',\n 'text',\n ['name' => 'state', 'label' => __('State'), 'title' => __('State'), 'required' => true]\n );\n $fieldset->addField(\n 'pincode',\n 'text',\n ['name' => 'pincode', 'label' => __('Pin Code'), 'title' => __('Pin Code'), 'required' => true]\n );\n $fieldset->addField(\n 'country',\n 'select',\n ['name' => 'country', 'label' => __('Country'), 'title' => __('Country'), 'values' => $countries]\n );\n $fieldset->addField(\n 'phone',\n 'text',\n ['name' => 'phone', 'label' => __('Phone Number'), 'title' => __('Phone Number'), 'required' => true]\n );\n $fieldset->addField(\n 'email',\n 'text',\n ['name' => 'email', 'label' => __('Email'), 'title' => __('Email'), 'required' => false]\n );\n $fieldset->addField(\n 'is_enable',\n 'select',\n [\n 'name' => 'is_enable',\n 'label' => __('Status'),\n 'title' => __('Status'),\n 'values' => $yesno\n ]\n );\n $form->setValues($model->getData());\n $this->setForm($form);\n return parent::_prepareForm();\n }", "public function Create($extra_meta=array()) {\n $form_instance = $this->form_instance;\n // Retrieve the form instance\n $action_instance = $this->action_instance;\n // Create a new entry SQL helper\n $entries_sql_helper = new VCFF_Reports_Helper_SQL_Entries();\n // Add the entry\n $entries_sql_helper\n ->Add_Entry(array(\n 'form_uuid' => $form_instance->Get_UUID(),\n 'form_type' => $form_instance->Get_Type(),\n 'event_id' => $action_instance->Get_ID(),\n 'event_code' => $action_instance->Get_Code(),\n 'source_url' => 'http://something',\n ));\n // If extra meta information was supplied\n if ($extra_meta && is_array($extra_meta)) {\n // Loop through each submission meta item\n foreach ($extra_meta as $meta_key => $meta_data) {\n // Add the submission meta item\n $entries_sql_helper\n ->Add_Meta_Item(array(\n 'meta_code' => $meta_data['meta_code'],\n 'meta_value' => $meta_data['meta_value'],\n 'meta_label' => $meta_data['meta_label'],\n ));\n }\n }\n // Return the form fields\n $form_fields = $form_instance->fields;\n // Loop through each form field\n foreach ($form_fields as $machine_code => $field_instance) { \n // Add the entry\n $entries_sql_helper\n ->Add_Field_Item(array(\n 'machine_code' => $machine_code,\n 'field_label' => $field_instance->Get_Label(),\n 'field_value' => $field_instance->Get_Value(),\n 'field_value_html' => $field_instance->Get_HTML_Value(false),\n 'field_value_text' => $field_instance->Get_TEXT_Value(false),\n ));\n }\n // Store and retrieve the stored entry\n $entry = $entries_sql_helper->Store();\n \n $flags_sql_helper = new VCFF_Reports_Helper_SQL_Flags();\n \n $flags_sql_helper\n ->Add_Flag(array(\n 'entry_uuid' => $entry['uuid'],\n 'form_uuid' => $form_instance->Get_UUID(),\n 'flag_code' => 'unread',\n 'flag_data' => array('hey'),\n ))\n ->Store();\n \n return $this;\n }", "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\n\t\t$oMainTab = $this->getTab('main');\n\t\t$oAdditionalTab = $this->getTab('additional');\n\n\t\t$modelName = $this->_object->getModelName();\n\n\t\tswitch ($modelName)\n\t\t{\n\t\t\tcase 'shop_discount':\n\t\t\t\t// Создаем вкладку\n\t\t\t\t$oShopDiscountTabExportImport = Admin_Form_Entity::factory('Tab')\n\t\t\t\t\t->caption(Core::_('Shop_Discount.tab_export'))\n\t\t\t\t\t->name('ExportImport');\n\n\t\t\t\t// Добавляем вкладку\n\t\t\t\t$this\n\t\t\t\t\t->addTabAfter($oShopDiscountTabExportImport, $oMainTab);\n\n\t\t\t\t$oMainTab\n\t\t\t\t\t->add($oMainRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oMainRow2 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oMainRow3 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t//->add($oMainRow4 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oDaysBlock = Admin_Form_Entity::factory('Div')->class('well with-header well-sm'))\n\t\t\t\t\t->add($oSiteuserGroupBlock = Admin_Form_Entity::factory('Div')->class('well with-header well-sm'))\n\t\t\t\t\t->add($oMainRow5 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oMainRow6 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t\t$oShopDiscountTabExportImport\n\t\t\t\t\t->add($oShopDiscountTabExportImportRow1 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t\t//Переносим GUID на \"Экспорт/Импорт\"\n\t\t\t\t$oMainTab->move($this->getField('guid'), $oShopDiscountTabExportImport);\n\n\t\t\t\t$oShopDiscountTabExportImport->move($this->getField('guid'), $oShopDiscountTabExportImportRow1);\n\n\t\t\t\t$this->getField('description')->rows(7)->wysiwyg(Core::moduleIsActive('wysiwyg'));\n\t\t\t\t$oMainTab->move($this->getField('description')->divAttr(array('class' => 'form-group col-xs-12')), $oMainRow2);\n\n\t\t\t\t$sColorValue = ($this->_object->id && $this->getField('color')->value)\n\t\t\t\t? $this->getField('color')->value\n\t\t\t\t: '#aebec4';\n\n\t\t\t\t$this->getField('color')\n\t\t\t\t\t->colorpicker(TRUE)\n\t\t\t\t\t->value($sColorValue);\n\n\t\t\t\t$oMainTab->move($this->getField('start_datetime')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-2')), $oMainRow3);\n\t\t\t\t$oMainTab->move($this->getField('end_datetime')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-2')), $oMainRow3);\n\t\t\t\t$oMainTab->move($this->getField('start_time')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-2')), $oMainRow3);\n\t\t\t\t$oMainTab->move($this->getField('end_time')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-2')), $oMainRow3);\n\t\t\t\t$oMainTab->move($this->getField('color')->set('data-control', 'hue')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3')), $oMainRow3);\n\n\t\t\t\t$oDaysBlock\n\t\t\t\t\t->add(Admin_Form_Entity::factory('Div')\n\t\t\t\t\t\t->class('header bordered-palegreen')\n\t\t\t\t\t\t->value(Core::_(\"Shop_Discount.days\"))\n\t\t\t\t\t)\n\t\t\t\t\t->add($oDaysBlockRow1 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t\t$oMainTab->move($this->getField('day1')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-2')), $oDaysBlockRow1);\n\t\t\t\t$oMainTab->move($this->getField('day2')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-2')), $oDaysBlockRow1);\n\t\t\t\t$oMainTab->move($this->getField('day3')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-2')), $oDaysBlockRow1);\n\t\t\t\t$oMainTab->move($this->getField('day4')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-2')), $oDaysBlockRow1);\n\t\t\t\t$oMainTab->move($this->getField('day5')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-3')), $oDaysBlockRow1);\n\t\t\t\t$oMainTab->move($this->getField('day6')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-2'))->class('colored-danger'), $oDaysBlockRow1);\n\t\t\t\t$oMainTab->move($this->getField('day7')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-2'))->class('colored-danger'), $oDaysBlockRow1);\n\n\t\t\t\t// Группа доступа\n\t\t\t\t$aSiteuser_Groups = array(0 => Core::_('Shop_Discount.all'));\n\n\t\t\t\tif (Core::moduleIsActive('siteuser'))\n\t\t\t\t{\n\t\t\t\t\t$oSiteuser_Controller_Edit = new Siteuser_Controller_Edit($this->_Admin_Form_Action);\n\t\t\t\t\t$aSiteuser_Groups = $aSiteuser_Groups + $oSiteuser_Controller_Edit->fillSiteuserGroups($this->_object->Shop->site_id);\n\t\t\t\t}\n\n\t\t\t\t$oSiteuserGroupBlock\n\t\t\t\t\t->add(Admin_Form_Entity::factory('Div')\n\t\t\t\t\t\t->class('header bordered-azure')\n\t\t\t\t\t\t->value(Core::_(\"Shop_Discount.siteuser_groups\"))\n\t\t\t\t\t)\n\t\t\t\t\t->add($oSiteuserGroupBlockRow1 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t\t$aTmp = array();\n\n\t\t\t\t$aShop_Discount_Siteuser_Groups = $this->_object->Shop_Discount_Siteuser_Groups->findAll(FALSE);\n\t\t\t\tforeach ($aShop_Discount_Siteuser_Groups as $oShop_Discount_Siteuser_Group)\n\t\t\t\t{\n\t\t\t\t\t!in_array($oShop_Discount_Siteuser_Group->siteuser_group_id, $aTmp)\n\t\t\t\t\t\t&& $aTmp[] = $oShop_Discount_Siteuser_Group->siteuser_group_id;\n\t\t\t\t}\n\n\t\t\t\tforeach ($aSiteuser_Groups as $siteuser_group_id => $name)\n\t\t\t\t{\n\t\t\t\t\t$oSiteuserGroupBlockRow1->add($oCheckbox = Admin_Form_Entity::factory('Checkbox')\n\t\t\t\t\t\t->divAttr(array('class' => 'form-group col-xs-12 col-md-4'))\n\t\t\t\t\t\t->name('siteuser_group_' . $siteuser_group_id)\n\t\t\t\t\t\t->caption(htmlspecialchars($name))\n\t\t\t\t\t);\n\n\t\t\t\t\t(!$this->_object->id || in_array($siteuser_group_id, $aTmp))\n\t\t\t\t\t\t&& $oCheckbox->checked('checked');\n\t\t\t\t}\n\n\t\t\t\t$oMainTab\n\t\t\t\t\t->move($this->getField('active')->divAttr(array('class' => 'form-group col-xs-12 col-sm-4 margin-top-21')), $oMainRow5)\n\t\t\t\t\t->move($this->getField('not_apply_purchase_discount')->divAttr(array('class' => 'form-group col-xs-12 col-sm-4 margin-top-21'))->class('colored-danger times'), $oMainRow5)\n\t\t\t\t\t->move($this->getField('public')->divAttr(array('class' => 'form-group col-xs-12 col-sm-4 margin-top-21')), $oMainRow5);\n\n\t\t\t\t$oMainTab\n\t\t\t\t\t->move($this->getField('url')->divAttr(array('class' => 'form-group col-xs-12 col-sm-8'))->placeholder('https://'), $oMainRow6)\n\t\t\t\t\t->move($this->getField('sorting')->divAttr(array('class' => 'form-group col-xs-12 col-sm-4 col-md-3 col-lg-2')), $oMainRow6);\n\n\t\t\t\t$oMainTab\n\t\t\t\t\t->delete($this->getField('value'))\n\t\t\t\t\t->delete($this->getField('type'));\n\n\t\t\t\t// Удаляем группу\n\t\t\t\t$oAdditionalTab->delete($this->getField('shop_discount_dir_id'));\n\n\t\t\t\t$oGroupSelect = Admin_Form_Entity::factory('Select');\n\n\t\t\t\t$oGroupSelect\n\t\t\t\t\t->caption(Core::_('Shop_Discount.shop_discount_dir_id'))\n\t\t\t\t\t->options(array(' … ') + self::fillShopDiscountDir($this->_object->shop_id))\n\t\t\t\t\t->name('shop_discount_dir_id')\n\t\t\t\t\t->value($this->_object->shop_discount_dir_id)\n\t\t\t\t\t->divAttr(array('class' => 'form-group col-xs-12 col-lg-4'));\n\n\t\t\t\t$oMainRow1->add($oGroupSelect);\n\n\t\t\t\t$oMainRow1->add(Admin_Form_Entity::factory('Div')\n\t\t\t\t\t->class('col-xs-12 col-sm-4 col-md-3 col-lg-2 form-group input-group select-group')\n\t\t\t\t\t->add(Admin_Form_Entity::factory('Code')\n\t\t\t\t\t\t->html('<div class=\"caption\">' . Core::_('Shop_Discount.value') . '</div>')\n\t\t\t\t\t)\n\t\t\t\t\t->add(Admin_Form_Entity::factory('Input')\n\t\t\t\t\t\t->name('value')\n\t\t\t\t\t\t->value($this->_object->value)\n\t\t\t\t\t\t->divAttr(array('class' => ''))\n\t\t\t\t\t\t->class('form-control semi-bold')\n\t\t\t\t\t\t->add(Core_Html_Entity::factory('Select')\n\t\t\t\t\t\t\t->name('type')\n\t\t\t\t\t\t\t->options(array(\n\t\t\t\t\t\t\t\t'%',\n\t\t\t\t\t\t\t\t$this->_object->Shop->Shop_Currency->sign\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t->value($this->_object->type)\n\t\t\t\t\t\t\t->class('form-control input-group-addon')\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$oMainTab->move($this->getField('coupon')\n\t\t\t\t\t->divAttr(array('class' => 'form-group margin-top-21 col-xs-12 col-sm-6 col-md-4 col-lg-3'))->onclick(\"$.toggleCoupon(this)\"), $oMainRow1);\n\n\t\t\t\t$hidden = !$this->_object->coupon\n\t\t\t\t\t? ' hidden'\n\t\t\t\t\t: '';\n\n\t\t\t\t$oMainTab->move($this->getField('coupon_text')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-3 col-lg-3' . $hidden)), $oMainRow1);\n\n\t\t\t\t$title = $this->_object->id\n\t\t\t\t\t? Core::_('Shop_Discount.item_discount_edit_form_title', $this->_object->name, FALSE)\n\t\t\t\t\t: Core::_('Shop_Discount.item_discount_add_form_title');\n\t\t\tbreak;\n\t\t\tcase 'shop_discount_dir':\n\t\t\t\t$oMainTab\n\t\t\t\t\t->add($oMainRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oMainRow2 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oMainRow3 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t\t$this->getField('description')->rows(9)->wysiwyg(Core::moduleIsActive('wysiwyg'));\n\t\t\t\t$oMainTab->move($this->getField('description')->divAttr(array('class' => 'form-group col-xs-12')), $oMainRow2);\n\n\t\t\t\t// Удаляем группу\n\t\t\t\t$oAdditionalTab->delete($this->getField('parent_id'));\n\n\t\t\t\t$oGroupSelect = Admin_Form_Entity::factory('Select');\n\n\t\t\t\t$oGroupSelect\n\t\t\t\t\t->caption(Core::_('Shop_Discount_Dir.parent_id'))\n\t\t\t\t\t->options(array(' … ') + self::fillShopDiscountDir($this->_object->shop_id, 0, array($this->_object->id)))\n\t\t\t\t\t->name('parent_id')\n\t\t\t\t\t->value($this->_object->parent_id)\n\t\t\t\t\t->divAttr(array('class' => 'form-group col-xs-12 col-md-6'));\n\n\t\t\t\t$oMainRow3->add($oGroupSelect);\n\n\t\t\t\t$oMainTab->move($this->getField('sorting')->divAttr(array('class' => 'form-group col-xs-12 col-sm-3')), $oMainRow3);\n\n\t\t\t\t$title = $this->_object->id\n\t\t\t\t\t? Core::_('Shop_Discount_Dir.edit_title', $this->_object->name, FALSE)\n\t\t\t\t\t: Core::_('Shop_Discount_Dir.add_title');\n\t\t\tbreak;\n\t\t}\n\n\t\t$this->title($title);\n\n\t\treturn $this;\n\t}", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "function ting_extended_search_settings_fields_form($form, &$form_state) {\n $form = array(\n '#tree' => TRUE,\n );\n\n $form['fields'] = array(\n '#prefix' => '<div id=\"ting-ext-search-wrapper\">',\n '#suffix' => '</div>',\n '#type' => 'fieldset',\n '#title' => t('Fields'),\n '#theme' => 'ting_ext_search_fields_table',\n '#header' => array(\n t('Title'),\n '',\n t('Placeholder'),\n t('Well index'),\n t('Type'),\n '', // Keep it for value\n ),\n );\n\n $fields = variable_get('ting_ext_search_fields_settings', array());\n $form_state['fields'] = $fields;\n if (!isset($form_state['fields_count'])) {\n $form_state['fields_count'] = empty($fields) ? 1 : count($fields);\n }\n $fields_count = $form_state['fields_count'];\n $field_types = array(\n 'textfield' => t('Textfield'),\n 'select' => t('Dropdown'),\n 'checkboxes' => t('Checkboxes'),\n 'radios' => t('Radios'),\n );\n\n $value_types = array(\n 'ting_well_types' => t('Well types'),\n 'ting_well_sources' => t('Well sources'),\n 'pickup_branches' => t('Pickup branches'),\n 'custom_list' => t('Custom list'),\n );\n\n for ($i = 0; $i < $fields_count; $i++) {\n $form['fields'][$i]['title'] = array(\n '#type' => 'textfield',\n '#default_value' => isset($fields[$i]['title']) ? $fields[$i]['title'] : '',\n );\n\n $form['fields'][$i]['machine_name'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($fields[$i]['machine_name']) ? $fields[$i]['machine_name'] : '',\n '#machine_name' => array(\n 'source' => array('fields', $i, 'title'),\n 'exists' => '_ting_extended_search_field_exists',\n ),\n '#disabled' => isset($fields[$i]['machine_name']),\n );\n\n $form['fields'][$i]['placeholder'] = array(\n '#type' => 'textfield',\n '#default_value' => isset($fields[$i]['placeholder']) ? $fields[$i]['placeholder'] : '',\n );\n\n $form['fields'][$i]['index'] = array(\n '#type' => 'textfield',\n '#default_value' => isset($fields[$i]['index']) ? $fields[$i]['index'] : '',\n );\n\n $form['fields'][$i]['type'] = array(\n '#type' => 'select',\n '#options' => $field_types,\n '#default_value' => isset($fields[$i]['type']) ? $fields[$i]['type'] : 'textfield',\n );\n $form['fields'][$i]['values']['type'] = array(\n '#type' => 'select',\n '#options' => $value_types,\n '#default_value' => isset($fields[$i]['values']['type']) ? $fields[$i]['values']['type'] : 'ting_well_types',\n '#states' => array(\n 'invisible' => array(\n ':input[name=\"fields[' . $i . '][type]\"]' => array(\n 'value' => 'textfield'\n ),\n ),\n ),\n );\n $value = '';\n if (isset($fields[$i]['values']['list']) && !empty($fields[$i]['values']['list']) && is_array($fields[$i]['values']['list'])) {\n $list = $fields[$i]['values']['list'];\n array_walk($list, function(&$i, $k) {\n $i = \"{$k}|{$i}\";\n });\n $value = implode(\"\\r\\n\", $list);\n }\n $form['fields'][$i]['values']['list'] = array(\n '#type' => 'textarea',\n '#rows' => 8,\n '#cols' => 5,\n '#default_value' => $value,\n '#states' => array(\n 'visible' => array(\n ':input[name=\"fields[' . $i . '][values][type]\"]' => array('value' => 'custom_list'),\n ),\n ),\n );\n }\n\n $form['fields']['more'] = array(\n '#type' => 'submit',\n '#value' => t('Add another one'),\n '#submit' => array('ting_ext_search_more_submit'),\n '#limit_validation_errors' => array(),\n '#ajax' => array(\n 'callback' => 'ting_ext_search_callback',\n 'wrapper' => 'ting-ext-search-wrapper',\n ),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n return $form;\n}", "function form_init_data()\r\n {\r\n // Initialize the form fields\r\n\r\n $this->set_hidden_element_value(\"_action\", FT_ACTION_ADD) ;\r\n\r\n $this->set_element_value(\"Meet Start\", array(\"year\" => date(\"Y\"),\r\n \"month\" => date(\"m\"), \"day\" => date(\"d\"))) ;\r\n $this->set_element_value(\"Meet End\", array(\"year\" => date(\"Y\"),\r\n \"month\" => date(\"m\"), \"day\" => date(\"d\"))) ;\r\n\r\n // If the config is set to US only, initialize the country\r\n\r\n if (FT_US_ONLY)\r\n $this->set_element_value(\"Meet Country\",\r\n FT_SDIF_COUNTRY_CODE_UNITED_STATES_OF_AMERICA_VALUE) ;\r\n\r\n $this->set_element_value(\"Pool Altitude\", \"0\") ;\r\n }", "public function generate_fields( $post ) {\n\t\t$output = '';\n\t\tforeach ( $this->fields as $field ) {\n\t\t\t$label = '<label for=\"' . $field['id'] . '\">' . $field['label'] . '</label>';\n\t\t\t$db_value = get_post_meta( $post->ID, 'scheduled_course_settings_' . $field['id'], true );\n\t\t\tswitch ( $field['type'] ) {\n\t\t\t\tcase 'textarea':\n\t\t\t\t\t$input = sprintf(\n\t\t\t\t\t\t'<textarea class=\"large-text\" id=\"%s\" name=\"%s\" rows=\"5\">%s</textarea>',\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$db_value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$input = sprintf(\n\t\t\t\t\t\t'<input %s id=\"%s\" name=\"%s\" type=\"%s\" value=\"%s\">',\n\t\t\t\t\t\t$field['type'] !== 'color' ? 'class=\"regular-text\"' : '',\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\t$db_value\n\t\t\t\t\t);\n\t\t\t}\n\t\t\t$output .= $this->row_format( $label, $input );\n\t\t}\n\t\techo '<table class=\"form-table\"><tbody>' . $output . '</tbody></table>';\n\t}", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'add_form',\n 'action' => $this->getUrl('*/faq/save', array(\n 'ret' => Mage::registry('ret'),\n 'id' => $this->getRequest()->getParam('id')\n )\n ),\n 'method' => 'post'\n ));\n\n $fieldset = $form->addFieldset('faq_new_question', array(\n 'legend' => $this->__('New Question'),\n 'class' => 'fieldset-wide'\n ));\n\n $fieldset->addField('new_question', 'text', array(\n 'label' => Mage::helper('inchoo_faq')->__('New Question'),\n 'required' => true,\n 'name' => 'question'\n ));\n\n $fieldset->addField('new_answer', 'textarea', array(\n 'label' => Mage::helper('inchoo_faq')->__('Answer'),\n 'required' => false,\n 'name' => 'answer',\n 'style' => 'height:12em;',\n ));\n\n $form->setUseContainer(true);\n// $form->setValues();\n $this->setForm($form);\n\n// echo \"_prepareForm()\";\n\n return parent::_prepareForm();\n\n\n }", "public function updateSortingFormFields()\n {\n global $rlDb;\n\n if (!$GLOBALS['config']['cache']) {\n return false;\n }\n\n $this->removeFiles('cache_sorting_forms_fields');\n\n $rlDb->setTable('categories');\n\n if ($categories = $rlDb->fetch(array('ID', 'Key'))) {\n foreach ($categories as $value) {\n $category_id = (int) $value['ID'];\n\n $sql = \"SELECT `T2`.`Key`, `T2`.`Type`, `T2`.`Default`, `T2`.`Condition`, `T2`.`Details_page`, \";\n $sql .= \"`T2`.`Multilingual`, `T2`.`Opt1`, `T2`.`Opt2`, `T2`.`Contact` \";\n $sql .= \"FROM `{db_prefix}sorting_forms` AS `T1` \";\n $sql .= \"LEFT JOIN `{db_prefix}listing_fields` AS `T2` ON `T1`.`Field_ID` = `T2`.`ID` \";\n $sql .= \"WHERE `T1`.`Category_ID` = {$category_id} ORDER BY `T1`.`Position`\";\n\n if ($fields = $rlDb->getAll($sql, 'Key')) {\n $out[$category_id] = $fields;\n }\n }\n\n $this->set('cache_sorting_forms_fields', $out);\n }\n }", "public function addMetaFieldsToEditForm()\n\t{\n\t\t$interval = $this->getMetaFields('interval');\n\t\t$animation = $this->getMetaFields('animation');\n\n\t\t?>\n\t\t\t<tr class=\"form-field\">\n\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t<label for=\"interval\">Tijd tussen slides</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<input name=\"interval\" id=\"interval\" type=\"text\" value=\"<?php echo $interval;?>\" size=\"40\">\n\t\t\t\t\t<p class=\"description\">De tijd tussen slides in milliseconden (1000ms = 1s).</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr class=\"form-field\">\n\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t<label for=\"animation\">Animatie</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<select name=\"animation\" id=\"animation\">\n\t\t\t\t\t\t<option <?php selected($animation, 'slide'); ?> value=\"slide\">Slide</option>\n\t\t\t\t\t\t<option <?php selected($animation, 'fade'); ?> value=\"fade\">Fade</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<p class=\"description\">Selecteer de animatie die gebruikt wordt door de slideshow.</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php\n\t}", "function create_add_form($fields, $meta, $post, $context = '' ){\r\n\t\t$nonce = wp_create_nonce( 'wck-add-meta' );\r\n\t\tif( !empty( $post->ID ) )\r\n\t\t\t$post_id = $post->ID;\r\n\t\telse\r\n\t\t\t$post_id = '';\r\n\r\n /* for single forms we need the values that are stored in the meta */\r\n if( $this->args['single'] == true ) {\r\n if ($this->args['context'] == 'post_meta')\r\n $results = get_post_meta($post_id, $meta, true);\r\n else if ($this->args['context'] == 'option')\r\n $results = get_option( apply_filters( 'wck_option_meta' , $meta ));\r\n\r\n /* Filter primary used for CFC/OPC fields in order to show/hide fields based on type */\r\n $wck_update_container_css_class = apply_filters(\"wck_add_form_class_{$meta}\", '', $meta, $results );\r\n }\r\n ?>\r\n\t\t<div id=\"<?php echo $meta ?>\" style=\"padding:10px 0;\" class=\"wck-add-form<?php if( $this->args['single'] ) echo ' single' ?> <?php if( !empty( $wck_update_container_css_class ) ) echo $wck_update_container_css_class; ?>\">\r\n\t\t\t<ul class=\"mb-list-entry-fields\">\r\n\t\t\t\t<?php\r\n\t\t\t\t$element_id = 0;\r\n\t\t\t\tif( !empty( $fields ) ){\r\n\t\t\t\t\tforeach( $fields as $details ){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdo_action( \"wck_before_add_form_{$meta}_element_{$element_id}\" );\r\n\r\n /* set values in the case of single forms */\r\n $value = '';\r\n if( $this->args['single'] == true ) {\r\n $value = null;\r\n if (isset($results[0][Wordpress_Creation_Kit_PB::wck_generate_slug($details['title'], $details )]))\r\n $value = $results[0][Wordpress_Creation_Kit_PB::wck_generate_slug($details['title'], $details )];\r\n }\r\n ?>\r\n\t\t\t\t\t\t\t<li class=\"row-<?php echo esc_attr( Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ) ) ?>\">\r\n <?php echo self::wck_output_form_field( $meta, $details, $value, $context, $post_id ); ?>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdo_action( \"wck_after_add_form_{$meta}_element_{$element_id}\" );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$element_id++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t?>\r\n <?php if( ! $this->args['single'] || $this->args['context'] == 'option' ){ ?>\r\n <li style=\"overflow:visible;\" class=\"add-entry-button\">\r\n <a href=\"javascript:void(0)\" class=\"button-primary\" onclick=\"addMeta('<?php echo esc_js($meta); ?>', '<?php echo esc_js( $post_id ); ?>', '<?php echo esc_js($nonce); ?>')\"><span><?php if( $this->args['single'] ) echo apply_filters( 'wck_add_entry_button', __( 'Save', 'profile-builder' ), $meta, $post ); else echo apply_filters( 'wck_add_entry_button', __( 'Add Entry', 'wck' ), $meta, $post ); ?></span></a>\r\n </li>\r\n <?php }elseif($this->args['single'] && $this->args['context'] == 'post_meta' ){ ?>\r\n <input type=\"hidden\" name=\"_wckmetaname_<?php echo $meta ?>#wck\" value=\"true\">\r\n <?php } ?>\r\n </ul>\r\n\t\t</div>\r\n\t\t<script>wck_set_to_widest( '.field-label', '<?php echo $meta ?>' );</script>\r\n\t\t<?php\r\n\t}", "public function createComponentEditForm(){\n $frm = $this->formFactory->create();\n $listingID = $this->hlp->sess(\"listing\")->listingID;\n \n //query database for listing type\n $FE = $this->listings->isFE($listingID);\n $MS = $this->listings->isMultisig($listingID);\n \n //checkbox value rendering logic\n $checkVal = array();\n \n if ($MS){\n $checkVal[\"ms\"] = \"ms\";\n }\n \n if ($FE){\n $checkVal[\"fe\"] = \"fe\";\n }\n \n $this->lHelp->constructCheckboxList($frm)->setValue($checkVal);\n \n //discard option array\n unset($checkVal);\n\n $cnt = count ($this->postageOptions); \n $session = $this->hlp->sess(\"postage\");\n\n \n for ($i = 0; $i<$cnt; $i++){\n\n $frm->addText(\"postage\" . $i, \"Doprava\");\n $frm->addText(\"pprice\" . $i, \"Cena dopravy\");\n\n }\n \n //additional postage textboxes logic\n $counter = $session->counterEdit;\n $values = $session->values;\n \n if (!is_null($counter)){\n \n $frm->addGroup(\"Postage\");\n \n for ($i =0; $i<$counter; $i++){\n $frm->addText(\"postage\" .$i. \"X\", \"Doprava\"); \n $frm->addText(\"pprice\" .$i. \"X\", \"Cena\");\n }\n }\n \n $frm->addSubmit(\"submit\", \"Upravit\");\n $frm->addSubmit(\"add_postage\", \"Přidat dopravu\")->onClick[] = \n \n function() use($listingID) {\n \n //inline onlclick handler, that counts postage options\n $session = $this->hlp->sess(\"postage\");\n $counter = &$session->counterEdit;\n \n if ($counter <= self::MAX_POSTAGE_OPTIONS){\n $counter++;\n } else {\n $this->flashMessage(\"Dosáhli jste maxima poštovních možností.\");\n }\n \n $form = $this->getComponent(\"editForm\");\n $session->values = $form->getValues(TRUE);\n \n $this->redirect(\"Listings:editListing\", $listingID);\n };\n \n $this->lHelp->fillForm($frm, $values); \n $frm->onSuccess[] = array($this, 'editSuccess');\n $frm->onValidate[] = array($this, 'editValidate');\n \n return $frm; \n }", "function imbaf_properties_create_add_fields(){\n ?>\n <div class=\"form-field\">\n <label for=\"term_meta[imbaf_property_type]\">Typ</label>\n\n <select name=\"term_meta[imbaf_property_type]\">\n\n <?php\n\n foreach($this -> property_types as $property){\n\n ?> <option style=\"width:100%;\" value=\"<?php echo $property['value']; ?>\"><?php echo $property['label']; ?></option> <?php\n\n }\n\n\n ?>\n </select>\n\n <p class=\"description\"><?php _e('Vergleichswert-Typ','imb_affiliate'); ?></p>\n\n\n\n <label for=\"term_meta[imbaf_property_icon]\">Icon</label>\n <input type=\"text\" name=\"term_meta[imbaf_property_icon]\">\n\n <p class=\"description\"><?php _e('Font Awesome Icon','imb_affiliate'); ?></p>\n\n\n <label for=\"term_meta[imbaf_property_prefix]\"><?php _e('Präfix','imb_affiliate'); ?></label>\n <input type=\"text\" name=\"term_meta[imbaf_property_prefix]\">\n\n <p class=\"description\"><?php _e('Vorgestellter Wert (ca.)','imb_affiliate'); ?></p>\n\n <label for=\"term_meta[imbaf_property_suffix]\"><?php _e('Suffix','imb_affiliate'); ?></label>\n <input type=\"text\" name=\"term_meta[imbaf_property_suffix]\">\n <p class=\"description\"><?php _e('Nachgestellter Wert (z.B. kg, MhZ etc.)','imb_affiliate'); ?></p>\n\n\n\n </div>\n <?php\n\n\n }", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "public function build_factory_widget($_fkey, $_ftype = \"text\", $_ptype = \"wccpf\", $_post = null) {\r\n \t$this->fields_values = null;\r\n \t$fields_meta = wcff()->dao->get_fields_meta();\r\n \t$common_meta = apply_filters(\"before_render_common_meta\", wcff()->dao->get_fields_common_meta(), $_ptype, $_ftype );\r\n \t$wccaf_common_meta = apply_filters(\"before_render_admin_common_meta\", wcff()->dao->get_admin_fields_comman_meta(), $_ptype, $_ftype );\r\n \t/* Load the options */\r\n \t$this->wccpf_options = wcff()->option->get_options();\r\n \t$this->is_multilingual = isset($this->wccpf_options[\"enable_multilingual\"]) ? $this->wccpf_options[\"enable_multilingual\"] : \"no\";\r\n \t$this->supported_locale = isset($this->wccpf_options[\"supported_lang\"]) ? $this->wccpf_options[\"supported_lang\"] : array();\r\n \t\r\n \tif ($_fkey && $_post) {\r\n \t $this->fields_values = wcff()->dao->load_field($_post, $_fkey); \r\n \t\t\r\n \t}\r\n \t\r\n \t/* Lets begin */\r\n \tif (isset($fields_meta[$_ftype])) {\r\n \t\t$html = '';\r\n \t\t$fields_meta[$_ftype] = apply_filters( \"before_render_field_meta\", $fields_meta[$_ftype], $_ptype, $_ftype, $_post, $_fkey ); \t\t\r\n \t\t/* Make sure whether this field is supported for the given Post Type */\r\n \t\tif (in_array($_ptype, $fields_meta[$_ftype][\"support\"])) {\r\n \t\t\tif (isset($fields_meta[$_ftype][\"document\"]) && ! empty($fields_meta[$_ftype][\"document\"])) {\r\n \t\t\t\t/* Insert a config row for Documentation Link */\r\n \t\t\t\t$html .= '<tr>';\r\n \t\t\t\t/* Left container TD starts here */\r\n \t\t\t\t$html .= '<td class=\"summary\">';\r\n \t\t\t\t$html .= '<label>Documentation</label>';\r\n \t\t\t\t$html .= '<p class=\"description\">Reference documentation for ' . $fields_meta[$_ftype][\"title\"] . '</p>';\r\n \t\t\t\t$html .= '</td>';\r\n \t\t\t\t/* Left container TD ends here */\r\n \t\t\t\t/* Right container TD starts here */\r\n \t\t\t\t$html .= '<td>';\r\n \t\t\t\t$html .= '<a href=\"' . $fields_meta[$_ftype][\"document\"] . '\" target=\"_blank\" title=\"Click here for documentation\">How to use this.?</a>';\r\n \t\t\t\t$html .= '<a href=\"#\" class=\"wcff-field-update-btn button button-primary button-large\">Update Field</a>';\r\n \t\t\t\t$html .= '</td>';\r\n \t\t\t\t/* Right container TD ends here */\r\n \t\t\t\t$html .= '<tr>';\r\n \t\t\t}\r\n \t\t\t/* Field's specific metas */\r\n \t\t\t$html .= $this->factory_meta_loop($fields_meta[$_ftype][\"meta\"], $_ftype, $_ptype);\r\n \t\t\t/* Include common meta */\r\n \t\t\t$html .= $this->factory_meta_loop($common_meta, $_ftype, $_ptype);\r\n \t\t\t/* Include common meta specif to Admin Field */\r\n \t\t\tif ($_ptype == \"wccaf\") {\r\n \t\t\t\t$html .= $this->factory_meta_loop($wccaf_common_meta, $_ftype, $_ptype);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\t/* Now we have the complete set of HTML elements generated for Fields Meta\r\n \t\t\t * Let's wrap it with config container along with other configurations */\r\n \t\t\t\r\n \t\t\t$pricing_config_tab = \"\";\r\n \t\t\t$fields_rule_config_tab = \"\";\r\n \t\t\t$color_to_image_config_tab = \"\";\r\n \t\t\t$meta_config_tab = $this->get_config_field_meta_tab($html);\r\n \t\t\t\r\n \t\t\tif ($_ftype != \"email\" && $_ftype != \"label\" && $_ftype != \"hidden\" && $_ftype != \"file\") {\r\n \t\t\t\t$pricing_config_tab = $this->get_config_pricing_rules_tab();\r\n \t\t\t\t$fields_rule_config_tab = $this->get_config_field_rules_tab();\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif ($_ftype == \"colorpicker\") {\r\n \t\t\t\t$color_to_image_config_tab = $this->get_config_image_for_color_tab();\r\n \t\t\t}\r\n \t\t\t \t\t\t\r\n \t\t\t$config_widget = $this->get_config_tab_container(\r\n \t\t\t\t$_ptype, \r\n \t\t\t\t$_ftype, \r\n \t\t\t\t$meta_config_tab, \r\n \t\t\t\t$pricing_config_tab, \r\n \t\t\t\t$fields_rule_config_tab, \r\n \t\t\t\t$color_to_image_config_tab\r\n \t\t\t); \r\n \t\t\t\r\n \t\t\t/* Fill the field values - if it is a newly created one */\r\n \t\t\tif (!$this->fields_values) {\r\n \t\t\t\t$this->fields_values = array (\r\n \t\t\t\t\t\"id\" => $_fkey,\r\n \t\t\t\t\t\"key\" => ($_ptype .\"_\". $_fkey),\r\n \t\t\t\t\t\"type\" => $_ftype\r\n \t\t\t\t);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\treturn array (\r\n \t\t\t\t\"id\" => $_fkey,\r\n \t\t\t \"key\" => ($_ptype .\"_\". $_fkey),\r\n \t\t\t\t\"meta\" => $this->fields_values,\r\n \t\t\t\t\"widget\" => $config_widget\r\n \t\t\t);\r\n \t\t}\r\n \t}\r\n \treturn false;\r\n }", "function top10_save_postdata( $post_id ) {\r\n\t//add the top 10 length. this variable drives how many entries we have to\r\n\t//submit overall.\r\n \tif(add_post_meta($post_id, 'top10_length', $_POST['top10_length'], true))\r\n\t\t{}\r\n\telse\r\n\t\t{update_post_meta($post_id, 'top10_length', $_POST['top10_length']);}\r\n\t\r\n\t//NOW LET's submit all the other fields. \r\n\t$iteratormax\t=\t $_POST['top10_length'];\r\n\tfor($x=1;$x<=$iteratormax;$x++)\r\n\t\t{\r\n\t\ttop_cycle_savedata($post_id, $x);\r\n\t\t}\r\n}", "public function generate_fields( $post ) {\n\t\t$output = '';\n\t\tforeach ( $this->fields as $field ) {\n\t\t\t$label = '<label for=\"' . $field['id'] . '\">' . $field['label'] . '</label>';\n\t\t\t$db_value = get_post_meta( $post->ID, 'event_settings_' . $field['id'], true );\n\t\t\tswitch ( $field['type'] ) {\n\t\t\t\tdefault:\n\t\t\t\t\t$input = sprintf(\n\t\t\t\t\t\t'<input %s id=\"%s\" name=\"%s\" type=\"%s\" value=\"%s\">',\n\t\t\t\t\t\t$field['type'] !== 'color' ? 'class=\"regular-text\"' : '',\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\t$db_value\n\t\t\t\t\t);\n\t\t\t}\n\t\t\t$output .= $this->row_format( $label, $input );\n\t\t}\n\t\techo '<table class=\"form-table\"><tbody>' . $output . '</tbody></table>';\n\t}", "function page_form( $dbh, $parameters = array( 'select_1' => NULL, 'select_2' => NULL, 'date_1' => NULL, 'date_2' => NULL ) ) {\n\techo '<form action=\"/prosody-archive/index.php\" method=\"post\"><fieldset style=\"border-radius: 5px;\">';\n\techo '<div style=\"float: left;\"><fieldset style=\"display: inline-block; border-radius: 5px;\"><legend>Participant(s):</legend>';\n\tintranet::form_staff( $dbh, 1, $parameters[ 'select_1' ] );\n\techo '<br />';\n\tintranet::form_staff( $dbh, 2, $parameters[ 'select_2' ] );\n\techo '</fieldset></div>';\n\techo '<div style=\"float: left;\"><fieldset style=\"display: inline-block; border-radius: 5px;\"><legend>Date Range:</legend>';\n\techo '<label for=\"date_1\" style=\"display: inline-block; width: 35px;\">Start: </label><input type=\"text\" class=\"datepicker\" name=\"date_1\" value=\"' . $parameters[ 'date_1' ] . '\" /> <font size=\"2\">Use mm/dd/yyyy</font>';\n\techo '<br />';\n\techo '<label for=\"date_2\" style=\"display: inline-block; width: 35px;\">End: </label><input type=\"text\" class=\"datepicker\" name=\"date_2\" value=\"' . $parameters[ 'date_2' ] . '\" /> <font size=\"2\">Use mm/dd/yyyy</font>';\n\techo '</fieldset></div>';\n\techo '</fieldset><input type=\"submit\" name=\"submit\" value=\"Search\" /></form>';\n}", "function form( $instance ) {\n\n \t$title = esc_attr($instance['title']);\n \t$display_image = esc_attr($instance['display_image']);\n \t$num_articles = esc_attr($instance['num_articles']);\n\n \t$options = get_option('pgnyt_articles');\n \t$pgnyt_results = $options['pgnyt_results'];\n\n \trequire ('inc/widget-fields.php');\n\n }" ]
[ "0.67327946", "0.6462871", "0.6323132", "0.6285885", "0.6225058", "0.6200007", "0.61422086", "0.6124241", "0.6105355", "0.6102163", "0.60642016", "0.601904", "0.60102123", "0.6002541", "0.5996481", "0.5965601", "0.59261006", "0.5888916", "0.5880237", "0.58703357", "0.5869075", "0.58657825", "0.58376735", "0.58354807", "0.5833762", "0.5825517", "0.5812719", "0.58091295", "0.58083653", "0.58064127", "0.58054566", "0.5799463", "0.57940716", "0.578498", "0.5774908", "0.5770682", "0.5770609", "0.57701296", "0.57577884", "0.57564586", "0.5753037", "0.5752551", "0.5744875", "0.5738628", "0.57359576", "0.57289785", "0.5712069", "0.5703594", "0.57033795", "0.5700061", "0.56995386", "0.5699109", "0.5698866", "0.56956387", "0.5695353", "0.56864166", "0.5685663", "0.5682203", "0.5673076", "0.5669999", "0.56671286", "0.56656355", "0.56612796", "0.5657198", "0.56522816", "0.56509876", "0.5647468", "0.5646119", "0.5645982", "0.56456363", "0.56395125", "0.563838", "0.563612", "0.56327844", "0.5631474", "0.56253684", "0.5621747", "0.56187993", "0.5617811", "0.56161505", "0.56143063", "0.56110543", "0.5609714", "0.5599654", "0.55959934", "0.55921155", "0.55904794", "0.5590438", "0.5582443", "0.55809987", "0.55793184", "0.55792713", "0.55745405", "0.5573327", "0.5571771", "0.5568844", "0.5567638", "0.556202", "0.5556584", "0.55479795" ]
0.64163613
2
Processes submits of the metadata entry form.
public function sendMetadataForm($data, $form) { // Specify array for the params to send to the API. Can't be associative and keyed by the xmlname // as the Dublin core specification allows for multiple of the same field. $apiParams = array(); // Loop through the defined fields grabbing the POSTed data for it, or if a placeholder // then just adding it and the specified value to the apiParams. foreach($this->Fields()->sort('SortOrder', 'asc') as $field) { // Like when the fields are looped through to create the form, str_replace the label to create the fieldname. $fieldName = str_replace(' ', '_', $field->Label); // If the field type is not a placeholder then get the data POSTed for it. if ($field->FieldType != 'PLACEHOLDER') { if (isset($data[$fieldName])) { // Check if the field is a dropdown and the 'other' option has been checked for it // if so then if the value selected is 'other' we need to grab the value out of the _other // field for it and pop that in the API params instead of the value selected in the dropdown. if ($field->DropdownOtherOption && $data[$fieldName] == 'other') { if (isset($data["${fieldName}_other"])) { $apiParams[] = array('xmlname' => $field->DublinCoreFieldType()->XmlName, 'value' => trim($data["${fieldName}_other"])); } else { $apiParams[] = array('xmlname' => $field->DublinCoreFieldType()->XmlName, 'value' => trim($data[$fieldName])); } } else { // Check if the field is a Keywords field. If so we need to append the string "Keywords: " // along with the keywords the admin specified to those entered by the user. if ($field->FieldType == 'KEYWORDS') { $keywordsString = 'Keywords: '; // If the admin entered some keywords (which is optional) add with one comma afterwards. if (trim($field->KeywordsValue)) { $keywordsString .= rtrim(trim($field->KeywordsValue), ',') . ', '; } // If the user entered some keywords then also add these on. if (trim($data[$fieldName])) { $keywordsString .= trim($data[$fieldName]); } // Finally set the keywords for the parameter to send to the catalogue. $apiParams[] = array('xmlname' => $field->DublinCoreFieldType()->XmlName, 'value' => $keywordsString); } else { // Else if regular field then just add its value to the params keyed by the XMLName. $apiParams[] = array('xmlname' => $field->DublinCoreFieldType()->XmlName, 'value' => trim($data[$fieldName])); } } } } else { // If it is placeholder then add it along with the admin defined placeholder value to the API params. $apiParams[] = array('xmlname' => $field->DublinCoreFieldType()->XmlName, 'value' => $field->PlaceholderValue); } } // Create an object of the MetadataPushAPI type sending the needed info to the constructor and then call the // execute command passing the apiParams. We need to try/catch it as it will throw and exception if there is // an issue or return the identifer of the newly created record if successful. $api = new MetadataPushApi($this->CataloguePushUrl, $this->CatalogueUsername, $this->CataloguePassword); $apiError = false; $apiErrorMessage = ""; $newRecordId = ""; try { $newRecordId = $api->execute($apiParams); } catch (Exception $exception) { $apiError = true; $apiErrorMessage = $exception->getMessage(); } // If the push was not successful, then we need to retain the user's input on the form i.e. re-display it with all fields re-populated. if ($apiError) { // Remember the user's data, this will cause the form to re-populate. Session::set("FormData.{$form->getName()}.data", $data); // Get the failure error message defined in the CMS and replace the speical {ERROR} variable with // the error message from the Catalogue API or HTML error code message. $errorMessage = nl2br(str_replace('{ERROR}', $apiErrorMessage, $this->PushFailureMessage)); // Populate the error message to display on the form when it is re-loaded. $form->sessionMessage($errorMessage, 'bad', false); // Return the user back to the form page they just posted. return $this->redirectBack(); } else { // No error, build link to view the new record which is displayed on the page and also included in the email. $newRecordLink = $this->CatalogueViewUrl . $newRecordId; // See if the AdditionalMessage checkbox is ticked, if so then get the value of the email user address // and User email message fields as this needs to be included in the email to the curator. $additionalMessageEmail = null; $additionalMessageText = null; if (!empty($data['AdditionalMessage'])) { $additionalMessageEmail = $data['AdditionalMessageEmail']; $additionalMessageText = $data['AdditionalMessageText']; } // Email the curators. foreach($this->Curators() as $curator) { $this->EmailCurator($curator->Name, $curator->Email, $this->CuratorEmailSubject, $this->CuratorEmailBody, $newRecordLink, $additionalMessageEmail, $additionalMessageText); } // Ensure that any form data in the session is cleared. Session::clear("FormData.{$form->getName()}.data"); // Get the success message replacing the link placeholder with a link to the newly created record. $successMessage = nl2br(str_replace('{LINK}', "<a href='" . $newRecordLink . "' target='_blank'>" . $newRecordLink . "</a>", $this->PushSuccessMessage)); // Set the message in the session to this. $form->sessionMessage($successMessage, 'good', false); // Also add the link to the newly created record to an array in the session so we can display these on the form. // The links should be page specific which is why it ID is included. $createdRecords = Session::get('PostcardRecordsCreated_' . $this->ID); // If there are no records already in the current session then call function to check for the hidden fields on // the form which provide the information required to email a project coordinator, and if they exist sent an email. if (count($createdRecords) == 0) { $this->EmailCoordinator($data); } // Add the new reocrd to the created records array and then set back in the session. $createdRecords[] = $newRecordLink; Session::set('PostcardRecordsCreated_' . $this->ID, $createdRecords); // Return the user back to the form. The redirect back will take the user back to the form // with the original URL parameters which means the fields with parameters on the URL will be // populated again like they want. return $this->redirectBack(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _handleFormPost()\n {\n // see submit.php\n // 'FILE_OBJECTS' => 'handle_file_post',\n // 'BASE64_ENCODED_FILE_OBJECTS' => 'handle_base64_encoded_file_post',\n // 'TRANSFER_IDS' => 'handle_transfer_ids_post'\n }", "protected function _handle_forms()\n\t{\n\t\tif (!strlen($this->_form_posted)) return;\n\t\t$method = 'on_'.$this->_form_posted.'_submit';\n\n\t\tif (method_exists($this, $method))\n\t\t{\n\t\t\tcall_user_func(array($this, $method), $this->_form_action);\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ($this->controls as $k=>$v)\n\t\t{\n\t\t\t$ctl = $this->controls[$k];\n\n\t\t\tif (method_exists($ctl, $method))\n\t\t\t{\n\t\t\t\t$ctl->page = $this;\n\t\t\t\tcall_user_func(array($ctl, $method), $this->_form_action);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (DEBUG) dwrite(\"Method '$method' not defined\");\n\t}", "public function submit()\n {\n if ($_POST['name'] == 'preview') { $this->preview(); }\n elseif ($_POST['name'] == 'create') { $this->save(); }\n }", "function submit()\n {\n\t\t//all data is handled by submit2()\n }", "private function _processSubmit()\n {\n global $interface;\n global $configArray;\n\n // Without IDs, we can't continue\n if (empty($_REQUEST['ids'])) {\n header(\n \"Location: \" . $this->followupUrl . \"?errorMsg=bulk_noitems_advice\"\n );\n exit();\n }\n\n $url = $configArray['Site']['url'] . \"/Search/Results?lookfor=\" .\n urlencode(implode(\" \", $_POST['ids'])) . \"&type=ids\";\n $result = $this->sendEmail(\n $url, $_POST['to'], $_POST['from'], $_POST['message']\n );\n\n if (!PEAR::isError($result)) {\n $this->followupUrl .= \"?infoMsg=\" . urlencode(\"bulk_email_success\");\n header(\"Location: \" . $this->followupUrl);\n exit();\n } else {\n // Assign Error Message and Available Data\n $this->errorMsg = $result->getMessage();\n $interface->assign('formTo', $_POST['to']);\n $interface->assign('formFrom', $_POST['from']);\n $interface->assign('formMessage', $_POST['message']);\n $interface->assign('formIDS', $_POST['ids']);\n }\n }", "public function handleDataSubmission() {}", "public function on_after_submit() {\n\t\t\n\t\t/*\n\t\t$post = array();\n\t\t$post['cm-name'] = $this->controller->questionAnswerPairs['1']['answer'].' '.$this->controller->questionAnswerPairs['2']['answer'];\n\t\t$post['cm-itutkr-itutkr'] = $this->controller->questionAnswerPairs['3']['answer'];\n\t\t\t\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 0);\n\t\tcurl_setopt($ch, CURLOPT_URL, 'http://url.to.my.campaignmonitor/myform');\n\t\t//Don't ask me what this does, I just know that without this funny header, the whole thing doesn't work!\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER,array('Expect:'));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1 );\n\t\t\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post );\n\t\t\n\t\t$url = curl_exec( $ch );\n\t\tcurl_close ($ch);\n\t\t*/\n\t}", "public function process_data() {\n // Process portfolio export request if any.\n $this->process_portfolio_export();;\n\n // New/update entries request.\n if ($editentries = optional_param('editentries', '', PARAM_TAGLIST)) {\n $this->editentries = $editentries;\n return;\n }\n\n // Process entries data.\n if ($processed = $this->process_entries_data()) {\n list($strnotify, $processedeids) = $processed;\n\n // Redirect base url.\n $redirecturl = $this->baseurl;\n $redirecturl->remove_params('eids');\n $redirecturl->remove_params('editentries');\n\n // TODO: handle filter removal if necessary.\n // $redirecturl->remove_params('filter');\n\n $response = $strnotify;\n $timeout = 0;\n\n // Are we returning to form?\n if ($editentries = $this->editentries) {\n if ($processedeids) {\n $processedentries = implode(',', $processedeids);\n // If we continue editing the same entries, simply return.\n if ($processedentries == $editentries) {\n return;\n }\n }\n\n // Otherwise, redirect to same view with new editentries param.\n $redirecturl->param('editentries', $editentries);\n redirect($redirecturl, $response, $timeout);\n }\n\n // We are not returning to form, so we need to apply redirection settings if any.\n $submission = $this->submission_settings;\n $timeout = !empty($submission['timeout']) ? $submission['timeout'] : 0;\n if (!empty($submission['redirect'])) {\n $redirecturl->param('view', $submission['redirect']);\n }\n\n if ($processedeids) {\n // Submission response.\n if (!empty($submission['message'])) {\n $response = $submission['message'];\n }\n\n // Display after if set and not returning to form.\n if (!empty($submission['displayafter'])) {\n $redirecturl->param('eids', implode(',', $processedeids));\n }\n }\n\n redirect($redirecturl, $response, $timeout);\n }\n }", "public function postProcess()\n {\n $pageId = Tools::getValue('id_page');\n if (Tools::isSubmit('submitEditCustomHTMLPage') || Tools::isSubmit('submitEditCustomHTMLPageAndStay')) {\n if ($pageId == 'new')\n $this->processAdd();\n else\n $this->processUpdate();\n }\n else if (Tools::isSubmit('status'.$this->table)) {\n $this->toggleStatus();\n }\n else if (Tools::isSubmit('delete'.$this->table)) {\n $this->processDelete();\n }\n }", "public function handleUserEntry()\n {\n $sessionClass = ReporticoSession();\n\n // First look for a parameter beginning \"submit_\". This will identify\n // What the user wanted to do.\n\n $hide_area = false;\n $show_area = false;\n $maintain_sql = false;\n $xmlsavefile = false;\n $xmldeletefile = false;\n if (($k = $this->getMatchingPostItem(\"/^submit_/\"))) {\n // Strip off \"_submit\"\n preg_match(\"/^submit_(.*)/\", $k, $match);\n\n // Now we should be left with a field element and an action\n // Lets strip the two\n $match1 = preg_split('/_/', $match[0]);\n $fld = $match1[1];\n $action = $match1[2];\n\n switch ($action) {\n case \"ADD\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->addMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"DELETE\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->deleteMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"MOVEUP\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->moveupMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"MOVEDOWN\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->movedownMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"SET\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->updateMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"REPORTLINK\":\n case \"REPORTLINKITEM\":\n // Link in an item from another report\n $this->linkInReportFields(\"link\", $fld, $action);\n $show_area = $fld;\n break;\n\n case \"REPORTIMPORT\":\n case \"REPORTIMPORTITEM\":\n // Link in an item from another report\n $this->linkInReportFields(\"import\", $fld, $action);\n $show_area = $fld;\n break;\n\n case \"SAVE\":\n $xmlsavefile = $this->query->xmloutfile;\n if (!$xmlsavefile) {\n trigger_error(ReporticoLang::templateXlate(\"UNABLE_TO_SAVE\") . ReporticoLang::templateXlate(\"SPECIFYXML\"), E_USER_ERROR);\n }\n\n break;\n\n case \"PREPARESAVE\":\n $xmlsavefile = $this->query->xmloutfile;\n $sessionClass::setReporticoSessionParam(\"execute_mode\", \"PREPARE\");\n\n if (!$xmlsavefile) {\n header(\"HTTP/1.0 404 Not Found\", true);\n echo '<div class=\"reportico-error-box\">' . ReporticoLang::templateXlate(\"UNABLE_TO_SAVE\") . ReporticoLang::templateXlate(\"SPECIFYXML\") . \"</div>\";\n die;\n }\n\n break;\n\n case \"DELETEREPORT\":\n $xmldeletefile = $this->query->xmloutfile;\n break;\n\n case \"HIDE\":\n $hide_area = $fld;\n break;\n\n case \"SHOW\":\n $show_area = $fld;\n break;\n\n case \"SQL\":\n $show_area = $fld;\n if ($fld == \"mainquerqury\") {\n // Main Query SQL Generation.\n $sql = stripslashes($_REQUEST[\"mainquerqury_SQL\"]);\n\n $maintain_sql = $sql;\n if (Authenticator::login()) {\n $p = new SqlParser($sql);\n if ($p->parse()) {\n $p->importIntoQuery($qr);\n if ($this->query->datasource->connect()) {\n $p->testQuery($this->query, $sql);\n }\n\n }\n }\n } else {\n // It's a lookup\n if (preg_match(\"/mainquercrit(.*)qury/\", $fld, $match1)) {\n $lookup = (int) $match1[1];\n $lookup_char = $match1[1];\n\n // Access the relevant crtieria item ..\n $qc = false;\n $ak = array_keys($this->query->lookup_queries);\n if (array_key_exists($lookup, $ak)) {\n $q = $this->query->lookup_queries[$ak[$lookup]]->lookup_query;\n } else {\n $q = new Reportico();\n }\n\n // Parse the entered SQL\n $sqlparm = $fld . \"_SQL\";\n $sql = $_REQUEST[$sqlparm];\n $q->maintain_sql = $sql;\n $q = new Reportico();\n $p = new SqlParser($sql);\n if ($p->parse()) {\n if ($p->testQuery($this->query, $sql)) {\n $p->importIntoQuery($q);\n $this->query->setCriteriaLookup($ak[$lookup], $q, \"WHAT\", \"NOW\");\n }\n }\n }\n }\n\n break;\n\n }\n }\n\n // Now work out what the maintainance screen should be showing by analysing\n // whether user pressed a SHOW button a HIDE button or keeps a maintenance item\n // show by presence of a shown value\n if (!$show_area) {\n // User has not pressed SHOW_ button - this would have been picked up in previous submit\n // So look for longest shown item - this will allow us to draw the maintenace screen with\n // the correct item maximised\n foreach ($_REQUEST as $k => $req) {\n if (preg_match(\"/^shown_(.*)/\", $k, $match)) {\n $containee = \"/^\" . $hide_area . \"/\";\n $container = $match[1];\n if (!preg_match($containee, $container)) {\n if (strlen($match[1]) > strlen($show_area)) {\n $show_area = $match[1];\n }\n }\n }\n }\n\n }\n\n if (!$show_area) {\n $show_area = \"mainquer\";\n }\n\n $xmlout = new XmlWriter($this->query);\n $xmlout->prepareXmlData();\n\n // If Save option has been used then write data to the named file and\n // use this file as the defalt input for future queries\n if ($xmlsavefile) {\n if ($this->query->allow_maintain != \"SAFE\" && $this->query->allow_maintain != \"DEMO\" && ReporticoApp::getConfig('allow_maintain')) {\n $xmlout->writeFile($xmlsavefile);\n $sessionClass::setReporticoSessionParam(\"xmlin\", $xmlsavefile);\n $sessionClass::unsetReporticoSessionParam(\"xmlintext\");\n } else {\n trigger_error(ReporticoLang::templateXlate(\"SAFENOSAVE\"), E_USER_ERROR);\n }\n\n }\n\n // If Delete Report option has been used then remove the file\n // use this file as the defalt input for future queries\n if ($xmldeletefile) {\n if ($this->query->allow_maintain != \"SAFE\" && $this->query->allow_maintain != \"DEMO\" && ReporticoApp::getConfig('allow_maintain')) {\n $xmlout->removeFile($xmldeletefile);\n $sessionClass::setReporticoSessionParam(\"xmlin\", false);\n $sessionClass::unsetReporticoSessionParam(\"xmlintext\");\n } else {\n trigger_error(ReporticoLang::templateXlate(\"SAFENODEL\"), E_USER_ERROR);\n }\n\n }\n\n $xml = $xmlout->getXmldata();\n $this->query->xmlintext = $xml;\n\n $this->query->xmlin = new XmlReader($this->query, false, $xml);\n $this->query->xmlin->show_area = $show_area;\n $this->query->maintain_sql = false;\n }", "protected function process()\n {\n $this->setSubmittedValues();\n \n if ( $this->error ) {\n $this->data['error']['form'] = 'Please check for errors.';\n return;\n }\n \n $this->addPaymentToDatabase();\n }", "public function form_submission() {\n\n\t\t// Check to see if this is a new post or has already been created.\n\t\tif ( isset( $_POST['object_id'] ) && ( get_post_type( $_POST['object_id'] ) !== 'tm-events-entries' ) && ( $_POST['object_id'] < 0 ) ) {\n\t\t\tremove_query_arg( 'entry' );\n\t\t\twp_redirect( home_url( $path = 'nominate/entry' ) );\n\t\t}\n\n\t\t// If no form submission, bail.\n\t\tif ( empty( $_POST ) || ! isset( $_POST['submit-cmb'], $_POST['object_id'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if hidden form is present.\n\t\t// If it is then this has been submitted by a bot.\n\t\tif ( empty( $_POST ) || isset( $_POST['_nsa_entries_2016_hidden_check'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get CMB2 metabox object.\n\t\t$cmb = $this->get_current_form( $this->meta_prefix, 'fake-object-id' );\n\t\t$post_data = array();\n\n\t\t// Check security nonce.\n\t\tif ( ! isset( $_POST[ $cmb->nonce() ] ) || ! wp_verify_nonce( $_POST[ $cmb->nonce() ], $cmb->nonce() ) ) {\n\t\t\treturn $cmb->prop( 'submission_error', new WP_Error( 'security_fail', __( 'Security check failed.' ) ) );\n\t\t}\n\n\t\t// Check hidden box is NOT ticked.\n\t\tif ( ! isset( $_POST[ $cmb->nonce() ] ) || ! wp_verify_nonce( $_POST[ $cmb->nonce() ], $cmb->nonce() ) ) {\n\t\t\treturn $cmb->prop( 'submission_error', new WP_Error( 'security_fail', __( 'Security check failed.' ) ) );\n\t\t}\n\n\t\t// Check Post ID is valid.\n\t\t/*if ( (! is_int( $_POST['object_id'] ) ) || ( ! $_POST['object_id'] >= 0 ) || floor( $_POST['object_id'] ) !== $_POST['object_id'] ) {\n\t\t\treturn $cmb->prop( 'submission_error', new WP_Error( 'post_data_missing', __( 'Cannot submit your entry. Please try again' ) ) );\n\t\t}*/\n\n\t\t/**\n\t\t * Fetch sanitized values\n\t\t */\n\t\t$sanitized_values = $cmb->get_sanitized_values( $_POST );\n\n\t\t// Set our post data arguments.\n\t\t// If we are updating a post supply the id from our hidden field.\n\t\t$post_data['ID'] = absint( $_POST['object_id'] );\n\n\t\t$post_data['post_title'] = $sanitized_values['submitted_post_title'];\n\t\tunset( $sanitized_values['submitted_post_title'] );\n\t\t$post_data['post_content'] = '';\n\n\t\t// Set the post type we want to submit.\n\t\t$post_data['post_type'] = 'tm-events-entries';\n\t\t// Set the status of of post.\n\t\t$post_data['post_status'] = 'publish';\n\n\t\t// Create the new post.\n\t\t$new_submission_id = wp_insert_post( $post_data, true );\n\n\t\t// If we hit a snag, update the user.\n\t\tif ( is_wp_error( $new_submission_id ) ) {\n\t\t\treturn $cmb->prop( 'submission_error', $new_submission_id );\n\t\t} else {\n\n\t\t\t// Loop through remaining (sanitized) data, and save to post-meta.\n\t\t\tforeach ( $sanitized_values as $key => $value ) {\n\t\t\t\tif ( is_array( $value ) ) {\n\t\t\t\t\t$value = array_filter( $value );\n\t\t\t\t\tif ( ! empty( $value ) ) {\n\t\t\t\t\t\tupdate_post_meta( $new_submission_id, $key, $value );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tupdate_post_meta( $new_submission_id, $key, $value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove any previous entry query arguments.\n\t\t\tremove_query_arg( 'entry' );\n\n\t\t\t// Send confirmation email out.\n\t\t\t$confirm_email = $this->send_confirmation( $post_data['post_title'], $sanitized_values );\n\n\t\t\t/**\n\t\t\t * Redirect back to the form page with a query variable with the new post ID.\n\t\t\t * This will help double-submissions with browser refreshes\n\t\t\t */\n\t\t\twp_redirect(\n\t\t\t\tesc_url_raw(\n\t\t\t\t\tadd_query_arg(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'entry' => $new_submission_id,\n\t\t\t\t\t\t),\n\t\t\t\t\t\thome_url( '/nominate/confirm/' )\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\texit;\n\t\t}\n\n\t}", "public function MetadataEntryForm()\n {\n // NIWA are worried about parameter case and would like it case insensitive so convert all get vars to lower\n // I think this is because they are not 100% what case the parameters from oracle will be in.\n $params = array_change_key_case($this->getRequest()->getVars(), CASE_LOWER);\n\n // Check in the parameters sent to this page if there are certian fields needed to power the\n // functionality which emails project coordinators and if so get them as we will need to add\n // them to the bottom of the form as hidden fields, this way we can access them in the form\n // processing and send the email.\n $hiddenFields = array();\n\n // These 2 fields can be populated either by Project_Coordinator or Project_Administrator as Oracle actually\n // sends Project_Administrator. NIWA want to keep the field here called coordinator.\n if (!empty($params['project_coordinator'])) {\n $hiddenFields['_Project_Coordinator'] = $params['project_coordinator'];\n } else if (!empty($params['project_administrator'])) {\n $hiddenFields['_Project_Coordinator'] = $params['project_administrator'];\n }\n\n if (!empty($params['project_coordinator_email'])) {\n $hiddenFields['_Project_Coordinator_email'] = $params['project_coordinator_email'];\n } else if (!empty($params['project_administrator_email'])) {\n $hiddenFields['_Project_Coordinator_email'] = $params['project_administrator_email'];\n }\n\n if (!empty($params['project_manager'])) {\n $hiddenFields['_Project_Manager'] = $params['project_manager'];\n }\n\n if (!empty($params['project_code'])) {\n $hiddenFields['_Project_Code'] = $params['project_code'];\n }\n\n // Get the fields defined for this page, exclude the placeholder fields as they are not displayed to the user.\n $metadataFields = $this->Fields()->where(\"FieldType != 'PLACEHOLDER'\")->Sort('SortOrder', 'asc');\n\n // Create fieldfield for the form fields.\n $formFields = FieldList::create();\n $actions = FieldList::create();\n $requiredFields = array();\n\n // Push the required fields message as a literal field at the top.\n $formFields->push(\n LiteralField::create('required', '<p>* Required fields</p>')\n );\n\n if ($metadataFields->count()) {\n foreach($metadataFields as $field) {\n // Create a version of the label with spaces replaced with underscores as that is how\n // any paraemters in the URL will come (plus we can use it for the field name)\n $fieldName = str_replace(' ', '_', $field->Label);\n $fieldLabel = $field->Label;\n\n // If the field is required then add it to the required fields and also add an\n // asterix to the end of the field label.\n if ($field->Required) {\n $requiredFields[] = $fieldName;\n $fieldLabel .= ' *';\n }\n\n // Check if there is a parameter in the GET vars with the corresponding name.\n $fieldValue = null;\n\n if (isset($params[strtolower($fieldName)])) {\n $fieldValue = $params[strtolower($fieldName)];\n }\n\n // Define a var for the new field, means no matter the type created\n // later on in the code we can apply common things like the value.\n $newField = null;\n\n // Single line text field creation.\n if ($field->FieldType == 'TEXTBOX') {\n $formFields->push($newField = TextField::create($fieldName, $fieldLabel));\n } else if ($field->FieldType == 'TEXTAREA') {\n $formFields->push($newField = TextareaField::create($fieldName, $fieldLabel));\n } else if ($field->FieldType == 'KEYWORDS') {\n // If keywords then output 2 fields the textbox for the keywords and then also a\n // literal read only list of those already specified by the admin below.\n $formFields->push($newField = TextAreaField::create($fieldName, $fieldLabel));\n $formFields->push(LiteralField::create(\n $fieldName . '_adminKeywords',\n \"<div class='control-group' style='margin-top: -12px'>Already specified : \" . $field->KeywordsValue . \"</div>\"\n ));\n } else if ($field->FieldType == 'DROPDOWN') {\n // Some dropdowns have an 'other' option so must add the 'other' to the entries\n // and also have a conditionally displayed text field for when other is chosen.\n $entries = $field->DropdownEntries()->sort('SortOrder', 'Asc')->map('Key', 'Label');\n\n if ($field->DropdownOtherOption == true) {\n $entries->push('other', 'Other');\n }\n\n $formFields->push(\n $newField = DropdownField::create(\n $fieldName,\n $fieldLabel,\n $entries\n )->setEmptyString('Select')\n );\n\n if ($field->DropdownOtherOption == true) {\n $formFields->push(\n TextField::create(\n \"${fieldName}_other\",\n \"Please specify the 'other'\"\n )->hideUnless($fieldName)->isEqualTo(\"other\")->end()\n );\n\n //++ @TODO\n // Ideally if the dropdown is required then if other is selected the other field\n // should also be required. Unfortunatley the conditional validation logic of ZEN\n // does not work in the front end - so need to figure out how to do this.\n }\n }\n\n // If a new field was created then set some things on it which are common no matter the type.\n if ($newField) {\n // Set help text for the field if defined.\n if (!empty($field->HelpText)) {\n $newField->setRightTitle($field->HelpText);\n }\n\n // Field must only be made readonly if the admin specified that they should be\n // provided that a value was specified in the URL for it.\n if ($field->Readonly && $fieldValue) {\n $newField->setReadonly(true);\n }\n\n // Set the value of the field one was plucked from the URL params.\n if ($fieldValue) {\n $newField->setValue($fieldValue);\n }\n }\n }\n\n // Add fields to the bottom of the form for the user to include a message in the email sent to curators\n // this is entirely optional and will not be used in most cases so is hidden until a checkbox is ticked.\n $formFields->push(\n CheckboxField::create('AdditionalMessage', 'Include a message from me to the curators')\n );\n\n // For the email address, because its project managers filling out the form, check if the Project_Manager_email\n // has been specified in the URL params and if so pre-populate the field with that value.\n $formFields->push(\n $emailField = EmailField::create('AdditionalMessageEmail', 'My email address')\n ->setRightTitle('Please enter your email address so the curator knows who the message below is from.')\n ->hideUnless('AdditionalMessage')->isChecked()->end()\n );\n\n if (isset($params['project_manager_email'])) {\n $emailField->setValue($params['project_manager_email']);\n }\n\n $formFields->push(\n TextareaField::create('AdditionalMessageText', 'My message')\n ->setRightTitle('You can enter a message here which is appended to the email sent the curator after the record has successfully been pushed to the catalogue.')\n ->hideUnless('AdditionalMessage')->isChecked()->end()\n );\n\n // If there are any hidden fields then loop though and add them as hidden fields to the bottom of the form.\n if ($hiddenFields) {\n foreach($hiddenFields as $key => $val) {\n $formFields->push(\n HiddenField::create($key, '', $val)\n );\n }\n }\n\n // We have at least one field so set the action for the form to submit the entry to the catalogue.\n $actions = FieldList::create(FormAction::create('sendMetadataForm', 'Send'));\n } else {\n $formFields->push(\n ErrorMessage::create('No metadata entry fields have been specified for this page.')\n );\n }\n\n // Set up the required fields validation.\n $validator = ZenValidator::create();\n $validator->addRequiredFields($requiredFields);\n\n // Create form.\n $form = Form::create($this, 'MetadataEntryForm', $formFields, $actions, $validator);\n\n // Check if the data for the form has been saved in the session, if so then populate\n // the form with this data, if not then just return the default form.\n $data = Session::get(\"FormData.{$form->getName()}.data\");\n\n return $data ? $form->loadDataFrom($data) : $form;\n }", "function process_form()\n {\n }", "private function _submitHandler() {\n // Checking if this is a valid settings submit handler.\n if (!empty($_POST) && isset($_POST['type']) && $_POST['type'] == 'pii_settings' && (isset( $_POST['pii_settings_nonce'] ) \n || wp_verify_nonce( $_POST['pii_settings_nonce'], 'pii_settings' )) ) {\n update_option('pii_fields', $_POST['options']);\n $encryption = new EncryptDecrypt();\n $encryption->updateFields($_POST['options']);\n }\n // Meta fields saving.\n else if (!empty($_POST) && isset($_POST['type']) && $_POST['type'] == 'pii_custom_meta_fields' && (isset( $_POST['pii_custom_meta_fields_nonce'] ) \n || wp_verify_nonce( $_POST['pii_custom_meta_fields_nonce'], 'pii_custom_meta_fields' )) ) {\n update_option('pii_custom_meta_fields', trim($_POST['pii_custom_meta_fields'])); \n }\n }", "function saveSubmit($args, $request) {\n\t\t$step = (int) array_shift($args);\n\t\t$articleId = (int) $request->getUserVar('articleId');\n\t\t$journal =& $request->getJournal();\n\n\t\t$this->validate($request, $articleId, $step);\n\t\t$this->setupTemplate($request, true);\n\t\t$article =& $this->article;\n\n\t\t$formClass = \"AuthorSubmitStep{$step}Form\";\n\t\timport(\"classes.author.form.submit.$formClass\");\n\n\t\t$submitForm = new $formClass($article, $journal, $request);\n\t\t$submitForm->readInputData();\n\n\t\tif (!HookRegistry::call('SubmitHandler::saveSubmit', array($step, &$article, &$submitForm))) {\n\n\t\t\t// Check for any special cases before trying to save\n\t\t\tswitch ($step) {\n\t\t\t\tcase 2:\n\t\t\t\t\tif ($request->getUserVar('uploadSubmissionFile')) {\n\t\t\t\t\t\t$submitForm->uploadSubmissionFile('submissionFile');\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\tif ($request->getUserVar('addAuthor')) {\n\t\t\t\t\t\t// Add a sponsor\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t\t$authors = $submitForm->getData('authors');\n\t\t\t\t\t\tarray_push($authors, array());\n\t\t\t\t\t\t$submitForm->setData('authors', $authors);\n\n\t\t\t\t\t} else if (($delAuthor = $request->getUserVar('delAuthor')) && count($delAuthor) == 1) {\n\t\t\t\t\t\t// Delete an author\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t\tlist($delAuthor) = array_keys($delAuthor);\n\t\t\t\t\t\t$delAuthor = (int) $delAuthor;\n\t\t\t\t\t\t$authors = $submitForm->getData('authors');\n\t\t\t\t\t\tif (isset($authors[$delAuthor]['authorId']) && !empty($authors[$delAuthor]['authorId'])) {\n\t\t\t\t\t\t\t$deletedAuthors = explode(':', $submitForm->getData('deletedAuthors'));\n\t\t\t\t\t\t\tarray_push($deletedAuthors, $authors[$delAuthor]['authorId']);\n\t\t\t\t\t\t\t$submitForm->setData('deletedAuthors', join(':', $deletedAuthors));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray_splice($authors, $delAuthor, 1);\n\t\t\t\t\t\t$submitForm->setData('authors', $authors);\n\n\t\t\t\t\t\tif ($submitForm->getData('primaryContact') == $delAuthor) {\n\t\t\t\t\t\t\t$submitForm->setData('primaryContact', 0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if ($request->getUserVar('moveAuthor')) {\n\t\t\t\t\t\t// Move an author up/down\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t\t$moveAuthorDir = $request->getUserVar('moveAuthorDir');\n\t\t\t\t\t\t$moveAuthorDir = $moveAuthorDir == 'u' ? 'u' : 'd';\n\t\t\t\t\t\t$moveAuthorIndex = (int) $request->getUserVar('moveAuthorIndex');\n\t\t\t\t\t\t$authors = $submitForm->getData('authors');\n\n\t\t\t\t\t\tif (!(($moveAuthorDir == 'u' && $moveAuthorIndex <= 0) || ($moveAuthorDir == 'd' && $moveAuthorIndex >= count($authors) - 1))) {\n\t\t\t\t\t\t\t$tmpAuthor = $authors[$moveAuthorIndex];\n\t\t\t\t\t\t\t$primaryContact = $submitForm->getData('primaryContact');\n\t\t\t\t\t\t\tif ($moveAuthorDir == 'u') {\n\t\t\t\t\t\t\t\t$authors[$moveAuthorIndex] = $authors[$moveAuthorIndex - 1];\n\t\t\t\t\t\t\t\t$authors[$moveAuthorIndex - 1] = $tmpAuthor;\n\t\t\t\t\t\t\t\tif ($primaryContact == $moveAuthorIndex) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex - 1);\n\t\t\t\t\t\t\t\t} else if ($primaryContact == ($moveAuthorIndex - 1)) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex);\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\t$authors[$moveAuthorIndex] = $authors[$moveAuthorIndex + 1];\n\t\t\t\t\t\t\t\t$authors[$moveAuthorIndex + 1] = $tmpAuthor;\n\t\t\t\t\t\t\t\tif ($primaryContact == $moveAuthorIndex) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex + 1);\n\t\t\t\t\t\t\t\t} else if ($primaryContact == ($moveAuthorIndex + 1)) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$submitForm->setData('authors', $authors);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 4:\n\t\t\t\t\tif ($request->getUserVar('submitUploadSuppFile')) {\n\t\t\t\t\t\t$this->submitUploadSuppFile(array(), $request);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (!isset($editData) && $submitForm->validate()) {\n\t\t\t\t$articleId = $submitForm->execute();\n\t\t\t\tHookRegistry::call('Author::SubmitHandler::saveSubmit', array(&$step, &$article, &$submitForm));\n\n\t\t\t\tif ($step == 5) {\n\t\t\t\t\t// Send a notification to associated users\n\t\t\t\t\timport('classes.notification.NotificationManager');\n\t\t\t\t\t$notificationManager = new NotificationManager();\n\t\t\t\t\t$articleDao =& DAORegistry::getDAO('ArticleDAO');\n\t\t\t\t\t$article =& $articleDao->getArticle($articleId);\n\t\t\t\t\t$roleDao =& DAORegistry::getDAO('RoleDAO');\n\t\t\t\t\t$notificationUsers = array();\n\t\t\t\t\t$editors = $roleDao->getUsersByRoleId(ROLE_ID_EDITOR, $journal->getId());\n\t\t\t\t\twhile ($editor =& $editors->next()) {\n\t\t\t\t\t\t$notificationManager->createNotification(\n\t\t\t\t\t\t\t$request, $editor->getId(), NOTIFICATION_TYPE_ARTICLE_SUBMITTED,\n\t\t\t\t\t\t\t$article->getJournalId(), ASSOC_TYPE_ARTICLE, $article->getId()\n\t\t\t\t\t\t);\n\t\t\t\t\t\tunset($editor);\n\t\t\t\t\t}\n\n\t\t\t\t\t$journal =& $request->getJournal();\n\t\t\t\t\t$templateMgr =& TemplateManager::getManager();\n\t\t\t\t\t$templateMgr->assign_by_ref('journal', $journal);\n\t\t\t\t\t// If this is an editor and there is a\n\t\t\t\t\t// submission file, article can be expedited.\n\t\t\t\t\tif (Validation::isEditor($journal->getId()) && $article->getSubmissionFileId()) {\n\t\t\t\t\t\t$templateMgr->assign('canExpedite', true);\n\t\t\t\t\t}\n\t\t\t\t\t$templateMgr->assign('articleId', $articleId);\n\t\t\t\t\t$templateMgr->assign('helpTopicId','submission.index');\n\t\t\t\t\t$templateMgr->display('author/submit/complete.tpl');\n\n\t\t\t\t} else {\n\t\t\t\t\t$request->redirect(null, null, 'submit', $step+1, array('articleId' => $articleId));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$submitForm->display();\n\t\t\t}\n\t\t}\n\t}", "public function _report_form_submit()\n\t{\n\t\t$incident = Event::$data;\n\n\t\tif ($_POST)\n\t\t{\n\t\t\t$action_item = ORM::factory('actionable')\n\t\t\t\t->where('incident_id', $incident->id)\n\t\t\t\t->find();\n\t\t\t$action_item->incident_id = $incident->id;\n\t\t\t$action_item->actionable = isset($_POST['actionable']) ?\n\t\t\t\t$_POST['actionable'] : \"\";\n\t\t\t$action_item->action_taken = isset($_POST['action_taken']) ?\n\t\t\t\t$_POST['action_taken'] : \"\";\n\t\t\t$action_item->action_summary = $_POST['action_summary'];\n\t\t\t$action_item->save();\n\n\t\t}\n\t}", "function process() {\n // We always call the parent's method\n parent::process();\n $d = $this->getDocument();\n \n // We pass the form our request object and the location of us so the form\n // will make us handle the input (as actually we take care of processing\n // this form) - it could link to any other action as long as it is aware\n // of the form\n $form = new Form($this->getRequest(), new Location($this), Request::METHOD_POST);\n \n // This is how you prepare values for the radio buttons\n $radios = array('visa', 'master');\n \n // This is how we prepare the fields\n $form->addField('text1', new TextInputField('Your name here please', \n new RegexValidator('^[[:alpha:]]+[[:space:]][[:alpha:]]+$')));\n $form->addField('pass1', \n new TextInputField('', new RegexValidator('^[[:digit:]]{16}$'), TextInputField::PASSWORD));\n $form->addField('text2', new TextInputField('', null, TextInputField::TEXTAREA));\n $form->addField('check1', new CheckBoxInputField());\n $form->addField('payment', new RadioButtonInputField('visa', $radios));\n \n // Here we test if the form was correctly submitted\n if($form->isValidSubmission()) {\n // Normally, we would do something useful here and redirect to another page\n // since this form uses the POST method\n $d->setVariable('success', true);\n }\n \n // Here we place the form into the document variable so it can process it\n $d->setVariable('form', $form);\n }", "public static abstract function postSubmit(Form $form);", "function processForm(){\n /*Admin page content goes here */\n if( isset($_POST['rssMultiUpdate']) ){\n require \"classes/RssUpdateSingle.php\";\n \n $RssUpdateSingle = new RssUpdateSingle;\n $RssUpdateSingle->updateBlog();\n }\n }", "public function processForm( Form $form )\n\t{\n\t\t$button = $form->isSubmitted();\n\t\tif ( $button ) {\n\t\t\t$submit = $button->getName();\n\t\t\t$data = $form->getValues( TRUE );\n\n\t\t\tif ( $submit == 'setFilter' || $submit == 'resetFilter' ) $this->setFilter( $submit, $data[ 'filter' ] );\n\t\t\tif ( $submit == 'saveRecord' || $submit == 'cancelRecord' ) $this->saveRecord( $submit, $data[ 'edit' ] );\n\t\t}\n\t}", "protected function processForm(){\n if(Tools::isSubmit('saveBtn')){ // save data\n $settings = array(\n 'user' => Tools::getValue('user'),\n 'widget_id' => Tools::getValue('widget_id'),\n 'tweets_limit' => Tools::getValue('tweets_limit'),\n 'follow_btn' => Tools::getValue('follow_btn')\n );\n Configuration::updateValue($this->name.'_settings', serialize($settings));\n \n // display success message\n return $this->displayConfirmation($this->l('The settings have been successfully saved!'));\n }\n \n return '';\n }", "public function submitPage() {}", "function submit() {\n\t\tThesisHandler::setupTemplate();\n\n\t\t$journal = &Request::getJournal();\n\t\t$journalId = $journal->getJournalId();\n\n\t\t$thesisPlugin = &PluginRegistry::getPlugin('generic', 'ThesisPlugin');\n\n\t\tif ($thesisPlugin != null) {\n\t\t\t$thesesEnabled = $thesisPlugin->getEnabled();\n\t\t}\n\n\t\tif ($thesesEnabled) {\n\t\t\t$thesisPlugin->import('StudentThesisForm');\n\n\t\t\t$templateMgr = &TemplateManager::getManager();\n\t\t\t$templateMgr->append('pageHierarchy', array(Request::url(null, 'thesis'), 'plugins.generic.thesis.theses'));\n\t\t\t$thesisDao = &DAORegistry::getDAO('ThesisDAO');\n\n\t\t\t$thesisForm = &new StudentThesisForm();\n\t\t\t$thesisForm->initData();\n\t\t\t$thesisForm->display();\n\n\t\t} else {\n\t\t\t\tRequest::redirect(null, 'index');\n\t\t}\n\t}", "function handle($args)\n {\n parent::handle($args);\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $this->trySave();\n } else {\n $this->showForm();\n }\n }", "protected function setSubmittedMeta()\n {\n $this->setDataObject( new Tagline, 'tagline' );\n $this->content_obj->setMeta( 'tagline', $this->tagline->get() );\n \n $this->setImage( new Image, 'image_secondary' );\n if ( $this->image_secondary->get('file_name') ) {\n $this->content_obj->setMeta('image_secondary', $this->image_secondary->getFullName() );\n $this->processImage( 'image_secondary' );\n }\n \n $this->setDataObject( new Video, 'video' );\n $this->content_obj->setMeta( 'video', $this->video->get() );\n \n $this->setDataObject( new VideoDescription, 'video_description' );\n $this->content_obj->setMeta( 'video_description', $this->video_description->get() );\n \n $this->setDataObject( new SelectableCharity, 'selectable' );\n $this->content_obj->setMeta( 'selectable', $this->selectable->get() );\n \n $this->setDataObject( new Rank, 'rank' );\n $this->content_obj->setMeta( 'rank', $this->rank->get() );\n \n $this->setDataObject( new Url, 'url' );\n $this->content_obj->setMeta( 'url', $this->url->get() );\n }", "function handlePOSTRequest() {\n if (array_key_exists('submitProjectionRequest', $_POST)) {\n handleProjectionRequest();\n }\n }", "function submit($args, $request) {\n\t\t$step = (int) array_shift($args);\n\t\t$articleId = (int) $request->getUserVar('articleId');\n\t\t$journal =& $request->getJournal();\n\n\t\t$this->validate($request, $articleId, $step, 'author.submit.authorSubmitLoginMessage');\n\t\t$article =& $this->article;\n\t\t$this->setupTemplate($request, true);\n\n\t\t$formClass = \"AuthorSubmitStep{$step}Form\";\n\t\timport(\"classes.author.form.submit.$formClass\");\n\n\t\t$submitForm = new $formClass($article, $journal, $request);\n\t\tif ($submitForm->isLocaleResubmit()) {\n\t\t\t$submitForm->readInputData();\n\t\t} else {\n\t\t\t$submitForm->initData();\n\t\t}\n\t\t$submitForm->display();\n\t}", "protected function onSubmit()\r {\r }", "function attachment_submitbox_metadata()\n {\n }", "public function handleSubmit()\n {\n // process: just display the form.\n if ((!empty($_POST[\"fromHome\"])) ||\n (!empty($_POST[\"fromStaffHomePage\"]))) {\n $this->fromHomePage = true;\n }\n if ($this->fromHomePage) {\n return;\n }\n\n // Clear camper ID from the session, in case multiple campers are\n // being added in the same browser.\n unset($_SESSION[\"camper_id\"]);\n\n // Check for submitted values. Fire an error if required inputs\n // are missing, and grab defaults if applicable.\n foreach ($this->columns as $col) {\n $val = test_input($_POST[$col->name]);\n if ($val === null) {\n if ($col->required) {\n $this->colName2Error[$col->name] = errorString(\"Missing value for required field\");\n continue;\n }\n if (!is_null($col->defaultValue)) {\n $val = $col->defaultValue;\n } else {\n continue;\n }\n }\n $this->col2Val[$col->name] = $val;\n }\n if (!empty($this->colName2Error)) {\n // If we hit any errors, stop here and display, so the user\n // can correct them.\n return;\n }\n\n // Check to see if this camper registration is a duplicate, which\n // we define as having the same first and last name, and edah. If\n // a dup is detected, display an overlay that lets the user either\n // continue to the edit-camper page, with the ID set to the existing\n // camper ID, or else lets them start the add form again, with the\n // fields cleared.\n $db = new DbConn();\n $db->isSelect = true;\n $db->addColVal($this->col2Val[\"first\"], 's');\n $db->addColVal($this->col2Val[\"last\"], 's');\n $db->addColVal($this->col2Val[\"edah_id\"], 'i');\n $sql = \"SELECT c.camper_id camper_id, e.name edah_name FROM campers c, edot e WHERE c.edah_id = e.edah_id AND \" .\n \"c.first = ? AND c.last = ? AND c.edah_id = ?\";\n $result = $db->doQuery($sql, $err);\n if (($result !== false) && ($result->num_rows > 0)) {\n // If the query succeeded and returned one or more rows, then\n // we've found a duplicate.\n $row = mysqli_fetch_assoc($result);\n $this->duplicateCamperDesc = $this->col2Val[\"first\"] . \" \" . $this->col2Val[\"last\"] . \" in \" . $row[\"edah_name\"];\n return;\n }\n\n // At this point, we have valid new-camper data. Set all our\n // column data in the SESSION hash, so that ajax methods can pick it\n // up.\n foreach ($this->col2Val as $colName => $colVal) {\n $_SESSION[$colName] = $colVal;\n }\n\n // Go to the choice-ranking page.\n $rankChoicesUrl = urlIfy(\"rankCamperChoices.html\");\n echo (\"<script type=\\\"text/javascript\\\">window.location.replace(\\\"$rankChoicesUrl\\\");</script>\");\n exit();\n }", "function _submit_data()\n {\n\t$data = $this->_get_data_from_post();\n\t//$this->debug($_FILES);\n\tif (isset($_FILES['photo']) && $_FILES['photo']['name'] != NULL) {\n\t $data['image'] = Modules::run('upload_manager/upload', 'photo', 'profile');\n\t}\n\n\t$id = $this->uri->segment(3) == 'edit' ? $this->session->user_id : '';\n\tif (is_numeric($id)) {\n\t $this->_update($id, $data);\n\t Modules::run('auth/create_session', $this->session->user_id);\n\t redirect($this->uri->segment(3) == 'edit' ? 'users/profile' : 'users');\n\t} else {\n\t $this->_insert($data);\n\t redirect('login');\n\t}\n }", "function handle_form() {\n\t\tglobal $wpdb;\n\t\t\n\t\t// Exit if user not logged in\n\t\t// TODO: GET THIS WORKING TO AVOID NON-ADMINS USING IT\n/*\t\tif( ! is_user_logged_in() ) {\n\t\t\tcpd_not_logged_in_message();\n\t\t\treturn;\t\n\t\t}\n*/\n\t\t// Exit if the Cancel button was pressed, and redirect to page that lists all orgs\n\t\tif( isset( $_POST['submit'] ) && 'Cancel' == $_POST['submit'] ) {\n\t\t\t\n\t\t\t// TODO: Check destination\n\t\t\twp_safe_redirect( site_url() . '/admin/list-orgs' );\n\t\t\texit();\n\t\t}\n\n\t\t$org = new Organisation();\n\n\t\t$org->save_org_from_post();\n\t\t\n\t}", "public function finish()\n {\n parent::finish();\n \n $form_entry_list_method = sprintf( 'get_%s_entry_list', $this->get_subject() );\n $session = lib::create( 'business\\session' );\n $db_user = $session->get_user();\n $db_role = $session->get_role();\n\n foreach( $this->get_record_list() as $record )\n {\n // determine who has worked on the form\n $typist_1 = 'n/a';\n $typist_1_submitted = false;\n $typist_2 = 'n/a';\n $typist_2_submitted = false;\n\n $form_entry_list = $record->$form_entry_list_method();\n $db_form_entry = current( $form_entry_list );\n if( $db_form_entry )\n {\n $typist_1 = $db_form_entry->get_user()->name;\n $typist_1_submitted = !$db_form_entry->deferred;\n }\n $db_form_entry = next( $form_entry_list );\n if( $db_form_entry )\n {\n $typist_2 = $db_form_entry->get_user()->name;\n $typist_2_submitted = !$db_form_entry->deferred;\n }\n\n // if both typists have submitted and this form is still in the list then there is a conflict\n $conflict = $typist_1_submitted && $typist_2_submitted;\n\n $this->add_row( $record->id,\n array( 'id' => $record->id,\n 'date' => $record->date,\n 'typist_1' => $typist_1,\n 'typist_1_submitted' => $typist_1_submitted,\n 'typist_2' => $typist_2,\n 'typist_2_submitted' => $typist_2_submitted,\n 'conflict' => $conflict ) );\n }\n\n $this->finish_setting_rows();\n }", "public function submit() {\r\n\t\t$name_value_pairs = array();\r\n\t\tforeach ( $this->request_data as $key => $value ) {\r\n\t\t\t$name_value_pairs[] = $key . '=' . rawurlencode( $value );\r\n\t\t}\r\n\r\n\t\t$url = 'https://mms.paymentsensegateway.com/Pages/PublicPages/PaymentForm.aspx';\r\n\t\t$params = implode( '&', $name_value_pairs );\r\n\t\theader( 'Location: ' . $url . '?' . $params, false );\r\n\t\texit();\r\n\t}", "public function onSubmit();", "function culturefeed_entry_ui_edit_collaboration_data_form_submit(array &$form, array &$form_state) {\n\n $consumer_key = variable_get('culturefeed_api_application_key', '');\n /* @var \\CultureFeed_Cdb_Item_Event $event */\n $event = $form['#event'];\n\n if ($consumer_key && $event && isset($form_state['values']['collaboration'])) {\n\n foreach ($form_state['values']['collaboration'] as $keyword => $collaboration) {\n\n $title = $collaboration['title'];\n $copyright = isset($collaboration['image']['copyright_text']) ? $collaboration['image']['copyright_text'] : '';\n $plain_text = $collaboration['text'];\n $image_file = '';\n $image = '';\n\n if ($collaboration['image']['upload']) {\n\n $image_file = file_load($collaboration['image']['upload']);\n $image_file->status = FILE_STATUS_PERMANENT;\n file_save($image_file);\n file_usage_add($image_file, 'culturefeed_entry_ui', 'event', $image_file->fid);\n $image = file_create_url($image_file->uri);\n\n }\n\n $description = drupal_json_encode(array(\n 'keyword' => $keyword,\n 'text' => $plain_text,\n 'image' => $image,\n 'article' => $collaboration['article'],\n ));\n\n /** @var CultureFeed_EntryApi $entryApi */\n $entryApi = Drupalculturefeed_EntryApi::getLoggedInUserInstance();\n\n $entryApi->addCollaborationLinkToEvent(\n $event,\n culturefeed_entry_ui_get_preferred_language(),\n $plain_text,\n $title,\n $copyright,\n $consumer_key,\n $description\n );\n\n // @codingStandardsIgnoreStart\n // Remove the file(s).\n /*if ($image_file) {\n file_delete($image_file);\n }\n if (isset($collaboration['image']['original_file'])) {\n $file = file_load($collaboration['image']['original_file']);\n file_delete($file);\n }*/\n // @codingStandardsIgnoreEnd\n\n // Also save the keyword directly as keyword.\n $keywords = array(\n $keyword => new CultureFeed_Cdb_Data_Keyword($keyword, FALSE),\n );\n $entryApi->addTagToEvent($event, $keywords);\n\n }\n\n }\n\n}", "public function mappingFormSubmit(array &$form, FormStateInterface $form_state);", "protected function postProcess()\n {\n $form_values = [];\n $formUpdated = '';\n $messages = '';\n\n if ((bool) Tools::isSubmit('submitDoofinderModuleLaunchReindexing')) {\n $this->indexApiInvokeReindexing();\n }\n if (((bool) Tools::isSubmit('submitDoofinderModuleDataFeed')) == true) {\n $form_values = array_merge($form_values, $this->getConfigFormValuesDataFeed());\n $formUpdated = 'data_feed_tab';\n }\n if (((bool) Tools::isSubmit('submitDoofinderModuleSearchLayer')) == true) {\n $form_values = array_merge($form_values, $this->getConfigFormValuesSearchLayer());\n $formUpdated = 'search_layer_tab';\n }\n\n if (((bool) Tools::isSubmit('submitDoofinderModuleAdvanced')) == true) {\n $form_values = array_merge($form_values, $this->getConfigFormValuesAdvanced());\n $formUpdated = 'advanced_tab';\n $messages .= $this->testDoofinderApi();\n $this->context->smarty->assign('adv', 1);\n }\n\n foreach (array_keys($form_values) as $key) {\n $postKey = str_replace(['[', ']'], '', $key);\n $value = Tools::getValue($postKey);\n\n if (isset($form_values[$key]['real_config'])) {\n $postKey = $form_values[$key]['real_config'];\n }\n if (is_array($value)) {\n $value = implode(',', $value);\n }\n if ($postKey === 'DF_FEED_FULL_PATH') {\n Configuration::updateValue('DF_FEED_MAINCATEGORY_PATH', 0);\n }\n $value = trim($value);\n Configuration::updateValue($postKey, $value);\n }\n\n if ($formUpdated == 'data_feed_tab') {\n if ((bool) Configuration::get('DF_UPDATE_ON_SAVE_DELAY')) {\n $this->setSearchEnginesByConfig();\n }\n if (Tools::getValue('DF_UPDATE_ON_SAVE_DELAY') && (int) Tools::getValue('DF_UPDATE_ON_SAVE_DELAY') < 15) {\n Configuration::updateValue('DF_UPDATE_ON_SAVE_DELAY', 15);\n }\n\n $msg = sprintf('<p>%1$s</p><p><form method=\"post\" action=\"\"><button type=\"submit\" class=\"btn btn-primary\" name=\"submitDoofinderModuleLaunchReindexing\">%2$s</button></form></p>',\n $this->l('You\\'ve just changed a data feed option. It may be necessary to reprocess the index to apply these changes effectively.'),\n $this->l('Launch reindexing'));\n $messages .= $this->displayWarningCtm($msg, false, true);\n }\n\n if (!empty($formUpdated)) {\n $messages .= $this->displayConfirmationCtm($this->l('Settings updated!'));\n $this->context->smarty->assign('formUpdatedToClick', $formUpdated);\n }\n\n return $messages;\n }", "public function processAction() {\n\n if (!$this->validateRequest()) {\n $this->_helper->viewRenderer->setNoRender(true);\n $this->_helper->layout()->disableLayout();\n return;\n }\n\n $request = $this->getRequest();\n\n // Check if we have a POST request, otherwise, redirect\n if (!$request->isPost()) {\n return $this->_helper->redirector('index');\n }\n //Retrieving the form\n $form = $this->getForm();\n if (!$form->isValid($request->getPost())) {// Invalid entries\n $this->view->message = 'process-authorize';\n $this->view->form = $form;\n return $this->render('index'); // re-render the login form\n }\n\n if ($form->getValue('yes')) {//Resource Owner says yes\n $this->processApprove($form->getValues());\n } else if ($form->getValue(\"no\")) {//Resource Owner says no\n $this->processDeny($form->getValues());\n } else {//unrecognized value\n $this->view->message = 'process-authorize';\n $this->view->form = $form;\n return $this->render('index'); // re-render the login form\n }\n }", "public function submit_handler() {\r\n\t\t// Posted Data\r\n\r\n\t\ttry {\r\n\t\t\t// Init fields\r\n\t\t\t$this->init_fields();\r\n\r\n\t\t\t// Get posted values\r\n\t\t\t$values = $this->get_posted_fields();\r\n\t\r\n\t\t\tif ( empty( $_POST['submit_listing'] ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Validate required\r\n\t\t\tif ( is_wp_error( ( $return = $this->validate_fields( $values ) ) ) ) {\r\n\t\t\t\tthrow new Exception( $return->get_error_message() );\r\n\t\t\t}\r\n\r\n\r\n\t\t\tif ( ! is_user_logged_in() ) {\r\n\t\t\t\tthrow new Exception( __( 'You must be signed in to post a new listing.', 'listeo_core' ) );\r\n\t\t\t}\r\n\r\n\t\t\r\n\t\t\t$post_title = $values['basic_info']['listing_title'];\r\n\t\t\t$post_content = $values['details']['listing_description'];\r\n\t\t\t$product_id = (isset($values['basic_info']['product_id'])) ? $values['basic_info']['product_id'] : '' ;\r\n\t\t\t\r\n\t\t\t// Add or update listing as a WoCommerce product and save product id to values\r\n\t\t\r\n\t\t\t\t$values['basic_info']['product_id'] = $this -> save_as_product($post_title,$post_content,$product_id);\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t$content = '';\r\n\r\n\t\t\t//locate listing_description\r\n\t\t\tforeach ($values as $section => $s_fields) {\r\n\t\t\t\tforeach ($s_fields as $key => $value) {\r\n\t\t\t\t\tif($key == 'listing_description') {\r\n\t\t\t\t\t\t$content = $value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\t//Update the listing\r\n\t\t\t$this->save_listing( $values['basic_info']['listing_title'], $content, $this->listing_id ? '' : 'preview', $values );\r\n\t\t\t\r\n\r\n\t\t\t$this->update_listing_data( $values );\r\n\r\n\t\t\t// Successful, show next step\r\n\t\t\t$this->step++;\r\n\r\n\r\n\t\t} catch ( Exception $e ) {\r\n\r\n\t\t\t$this->add_error( $e->getMessage() );\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "public function submit()\n\t{\n\t\tJRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t// Initialise variables.\n\t\t$app\t= JFactory::getApplication();\n\t\t$model\t= $this->getModel('items');\n\n\t\t// Get the data from the form POST\n\t\t$data = JRequest::getVar('jform', array(), 'post', 'array');\n\t\t$img = JRequest::getVar('jform', array(), 'files', 'array');\n\n\t\t$category_id = $data['category_id'];\n // Now update the loaded data to the database via a function in the model\n $upditem = $model->updItem($data, $img);\n\n \t// check if ok and display appropriate message. This can also have a redirect if desired.\n\n if ($upditem) {\n \tJError::raiseNotice( 100, 'Category successfuly saved!' );\n } else {\n JError::raiseNotice( 100, 'An error has occured. <br> Category not saved' );\n } \n\n // redirect\n $url = JRoute::_('index.php?option=com_jfilemanager&view=items&category_id='.$category_id);\n\t\t$app->redirect($url);\n\n\t\treturn true;\n\t}", "function handlePost()\n {\n // CSRF protection\n $token = $this->trimmed('token');\n if (!$token || $token != common_session_token()) {\n // TRANS: Client error displayed when the session token does not match or is not given.\n $this->showForm(_m('There was a problem with your session token. '.\n 'Try again, please.'));\n return;\n }\n\n if ($this->oprofile) {\n if ($this->arg('submit')) {\n $this->saveFeed();\n return;\n }\n }\n $this->showForm();\n }", "function process_form_submission() {\n\t\t// Add a filter to replace tokens in the subject field with sanitized field values\n\t\tadd_filter( 'contact_form_subject', array( $this, 'replace_tokens_with_input' ), 10, 2 );\n\n\t\t$id = stripslashes( $_POST['contact-form-id'] );\n\n\t\tif ( is_user_logged_in() ) {\n\t\t\tcheck_admin_referer( \"contact-form_{$id}\" );\n\t\t}\n\n\t\t$is_widget = 0 === strpos( $id, 'widget-' );\n\n\t\t$form = false;\n\n\t\tif ( $is_widget ) {\n\t\t\t// It's a form embedded in a text widget\n\n\t\t\t$this->current_widget_id = substr( $id, 7 ); // remove \"widget-\"\n\t\t\t$widget_type = implode( '-', array_slice( explode( '-', $this->current_widget_id ), 0, -1 ) ); // Remove trailing -#\n\n\t\t\t// Is the widget active?\n\t\t\t$sidebar = is_active_widget( false, $this->current_widget_id, $widget_type );\n\n\t\t\t// This is lame - no core API for getting a widget by ID\n\t\t\t$widget = isset( $GLOBALS['wp_registered_widgets'][$this->current_widget_id] ) ? $GLOBALS['wp_registered_widgets'][$this->current_widget_id] : false;\n\n\t\t\tif ( $sidebar && $widget && isset( $widget['callback'] ) ) {\n\t\t\t\t// This is lamer - no API for outputting a given widget by ID\n\t\t\t\tob_start();\n\t\t\t\t// Process the widget to populate Grunion_Contact_Form::$last\n\t\t\t\tcall_user_func( $widget['callback'], array(), $widget['params'][0] );\n\t\t\t\tob_end_clean();\n\t\t\t}\n\t\t} else {\n\t\t\t// It's a form embedded in a post\n\n\t\t\t$post = get_post( $id );\n\n\t\t\t// Process the content to populate Grunion_Contact_Form::$last\n\t\t\tapply_filters( 'the_content', $post->post_content );\n\t\t}\n\n\t\t$form = Grunion_Contact_Form::$last;\n\n\t\tif ( ! $form )\n\t\t\treturn false;\n\n\t\tif ( is_wp_error( $form->errors ) && $form->errors->get_error_codes() )\n\t\t\treturn $form->errors;\n\n\t\t// Process the form\n\t\treturn $form->process_submission();\n\t}", "public function submit() {\n $post = Post::submit();\n require_once('view/posts/submit.php');\n \n \n }", "protected function _handlePostAction()\n {\n $postData = $this->getRequest()->getPost();\n\n switch (true) {\n case array_key_exists('_cancel', $postData);\n $this->_goto($this->_getBrowseAction());\n break;\n }\n }", "function meta_boxes_save() {\r\n\t\t\r\n\t\t// Only process if the form has actually been submitted\r\n\t\tif (\r\n\t\t\tisset( $_POST['_wpnonce'] ) &&\r\n\t\t\tisset( $_POST['post_ID'] )\r\n\t\t) {\r\n\t\t\t\r\n\t\t\t// Do nonce security check\r\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\r\n\t\t\t\r\n\t\t\t// Grab post ID\r\n\t\t\t$post_ID = (int) $_POST['post_ID'];\r\n\t\t\t\r\n\t\t\t// Iterate through each possible piece of meta data\r\n\t\t\tforeach( $this->post_meta as $key => $value ) {\r\n\t\t\t\tif ( isset( $_POST['_' . $key] ) ) {\r\n\t\t\t\t\t$data = esc_html( $_POST['_' . $key] ); // Sanitise data input\r\n\t\t\t\t\tupdate_post_meta( $post_ID, '_' . $key, $data ); // Store the data\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public function configFormSubmit(&$values) {\n if ($author = user_load_by_name($values['author'])) {\n $values['author'] = $author->uid;\n }\n else {\n $values['author'] = 0;\n }\n parent::configFormSubmit($values);\n }", "public function process() {\r\n\r\n\t\t// reset cookie\r\n\t\tif (\r\n\t\t\tisset( $_GET[ 'new' ] ) &&\r\n\t\t\tisset( $_COOKIE[ 'listeo-submitting-listing-id' ] ) &&\r\n\t\t\tisset( $_COOKIE[ 'listeo-submitting-listing-key' ] ) &&\r\n\t\t\tget_post_meta( $_COOKIE[ 'listeo-submitting-listing-id' ], '_submitting_key', true ) == $_COOKIE['listeo-submitting-listing-key']\r\n\t\t) {\r\n\t\t\tdelete_post_meta( $_COOKIE[ 'listeo-submitting-listing-id' ], '_submitting_key' );\r\n\t\t\tsetcookie( 'listeo-submitting-listing-id', '', time() - 3600, COOKIEPATH, COOKIE_DOMAIN, false );\r\n\t\t\tsetcookie( 'listeo-submitting-listing-key', '', time() - 3600, COOKIEPATH, COOKIE_DOMAIN, false );\r\n\r\n\t\t\twp_redirect( remove_query_arg( array( 'new', 'key' ), $_SERVER[ 'REQUEST_URI' ] ) );\r\n\r\n\t\t}\r\n\r\n\t\t$step_key = $this->get_step_key( $this->step );\r\n\r\n\t\tif(isset( $_POST[ 'listeo_core_form' ] )) {\r\n\t\t\r\n\r\n\t\t\tif ( $step_key && isset( $this->steps[ $step_key ]['handler']) && is_callable( $this->steps[ $step_key ]['handler'] ) ) {\r\n\t\t\t\tcall_user_func( $this->steps[ $step_key ]['handler'] );\r\n\t\t\t}\r\n\t\t}\r\n\t\t$next_step_key = $this->get_step_key( $this->step );\r\n\r\n\t\t// if the step changed, but the next step has no 'view', call the next handler in sequence.\r\n\t\tif ( $next_step_key && $step_key !== $next_step_key && ! is_callable( $this->steps[ $next_step_key ]['view'] ) ) {\r\n\t\t\t$this->process();\r\n\t\t}\r\n\r\n\t}", "public function postSubmit(FormEvent $event)\n {\n if (!$event->getForm()->isRoot()) {\n return;\n }\n\n // Only act if the form is valid\n if (!$event->getForm()->isValid()) {\n return;\n }\n\n $data = $event->getForm()->getData();\n\n $this->sendNotifications($this->replaceOptionValueWithText($event->getForm(), $data));\n\n $this->setFlashes();\n\n $this->writeToContentype($data);\n\n foreach ($this->flashes as $flash) {\n $this->app['session']->getFlashBag()->set($flash['type'], $flash['message']);\n }\n }", "function handlePOSTRequest() {\n if (array_key_exists('submitGroupByRequest', $_POST)) {\n handleGroupByRequest();\n }\n }", "function post_handler() {\r\n\r\n if ($this->action == 'new' or $this->action == 'edit') { # handle new-save\r\n # check permission first\r\n if ( ($this->action == 'new' and !$this->allow_new) or ($this->action == 'edit' and !$this->allow_edit) )\r\n die('Permission not given for \"'.$this->action.'\" action.');\r\n\r\n $_REQUEST['num_row'] = intval($_REQUEST['num_row']) > 0? intval($_REQUEST['num_row']): 1; # new row should get the number of row to insert from num_row\r\n # import suggest field into current datasource (param sugg_field[..]). note: suggest field valid for all rows\r\n if ($this->action == 'new')\r\n $this->import_suggest_field_to_ds();\r\n # only do this if post come from edit form. bground: browse mode now can contain <input>, which value got passed to edit/new mode\r\n if ($this->_save == '') { # to accomodate -1 (preview)\r\n\t\t\t\treturn False;\r\n\t\t\t}\r\n\r\n $this->import2ds(); # only do this if post come from edit form. bground: browse mode now can contain <input>, which value got passed to edit/new mode\r\n $this->db_count = $_REQUEST['num_row']; # new row should get the number of row to insert from num_row\r\n # check requirement\r\n\r\n if (!$this->validate_rows()) # don't continue if form does not pass validation\r\n return False;\r\n\r\n if ($this->action == 'new') {\r\n for ($i = 0; $i < $this->db_count; $i++) {\r\n if (!$this->check_datatype($i)) { # check duplicate index\r\n return False;\r\n }\r\n\r\n if (!$this->check_duplicate_index($i)) { # check duplicate index\r\n return False;\r\n }\r\n if (!$this->check_insert($i)) { # check insertion\r\n return False;\r\n }\r\n }\r\n\r\n if ($this->preview[$this->action] and $this->_save == -1) { # show preview page instead\r\n $this->_preview = True;\r\n return False;\r\n }\r\n\r\n for ($i = 0; $i < $this->db_count; $i++) {\r\n $this->insert($i);\r\n }\r\n\r\n if ($this->_go != '') {\r\n while (@ob_end_clean());\r\n header('Location: '.$this->_go);\r\n exit;\r\n }\r\n }\r\n elseif ($this->action == 'edit') {\r\n $this->populate($this->_rowid, True);\r\n for ($i = 0; $i < $this->db_count; $i++) {\r\n #~ if (!$this->check_duplicate_index($i)) { # check duplicate index\r\n #~ return False;\r\n #~ }\r\n if (!$this->check_update($i)) { # check insertion\r\n return False;\r\n }\r\n }\r\n\r\n if ($this->preview[$this->action] and $this->_save == -1) { # show preview page instead\r\n $this->_preview = True;\r\n return False;\r\n }\r\n\r\n for ($i = 0; $i < $this->db_count; $i++) {\r\n $this->update($i);\r\n }\r\n\r\n if ($this->_go != '') {\r\n #~ include('footer.inc.php');\r\n header('Location: '.$this->_go);\r\n exit;\r\n }\r\n }\r\n }\r\n elseif ($this->action == 'csv') {\r\n /* generate CSV representation of loaded datasource\r\n http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm\r\n */\r\n if (AADM_ON_BACKEND!=1)\r\n die('Permission not given for \"'.$this->action.'\" action.');\r\n $this->browse_rows = 0; # show all data\r\n $this->populate();\r\n $rows = array();\r\n $fields = array();\r\n foreach ($this->properties as $colvar=>$col) {\r\n $vtemp = $this->ds->{$colvar}[$i];\r\n $vtemp = str_replace('\"','\"\"',$vtemp);\r\n $vtemp = (strpos($vtemp,',') === false and strpos($vtemp,'\"') === false and strpos($vtemp,\"\\n\") === false)? $vtemp: '\"'.$vtemp.'\"';\r\n $fields[] = (strpos($col->label,',') === false)? $col->label: '\"'.$col->label.'\"';\r\n }\r\n $rows[] = join(',',$fields);\r\n for ($i = 0; $i < $this->db_count; $i++) {\r\n $fields = array();\r\n foreach ($this->properties as $colvar=>$col) {\r\n $vtemp = $this->ds->{$colvar}[$i];\r\n $vtemp = str_replace('\"','\"\"',$vtemp);\r\n $vtemp = (strpos($vtemp,',') === false and strpos($vtemp,'\"') === false and strpos($vtemp,\"\\n\") === false)? $vtemp: '\"'.$vtemp.'\"';\r\n $fields[] = $vtemp;\r\n }\r\n $rows[] = join(',',$fields);\r\n }\r\n #~ header('Content-type: application/vnd.ms-excel');\r\n header('Content-type: text/comma-separated-values');\r\n header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');\r\n header('Content-Disposition: inline; filename=\"dump.csv\"');\r\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\r\n header('Pragma: public');\r\n header('Expires: 0');\r\n\r\n echo join(\"\\r\\n\",$rows);\r\n exit();\r\n }\r\n else { # no-act handler, call its post function callbacks if available\r\n if (AADM_ON_BACKEND==1) {\r\n $callback = 'act_'.$this->action;\r\n if (method_exists($this, $callback)) {\r\n $this->$callback(True);\r\n }\r\n }\r\n }\r\n }", "public function public_form_response_handler() {\n\n\t\t$nonce = $_POST['_wpnonce'];\n if (!wp_verify_nonce( $nonce, 'submit_coinqvest_checkout_8b%kj@')) {\n exit; // Get out of here, the nonce is rotten!\n }\n\n\t\t$this->checkout_form = new Checkout_Form($this->plugin_name_url);\n\t\t$this->checkout_form->process_checkout();\n\n\t}", "public function execute()\n\t{\n\t\t$opf = Opl_Registry::get('opf');\n\n\t\t$this->invokeEvent('preInit');\n\t\t$this->onInit();\n\t\t$this->invokeEvent('postInit');\n\n\t\t// Validate the input data.\n\t\t$data = $this->_retrieveData();\n\n\t\t// Decide, if the form has been sent to us.\n\t\tif($_SERVER['REQUEST_METHOD'] == $this->_method && isset($data[$opf->formInternalId]))\n\t\t{\n\t\t\t// Get the internal data and remove them from the \"official\" scope.\n\t\t\t$internals = $data[$opf->formInternalId];\n\t\t\tunset($data[$opf->formInternalId]);\n\n\t\t\t// The names must match.\n\t\t\tif(isset($internals['name']) && $internals['name'] == $this->_name)\n\t\t\t{\n\t\t\t\t$this->_step = 0;\n\t\t\t\tif(isset($internals['step']))\n\t\t\t\t{\n\t\t\t\t\t$this->_step = (integer)$internals['step'];\n\t\t\t\t}\n\t\t\t\t$tracker = $this->getTracker();\n\t\t\t\t$tracker->setSequence($this);\n\t\t\t\t$current = 0;\n\t\t\t\twhile($current < $this->_step)\n\t\t\t\t{\n\t\t\t\t\t// Get the current form and advance the placeholder pointer.\n\t\t\t\t\t$form = $this->getNextSubform();\n\n\t\t\t\t\t// Attempt to ensure that the tracked data are still valid.\n\t\t\t\t\t$formData = $tracker->retrieve($internals, $current);\n\t\t\t\t\t$current++;\n\n\t\t\t\t\t$state = $form->_validate($formData);\n\t\t\t\t\tif(!$state)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_step = $current;\n\t\t\t\t\t\t$this->_state = $form->_state = self::ERROR;\n\t\t\t\t\t\t$form->populate($data);\n\t\t\t\t\t\t$form->_onRender($this->_view);\n\t\t\t\t\t\t$this->_onRender($this->_view);\n\t\t\t\t\t\t$this->invokeEvent('preRender');\n\t\t\t\t\t\t$form->invokeEvent('preRender');\n\t\t\t\t\t\t$form->onRender();\n\t\t\t\t\t\t$form->invokeEvent('postRender');\n\t\t\t\t\t\t$this->invokeEvent('postRender');\n\t\t\t\t\t\treturn $this->_state;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$form = $this->getNextSubform();\n\t\t\t\t// Now, the currently displayed form.\n\t\t\t\t$state = $form->_validate($data);\n\t\t\t\tif(!$state)\n\t\t\t\t{\n\t\t\t\t\t$this->_state = $form->_state = self::ERROR;\n\t\t\t\t\t$form->populate($data);\n\t\t\t\t\t$form->_onRender($this->_view);\n\t\t\t\t\t$form->invokeEvent('preRender');\n\t\t\t\t\t$form->onRender();\n\t\t\t\t\t$form->invokeEvent('postRender');\n\t\t\t\t\treturn $this->_state;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$tracker->track($data, $current);\n\t\t\t\t\t$form->_state = self::ACCEPTED;\n\t\t\t\t}\n\t\t\t\t// Decide, what to do next: display another form or return\n\t\t\t\t$this->_step++;\n\t\t\t\tif(($form = $this->getNextSubform()) === false)\n\t\t\t\t{\n\t\t\t\t\t$this->_state = self::ACCEPTED;\n\t\t\t\t\t$this->invokeEvent('preAccept');\n\t\t\t\t\t$this->onAccept();\n\t\t\t\t\t$this->invokeEvent('postAccept');\n\t\t\t\t\treturn $this->_state;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->_state = $form->_state = self::RENDER;\n\t\t\t\t\t$form->_onRender($this->_view);\n\t\t\t\t\t$this->_onRender($this->_view);\n\t\t\t\t\t$form->invokeEvent('preRender');\n\t\t\t\t\t$form->onRender();\n\t\t\t\t\t$form->invokeEvent('postRender');\n\t\t\t\t\treturn $this->_state;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$form = $this->getNextSubform();\n\t\t$this->_state = $form->_state = self::RENDER;\n\t\t$form->_onRender($this->_view);\n\t\t$this->_onRender($this->_view);\n\t\t$form->invokeEvent('preRender');\n\t\t$form->onRender();\n\t\t$form->invokeEvent('postRender');\n\t\treturn $this->_state;\n\t}", "abstract public function submit($data);", "public function submitEvent();", "public function callbackSubmit()\n {\n $reply = new Reply();\n $reply->setDb($this->di->get(\"db\"));\n $reply->find(\"id\", $this->form->value(\"id\"));\n $reply->delete();\n $this->di->get(\"response\")->redirect(\"comments\");\n }", "public function Handler() {\n\t\tif(isset($_POST['doAdd']) && empty($_POST['email'])) {\n\t\t $this->guestbookModel->Add(strip_tags($_POST['newEntry']));\n\t\t}\n\t\telseif(isset($_POST['doClear'])) {\n\t\t $this->guestbookModel->DeleteAll();\n\t\t}\n\t\telseif(isset($_POST['doCreate'])) {\n\t\t $this->guestbookModel->Init();\n\t\t} \n\t\t$this->RedirectTo($this->request->CreateUrl($this->request->controller));\n\t}", "private function formSubmitted() {\n\t\t\t\n\t\t\t// connect db\n\t\t\t$this->db->replicaConnect(Database::getName($this->par['lang'], $this->par['project']));\n\t\t\t\n\t\t\t// build query for outgoing links\n\t\t\t$this->par['page'] = str_replace(' ', '_', $this->par['page']);\n\t\t\t$t1 = 'SELECT s.pl_title';\n\t\t\t$t1 .= ' FROM pagelinks s';\n\t\t\t$t1 .= ' INNER JOIN page tp ON (s.pl_title = tp.page_title AND s.pl_namespace = tp.page_namespace)';\n\t\t\t$t1 .= ' INNER JOIN page sp ON (s.pl_from = sp.page_id AND s.pl_namespace = sp.page_namespace AND sp.page_title = ?)';\n\t\t\t$t1 .= ' WHERE s.pl_namespace = 0';\n\t\t\t$t1 .= ' AND s.pl_from_namespace = 0';\n\t\t\t\n\t\t\t// execute query\n\t\t\t$q1 = $this->db->executePreparedQuery($t1, 's', $this->par['page']);\n\t\t\t\n\t\t\t// check for sql errors\n\t\t\tif (Database::checkSqlQueryObject($q1) === false) {\n\t\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t\t$this->page->addInline('p', 'SQL Error: ' . $this->db->error, 'iw-error');\n\t\t\t\t$this->page->closeBlock();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$r1 = Database::fetchResult($q1);\n\t\t\t\n\t\t\t// build query for incoming links\n\t\t\t$t2 = 'SELECT tp.page_title';\n\t\t\t$t2 .= ' FROM page tp';\n\t\t\t$t2 .= ' INNER JOIN pagelinks t ON (tp.page_id = t.pl_from AND t.pl_title = ? AND t.pl_namespace = 0 AND t.pl_from_namespace = 0)';\n\t\t\t$t2 .= ' WHERE tp.page_is_redirect = 0';\n\t\t\t\n\t\t\t// execute query\n\t\t\t$q2 = $this->db->executePreparedQuery($t2, 's', $this->par['page']);\n\n\t\t\t// check for sql errors\n\t\t\tif (Database::checkSqlQueryObject($q2) === false) {\n\t\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t\t$this->page->addInline('p', 'SQL Error: ' . $this->db->error, 'iw-error');\n\t\t\t\t$this->page->closeBlock();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$r2 = Database::fetchResult($q2);\n\t\t\t\n\t\t\t$out = [];\n\t\t\t$inc = [];\n\t\t\t$common = [];\n\t\t\t$noback = [];\n\t\t\t$nolink = [];\n\t\t\tforeach ($r1 as $l1) {\n\t\t\t\t$out[] = $l1['pl_title'];\n\t\t\t}\n\t\t\tforeach ($r2 as $l2) {\n\t\t\t\t$inc[] = $l2['page_title'];\n\t\t\t}\n\t\t\t\n\t\t\t// get arrays\n\t\t\t$common = array_intersect($out, $inc);\n\t\t\t$noback = array_diff($out, $inc);\n\t\t\t$nolink = array_diff($inc, $out);\n\t\t\t\n\t\t\t// sort arrays\n\t\t\tsort($common);\n\t\t\tsort($noback);\n\t\t\tsort($nolink);\n\t\t\t\n\t\t\t// close queries\n\t\t\t$q1->close();\n\t\t\t$q2->close();\n\t\t\t\n\t\t\t// open statistics area\n\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t$this->page->addInline('h2', 'Statistics');\n\t\t\t\n\t\t\t$this->page->addInline('p', 'Page conjunction for ' . Hgz::buildWikilink($this->par['lang'], $this->par['project'], $this->par['page'], str_replace('_', ' ', $this->par['page']))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t. ' (' . Hgz::buildWikilink($this->par['lang'], $this->par['project'], 'Special:Whatlinkshere/' . $this->par['page'], 'What links here') . ')');\n\t\t\t\n\t\t\t// statistics\n\t\t\t$this->page->openBlock('p');\n\t\t\t$this->page->openBlock('ul');\n\t\t\t$this->page->addInline('li', count($out) . ' links on this page');\n\t\t\t$this->page->addInline('li', count($inc) . ' links to this page');\n\t\t\t$this->page->addInline('li', '<a href=\"#noback\">' . count($noback) . ' links on this page without backlinks</a>');\n\t\t\t$this->page->addInline('li', '<a href=\"#nolink\">' . count($nolink) . ' incoming links without corresponding outgoing links</a>');\n\t\t\t$this->page->addInline('li', '<a href=\"#mutual\">' . count($common) . ' mutual links</a>');\n\t\t\t$this->page->closeBlock(2);\n\t\t\t\n\t\t\t// open result area\n\t\t\t$this->page->closeBlock();\n\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t$this->page->addInline('h2', 'Results');\n\t\t\t\n\t\t\t// no backlinks\n\t\t\tif (count($noback) != 0) {\n\t\t\t\t$this->page->addHTML('<span id=\"noback\"></span>');\n\t\t\t\t$this->page->addInline('h3', 'Articles linked from ' . str_replace('_', ' ', $this->par['page']) . ' with no backlinks:');\n\t\t\t\t$this->page->openBlock('ul');\n\t\t\t\tforeach ($noback as $v1) {\n\t\t\t\t\t$this->page->addInline('li', Hgz::buildWikilink($this->par['lang'], $this->par['project'], $v1, str_replace('_', ' ', $v1)));\n\t\t\t\t}\n\t\t\t\t$this->page->closeBlock();\n\t\t\t}\n\n\t\t\t// no wikilinks\n\t\t\tif (count($nolink) != 0) {\n\t\t\t\t$this->page->addHTML('<span id=\"nolink\"></span>');\n\t\t\t\t$this->page->addInline('h3', 'Articles with links to ' . str_replace('_', ' ', $this->par['page']) . ' but no links from here:');\n\t\t\t\t$this->page->openBlock('ul');\n\t\t\t\tforeach ($nolink as $v2) {\n\t\t\t\t\t$this->page->addInline('li', Hgz::buildWikilink($this->par['lang'], $this->par['project'], $v2, str_replace('_', ' ', $v2)));\n\t\t\t\t}\n\t\t\t\t$this->page->closeBlock();\n\t\t\t}\n\n\t\t\t// common links\n\t\t\tif (count($common) != 0) {\n\t\t\t\t$this->page->addHTML('<span id=\"mutual\"></span>');\n\t\t\t\t$this->page->addInline('h3', 'Articles linked from ' . str_replace('_', ' ', $this->par['page']) . ' with backlinks (mutual links):');\n\t\t\t\t$this->page->openBlock('ul');\n\t\t\t\tforeach ($common as $v3) {\n\t\t\t\t\t$this->page->addInline('li', Hgz::buildWikilink($this->par['lang'], $this->par['project'], $v3, str_replace('_', ' ', $v3)));\n\t\t\t\t}\n\t\t\t\t$this->page->closeBlock();\n\t\t\t}\n\t\t\t\n\t\t\t// close result area\n\t\t\t$this->page->closeBlock();\n\t\t}", "protected function OnSubmit()\n {\n //tu codigo aqui\n }", "protected function handleFormAction(): void\n {\n $action = $_REQUEST['action'] ?? null;\n $editableColumns = $this->editableColumns();\n\n $isFormAction = in_array($action, ['edit', 'create']);\n $isAdmin = current_user_can('manage_options');\n $shouldSkip = 'GET' === $_SERVER['REQUEST_METHOD']\n || empty($_POST)\n || is_null($action);\n\n if ($shouldSkip || !$isFormAction || !$isAdmin) {\n return;\n }\n\n try {\n $this->validateEditableColumns($editableColumns, $_POST);\n } catch (\\Throwable $e) {\n $this->displayResourceNotice($e->getMessage());\n return;\n }\n\n $primaryKey = $this->newModel()->getPrimaryColumn();\n preg_match('/\\w+/', $_POST[$primaryKey] ?? '', $matches);\n\n $resourceId = $matches[0] ?? '';\n $values = $this->filterGuardedAttributes($editableColumns, $_POST);\n\n $model = !strlen($resourceId)\n ? $this->newModel()\n : $this->model::find($resourceId);\n\n $model->fill($values);\n $model->saveOrUpdate();\n\n $this->displayResourceNotice('Resource was updated', 'success');\n\n // to display the edit page after creating new resources\n if ($action === 'create') {\n $this->model = $model;\n }\n }", "public function onSubmit()\n {\n // Save or reset search term in session\n $this->setActiveTerm(post($this->getName()));\n\n // Trigger class event, merge results as viewable array\n $params = func_get_args();\n $result = $this->fireEvent('search.submit', [$params]);\n if ($result && is_array($result)) {\n [$redirect] = $result;\n\n return ($redirect instanceof RedirectResponse) ?\n $redirect : call_user_func_array('array_merge', $result);\n }\n }", "function parse_submit()\n\t\t{\n\t\t\t//inside the select box for submits\n\t\t\t$this->t->set_block('run_activity', 'block_submit_options', 'submit_options');\n\t\t\t//the select submit box\n\t\t\t$this->t->set_block('run_activity', 'block_submit_select_area', 'submit_select_area');\n\t\t\t//submit as buttons\n\t\t\t$this->t->set_block('run_activity', 'block_submit_buttons_area', 'submit_buttons_area');\n\t\t\t//the whole zone\n\t\t\t$this->t->set_block('run_activity', 'block_submit_zone', 'submit_zone');\n\t\t\t\n\t\t\tif (!($this->conf['use_automatic_parsing'])) \n\t\t\t{\n\t\t\t\t// the user decided he'll do it his own way\n\t\t\t\t//empty the whole zone\n\t\t\t\t$this->t->set_var(array('submit_zone' => ''));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$buttons = '';\n\t\t\t\tif (count($this->submit_array)==0)\n\t\t\t\t{\n\t\t\t\t\t//the user didn't give us any instruction\n\t\t\t\t\t// we draw a simple submit button\n\t\t\t\t\t$this->t->set_var(array('submit_area',''));\n\t\t\t\t\t$buttons .= '<td class=\"wf_submit_buttons_button\">';\n\t\t\t\t\t$buttons .= '<input name=\"wf_submit\" type=\"submit\" value=\"'.lang('Submit').'\"/>';\n\t\t\t\t\t$buttons .= '</td>';\n\t\t\t\t\t//set the buttons\n\t\t\t\t\t$this->t->set_var(array('submit_buttons' => $buttons));\n\t\t\t\t\t// hide the select box zone\n\t\t\t\t\t$this->t->set_var(array('submit_select_area'=> ''));\n\t\t\t\t\t//show the buttons zone\n\t\t\t\t\t$this->t->parse('submit_buttons_area', 'block_submit_buttons_area', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//now we have another user choice. he can choose multiple submit buttons\n\t\t\t\t\t//or a select with only one submit\n\t\t\t\t\tif ( ($this->conf['show_multiple_submit_as_select']) && (count($this->submit_array) > 1) )\n\t\t\t\t\t{\n\t\t\t\t\t\t//multiple submits in a select box\n\t\t\t\t\t\t//handling the select box \n\t\t\t\t\t\tforeach ($this->submit_array as $submit_button_name => $submit_button_value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->t->set_var(array(\n\t\t\t\t\t\t\t\t'submit_option_value'\t=> $submit_button_value,\n\t\t\t\t\t\t\t\t'submit_option_name'\t=> $submit_button_name,\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t//show the select box\n\t\t\t\t\t\t\t$this->t->parse('submit_options','block_submit_options',true);\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\t//we need at least one submit button\n\t\t\t\t\t\t$this->t->set_var(array(\n\t\t\t\t\t\t\t'submit_button_name'\t=> 'wf_submit',\n\t\t\t\t\t\t\t'submit_button_value'\t=> lang('submit'),\n\t\t\t\t\t\t));\n\t\t\t\t\t\t// hide the multiple buttons zone\n\t\t\t\t\t\t$this->t->set_var(array('submit_buttons_area'=> ''));\n\t\t\t\t\t\t//show the select box zone\n\t\t\t\t\t\t$this->t->parse('submit_select_area', 'block_submit_select_area', true);\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//multiple buttons with no select box or just one\n\t\t\t\t\t\t//draw input button for each entry\n\t\t\t\t\t\tforeach ($this->submit_array as $submit_button_name => $submit_button_value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//now we can have some special options, like jscode\n\t\t\t\t\t\t\tif (is_array($submit_button_value))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$button_val = $submit_button_value['label'];\n\t\t\t\t\t\t\t\t$confirm = $submit_button_value['confirm'];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$button_val = $submit_button_value;\n\t\t\t\t\t\t\t\t$confirm = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t \t$buttons .= '<td class=\"wf_submit_buttons_button\">';\n\t\t\t\t\t\t\t$buttons .= '<input name=\"'.$submit_button_name.'\" type=\"submit\" value=\"'.$button_val.'\" ';\n\t\t\t\t\t\t\tif (!!($confirm))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$buttons .= 'onClick=\"return confirmSubmit(\\''.$submit_button_name.'\\',\\''.$confirm.'\\')\"/>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$buttons .= '/>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$buttons .= '</td>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//set the buttons\n\t\t\t\t\t\t$this->t->set_var(array('submit_buttons' => $buttons));\n\t\t\t\t\t\t// hide the select box zone\n\t\t\t\t\t\t$this->t->set_var(array('submit_select_area'=> ''));\n\t\t\t\t\t\t//show the buttons zone\n\t\t\t\t\t\t$this->t->parse('submit_buttons_area', 'block_submit_buttons_area', true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//show the whole submit zone\n\t\t\t\t$this->t->parse('submit_zone', 'block_submit_zone', true);\n\t\t\t}\n\t\t}", "function _submit_data()\n {\n\t$data = $this->get_data_from_post();\n\t\n\t//$data['photo'] = Modules::run('upload_manager/upload','image');\n\t$id = $this->uri->segment( 3 );\n\tif ( is_numeric( $id ) ) {\n\t $this->_update( $id, $data );\n\t redirect( 'auth/profile/' . $id );\n\t} else {\n\t $this->_insert( $data );\n\t redirect( 'auth/add_lecturer' );\n\t}\n }", "function submit() {\n foreach ($this->submit_callbacks as $callback) {\n call_user_func($callback, $this);\n }\n foreach ($this->children as $element) {\n $element->submit();\n }\n }", "protected function process() {\n $username = $this->app()->request->post(\"username\");\n $fullName = $this->app()->request->post(\"fullname\");\n $phone = $this->app()->request->post(\"phone\");\n $password = $this->app()->request->post(\"password\");\n $cpassword = $this->app()->request->post(\"cpassword\");\n $currentLocation = $this->app()->request->post(\"curr-location\");\n $preferredLocation = $this->app()->request->post(\"pref-location\");\n $experience = $this->app()->request->post(\"experience\");\n $skills = $this->app()->request->post(\"skills\");\n\n $skillSet = explode(',', $skills);\n\n // Validation stuff\n if(!($this->validateRegistration($username, $phone, $password, $cpassword,$currentLocation,$preferredLocation,$skills,$experience))) {\n $this->setRedirectUri(\"home\");\n }\n\n require_once 'libs/Auth.php';\n $volunteerId = Auth::userId();\n\n require_once 'models/Volunteer.php';\n \n $volunteer = new Volunteer($volunteerId);\n $volunteer->registerSeeker($username, $fullName, $phone, $password, $currentLocation, $preferredLocation, $experience, $skillSet);\n }", "private function handlePostRequest() {\n $this->store();\n }", "public function process()\n\t{\n\t\tif(isset($_POST[$this->input_name()])) {\n\t\t\t$this->value = $_POST[$this->input_name()];\n\t\t}\n\t\telse {\n\t\t\t$this->value = false;\n\t\t}\n\t}", "protected function _processValidForm()\n {\n $table = $this->_getTable();\n\n $formValues = $this->_getForm()->getValues();\n\n if (!empty($formValues[$this->_getPrimaryIdKey()])) {\n $row = $this->_getRow($this->_getPrimaryId());\n } else {\n $row = $table->createRow();\n }\n\n foreach ($formValues as $key => $value) {\n if (isset($row->$key) && !$table->isIdentity($key)) {\n $row->$key = $value;\n }\n }\n\n $row->save();\n\n $this->_goto($this->_getBrowseAction());\n }", "function processForm()\r\n\t{\r\n\t\t$originalViewId = $this->viewId;\r\n\t\tparent::processForm();\r\n\t\t\r\n\t\t$this->mc->database->query(\"UPDATE \" . $this->mc->config['database_pref'] . \"views SET view_action = view_name WHERE view_id = ?\", array(array($this->viewId, \"i\")));\r\n\t\t\r\n\t\t//if(isset($_REQUEST['view_videoselection']) && $_REQUEST['view_videoselection'] != -1)\r\n\t\t\t// TODO: currently just statically inserted\r\n\t\t\t$this->mc->database->query(\"INSERT INTO \" . $this->mc->config['database_pref'] . \"concept_mediacenter (view_id, video_name, video_text, video_length, video_thumbnail, revision) VALUES(?, 'The Superbowl XLVI 2012.mp4', 'Superbowl XLVI Trailer', '4:16', 'superbowl_logo.jpg', ?)\", array(array($this->viewId, \"i\"), array($this->mc->config['current_revision'], \"i\")));\r\n\t\t\t$this->mc->database->query(\"INSERT INTO \" . $this->mc->config['database_pref'] . \"concept_mediacenter (view_id, video_name, video_text, video_length, video_thumbnail, revision) VALUES(?, 'Ahmad Bradshaw Touchdown.mp4', 'Ahmad Bradshaw Touchdown', '0:24', 'superbowl_shot.jpg', ?)\", array(array($this->viewId, \"i\"), array($this->mc->config['current_revision'], \"i\")));\r\n\t\t\t$this->mc->database->query(\"INSERT INTO \" . $this->mc->config['database_pref'] . \"concept_mediacenter (view_id, video_name, video_text, video_length, video_thumbnail, revision) VALUES(?, 'Jerome Simpson Touchdown Flip.mp4', 'Jerome Simpson Touchdown Flip', '0:26', 'nfl_logo_rasen.jpg', ?)\", array(array($this->viewId, \"i\"), array($this->mc->config['current_revision'], \"i\")));\r\n\t\t\t$this->mc->database->query(\"INSERT INTO \" . $this->mc->config['database_pref'] . \"concept_mediacenter (view_id, video_name, video_text, video_length, video_thumbnail, revision) VALUES(?, 'Tom Brady Final Throw.mp4', 'Tom Brady Final Throw', '1:33', 'nfl_logl_original.jpg', ?)\", array(array($this->viewId, \"i\"), array($this->mc->config['current_revision'], \"i\")));\r\n\t\t\t$this->mc->database->query(\"INSERT INTO \" . $this->mc->config['database_pref'] . \"concept_mediacenter (view_id, video_name, video_text, video_length, video_thumbnail, revision) VALUES(?, 'Best SuperBowl Moments.mp4', 'Best SuperBowl Moments', '3:19', 'superbowl_moments.jpg', ?)\", array(array($this->viewId, \"i\"), array($this->mc->config['current_revision'], \"i\")));\r\n\t\r\n\t\t// update concept type id for this view\r\n\t\t$conceptQuery = $this->mc->database->query(\"SELECT concept_id FROM \" . $this->mc->config['database_pref'] . \"concepts WHERE concept_key = 'mediacenter'\");\r\n\t\t$this->mc->database->query(\"UPDATE \" . $this->mc->config['database_pref'] . \"views SET view_c_type = ? WHERE view_id = ?\", array(array($conceptQuery->rows[0]->concept_id, \"i\"), array($this->viewId, \"i\")));\r\n\t\t\r\n\t\t$this->cleanUpDirectory();\r\n\t\t$this->createXmlFile();\r\n\t\t\r\n\t\t// re-create main xml file and refresh filelist\r\n\t\t$this->mc->filecreator->createGeneralFiles();\r\n\t\t$configSet = true;\r\n\t\tinclude_once('modules/filemanager.module.php');\r\n\t\t$fileManagerObj = new apdModuleFilemanager($this->mc);\r\n\t\t$fileManagerObj->refreshFilelist();\r\n\t\t\r\n\t\theader(\"Location: index.php?m=mediacenter&view_id=\" . $this->viewId);\r\n\t}", "private function _processPageForm($csrf)\r\n {\r\n\t\t$oldValues = $this->_getAllValuesDatabaseIndex();\r\n if ($this->getRequest()->isPost()) { // if the user is submitting the form\r\n\t\t\t$values = $_POST['Elements'];\r\n\t\t\tif ($this->_autoCsrfProtection && !$csrf->isValid($_POST)) {\r\n $this->_helper->_flashMessenger(__('There was an error on the form. Please try again.'), 'error');\r\n return;\r\n }\r\n\t\t\tif (!(\"\" == $_POST['item_type_id']) ) { // if the user assigned an item type, save it with the element id of 0. this will force an update if there is already a saved item type.\r\n\t\t\t\t$value = new DefaultMetadataValue;\r\n\t\t\t\t$value->element_id = 0;\r\n\t\t\t\t$value->input_order = 0;\r\n\t\t\t\t$value->text = $_POST['item_type_id'];\r\n\t\t\t\t$value->html = 0;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\t$value->setPostData($_POST);\r\n\t\t\t\t\t$value->save();\r\n\t\t\t\t// Catch validation errors.\r\n\t\t\t\t} catch (Omeka_Validate_Exception $e) {\r\n\t\t\t\t\t$this->_helper->flashMessenger($e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tforeach($values as $id => $texts) { //iterate over each textbox on the form and save them to the database\r\n\t\t\t\t\r\n\t\t\t\t$order = 0;\r\n\t\t\t\tforeach($texts as $text) {\r\n\t\t\t\t\tif (!(\"\" == trim($text['text']))) { // if the input has a value\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$value = new DefaultMetadataValue;\r\n\t\t\t\t\t\t$value->element_id = $id;\r\n\t\t\t\t\t\t$value->input_order = $order;\r\n\t\t\t\t\t\t$value->text = $text['text'];\r\n\t\t\t\t\t\t$value->html = intval($text['html']);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$oldValue = $this->_oldValue($value, $oldValues); // check for the corresponding old value\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!$oldValue) { // if the value's element does not have a value already in the database, save it\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t$value->setPostData($_POST);\r\n\t\t\t\t\t\t\t\t$value->save();\r\n\t\t\t\t\t\t\t// Catch validation errors.\r\n\t\t\t\t\t\t\t} catch (Omeka_Validate_Exception $e) {\r\n\t\t\t\t\t\t\t\t$this->_helper->flashMessenger($e);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (($value->text != $oldValue['text']) || ($value->html != $oldValue['html'])) { //if the value already in the database was changed or if the html boolean is different, update the database record.\r\n\t\t\t\t\t\t\t$value->id = $oldValue['id']; // having the id of an existing database record forces UPDATE instead of INSERT\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t$value->setPostData($_POST);\r\n\t\t\t\t\t\t\t\t$value->save();\r\n\t\t\t\t\t\t\t// Catch validation errors.\r\n\t\t\t\t\t\t\t} catch (Omeka_Validate_Exception $e) {\r\n\t\t\t\t\t\t\t\t$this->_helper->flashMessenger($e);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tunset($oldValues[$oldValue['id']]); // remove the old value from the array, so we don't delete it later\r\n\t\t\t\t\t\t} else { // otherwise, the value is unchanged and do not save it to the database\r\n\t\t\t\t\t\t\tunset($oldValues[$oldValue['id']]); // remove the old value from the array, so we don't delete it later\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t$order++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// delete old values not found in the form\r\n\t\t\tforeach($oldValues as $oldValue) {\r\n\t\t\t\t$oldValue->delete();\r\n\t\t\t}\r\n\t\t\t$this->_helper->flashMessenger(__('Default metadata have been saved.'), 'success');\r\n }\r\n }", "public function Create($extra_meta=array()) {\n $form_instance = $this->form_instance;\n // Retrieve the form instance\n $action_instance = $this->action_instance;\n // Create a new entry SQL helper\n $entries_sql_helper = new VCFF_Reports_Helper_SQL_Entries();\n // Add the entry\n $entries_sql_helper\n ->Add_Entry(array(\n 'form_uuid' => $form_instance->Get_UUID(),\n 'form_type' => $form_instance->Get_Type(),\n 'event_id' => $action_instance->Get_ID(),\n 'event_code' => $action_instance->Get_Code(),\n 'source_url' => 'http://something',\n ));\n // If extra meta information was supplied\n if ($extra_meta && is_array($extra_meta)) {\n // Loop through each submission meta item\n foreach ($extra_meta as $meta_key => $meta_data) {\n // Add the submission meta item\n $entries_sql_helper\n ->Add_Meta_Item(array(\n 'meta_code' => $meta_data['meta_code'],\n 'meta_value' => $meta_data['meta_value'],\n 'meta_label' => $meta_data['meta_label'],\n ));\n }\n }\n // Return the form fields\n $form_fields = $form_instance->fields;\n // Loop through each form field\n foreach ($form_fields as $machine_code => $field_instance) { \n // Add the entry\n $entries_sql_helper\n ->Add_Field_Item(array(\n 'machine_code' => $machine_code,\n 'field_label' => $field_instance->Get_Label(),\n 'field_value' => $field_instance->Get_Value(),\n 'field_value_html' => $field_instance->Get_HTML_Value(false),\n 'field_value_text' => $field_instance->Get_TEXT_Value(false),\n ));\n }\n // Store and retrieve the stored entry\n $entry = $entries_sql_helper->Store();\n \n $flags_sql_helper = new VCFF_Reports_Helper_SQL_Flags();\n \n $flags_sql_helper\n ->Add_Flag(array(\n 'entry_uuid' => $entry['uuid'],\n 'form_uuid' => $form_instance->Get_UUID(),\n 'flag_code' => 'unread',\n 'flag_data' => array('hey'),\n ))\n ->Store();\n \n return $this;\n }", "public function afterSubmit() {\n\t\t$this->setValue($this->serializeData($this->getValue()));\n\t}", "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}", "function opensky_upload_form_submit (array $form, array &$form_state) {\n extract($form_state['values']);\n\n $object = islandora_object_load($pid);\n\n try {\n $datastream = $object->constructDatastream($dsid, 'M');\n $datastream->label = 'PDF Datastream';\n $datastream->mimetype = 'application/pdf';\n $file = file_load($file);\n $path = drupal_realpath($file->uri);\n $datastream->setContentFromFile($path);\n\n $object->ingestDatastream($datastream);\n\n opensky_add_usage_and_version_elements_to_mods($object, $usage, $version);\n }\n catch (Exception $e) {\n drupal_set_message(t('@message', array('@message' => check_plain($e->getMessage()))), 'error');\n }\n}", "public function processform($args=null) {\n\n foreach ($_POST as $k => $v) {\n if (!$_POST[$k]) {\n return $this->index('wypełnij wszystkie pola');\n }\n }\n\n\n $this->postData = $this->sanitizePost($_POST);\n unset($_POST);\n\n $_SESSION['app_identifier'] = $app_identifier = date(\"Y-m-d\", time()) . '/' . time() . '/' . rand();\n\n $this->newApplication = Application::create(\n array('app_identifier' => $app_identifier,\n 'app_code' => $this->postData['doccode'],\n 'app_serialized' => serialize($this->postData))\n );\n\n $_SESSION['postCheck'] = true;\n\n header(\"Location: \" . BASE_URL.'addapp');\n }", "public function processForm(ServerData $server);", "function wpgnv_process_form() {\n\tif ( empty( $_POST['post-title'] ) && wp_verify_nonce( $_POST['wpgnv_new_idea'], 'wpgnv_new_idea' ) ) {\n\t\tglobal $wpgnv_error;\n\t\t$wpgnv_error = 'You left the Idea field empty. Please enter an Idea and THEN submit it.';\n\t\treturn;\n\t}\n\tif ( isset( $_POST ) && wp_verify_nonce( $_POST['wpgnv_new_idea'], 'wpgnv_new_idea' ) ) {\n\t\t$post_args = array (\n\t\t\t'post_type' => 'ideas',\n\t\t\t'post_status' => 'pending',\n\t\t\t'post_title' => esc_html( $_POST['post-title'] )\n\t\t);\n\t\t$post_id = wp_insert_post( $post_args );\n\n\t\tif ( is_wp_error( $post_id ) ) {\n\t\t\tglobal $wpgnv_error;\n\t\t\t$wpgnv_error = 'Sorry, there was an error processing your new idea.';\n\t\t} else {\n\t\t\tglobal $wpgnv_success;\n\t\t\t$wpgnv_success = 'Awesome! Your idea has been submitted and is awaiting moderation.';\n\t\t}\n\t}\t\n}", "public function _report_form_submit()\n\t{\n\t\t$incident = Event::$data;\n\n\t\tif ($_POST)\n\t\t{\n\t\t\t$action_item = ORM::factory('actionable')\n\t\t\t\t->where('incident_id', $incident->id)\n\t\t\t\t->find();\n\t\t\t\t\n\t\t\t$incident_message = ORM::factory('incident_message')->where('incident_id', $incident->id)->find();\t\n\t\t\t$messageID = $incident_message->message_id;\n\t\t\t$message = ORM::factory('message')->where('id',$messageID)->find();\n\t\t\t$smsFrom = $message->message_from;\n\t\t\t\n\t\t\t$locationID = $incident->location_id;\n\t\t\t$location = ORM::factory('location')->where('id',$locationID)->find();\n\t\t\t$locationName = $location->location_name; \n\t\t\t\n\t\t\t$outgoingMessage = Kohana::lang('actionable.action_taken_message').\": \".$incident->incident_title.\" | \".$locationName.\" | \".$incident->incident_date;\n\t\t\t$resolutionMessage = Kohana::lang('actionable.resolution_message').\": \".$incident->incident_title.\" | \".$locationName.\" | \".$incident->incident_date;\n\n\t\t\t$action_item->incident_id = $incident->id;\n\t\t\t$action_item->actionable = isset($_POST['actionable']) ? \n\t\t\t\t$_POST['actionable'] : \"\";\n\t\t\t$action_item->action_taken = isset($_POST['action_taken']) ?\n\t\t\t\t$_POST['action_taken'] : \"\";\n\t\t\t$action_item->action_summary = $_POST['action_summary'];\n\t\t\t$action_item->resolution_summary = $_POST['resolution_summary'];\n\t\t\tif(isset($_POST['action_taken'])){\n\t\t\t\tif($_POST['action_taken']==1){\n\t\t\t\t\tif(!isset($action_item->action_date)){\n\t\t\t\t\t\t$action_item->action_date = date(\"Y-m-d H:i:s\",time());\n\t\t\t\t\t\tsms::send($smsFrom,Kohana::config(\"settings.sms_no1\"),$outgoingMessage);\n\t\t\t\t\t}\n\t\t\t\t}else if($_POST['action_taken']==2){\n\t\t\t\t\tif(!isset($action_item->resolution_date)){\n\t\t\t\t\t\t$action_item->resolution_date = date(\"Y-m-d H:i:s\",time());\n\t\t\t\t\t\tsms::send($smsFrom,Kohana::config(\"settings.sms_no1\"),$resolutionMessage);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$action_item->action_date = null;\n\t\t\t\t$action_item->resolution_date = null;\n\t\t\t}\t\t\n\t\t\t$action_item->save();\n\t\t}\n\t}", "public function formSubmitHandler(Nette\\Application\\UI\\Form $form)\n\t{\n\t\t$this->receivedSignal = 'submit';\n\n\t\t// was form submitted?\n\t\tif ($form->isSubmitted()) {\n\t\t\t$values = $form->getValues();\n\n\t\t\tif ($form['filterSubmit']->isSubmittedBy()) {\n\t\t\t\t$this->handleFilter($values['filters']);\n\n\t\t\t} elseif ($form['pageSubmit']->isSubmittedBy()) {\n\t\t\t\t$this->handlePage($values['page']);\n\n\t\t\t} elseif ($form['itemsSubmit']->isSubmittedBy()) {\n\t\t\t\t$this->handleItems($values['items']);\n\n\t\t\t} elseif ($form['resetSubmit']->isSubmittedBy()) {\n\t\t\t\t$this->handleReset();\n\n\t\t\t} elseif ($form['operationSubmit']->isSubmittedBy()) {\n\t\t\t\tif (!is_array($this->onOperationSubmit)) {\n\t\t\t\t\tthrow new \\Nette\\InvalidStateException('No user defined handler for operations; assign valid callback to operations handler into DataGrid\\DataGrid::$operationsHandler variable.');\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tthrow new \\Nette\\InvalidStateException('Unknown submit button.');\n\t\t\t}\n\n\t\t}\n\n\t\t$this->finalize();\n\t}", "public function submit()\n {\n $this->waitFor(20000, function () {\n return $this->present();\n });\n $this->xpath($this->selectors['submit'])->click();\n $this->waitFor(20000, function () {\n return $this->xpath($this->selectors['formSubmitted']) !== null;\n });\n }", "public function formSubmit() {\n\n check_admin_referer('ncstate-wrap-authentication');\n\n $newOptions = array(\n 'autoCreateUser' => (bool)$_POST['nwa_autoCreateUser'],\n );\n\n update_option('ncstate-wrap-authentication', $newOptions);\n\n wp_safe_redirect(add_query_arg('updated', 'true', wp_get_referer()));\n }", "protected abstract function fetchSubmitValue();", "public function submit()\n {\n $this->find('css', '.filter-update')->click();\n }", "function processIncomingData() {\n\t \tglobal $TSFE;\n\n\t \t\t// fetch incoming POST data and restore current session data:\n\t \t$incomingData = t3lib_div::_GP($this->prefixId);\n\t \t\n\t \tif (!is_array ($this->sessionData)) {\n\t \t\t$this->sessionData = array (\n\t \t\t\t'data' => array(),\n\t \t\t\t'submitCount' => 0,\n\t \t\t\t'currentStep' => 1,\n\t\t\t\t'submissionId' => md5(t3lib_div::getIndpEnv('REMOTE_ADDR').microtime()),\n\t \t\t);\n\t \t}\n\t \tif (!is_array ($incomingData['data'])) {\n\t \t\t$incomingData['data'] = array();\n\t \t}\n\n\t \t\t// To avoid submit spamming attacks we restrict each session to a certain amount of submits:\n\t\t$this->sessionData['submitCount']++;\n\t\tif ($this->sessionData['submitCount'] < $this->maxSubmitsPerSession) {\n\n\t\t\t\t// Now proceed according to the type of submission:\n\t\t\tif (isset ($incomingData['submitcancel'])) {\n\t\t\t\t$this->submitType = 'cancel';\n\t\t\t\t$this->sessionData['data'] = array();\n\t\t\t\t$this->sessionData['currentStep'] = 1;\n\t\t\t\t\t// Reset submission id. This is used for making sure that a submission is only processed once. It must be handled by the extension\n\t\t\t\t\t// which processes the form:\n\t\t\t\t$this->sessionData['submissionId'] = md5(t3lib_div::getIndpEnv('REMOTE_ADDR').microtime());\n\t\t\t} elseif (isset ($incomingData['submitproceed'])) {\n\t\t\t\t$this->submitType = 'proceed';\n\t\t\t\t$this->sessionData['data'] = (t3lib_div::array_merge_recursive_overrule ($this->sessionData['data'], $incomingData['data']));\n\n\t\t\t\t$evalResult = $this->evaluate_stepFields ($incomingData['currentstep'], $this->sessionData['data']);\n\t\t\t\tif ($evalResult === TRUE) {\n\t\t\t\t\t$this->sessionData['currentStep']= $incomingData['currentstep'] + 1;\n\t\t\t\t} else {\n\t\t\t\t\t$this->submitType = 'evalerror';\n\t\t\t\t}\n\t\t\t} elseif (isset ($incomingData['submitback'])) {\n\t\t\t\t$this->submitType = 'back';\n\t\t\t\t$this->sessionData['data'] = (t3lib_div::array_merge_recursive_overrule ($this->sessionData['data'], $incomingData['data']));\n\t\t\t\t$this->sessionData['currentStep']= $incomingData['currentstep'] - 1;\n\t\t\t} elseif (isset ($incomingData['submitsubmit'])) {\n\t\t\t\t$this->submitType = 'submit';\n\t\t\t\t$this->sessionData['data'] = (t3lib_div::array_merge_recursive_overrule ($this->sessionData['data'], $incomingData['data']));\n\t\t\t\t$evalResult = $this->evaluate_allFields ($this->sessionData['data']);\n\t\t\t\tif ($evalResult !== TRUE) {\n\t\t\t\t\t$this->submitType = 'evalerror';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$TSFE->fe_user->setKey ('ses', $this->prefixId, $this->sessionData);\n\t\t$this->currentStep = $this->sessionData['currentStep'];\n\t }", "public function after_submission( $entry, $form ) {\n\n\t\t// Evaluate the rules configured for the custom_logic setting.\n\t\t//$result = $this->is_custom_logic_met( $form, $entry );\n\t\t$result = true;\n\n\t\tif ( $result ) {\n\t\t\t$settings = $this->get_form_settings( $form );\n\t\t\t$enabled = 1 === (int) rgar( $settings, 'enabled' );\n\n\t\t\tif ( ! $enabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$event_id = $this->create_event( $entry, $settings );\n\t\t}\n\t}", "function submit($data, $form, $request) {\n\t\treturn $this->processForm($data, $form, $request, \"\");\n\t}", "function submit($data, $form, $request) {\n\t\treturn $this->processForm($data, $form, $request, \"\");\n\t}", "function attachment_submit_meta_box($post)\n {\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}", "function action_handler() \n{ \t \n // set variables that were passed fron the form\n $name = $_POST[\"name\"];\n $artist = $_POST[\"artist\"];\n $price = $_POST[\"price\"];\n $version = $_POST[\"version\"];\n\n echo \"<br>Running our ACTION HANDLER code - Version $version\"; \n echo \"<br> Name was entered: $name\";\n echo \"<br> Artist was entered: $artist\";\n echo \"<br> Price was entered: $price\";\n}", "protected function handle_form_data($file, $index) {\n }", "public static function run () {\n\t\t\t$form = new FormHandler();\n\n\t\t\t$form->addValuesArray($_POST);\n\n\t\t\t# Add all the fields\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'title', \n\t\t\t\t'title'\t\t=> Lang::get('Site Title'),\n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'url', \n\t\t\t\t'title'\t\t=> Lang::get('URL'),\n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'thumb_url', \n\t\t\t\t'title'\t\t=> Lang::get('URL to Thumbnail')\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'content', \n\t\t\t\t'title'\t\t=> Lang::get('Description'), \n\t\t\t\t'type'\t\t=> 'textarea',\n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'author', \n\t\t\t\t'title'\t\t=> Lang::get('Your Name'), \n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'email', \n\t\t\t\t'title'\t\t=> Lang::get('And E-mail'), \n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'add_site_submit', \n\t\t\t\t'type'\t\t=> 'hidden', \n\t\t\t\t'value'\t\t=> '1'\n\t\t\t));\n\n\t\t\t# User is submitting form\n\t\t\t# Make sure form is valid (true => check for spam as well)\n\t\t\tif (isset($_POST['add_site_submit']) and $form->validate(true)) {\n\t\t\t\t# Add new site\n\t\t\t\tSites::insert(array(\n\t\t\t\t\t'author'\t\t=> $_POST['author'], \n\t\t\t\t\t'email'\t\t\t=> $_POST['email'], \n\t\t\t\t\t'title'\t\t\t=> $_POST['title'], \r\n\t\t\t\t\t'content'\t\t=> $_POST['content'], \r\n\t\t\t\t\t'thumb_url'\t\t=> isset($_POST['thumb_url']) ? $_POST['thumb_url'] : '', \r\n\t\t\t\t\t'url'\t\t\t=> $_POST['url'], \r\n\t\t\t\t\t'url_str'\t\t=> Router::urlize($_POST['title']), \n\t\t\t\t\t'pub_date'\t\t=> date('Y-m-d H:i:s')\n\t\t\t\t));\n\n\t\t\t\t# Redirect after POST\n\t\t\t\tredirect('?added_site');\r\n\t\t\t}\n\n\t\t\t# Form has been submitted\n\t\t\tif (isset($_GET['added_site'])) {\n\t\t\t\tself::$tplFile = 'ThankYou';\n\t\t\t}\n\t\t\t# Form has NOT been submitted\n\t\t\telse {\n\t\t\t\t# Assign form HTML to template vars\n\t\t\t\tself::$tplVars['form_html'] = $form->asHTML();\n\t\t\t}\n\t\t}", "public function done() {\r\n\r\n\t\tdo_action( 'listeo_core_listing_submitted', $this->listing_id );\r\n\t\t$template_loader = new Listeo_Core_Template_Loader;\r\n\t\t$template_loader->set_template_data( \r\n\t\t\tarray( \r\n\t\t\t\t'listing' \t=> get_post( $this->listing_id ),\r\n\t\t\t\t'id' \t\t=> \t$this->listing_id,\r\n\t\t\t\t) \r\n\t\t\t)->get_template_part( 'listing-submitted' );\r\n\r\n\t}", "function install_form_process()\n\t{\n\t\t//-----------------------------------------\n\t\t// When processed, return all vars to save\n\t\t// in conf_global in the array $this->info_extra\n\t\t// This will also be saved into $INFO[] for\n\t\t// the installer\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $_REQUEST['mysql_tbl_type'] )\n\t\t{\n\t\t\t$this->errors[] = 'You must complete the required SQL section!';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->info_extra['mysql_tbl_type'] = $_REQUEST['mysql_tbl_type'];\n\t}", "public static function renderSubmit();", "public function form_submission($args) {\n\t\t\t// Called when a form is submitted\n\t\t\t// * Add the __finishURL if not set\n\t\t\t// * Store it in temp storage\n\t\t\t// * Output \"busy page\" that includes the UID. The page will then do an AJAX request\n\t\t\t// that will start the processing of the form data\n\t\t\n\t\t\t// Some housekeeping--garbage collect the old signed files\n\t\t\t$this->gc_files_dir();\n\t\t\t\n\t\t\t$UID = $args['__UID'];\n\n\t\t\tif ($this->debug_mode()) {\n\t\t\t\t$this->log (\"Request {$UID}:Incoming form values: \" . $this->var_dump($args), CFS_DEBUG);\n\t\t\t}\n\t\t\t\n\t\t\t// $args must have a __UID. \n\t\t\tif ($UID === 0) {\n\t\t\t\t$this->error_page(\"Problem! The form id was not provided.\", \n\t\t\t\t\t\"Please consult your developer.\");\n\t\t\t\t$this->log (\"Request missing UID! Incoming form values: \" . $this->var_dump($args), CFS_FATALERROR);\t\t\t\t\n\t\t\t} else {\n\t\t\t\tif (! $args['__finishURL']) {\n\t\t\t\t\t$args['__finishURL'] = $this->thank_you_url();\n\t\t\t\t}\n\t\t\t\t$args['__signed_file_path'] = $this->signed_files_dir() . \"/\" . $UID . \".pdf\";\n\t\t\t\t\n\t\t\t\tif ( $args['_date_format'] && $args['_date_fields']) {\n\t\t\t\t\t$args = $this->process_dates($args);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// store the args\n\t\t\t\t// See http://codex.wordpress.org/Transients_API\n\t\t\t\tset_transient( $UID, $args, HOUR_IN_SECONDS );\n\t\t\t\t\n\t\t\t\t// Send our please wait page\n\t\t\t\t// The page will then do an Ajax call back to us\n\t\t\t\t// using api POST /cfs/v1/request\n\t\t\t\t$this->please_wait_page($UID);\n\t\t\t}\n\t\t}", "public function postSetupForm() {\r\n\r\n $l = $this->bootstrap->getLocalization();\r\n // ugyanaz submitnak mint title-nek\r\n $this->form->submit =\r\n $this->controller->toSmarty['title'] = $l('users', 'login_title');\r\n if ( $this->application->getParameter('nolayout') )\r\n $this->controller->toSmarty['nolayout'] = true;\r\n\r\n $this->controller->toSmarty['formclass'] = 'halfbox centerformwrap';\r\n $this->controller->toSmarty['titleclass'] = 'center';\r\n parent::postSetupForm();\r\n\r\n }", "protected function processPost() {\n\t\tif (isset($_POST['posted'])) {\n\t\t\t$this->is_save_request = TRUE;\n\t\t\tunset($_POST['posted']);\n\t\t}\n\n\t\t// process the remaining post vars\n\t\tif (0) deb(\"Survey1: processPost: POST = \", $_POST);\n\t\tforeach($_POST as $job_id=>$offer) {\n\t\t\tif ($job_id == 'username') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$job_name = get_job_name($job_id);\n\t\t\t// All offers except positive integers are treated as 0, meaning \"I don't want to do this job\"\n\t\t\tif ($offer == NULL || $offer < 0 || !is_numeric($offer)) $offer = 0;\n\t\t\tif (is_float($offer)) $offer = round($is_offer);\n\t\t\tif (0) deb(\"Survey1: processPost: job_name = offer: \", $job_name.\" = \".$offer);\n\t\t\t$this->results[$job_id] = $offer;\n\t\t}\n\t\tif (0) deb(\"Survey1: processPost: Results:\", $this->results);\n\t}", "public function callbackSubmit()\n {\n // Remember values during resubmit, useful when failing (retunr false)\n // and asking the user to resubmit the form.\n $this->form->rememberValues();\n $apiKey = $this->form->value(\"ApiKey\");\n $widget = $this->form->value(\"Widget\");\n $defaultList = $this->form->value(\"DefaultList\");\n $apiKey = $apiKey === \"\" ? \"null\" : $apiKey;\n $popup = $this->form->value(\"Popup\");\n $mailChimpService = new MailChimpService($this->di);\n\n try {\n $mailChimpService->addConfig($apiKey, $widget, $popup, $defaultList);\n } catch (\\Peto16\\Admin\\Exception $e) {\n $this->form->addOutput($e->getMessage());\n return false;\n }\n $this->form->addOutput(\"Configuration updated.\");\n return true;\n }", "public function callbackSubmit()\n {\n // Get values from the submitted form\n $text = $this->form->value(\"text\");\n\n if (!$this->di->get('session')->has(\"user\")) {\n $this->form->addOutput(\"Du behöver logga in\");\n return false;\n }\n\n $user = new User($this->di->get(\"db\"));\n if ($user->controlAuthority($this->di->get('session')->get(\"user\"), $this->post->user) != true) {\n $this->form->addOutput(\"Du får inte redigera denna.\");\n return false;\n }\n\n if ($text == \"\") {\n $this->form->addOutput(\"Du skrev aldrig något. Skriv gärna något.\");\n return false;\n }\n\n $this->post->text = $text;\n $this->post->save();\n $this->form->addOutput(\"Du har uppdaterat inlägget\");\n return true;\n }" ]
[ "0.6819233", "0.66068184", "0.65293044", "0.65138984", "0.6456923", "0.6415931", "0.6290041", "0.62583953", "0.62153906", "0.6171831", "0.6122489", "0.61137354", "0.61061496", "0.6099429", "0.6061061", "0.6021718", "0.60060567", "0.5975959", "0.59696853", "0.5932175", "0.58974564", "0.5882701", "0.5864159", "0.5853628", "0.58532465", "0.5811458", "0.58097726", "0.5807207", "0.580566", "0.5762805", "0.5736445", "0.5728124", "0.5718321", "0.5708481", "0.57046413", "0.56988287", "0.56877786", "0.5687223", "0.56678647", "0.56603575", "0.56594396", "0.5630146", "0.5625389", "0.56252974", "0.5623819", "0.5612079", "0.56085664", "0.56041086", "0.55979735", "0.5597834", "0.55908847", "0.55846065", "0.5579767", "0.5575687", "0.557194", "0.55611664", "0.5555802", "0.5548179", "0.5521982", "0.55166113", "0.551625", "0.55131805", "0.55123585", "0.5505708", "0.5504476", "0.5499952", "0.5493759", "0.54932284", "0.5491917", "0.5468858", "0.54630315", "0.5458885", "0.54545605", "0.54535866", "0.54510987", "0.5449497", "0.5445172", "0.5445113", "0.54442966", "0.54396266", "0.5435467", "0.5432855", "0.54216826", "0.54200417", "0.54185224", "0.5416329", "0.54135555", "0.54135555", "0.5412284", "0.54002", "0.5396935", "0.53892565", "0.53862107", "0.5383222", "0.5367866", "0.53656006", "0.5356831", "0.5355938", "0.5350996", "0.5348114", "0.5339106" ]
0.0
-1
Emails a single curator that there has been a new entry in a catalogue.
protected function EmailCurator($name, $emailAddress, $subject, $body, $newRecordLink, $additionalMessageEmail, $additionalMessageText) { if ($name && $emailAddress && $subject && $body && $newRecordLink) { // Check for special variables of {NAME} and {LINK} in the body and replace with // the name of the curator and the postcardID link. $body = str_replace(array('{NAME}', '{LINK}'), array($name, $newRecordLink), $body); // If the user wants to include an additional message to the curator then add this in after the main body. if ($additionalMessageEmail || $additionalMessageText) { // Alter the subject to include plus message from {email} // Add the email and message to the body. $subject .= " PLUS message from " . $additionalMessageEmail; $body .= "\n\n----------------------------------------------------\n" . "Message from " . $additionalMessageEmail . "...\n\n" . $additionalMessageText; } $email = new Email( $this->FromEmailAddress, $emailAddress, $subject, $body ); // Just send plain email, no need for a fancy template. $email->sendPlain(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function notifyOwner()\n {\n global $config, $reefless, $account_info;\n\n $reefless->loadClass('Mail');\n\n $mail_tpl = $GLOBALS['rlMail']->getEmailTemplate(\n $config['listing_auto_approval']\n ? 'free_active_listing_created'\n : 'free_approval_listing_created'\n );\n\n if ($config['listing_auto_approval']) {\n $link = $reefless->getListingUrl(intval($this->listingID));\n } else {\n $myPageKey = $config['one_my_listings_page'] ? 'my_all_ads' : 'my_' . $this->listingType['Key'];\n $link = $reefless->getPageUrl($myPageKey);\n }\n\n $mail_tpl['body'] = str_replace(\n array('{username}', '{link}'),\n array(\n $account_info['Username'],\n '<a href=\"' . $link . '\">' . $link . '</a>',\n ),\n $mail_tpl['body']\n );\n $GLOBALS['rlMail']->send($mail_tpl, $account_info['Mail']);\n }", "function add_contact_to_list($cat_id, $email, $name) {\n require_once 'createsend-php-5.1.2/csrest_subscribers.php';\n $auth = array('api_key' => CM_API_KEY);\n\n $wrap = new CS_REST_Subscribers(get_term_meta($cat_id, 'list_id', true), $auth);\n $result = $wrap->add(array(\n 'EmailAddress' => $email,\n 'Name' => $name,\n 'Resubscribe' => true\n ));\n}", "public function actionInformClientsSubscriptionEnding (){\n Yii::getLogger()->log('actionInformClientsSubscriptionEnding running', Logger::LEVEL_INFO);\n\n try {\n if(($clients = CoreClient::find()->where(['prepaid_for'=>date('Y-m-d', strtotime('now +3days'))])->all())) {\n foreach( $clients as $client) {\n $mail = Yii::$app->mailer->compose('subscriptionExpires')\n ->setFrom(Yii::$app->params['adminEmail'])\n ->setTo($client->email)\n ->setSubject('The subscription expires in 3 days');\n\n if (!$mail->send()) {\n throw new Exception('an email haven\\'t been sent');\n }\n }\n }\n\n } catch(\\Exception $e) {\n Yii::getLogger()->log('actionInformClientsSubscriptionEnding error' .\n $e->getMessage() .\n $e->getTraceAsString(),\n Logger::LEVEL_ERROR);\n }\n }", "public function afterCreate()\n {\n // $this->getDI()\n // ->getMail()\n // ->send([\"[email protected]\" => \"Admin GamanAds\"],\"New Adspace\", 'newadspace',\n // [ 'emailBody'=> \"New Adspace : <b>$this->ad_url</b> from Client Id : <b>$this->client_id</b> Client Name: <b>$this->client_name</b>\"]);\n }", "public function afterUpdate()\n {\n // $this->getDI()\n // ->getMail()\n // ->send([\"[email protected]\" => \"Admin GamanAds\"],\"Update Adspace\", 'updateadspace',\n // [ 'emailBody'=> \"Update Adspace : <b>$this->ad_url</b> from Client Id : <b>$this->client_id</b> Client Name: <b>$this->client_name</b>\"]);\n }", "public function getNewMailsAction()\n {\n $this->View()->success = true;\n $mails = $this->container->get('dbal_connection')->fetchAll('SELECT id, subject, receiverAddress FROM s_plugin_mailcatcher WHERE id > :id ORDER BY id ASC', ['id' => $this->Request()->getParam('id')]);\n $this->View()->mails = $mails;\n }", "function sendAddNew($usrid,$AddNewSubject,$AddNewInfo){\r\n\tif(getAddNewNotification($usrid)==1){\r\n\t\t//send addnew Info\r\n\t}\r\n}", "protected function _involveNewCustomer()\n {\n $customer = $this->getQuote()->getCustomer();\n if ($customer->isConfirmationRequired()) {\n $customer->sendNewAccountEmail('confirmation', '', $this->getQuote()->getStoreId());\n $url = Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail());\n $this->getCustomerSession()->addSuccess(\n Mage::helper('customer')->__('Account confirmation is required. Please, check your e-mail for confirmation link. To resend confirmation email please <a href=\"%s\">click here</a>.', $url)\n );\n } else {\n $customer->sendNewAccountEmail('registered', '', $this->getQuote()->getStoreId());\n $this->getCustomerSession()->loginById($customer->getId());\n }\n return $this;\n }", "protected function _involveNewCustomer()\n {\n $customer = $this->getQuote()->getCustomer();\n if ($customer->isConfirmationRequired()) {\n $customer->sendNewAccountEmail('confirmation', '', $this->getQuote()->getStoreId());\n $url = Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail());\n $this->getCustomerSession()->addSuccess(\n Mage::helper('customer')\n ->__('Account confirmation is required. Please, check your e-mail for confirmation link. To resend confirmation email please <a href=\"%s\">click here</a>.', $url)\n );\n } else {\n $customer->sendNewAccountEmail('registered', '', $this->getQuote()->getStoreId());\n $this->getCustomerSession()->loginById($customer->getId());\n }\n\n return $this;\n }", "function subscribeUser()\n\t\t{\n\t\t\techo $this->email.\"add to the database !!\";\n\t\t}", "public function NotifyAction()\n {\n $rma = Mage::getModel('ProductReturn/Rma')->load($this->getRequest()->getParam('rma_id'));\n\n try {\n\n\n if (!Mage::helper('ProductReturn/Returnlabel')->isExists($rma))\n throw new Exception($this->__('No return label found'));\n\n Mage::helper('ProductReturn/Returnlabel')->notifyLabel($rma);\n\n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Customer successfully notified.'));\n } catch (Exception $ex) {\n Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to notify customer') . ' : ' . $ex->getMessage());\n }\n\n $this->_redirect('ProductReturn/Admin/Edit', array('rma_id' => $rma->getId()));\n }", "public function created(Edit $edit)\n {\n $moderator = $edit->moderator;\n $moderator->notify(new NewBid($edit));\n }", "function new_user_email_admin_notice()\n {\n }", "public function actionInformClientsSubscriptionEnded (){\n Yii::getLogger()->log('actionInformClientsSubscriptionEnded running', Logger::LEVEL_INFO);\n\n try {\n if(($clients = CoreClient::find()->where(['prepaid_for'=>date('Y-m-d', strtotime('now'))])->all())) {\n foreach( $clients as $client) {\n $mail = Yii::$app->mailer->compose('subscriptionExpired')\n ->setFrom(Yii::$app->params['adminEmail'])\n ->setTo($client->email)\n ->setSubject('The subscription have expired');\n\n if (!$mail->send()) {\n throw new Exception('an email haven\\'t been sent');\n }\n }\n }\n\n } catch(\\Exception $e) {\n Yii::getLogger()->log('actionInformClientsSubscriptionEnded error' .\n $e->getMessage() .\n $e->getTraceAsString(),\n Logger::LEVEL_ERROR);\n }\n }", "public function newCustomer(Varien_Event_Observer $observer)\n {\n $orderIds = $observer->getEvent()->getOrderIds();\n \n if (!is_array($orderIds) || (!array_key_exists(0, $orderIds))) {\n return;\n }\n \n $order = Mage::getModel('sales/order')->load($orderIds[0]);\n \n if (!$order->getId()) {\n return;\n }\n \n if (!$order->getCustomerId()) {\n //send a message only for registered customers\n return;\n }\n \n $customer = Mage::getModel('customer/customer')->load($order->getCustomerId());\n \n if (!$customer->getId()) {\n return;\n }\n \n $customerOrders = Mage::getModel('sales/order')\n ->getCollection()\n ->addAttributeToFilter('customer_id', $customer->getId());\n if (count($customerOrders) > 1) {\n // send a message only after the first order\n return;\n }\n \n return Mage::getModel('aviso_correiocontrol/customer')\n ->newCustomer($customer, $order); \n }", "function issueAfterInsert(){\n $this->emailReport();\n }", "function addCC( $newRecipient ) {\n\t\t\t\t\n\t}", "public function mailing_list_subscribe()\n\t{\n\t\t// get parameters for first name, last name and email\n\t\t$first_name = ee()->TMPL->fetch_param('first_name');\n\t\t$last_name = ee()->TMPL->fetch_param('last_name');\n\t\t$email = ee()->TMPL->fetch_param('email');\n\n\t\tif(empty($email))\n\t\t{\n\t\t\treturn;\n\t\t}\t\n\n\t\t$this->update_constant_contact('create', $email, $first_name, $last_name);\n\n\t}", "public function newAction() {\n $this->setSession();\n $this->setOrder();\n $this->forceNewOrderStatus();\n $this->setPayment(true);\n $this->setTryNumber();\n if (!$this->_order->getEmailSent() == 1) {\n $this->_order->sendNewOrderEmail();\n }\n $this->_renderRedirectPage();\n }", "public function notify_site_admin_of_log_entry(Omnilog_entry $entry)\n {\n $this->EE->load->helper('text');\n $this->EE->load->library('email');\n\n $email = $this->EE->email;\n $lang = $this->EE->lang;\n\n $lang->loadfile('omnilog');\n\n if ( ! $entry->is_populated())\n {\n throw new Exception($lang->line('exception__notify_admin__missing_data'));\n }\n\n $webmaster_email = $this->EE->config->item('webmaster_email');\n\n if ($email->valid_email($webmaster_email) !== TRUE)\n {\n throw new Exception(\n $lang->line('exception__notify_admin__invalid_webmaster_email'));\n }\n\n $webmaster_name = ($webmaster_name = $this->EE->config->item('webmaster_name'))\n ? $webmaster_name\n : '';\n\n switch ($entry->get_type())\n {\n case Omnilog_entry::NOTICE:\n $lang_entry_type = $lang->line('email_entry_type_notice');\n break;\n\n case Omnilog_entry::WARNING:\n $lang_entry_type = $lang->line('email_entry_type_warning');\n break;\n\n case Omnilog_entry::ERROR:\n $lang_entry_type = $lang->line('email_entry_type_error');\n break;\n\n default:\n $lang_entry_type = $lang->line('email_entry_type_unknown');\n break;\n }\n\n $subject = ($site_name = $this->EE->config->item('site_name'))\n ? $lang->line('email_subject') .' (' .$site_name .')'\n : $lang->line('email_subject');\n\n $admin_emails = ($admin_emails = $entry->get_admin_emails())\n ? $admin_emails\n : array($webmaster_email);\n\n $message = $lang->line('email_preamble') .NL .NL;\n $message .= $lang->line('email_addon_name') .NL\n .$entry->get_addon_name() .NL .NL;\n\n $message .= $lang->line('email_log_date') .NL\n .date('r', $entry->get_date()) .NL .NL;\n\n $message .= $lang->line('email_entry_type') .NL\n .$lang_entry_type .NL .NL;\n\n $message .= $lang->line('email_log_message') .NL\n .$entry->get_message() .NL .NL;\n\n $message .= $lang->line('email_log_extended_data') .NL\n .$entry->get_extended_data() .NL .NL;\n\n $message .= $lang->line('email_cp_url') .NL\n .$this->EE->config->item('cp_url') .NL .NL;\n\n $message .= $lang->line('email_postscript');\n $message = entities_to_ascii($message);\n\n $email->from($webmaster_email, $webmaster_name);\n $email->to($admin_emails);\n $email->subject($subject);\n $email->message($message);\n\n if ($email->send() !== TRUE)\n {\n throw new Exception(\n $lang->line('exception__notify_admin__email_not_sent'));\n }\n }", "public function created(IncentivePurchase $purchase)\r\n {\r\n Mail::send(new IncentivePurchased($purchase));\r\n }", "public function created(Masyarakat $masyarakat)\n {\n $author = $masyarakat->name;\n $users = User::all();\n foreach ($users as $user) {\n $user->notify(new NewItem($masyarakat,$author));\n }\n }", "public function lastMailAction()\n {\n $this->View()->success = true;\n $this->View()->id = (int) $this->container->get('dbal_connection')->fetchColumn('SELECT id FROM s_plugin_mailcatcher ORDER BY id DESC LIMIT 1');\n }", "public static function clientNewOrderNotice(Order $order)\n {\n //For the purpose of our new clients, We also send them an email on order delivery\n //We wil design a new email template for clients\n\n $client = User::findorfail($order->client_ID);\n if ($client->domain == 1) {\n $domain = \"writemyclassessay.com\";\n }elseif ($client->domain == 2) {\n $domain = \"writemyacademicessay.com\";\n }elseif ($client->domain == 3) {\n $domain = \"writemyschoolessay.com\";\n }\n Mail::send('emails.newOrderClient',['client'=>$client, 'order'=>$order,'domain'=>$domain], function($m)use ($client, $order, $domain)\n {\n $m->from('support@'.$domain, 'Academic Paper writing Platform');\n\n $m->to($client->email, $client->first_name)->subject('Congratulations! Your project is now visible to our writers.');\n\n });\n }", "public function assigncredits(Varien_Event_Observer $observer)\n{\n $customer = $observer->getCustomer();\n$arr = array();\n$arr1 = array();\n //Mage::log($customer->getEmail());\n //Mage::log($customer->getId().\"customer id\");\n$currentTimestamp = Mage::getModel('core/date')->timestamp(time()); \n$nowdate = date('Y-m-d H:m:s', $currentTimestamp); //current data\n$collection = Mage::getModel('kartparadigm_storecredit/sendcreditstofriend')->getCollection()->addFieldToFilter('receiver_email',$customer->getEmail())->addFieldToFilter('status',0); //retriving values from sendcreditstofriend\n//Mage::log(count($collection));\n$arr = array();\nif(count($collection) > 0){\nforeach($collection as $col){\n//Mage::log($col['s_id'].\"sender id\");\nif($col['status'] == 0){\n\n$arr1['c_id'] = $customer->getId();\n $arr1['website1'] = \"Main Website\";\n $arr1['action_credits'] = $col['credits'];\n $arr1['total_credits'] = $col['credits'];\n $arr1['action'] = \"Updated\";\n $arr1['state'] = 0;\n $arr1['store_view'] = Mage::app()->getStore()->getName();\n $arr1['action_date'] = $nowdate;\n $arr1['custom_msg'] = \"Send By : \" . $col['sname'].\" Message( \".$col['message'].\" )\";\n $arr1['customer_notification_status'] = 'No';\n\n$arr['status'] = 1;\n\n$id = $col['receiver_id'];\n\n $table1 = Mage::getModel('kartparadigm_storecredit/creditinfo');\n$table1->setData($arr1);\n\n$table2 = Mage::getModel('kartparadigm_storecredit/sendcreditstofriend')->load($id)->addData($arr);\n\n/*-------------------------------------------------------------------------------------*/\ntry{\n\n$table1->save();\n$table2->setId($id)->save();\n//$this->_redirect('*/*/');\n\n}catch(Exception $e){\nMage::log($e);\n}\n\n\n\n}//end if\n}//end foreach \n}//end if\n}", "private function certificate_expiration_reminder(){\n Loader::loadModels($this, array('Services','ModuleManager'));\n Loader::loadModels($this, array(\"Emails\", \"EmailGroups\", \"Languages\"));\n Loader::loadModels($this, array(\"Clients\", \"Contacts\", \"Emails\", \"ModuleManager\"));\n $services = $this->Services->getList();\n foreach($services as $service){\n $fields = $this->serviceFieldsToObject($service->fields);\n if(isset($fields->thesslstore_order_id)){\n $renewsDate=$service->date_renews;\n //Convert it into a timestamp.\n $renewsDate = strtotime($renewsDate);\n //Get the current timestamp.\n $todaysDate = time();\n //Calculate the difference.\n $difference = $renewsDate - $todaysDate;\n //Convert seconds into days.\n $days = floor($difference / (60*60*24) );\n if($days=='30')\n {\n $WEBDIR=WEBDIR;\n $client = Configure::get(\"Route.client\");\n $service_link = 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 's' : '') . '://'.$_SERVER['HTTP_HOST'].$WEBDIR.$client.'/'.'services/manage/'.$service->id.'/';\n // Fetch the client\n $client = $this->Clients->get($service->client_id);\n $tags = array('client' => $client, 'package' => $service->package, 'servicelink'=>$service_link, 'service' => $service, 'days' => $days);\n $this->Emails->send(\"Thesslstore.expiration_reminder\", Configure::get(\"Blesta.company_id\"), \"en_us\", $service->client_email, $tags, null, null, null, array('to_client_id' =>$service->client_id_code));\n }\n }\n }\n }", "public function message()\n {\n return \"You already have a client with an email of $this->value\";\n }", "function count_new_messages() {\n $this->renderText(NotificationsActivityLogs::countSinceLastVisit($this->logged_user));\n }", "public function notify_members() {\n $from = array($this->site->user->email, $this->site->user->name());\n $subject = Kohana::lang('finance_reminder.charge.subject');\n if ($this->site->collections_enabled()) {\n $message = Kohana::lang('finance_reminder.charge.message_finances');\n }\n else {\n $message = Kohana::lang('finance_reminder.charge.message_basic');\n }\n\n foreach ($this->finance_charge_members as $member) {\n if ( ! $member->paid) {\n $replacements = array(\n '!name' => $member->user->name(),\n '!due_date' => date::display($member->due, 'M d, Y', FALSE),\n '!due_amount' => money::display($member->balance()),\n '!charge_title' => $member->title,\n '!pay_link' => url::base(),\n );\n $email = array(\n 'subject' => strtr($subject, $replacements),\n 'message' => strtr($message, $replacements),\n );\n email::announcement($member->user->email, $from, 'finance_charge_reminder', $email, $email['subject']);\n }\n }\n return TRUE;\n }", "function notifyReg($uName,$eMail) { //notify a new user registration\r\n\tglobal $ax, $set, $today;\r\n\t\t\r\n\t//compose email message\r\n\t$subject = \"{$ax['log_new_reg']}: {$uName}\";\r\n\t$msgBody = \"\r\n<p>{$ax['log_new_reg']}:</p><br>\r\n<table>\r\n\t<tr><td>{$ax['log_un']}:</td><td>{$uName}</td></tr>\r\n\t<tr><td>{$ax['log_em']}:</td><td>{$eMail}</td></tr>\r\n\t<tr><td>{$ax['log_date_time']}:</td><td>\".IDtoDD($today).\" {$ax['at_time']} \".ITtoDT(date(\"H:i\")).\"</td></tr>\r\n</table>\r\n\";\r\n\t//send email\r\n\t$result = sendEml($subject,$msgBody,$set['calendarEmail'],1,0,0);\r\n\treturn $result;\r\n}", "public function postCreateMail()\n {\n if ($this->_activeMail->getData('recipient_email') == '') {\n $recipient_email = $this->cart->getData('email');\n $recipient_name = $this->cart->getCustomerFirstname(). ' ' .$this->cart->getCustomerLastname();\n $data = [\n 'recipient_email' => $recipient_email,\n 'recipient_name' => $recipient_name\n ];\n $this->_activeMail->addData($data)->save();\n }\n }", "function wcfm_mark_as_recived() {\r\n\t\tglobal $WCFM, $WCFMu, $woocommerce, $wpdb;\r\n\t\t\r\n\t\tif ( !empty( $_POST['orderitemid'] ) ) {\r\n $order_id = $_POST['orderid']; \r\n\t\t\t$order = wc_get_order( $order_id );\r\n\t\t\t$product_id = $_POST['productid'];\r\n $order_item_id = $_POST['orderitemid'];\r\n \r\n //$comment_id = $order->add_order_note( sprintf( __( 'Item(s) <b>%s</b> received by customer.', 'wc-frontend-manager-ultimate' ), get_the_title( $product_id ) ), '1');\r\n \r\n // Keep Tracking URL as Order Item Meta\r\n\t\t\t$sql = \"INSERT INTO {$wpdb->prefix}woocommerce_order_itemmeta\";\r\n\t\t\t$sql .= ' ( `meta_key`, `meta_value`, `order_item_id` )';\r\n\t\t\t$sql .= ' VALUES ( %s, %s, %s )';\r\n\t\t\t\r\n\t\t\t$confirm_message = __( 'YES', 'wc-frontend-manager-ultimate' );\r\n\t\r\n\t\t\t$wpdb->get_var( $wpdb->prepare( $sql, 'wcfm_mark_as_recived', $confirm_message, $order_item_id ) );\r\n\t\t\t\r\n\t\t\t$vendor_id = $WCFM->wcfm_vendor_support->wcfm_get_vendor_id_from_product( $product_id );\r\n\t\t\t\r\n\t\t\t// WCfM Marketplace Table Update\r\n\t\t\tif( $vendor_id && (wcfm_is_marketplace() == 'wcfmmarketplace') ) {\r\n\t\t\t\t$wpdb->query(\"UPDATE {$wpdb->prefix}wcfm_marketplace_orders SET shipping_status = 'completed' WHERE order_id = $order_id and vendor_id = $vendor_id and item_id = $order_item_id\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Notification\r\n\t\t\t$wcfm_messages = sprintf( __( 'Customer marked <b>%s</b> received.', 'wc-frontend-manager-ultimate' ), get_the_title( $product_id ) );\r\n\t\t\t$WCFM->wcfm_notification->wcfm_send_direct_message( -1, 0, 0, 1, $wcfm_messages, 'shipment_received' );\r\n\t\t\t\r\n\t\t\t// Vendor Notification\r\n\t\t\tif( $vendor_id ) {\r\n\t\t\t\t$WCFM->wcfm_notification->wcfm_send_direct_message( -2, $vendor_id, 0, 1, $wcfm_messages, 'shipment_received' );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// WC Order Note\r\n\t\t\t$comment_id = $order->add_order_note( $wcfm_messages, '1');\r\n\t\t\t\r\n\t\t\tdo_action( 'wcfm_after_order_mark_received', $order_id, $order_item_id, $product_id );\r\n }\r\n die;\r\n\t}", "public function after_save($request) {\n\t\tif (!$request->id) {\n\t\t\t$this->send_upcoming_gig_emails($request);\n\t\t}\n\t}", "protected function insert() {\n\t\tglobal $wgEchoNotifications;\n\n\t\t$notifMapper = new NotificationMapper();\n\n\t\t$services = MediaWikiServices::getInstance();\n\t\t$hookRunner = new HookRunner( $services->getHookContainer() );\n\t\t// Get the bundle key for this event if web bundling is enabled\n\t\t$bundleKey = '';\n\t\tif ( !empty( $wgEchoNotifications[$this->event->getType()]['bundle']['web'] ) ) {\n\t\t\t$hookRunner->onEchoGetBundleRules( $this->event, $bundleKey );\n\t\t}\n\n\t\tif ( $bundleKey ) {\n\t\t\t$hash = md5( $bundleKey );\n\t\t\t$this->bundleHash = $hash;\n\t\t}\n\n\t\t$notifUser = NotifUser::newFromUser( $this->user );\n\n\t\t// Add listener to refresh notification count upon insert\n\t\t$notifMapper->attachListener( 'insert', 'refresh-notif-count',\n\t\t\tstatic function () use ( $notifUser ) {\n\t\t\t\t$notifUser->resetNotificationCount();\n\t\t\t}\n\t\t);\n\n\t\t$notifMapper->insert( $this );\n\n\t\tif ( $this->event->getCategory() === 'edit-user-talk' ) {\n\t\t\t$services->getTalkPageNotificationManager()\n\t\t\t\t->setUserHasNewMessages( $this->user );\n\t\t}\n\t\t$hookRunner->onEchoCreateNotificationComplete( $this );\n\t}", "public function postCreationSuccessful() {\n $this->setDisplayMessage(\"Posted new message.\");\n $this->redirect();\n die();\n }", "function make_donation_action() {\n // Annual subscription + membership product ID: 11327\n $product_id = 11336;\n $product_cart_id = WC()->cart->generate_cart_id($product_id);\n $is_product_in_the_cart = WC()->cart->find_product_in_cart($product_cart_id);\n $added_product = null;\n\n if (!$is_product_in_the_cart) {\n $added_product = WC()->cart->add_to_cart($product_id);\n\n if ($added_product !== '') {\n echo \"<span class='msg msg_success'>Membership added to cart!</span>\";\n } else {\n echo \"<span class='msg msg_error'>Membership not add to cart!</span>\";\n }\n } else {\n echo \"<span class='msg msg_info'>You have already added a membership</span>\";\n }\n\n wp_die();\n }", "public function commit()\n {\n // my code\n $builder = new EventsBuilder();\n $builder->createEventType(self::EVENT_TYPE, 'ru', function (EventType $event) {\n $event\n ->name(self::EVENT_NAME)\n ->sort(10)\n ->description('#NAME# - Имя\n#EMAIL# - Email\n#PHONE# - Телефон\n#MESSAGE# - Сообщение\n#FILE# - Ссылка на файл');\n $event\n ->addEventMessage('#DEFAULT_EMAIL_FROM#', '#EMAIL_TO#', 's1')\n ->subject('#SITE_NAME#: Новое сообщение')\n ->body('Информационное сообщение сайта #SITE_NAME#\n------------------------------------------\nВам было отправлено новое сообщение:\n\nИмя: #NAME#\nEmail: #EMAIL#\nТелефон: #PHONE#\nСсылка на файл: #FILE#\n\nСообщение: \n#MESSAGE#\n\n------------------------------------------\nСообщение сгенерировано автоматически.')\n ->bodyType(EventMessage::BODY_TYPE_TEXT)\n ->active();\n });\n }", "public function notifyOwner($member) {\n $to = CSM_EMAIL;\n $subject = 'New membership: ' . show_a_name($member);\n $body = 'Hello ' . CSM_NAME . ', <br><br>'\n . show_a_name($member) . ' has added a new membership plan.<br>'\n . 'Login to your Wordpress account and go to the Coworking Space Manager to see the membership plan.';\n $headers = array('Content-Type: text/html; charset=UTF-8',\n 'From: ' . html_entity_decode(CSM_NAME) . ' <' . CSM_EMAIL . '>'\n );\n\n $mail = wp_mail($to, $subject, $body, $headers);\n }", "public function getCustomerNoteNotify();", "public static function emailMe(Box_Event $event)\n {\n // returns event name 'client.postCreateClient'\n $event_name = $event->getName();\n\n // return event subject, for this event it is Model_Client\n $client = $event->getSubject();\n\n // return array of additional event parameters.\n $params = $event->getParameters();\n\n if(!$client instanceof Model_Client) {\n return;\n }\n\n $message = sprintf('\"%s\" just signed up', $client->getFullName());\n mail('[email protected]', $message, $message);\n }", "public function addCatalogue(MessageCatalogue $catalogue): void;", "public function addCatalogue(MessageCatalogue $catalogue);", "public function displayNewAction() {\n $params = t3lib_div::_GET('libconnect');\n $params['jq_type1'] = 'ID';\n $params['sc'] = $params['search']['sc'];\n if(!empty($params['subject'])){\n $subject = $this->ezbRepository->getSubject($params['subject']);\n $params['Notations']=array($subject['ezbnotation']);\n }\n unset($params['subject']);\n unset($params['search']);\n\n //include CSS\n $this->decideIncludeCSS();\n\n //date how long entry is new\n $params['jq_term1'] = $this->getCalculatedDate();\n\n $config['detailPid'] = $this->settings['flexform']['detailPid'];\n\n if(empty($config['detailPid'])){\n $this->addFlashMessage(\n \"Bitte konfigurieren Sie ein Ziel für die Detailseite.\",\n $messageTitle = 'Fehler',\n $severity = \\TYPO3\\CMS\\Core\\Messaging\\AbstractMessage::ERROR,\n $storeInSession = TRUE\n );\n $liste = FALSE;\n }else{\n //request\n $journals = $this->ezbRepository->loadSearch($params, false, $config);\n }\n \n //variables for template\n $this->view->assign('journals', $journals);\n $this->view->assign('new_date', $params['jq_term1']);\n $this->view->assign('subject', $subject['title']);\n }", "public function notify()\n\t{\n\t\t// Check the sender is 2Checkout\n\t\t$key = Context::get('md5_hash');\n\n\t\t$sale_id = Context::get('sale_id');\n\t\t$vendor_id = $this->sid;\n\t\t$invoice_id = Context::get('invoice_id');\n\t\t$secret_word = $this->secret_word;\n\t\t$expected_key = strtoupper(md5($sale_id . $vendor_id . $invoice_id . $secret_word));\n\n\t\tif(strtoupper($key) != $expected_key)\n\t\t{\n\t\t\tShopLogger::log(\"Invalid 2checkout IPN message received - key \" . $key . ' ' . print_r($_REQUEST, TRUE));\n\t\t\treturn;\n\t\t}\n\n\t\t$message_type = Context::get('message_type');\n\t\tif($message_type != 'ORDER_CREATED')\n\t\t{\n\t\t\tShopLogger::log(\"Unsupported IPN 2checkout message received: \" . print_r($_REQUEST, TRUE));\n\t\t\treturn;\n\t\t}\n\n\t\t$cart_srl = Context::get('vendor_order_id');\n\t\t$transaction_id = $sale_id; // Hopefully, this is order number\n\n\t\t$order_repository = new OrderRepository();\n\n\t\t// Check if order has already been created for this transaction\n\t\t$order = $order_repository->getOrderByTransactionId($transaction_id);\n\t\tif(!$order) // If not, create it\n\t\t{\n\t\t\t$cart = new Cart($cart_srl);\n\t\t\t$this->createNewOrderAndDeleteExistingCart($cart, $transaction_id);\n\n // get created order\n $model = getModel('shop');\n $orderRepository = $model->getOrderRepository();\n $order_srl = Context::get('order_srl');\n $order = $orderRepository->getOrderBySrl($order_srl);\n\t\t}\n\n // generate invoice\n $args = new StdClass();\n $args->order_srl = $order->order_srl;\n $args->module_srl = $order->module_srl;\n $invoice = new Invoice($args);\n $invoice->save();\n if ($invoice->invoice_srl) {\n if (isset($order->shipment))\n $order->order_status = Order::ORDER_STATUS_COMPLETED;\n else\n $order->order_status = Order::ORDER_STATUS_PROCESSING;\n try {\n $order->save();\n }\n catch(Exception $e) {\n return new Object(-1, $e->getMessage());\n }\n } else {\n throw new ShopException('Something whent wrong when adding invoice');\n }\n\t}", "public function send_subscriptions(){\r\n //send email to all those who have subscribed to posts from this author\r\n\r\n }", "public function updated_message() {\n\t\t$tab = Template::current_tab();\n\n\t\t// Show updated notice.\n\t\tadd_action( 'beehive_admin_top_notices', function () use ( $tab ) {\n\t\t\tswitch ( $tab ) {\n\t\t\t\tcase 'tracking':\n\t\t\t\t\t$this->notice( __( 'Tracking ID updated successfully.', 'ga_trans' ), 'success', true );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->notice( __( 'Changes were saved successfully.', 'ga_trans' ), 'success', true );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} );\n\t}", "public function actionNotifyToJoin(){\n $message = new YiiMailMessage;\n $message->view = 'system';\n $message->subject = \"We are happy to see you soon on Cofinder\"; // 11.6. title change\n $message->from = Yii::app()->params['noreplyEmail'];\n \n // send newsletter to all in waiting list\n $invites = Invite::model()->findAll(\"NOT ISNULL(`key`)\");\n $c = 0;\n foreach ($invites as $user){\n \n $create_at = strtotime($user->time_invited);\n if ($create_at < strtotime('-8 week') || $create_at >= strtotime('-1 day')) continue; \n if (!\n (($create_at >= strtotime('-1 week')) || \n (($create_at >= strtotime('-4 week')) && ($create_at < strtotime('-3 week'))) || \n (($create_at >= strtotime('-8 week')) && ($create_at < strtotime('-7 week'))) )\n ) continue; \n \n //set mail tracking\n $mailTracking = mailTrackingCode($user->id);\n $ml = new MailLog();\n $ml->tracking_code = mailTrackingCodeDecode($mailTracking);\n $ml->type = 'invitation-reminder';\n $ml->user_to_id = $user->id;\n $ml->save();\n \n //$activation_url = '<a href=\"'.absoluteURL().\"/user/registration?id=\".$user->key.'\">Register here</a>';\n $activation_url = mailButton(\"Register here\", absoluteURL().\"/user/registration?id=\".$user->key,'success',$mailTracking,'register-button');\n $content = \"This is just a friendly reminder to activate your account on Cofinder.\n <br /><br />\n Cofinder is a web platform through which you can share your ideas with the like minded entrepreneurs, search for people to join your project or join an interesting project yourself.\n <br /><br />If we got your attention you can \".$activation_url.\"!\";\n \n $message->setBody(array(\"content\"=>$content,\"email\"=>$user->email,\"tc\"=>$mailTracking), 'text/html');\n $message->setTo($user->email);\n Yii::app()->mail->send($message);\n $c++;\n }\n Slack::message(\"CRON >> Invite to join reminders: \".$c);\n return 0;\n }", "public function pushEmail($receipientMail)\n {\n $sql = \"SELECT email FROM subscriptionEmail\";\n $query = mysqli_query($this->con, $sql);\n $query = mysqli_fetch_array($query);\n\n // check if the users email is not already in the database\n while ($row = ($query['email'])) {\n if ($row !== $receipientMail) {\n // echo $row. \" and \" . $receipientMail;\n $sql =\"INSERT INTO subscriptionEmail VALUES('', '$receipientMail')\";\n $query = mysqli_query($this->con, $sql);\n }\n }\n }", "function wpcom_vip_notify_on_new_user_added_to_site( $emails ) {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "public function mailAction()\n\t{\n\t\t$log = $this->_initLog();\n\t\t\n if (!$log->getId()) {\n $this->_getSession()->addError(Mage::helper('logging')->__('This log no longer exists.'));\n $this->_redirect('*/*/');\n return;\n }\n\t\t$log->sendLogMail();\n\t\t$this->_redirect('*/*/view', array('id' => $this->getRequest()->getParam('id')));\n\t}", "public function actionIndex()\n {\n \n $request = Craft :: $app -> getRequest();\n $plugin = Freshmail :: getInstance();\n $settings = $plugin -> getSettings();\n \n\t\t$this -> setApiKey( $settings-> apiKey );\n $this -> setApiSecret( $settings-> apiSecretKey );\n \n $addEmailArray = array(\n\t\t\t'email' => $request -> getBodyParam('freshmailEmail'),\n\t\t\t'list' => $request -> getBodyParam('freshmailListId'),\n\t\t\t'state' => 1\n );\n\n try {\n\t\t $response = $this -> doRequest('subscriber/add', $addEmailArray );\n\n if( isset( $response[ 'errors' ] ) ) {\n Craft :: $app -> getSession() -> setError( Craft :: t( 'freshmail' , 'error_' . $response[ 'errors' ][ 0 ][ 'code' ] ) );\n } else {\n Craft :: $app -> getSession() -> setNotice( Craft :: t( 'freshmail' , \"Subscriber added\") );\n }\n\n\t\t} catch (Exception $e) {\n Craft :: $app -> getSession() -> setError( Craft :: t( 'freshmail' , 'Connection with freshmail went wrong. Check plugin settings.' ));\n\t\t}\n\n }", "public function runsubscribersyncAction()\n {\n $result = Mage::getModel('ddg_automation/cron')->subscribersAndGuestSync();\n\n if ($result['message'])\n Mage::getSingleton('adminhtml/session')->addSuccess($result['message']);\n\n $this->_redirectReferer();\n }", "function btrClient_new_term_notification($string, $sguid) {\n\n // Get all the users with role 'translator'.\n $query = \"SELECT ur.uid FROM users_roles ur\n RIGHT JOIN role r ON (ur.rid = r.rid)\n WHERE r.name = 'translator' \";\n $uids = db_query($query)->fetchCol();\n $translators = user_load_multiple($uids);\n\n // Notify the translators about the new term.\n $queue = DrupalQueue::get('notifications');\n $queue->createQueue(); // There is no harm in trying to recreate existing.\n foreach ($translators as $translator) {\n $notification_params = array(\n 'type' => 'notify-translator-on-new-term',\n 'uid' => $translator->uid,\n 'username' => $translator->name,\n 'recipient' => $translator->name . ' <' . $translator->mail . '>',\n 'sguid' => $sguid,\n 'string' => $string,\n 'author' => $GLOBALS['user']->name,\n );\n $queue->createItem((object)$notification_params);\n }\n}", "function delete_contact_from_list($cat_id, $email) {\n require_once 'createsend-php-5.1.2/csrest_subscribers.php';\n $auth = array('api_key' => CM_API_KEY);\n\n $wrap = new CS_REST_Subscribers(get_term_meta($cat_id, 'list_id', true), $auth);\n $result = $wrap->delete($email);\n}", "function notify() {\n if ($this->active_invoice->isLoaded()) {\n if ($this->active_invoice->canResendEmail($this->logged_user)) {\n $company = $this->active_invoice->getCompany();\n if(!($company instanceof Company)) {\n $this->response->operationFailed();\n } // if\n \n $issue_data = $this->request->post('issue', array(\n 'issued_on' => $this->active_invoice->getIssuedOn(),\n 'due_on' => $this->active_invoice->getDueOn(),\n 'issued_to_id' => $this->active_invoice->getIssuedToId()\n ));\n \n $this->response->assign('issue_data', $issue_data);\n \n if ($this->request->isSubmitted()) {\n try {\n if($this->active_invoice->isIssued()) {\n $this->active_invoice->setDueOn($issue_data['due_on']);\n } // if\n \n $resend_to = isset($issue_data['user_id']) && $issue_data['user_id'] ? Users::findById($issue_data['user_id']) : null;\n \n if($issue_data['send_emails'] && $resend_to instanceof IUser) {\n $this->active_invoice->setIssuedTo($resend_to);\n \n $recipients = array($resend_to);\n\n AngieApplication::notifications()\n ->notifyAbout('invoicing/invoice_reminder', $this->active_invoice)\n ->sendToUsers($recipients, true);\n } // if\n \n $this->active_invoice->save();\n \n $this->response->respondWithData($this->active_invoice, array(\n 'detailed' => true, \n \t'as' => 'invoice'\n ));\n \t} catch (Exception $e) {\n \t DB::rollback('Failed to resend email @ ' . __CLASS__);\n \t $this->response->exception($e);\n \t} // try\n } // if\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n }", "public function subscribe(Request $request ){\n if(DB::table('emails')->insert([\n ['email' =>$request->input('email') ],\n ])){\n //Envoi du mail de confirmation\n Mail::to($request->input('email'))\n ->send(new newsletterconfirm);\n }\n\n return \"Cet email est bien enregistré: \".$request->input('email');\n }", "public function mailUserNewReservation(Request $request)\n {\n $now = now(); \n $reservation = new BikeReservation([\n 'reserved_from' => $now,\n 'reserved_to' => $now->addDay(),\n ]);\n $reservation->id = 2; \n \n $bike = new Bike([\n 'name' => 'Sample Bike',\n ]);\n \n $bike->id = 1;\n $mail = new Mail\\UserNewReservation($bike, $reservation);\n \n return $mail;\n }", "function Trigger_SendEmail(&$tNG) {\r\r\n $emailObj = new tNG_Email($tNG);\r\r\n $emailObj->setFrom(\"{SESSION.kt_login_user}\");\r\r\n $emailObj->setTo(\"{KT_defaultSender}\");//\r\r\n $emailObj->setCC(\"\");\r\r\n $emailObj->setBCC(\"\");\r\r\n $emailObj->setSubject(\"Proposition de catégorie\");\r\r\n $id = mysql_insert_id();\r\r\n //WriteContent method\r\r\n $emailObj->setContent(\"Bonjour Admin,\\nUn commercant à proposé une catégorie sous le nom de: {POST.proposition} dans \\n la catégorie: {POST.cat1text} \\n sous catégorie 1: {POST.cat2text} \\n sous catégorie 2: {POST.cat3text} \\n\\n\r\r\n Veuillez cliquer sur ce lien pour valider: http://www.magasinducoin.fr/dev/proposer-action.php?id=$id \\n\\n\r\r\n Cordialement.\");\r\r\n $emailObj->setEncoding(\"ISO-8859-1\");\r\r\n $emailObj->setFormat(\"Text\");\r\r\n $emailObj->setImportance(\"Normal\");\r\r\n return $emailObj->Execute();\r\r\n}", "public function AddNewRecipient()\n {\n $country = Country::find(session('order')['country_id']);\n $account = PaymentNetwork::find(session('order')['payment_network_id']);\n $reasons = Reason::all();\n return view('frontEnd.usersPanel.addRecipient',compact('country','reasons','account'));\n }", "function add_voucher($order_id){\n\t$order = wc_get_order( $order_id );\n\terror_log($order_id);\n\t//echo \"<script language='javascript'>alert('$order_id');</script>\";\n\t//$order = new WC_Order($order_id);\n\t$items = $order->get_items();\n\t$customer = $order->get_user_id();\n\terror_log($customer);\n\t//echo \"<script language='javascript'>alert('$customer');</script>\";\n\tforeach ( $items as $item ) {\n $product_name = $item->get_name();\n $product_id = $item->get_product_id();\n $product_variation_id = $item->get_variation_id();\n\t}\n\t\n\t/* query */\n\t$mylink = $wpdb->get_row( \"\n\tSELECT * FROM $table_name WHERE art_id = $product_id AND used_by = '' ORDER BY created ASC LIMIT 1\n\t\" );\n\t\n\tif ($mylink !== null) {\n\t\n\t\t/* write to db */\n\t\t$wpdb->update( \n\t\t\t$table_name, \n\t\t\tarray( \n\t\t\t\t'used_by' => $customer,\t// string\n\t\t\t\t'order_id' => $order_id\t// integer (number) \n\t\t\t), \n\t\t\tarray( 'ID' => $mylink->id ), \n\t\t\tarray( \n\t\t\t\t'%d',\t// value1\n\t\t\t\t'%d'\t// value2\n\t\t\t), \n\t\t\tarray( '%d' ) \n\t\t);\n\t\t\n\t\t\n\t\t/* send mail */\n\t\n\t\n\t}\n}", "function count_new_messages() {\n $last_visit = UserConfigOptions::getValue('status_update_last_visited', $this->logged_user);\n echo StatusUpdates::countNewMessagesForUser($this->logged_user, $last_visit);\n die();\n }", "public function giftNewEmail($user)\r\n {\r\n\t\t// Mail args\r\n\t\t$args = ['user' => $user];\r\n\t\treturn $this->sendEmail('common', 'new-gift', $user->email, $args);\r\n }", "public function addNewEmail()\r\n {\r\n if (isset($_POST['submit'])) {\r\n\r\n $date = date(\"Y-m-d\");\r\n $email = $_POST['inputEmail'];\r\n\r\n $data['date'] = $date;\r\n $data['email'] = $email;\r\n\r\n $this->insertNewEmail($data);\r\n }\r\n }", "public function subscribe() {\n\t\t\tif (!$this->Auth->user('id')) {\n\t\t\t\tthrow new NotFoundException();\n\t\t\t}\n\t\t\t// sinon affichage de la page qui permet d'aller sur paypal\n\t\t}", "public function notifyNewCustomer(Varien_Event_Observer $observer)\n {\n /* @var $order Mage_Sales_Model_Order */\n if (!Mage::helper('twilio')->isEnabled() || !Mage::helper('twilio')->sendSmsForNewCustomers()) {\n Mage::log(\"Magento Twilio module is not enabled or should not send SMS for new customers\");\n return;\n }\n\n try {\n $sms = $this->account->messages->sendMessage(\n $this->twilioNumber,\n $this->smsNotificationNumber,\n 'A new customer just signed up'\n );\n Mage::log($sms);\n\n } catch (Exception $e) {\n Mage::logException($e);\n }\n\n return $this;\n }", "public function notifyReporter()\r\n {\r\n $message = new Message();\r\n if (!$message->create())\r\n {\r\n return false;\r\n } \r\n \r\n $message->from( \"TicketSystem\" ); \r\n $message->to( $this->getReporter() ); \r\n $message->subject( \"Antwort auf Ticket #\".$this->getId() );\r\n \r\n $subJ = $this->getSubject();\r\n $tID = $this->getId();\r\n \r\n $msgText = \"Deinem Ticket mit dem Betreff \\\"\".$subJ.\"\\\" wurde eine neue Nachricht hinzugefügt.<br/><br/>\";\r\n $msgText .= \"<a href=\\\"ticketsystem.php?ticketid=\".$tID.\"\\\">Klicke hier um zum Ticket zu gelangen</a>\"; \r\n \r\n $message->text( $msgText ); \r\n $message->html( true );\r\n \r\n $message->addUser( $this->getReporter(), 6 ); \r\n\r\n unset( $message ); \r\n }", "public function handleNewContact(Request $request) \n { \n $form_data = $request->all();\n\n Mail::to($form_data['email'])->send(new NewContactUserAutoreplay());\n // Mando la mail anche all'amministratore con il nuovo contatto appena acquisito\n Mail::to('[email protected]')->send(new NewContactAdminNotification($form_data));\n\n return redirect()->route('contacts-thankyou');\n }", "public function notificationAction() {\n global $CFG;\n\n // Full strength error logging\n error_reporting(E_ALL);\n ini_set('display_errors', 0);\n ini_set('log_errors', 1);\n\n // Library stuff\n $sagepay = new sagepayserverlib();\n $sagepay->setController($this);\n\n // POST data from SagePay\n $data = $sagepay->getNotification();\n\n // Log the notification data to debug file (in case it's interesting)\n $this->log(var_export($data, true));\n\n // Get the VendorTxCode and use it to look up the purchase\n $VendorTxCode = $data['VendorTxCode'];\n if (!$purchase = $this->bm->getPurchaseFromVendorTxCode($VendorTxCode)) {\n $url = $this->Url('booking/fail') . '/' . $VendorTxCode . '/' . urlencode('Purchase record not found');\n $this->log('SagePay notification: Purchase not found - ' . $url);\n $sagepay->notificationreceipt('INVALID', $url, 'Purchase record not found');\n die;\n }\n\n // Now that we have the purchase object, we can save whatever we got back in it\n $purchase = $this->bm->updateSagepayPurchase($purchase, $data);\n\n // Mailer\n $mail = new maillib();\n $mailpurchase = clone $purchase;\n $mail->initialise($this, $mailpurchase, $this->bm);\n $mail->setExtrarecipients($CFG->backup_email);\n\n // Check VPSSignature for validity\n if (!$sagepay->checkVPSSignature($purchase, $data)) {\n $purchase->status = 'VPSFAIL';\n $purchase->save();\n $url = $this->Url('booking/fail') . '/' . $VendorTxCode . '/' . urlencode('VPSSignature not matched');\n $this->log('SagePay notification: VPS sig no match - ' . $url);\n $sagepay->notificationreceipt('INVALID', $url, 'VPSSignature not matched');\n die;\n }\n\n // Check Status.\n // Work out what next action should be\n $status = $purchase->status;\n if ($status == 'OK' || ($status == 'OK REPEATED')) {\n\n // Send confirmation email\n $url = $this->Url('booking/complete') . '/' . $VendorTxCode;\n $mail->confirm();\n $this->log('SagePay notification: Confirm sent - ' . $url);\n $sagepay->notificationreceipt('OK', $url, '');\n } else if ($status == 'ERROR') {\n $url = $this->Url('booking/fail') . '/' . $VendorTxCode . '/' . urlencode($purchase->statusdetail);\n $this->log('SagePay notification: Booking fail - ' . $url);\n $mail->decline();\n $sagepay->notificationreceipt('OK', $url, $purchase->statusdetail);\n } else {\n $url = $this->Url('booking/decline') . '/' . $VendorTxCode;\n $this->log('SagePay notification: Booking decline - ' . $url);\n $mail->decline();\n $sagepay->notificationreceipt('OK', $url, $purchase->statusdetail);\n }\n\n $purchase->completed = 1;\n $purchase->save();\n\n die;\n }", "public function commit ($obj)\n {\n $new_user = ! $obj->exists ();\n\n parent::commit ($obj);\n\n $orig_email = $this->value_for ('orig_email');\n $new_email = $this->value_for ('email');\n\n if (! $new_user && ($orig_email != $new_email))\n {\n /* mail has changed, update subscription information. If the mail is now empty,\n remove all subscription information. If the mail has changed, update the\n subscriber record. */\n\n $class_name = $this->app->final_class_name ('SUBSCRIBER', 'webcore/obj/subscriber.php');\n /** @var SUBSCRIBER $subscriber */\n $subscriber = new $class_name ($this->app);\n $subscriber->email = $orig_email;\n\n if (! $new_email)\n {\n $subscriber->purge ();\n }\n else\n {\n if ($subscriber->exists ())\n {\n $subscriber->email = $new_email;\n $subscriber->store ();\n }\n }\n }\n\n // If current user is anonymous, then log in as the newly created user\n\n if ($new_user && ($this->login->is_anonymous () || $this->login->ad_hoc_login))\n {\n $this->app->log_in ($obj, false);\n }\n }", "public function Handler() {\n\t\tif(isset($_POST['doAdd']) && empty($_POST['email'])) {\n\t\t $this->guestbookModel->Add(strip_tags($_POST['newEntry']));\n\t\t}\n\t\telseif(isset($_POST['doClear'])) {\n\t\t $this->guestbookModel->DeleteAll();\n\t\t}\n\t\telseif(isset($_POST['doCreate'])) {\n\t\t $this->guestbookModel->Init();\n\t\t} \n\t\t$this->RedirectTo($this->request->CreateUrl($this->request->controller));\n\t}", "public function run()\n {\n if (! $this->reminder_template) {\n $this->reminder_template = $this->quote->calculateTemplate('quote');\n }\n\n $this->quote->invitations->each(function ($invitation) {\n if ($invitation->contact->send_email && $invitation->contact->email) {\n EmailEntity::dispatchNow($invitation, $invitation->company, $this->reminder_template);\n }\n });\n\n $this->quote->service()->markSent();\n }", "public function __construct()\n {\n // TODO: expand this.!\n Log::info(\"New Daily Email To Be Sent Out..\");\n }", "public function new_coin_announcement(){\n \n \n// $user = User::find( 19 );\n $users = User::all();\n \n \n// echo $user->full_name;\n// echo \"<br>\";\n// echo \"<pre>\";\n// // print_r( $user);\n// exit;\n\n\n foreach( $users as $user ){\n $email_data = array(\n 'userfullname' => isset($user->full_name) ? $user->full_name : ''\n );\n\n $data = array( 'data' => $email_data );\n Mail::send( 'email_templates.newCoinAnnouncement', $data, function($message) use ( $user ) {\n $message->to( $user->email, $user->full_name )->subject\n ( 'New coins added to WooCommerce Altcoin Payment Gateway' );\n $message->from( '[email protected]', 'CodeSolz Team' );\n });\n }\n \n echo 'Email sent!';\n \n }", "function notify_modifications($new, $updates) {\n\tif (count($new) > 0) {\n\t\techo \"<p><b>New terms created:</b></p><ul>\";\n\t\tfor ($c = 0; $c < count($new); $c++) {\n\t\t\techo \"<li>\" . $new[$c][\"Id\"] . \": \" . $new[$c][\"Name\"] . \"</li>\";\t\n\t\t}\n\t\techo \"</ul>\";\n\t}\n\tif (count($updates) > 0) {\n\t\techo \"<p><b>The following terms were modified:</b></p><ul>\";\n\t\tfor ($u = 0; $u < count($updates); $u++) {\n\t\t\techo \"<li>\" . $updates[$u][\"id\"] . \": \" . $updates[$u][\"name\"] . \"</li>\";\n\t\t}\n\t\techo \"</ul>\";\n\t}\n}", "function GST_setReplied($message_GUID)\n\t{\n $this->GST_setClassDB();\n \n\t\t$query = $this->DB->query(\"UPDATE guestbook SET condition='REPLIED' WHERE message_GUID='\".$message_GUID.\"'\");\n $query->run();\n $query->destroy();\n\t}", "public function generateEventForCommunityNewsRecipientsCommand()\n {\n $communityNewsRecipients = $this->communityUserRepository->findCommunityNewsRecipientsWithoutEvent();\n foreach ($communityNewsRecipients as $communityUser) {\n /** @var $communityUser \\Visol\\Easyvote\\Domain\\Model\\CommunityUser */\n\n $this->outputLine('Generate event for ' . $communityUser->getEmail());\n\n /** @var \\Visol\\Easyvote\\Domain\\Model\\Event $event */\n $event = $this->objectManager->get('Visol\\Easyvote\\Domain\\Model\\Event');\n $event->setDate(new \\DateTime('2015-10-08'));\n $event->setCommunityUser($communityUser);\n $this->eventRepository->add($event);\n $this->persistenceManager->persistAll();\n }\n $this->communityUserRepository->updateRelationCount('tx_easyvote_domain_model_event', 'community_user', 'events', 'fe_users', array('deleted', 'disable'));\n }", "public function handleNewsletterSubscriberSave(Varien_Event_Observer $observer)\n {\n\t $helper = Mage::helper('connector');\n\t $subscriber = $observer->getEvent()->getSubscriber();\n\t $storeId = $subscriber->getStoreId();\n\t $email = $subscriber->getEmail();\n\t $subscriberStatus = $subscriber->getSubscriberStatus();\n\n $websiteId = Mage::app()->getStore($subscriber->getStoreId())->getWebsiteId();\n $contactEmail = Mage::getModel('email_connector/contact')->loadByCustomerEmail($email, $websiteId);\n\t try{\n\t // send new subscriber to an automation\n\t if (! Mage::getModel('newsletter/subscriber')->loadByEmail($email)->getId()) {\n\n\t\t $this->_postSubscriberToAutomation($email, $websiteId);\n\t }\n\n // only for subsribers\n if ($subscriberStatus == Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED) {\n\n\t $client = Mage::helper('connector')->getWebsiteApiClient($websiteId);\n\n\t //check for website client\n\t if ($client) {\n\t\t //set contact as subscribed\n\t\t $contactEmail->setSubscriberStatus( $subscriberStatus )\n\t\t ->setIsSubscriber('1');\n\n\t\t $apiContact = $client->postContacts( $email );\n\n\t\t //resubscribe suppressed contacts\n\t\t if ( isset( $apiContact->status ) && $apiContact->status == 'Suppressed' ) {\n\t\t\t $client->postContactsResubscribe( $apiContact );\n\t\t }\n\t }\n\t // reset the subscriber as suppressed\n $contactEmail->setSuppressed(null);\n\n\t //not subscribed\n } else {\n\t //skip if contact is suppressed\n\t if ($contactEmail->getSuppressed())\n\t\t return $this;\n //update contact id for the subscriber\n $client = Mage::helper('connector')->getWebsiteApiClient($websiteId);\n\t //check for website client\n\t if ($client) {\n\t\t $contactId = $contactEmail->getContactId();\n\t\t //get the contact id\n\t\t if ( !$contactId ) {\n\t\t\t //if contact id is not set get the contact_id\n\t\t\t $result = $client->postContacts( $email );\n\t\t\t if ( isset( $result->id ) ) {\n\t\t\t\t $contactId = $result->id;\n\t\t\t } else {\n\t\t\t\t //no contact id skip\n\t\t\t\t $contactEmail->setSuppressed( '1' )\n\t\t\t\t ->save();\n\t\t\t\t return $this;\n\t\t\t }\n\t\t }\n\t\t //remove contact from address book\n\t\t $client->deleteAddressBookContact( $helper->getSubscriberAddressBook( $websiteId ), $contactId );\n\t }\n $contactEmail->setIsSubscriber(null)\n\t ->setSubscriberStatus(Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED);\n }\n\n\t //update the contact\n $contactEmail->setStoreId($storeId);\n\t if (isset($contactId))\n\t\t $contactEmail->setContactId($contactId);\n\t //update contact\n\t $contactEmail->save();\n\n }catch(Exception $e){\n Mage::logException($e);\n\t Mage::helper('connector')->getRaygunClient()->SendException($e, array(Mage::getBaseUrl('web')));\n }\n return $this;\n }", "protected function afterInsert() {\r\n // echo 'checking mail todo'.BR;\r\n $lUid = intval($this -> mVal['user_id']);\r\n if (empty($lUid)) {\r\n return;\r\n }\r\n $lSql = 'SELECT val FROM al_usr_pref WHERE uid='.$lUid.' AND code=\"sys.mail.todo\"';\r\n $lVal = CCor_Qry::getStr($lSql);\r\n if (FALSE === $lVal) {\r\n $lSql = 'SELECT val FROM al_sys_pref WHERE code=\"sys.mail.todo\"';\r\n $lVal = CCor_Qry::getStr($lSql);\r\n } \r\n if (smEveryTime == $lVal) {\r\n // mail versenden\r\n $lUsr = CCor_Usr::getInstance();\r\n $lFMail = $lUsr -> getVal('email');\r\n $lFName = $lUsr -> getVal('firstname').' '.$lUsr -> getVal('lastname');\r\n \r\n $lSql = 'SELECT firstname,lastname,email FROM al_usr WHERE id='.intval($lUid);\r\n $lQry = new CCor_Qry($lSql);\r\n if ($lRow = $lQry -> getAssoc()) {\r\n $lToName = $lRow['firstname'].' '.$lRow['lastname'];\r\n $lToMail = $lRow['email'];\r\n $lMsg = 'Dear user,'.LF.LF.'you have a new todo in your todo list:'.LF.LF;\r\n $lMsg.= $this['subject'].LF.LF; \r\n $lCfg = CCor_Cfg::getInstance();\r\n $lUrl = $lCfg -> getVal('base.url').'index.php?act=';\r\n $lMsg.= 'Link: '.$lUrl.$this['ref_link'];\r\n #echo $lMsg;\r\n $lMai = new CApi_Mail_Item($lFMail, $lFName, $lToMail, $lToName, 'Todo: '.$this['subject'], $lMsg);\r\n #$lMai -> send();\r\n $lMai -> insert();\r\n }\r\n } \r\n }", "public function change_email_sent()\n {\n $this->_render();\n }", "public function email_3day()\n {\n $this->Email->email_3d();\n }", "public function notify()\n\t\t{\n\t\t\techo \"Notifying via YM\\n\";\n\t\t}", "public function sendNewReservationEmail($values)\n {\n $mail = new Nette\\Mail\\Message();\n\n $mail->setFrom($values['email'])\n ->addTo(parent::OWNER_EMAIL)\n ->setHtmlBody('\n <h1>Nová rezervace</h1>\n <p>Jméno: ' . $values['name'] . '</p>\n <p>Email: ' . $values['email'] . '</p>\n <p>Telefon: ' . $values['phone'] . '</p>\n <p>Počet lidí: ' . $values['peopleCount'] . '</p>\n <p>Zpráva: ' . $values['message'] . '</p>');\n\n Debugger::barDump($mail);\n\n //TODO: $this->mailer->send($mail);\n }", "function message(){\n\t\t\treturn \"New Admin has been successfully created!\";\n\t\t}", "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 getNewMail()\n {\n return $this->get(self::_NEW_MAIL);\n }", "static function sendRegInfoMail($recepient) {\r\n\t\tif (!MAIL) return;\r\n\r\n\t\t$mailTemplate = new Art_Model_Email_Template(array('name' => static::EMAIL_TEMPLATE_REGISTRATION_INFO));\r\n\t\tif (!$mailTemplate->isLoaded()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$footer = Helper_Default::getDefaultValue(Helper_TBDev::DEFAULT_MAIL_FOOTER);\r\n\t\t$body = Art_Model_Email_Template::replaceIdentities(array('footer' => $footer),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$mailTemplate->body);\r\n\t\tstatic::sendMailUsingTemplate($mailTemplate, $body, $recepient);\r\n\t}", "public function composeAction()\n\t{\n $contrib_obj = new Ep_User_Contributor();\n $mail=new Ep_Message_Ticket();\n \n //language array list\n $language_array=$this->_arrayDb->loadArrayv2(\"EP_LANGUAGES\", $this->_lang);\n natsort($language_array);\n $this->_view->ep_language_list=$language_array;\n \n $categories_array=$this->_arrayDb->loadArrayv2(\"EP_ARTICLE_CATEGORY\", $this->_lang);\n natsort($categories_array);\n $this->_view->ep_categories_list=$categories_array;\n \n $get_contacts=$mail->getContacts('client');\n foreach($get_contacts as $contact)\n {\n $contact['contact_name'] = trim($contact['contact_name']) ;\n $contact['email'] = trim($contact['email']) ;\n if($contact['contact_name']==NULL)\n $eml=explode(\"@\",$contact['email']);\n \n $clients_contacts[$contact['identifier']] = (($contact['contact_name']!=NULL) ? ($contact['contact_name']) : $eml[0]) . \" (\" . $contact['email'] . \")\" ;\n }\n /**Edit-Place Contacts**/\n $get_contrib_contacts=$mail->getContacts('contributor');\n foreach($get_contrib_contacts as $contact)\n {\n $contact['contact_name'] = trim($contact['contact_name']) ;\n $contact['email'] = trim($contact['email']) ;\n if($contact['contact_name']==NULL)\n $eml=explode(\"@\",$contact['email']);\n \n $Contributor_contacts[$contact['identifier']] = (($contact['contact_name']!=NULL) ? ($contact['contact_name']) : $eml[0]) . \" (\" . $contact['email'] . \")\" ;\n }\n /**Ep Contacts**/\n $get_EP_contacts=$mail->getEPContactsMaster('\"salesuser\",\"partner\",\"customercare\",\"facturation\"');\n if($get_EP_contacts!=\"Not Exists\")\n {\n foreach($get_EP_contacts as $contact)\n {\n $contact['contact_name'] = trim($contact['login_name']) ;\n $contact['email'] = trim($contact['email']) ;\n if($contact['contact_name']==NULL)\n $eml=explode(\"@\",$contact['email']);\n \n $EP_contacts[$contact['identifier']] = (($contact['contact_name']!=NULL) ? ($contact['contact_name']) : $eml[0]) . \" (\" . $contact['email'] . \")\" ;\n }\n }\n if($Contributor_contacts!=='Not Exists')\n $this->_view->Contributor_contacts=$Contributor_contacts;\n if($clients_contacts!=='Not Exists')\n $this->_view->Cients_contacts=$clients_contacts;\n if($get_EP_contacts!=='Not Exists')\n $this->_view->EP_contacts=$EP_contacts;\n\n $this->_view->sc_count=$contrib_obj->getContributorcount('senior');\n $this->_view->jc_count=$contrib_obj->getContributorcount('junior');\n $this->_view->jc0_count=$contrib_obj->getContributorcount('sub-junior');\n $this->_view->csc_count=$contrib_obj->getWritercount('senior');\n $this->_view->cjc_count=$contrib_obj->getWritercount('junior');\n \n $this->_view->sender= $this->user_id ;\n $this->_view->render(\"master_composemail\");\n\t}", "public function newContact() {\n $this->checkValidUser();\n\n $this->db->sql = 'INSERT INTO '.$this->db->dbTbl['contact'].' () VALUES ()';\n\n $res = $this->db->execute();\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'sdfU7'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'sdfE5',\n 'caseId' => $this->db->getLastInsertId(),\n 'timestamp' => time()\n );\n }\n\n $this->renderOutput();\n }", "public function message()\n {\n return 'This product is already listed.';\n }", "public function notify()\n {\n /*$data = DB::select(DB::raw(\"SELECT license_type_id from `license_type_vehicle` where CURDATE()+INTERVAL 31 DAY =`license_end_on`\"));\n if(!empty($result)) {\n $data = array('license_type_id' => ,$result->license_type_id, 'vehicle_id' => $result->vehicle_id, '' );\n }\n DB::table('users')->insert([\n ['email' => '[email protected]', 'votes' => 0],\n ['email' => '[email protected]', 'votes' => 0]\n ]);*/\n $results = DB::table('license_type_vehicle')\n ->join('vehicles', 'vehicles.id', '=', 'license_type_vehicle.vehicle_id') \n ->select('license_type_vehicle.license_type_id', 'license_type_vehicle.vehicle_id','vehicles.client_id')\n ->where( 'license_type_vehicle.license_end_on', '=','CURDATE()+INTERVAL 30 DAY')\n ->get();\n print_r($results);\n /* Mail::send('emails.welcome', ['key' => 'value'], function($message)\n {\n $message->to('[email protected]', 'John Smith')->subject('Welcome!');\n });*/\n \n }", "public function message()\n {\n return 'This product is already exists.';\n }", "public function newAction()\n {\n // Layout\n $this->loadLayout();\n\n // Title\n $this->_title($this->__('Add a credit card'));\n\n // Init messages\n $this->_initLayoutMessages('mbiz_cc/session');\n\n // Active menu\n $navigationBlock = $this->getLayout()->getBlock('customer_account_navigation');\n if ($navigationBlock) {\n $navigationBlock->setActive('customer/cc');\n }\n\n // Render\n $this->renderLayout();\n }", "public function newEvent()\n\t{\n $this->to = $this->domain;\n $this->email = $this->info_mail;\n $this->subject = 'Neue Messe gemeldet';\n $this->view = 'emails.user.new_event';\n\t\t\n\t\t$this->data = [\n\t\t\t'contact'\t\t=> \\Input::get('contact'),\n\t\t\t'email'\t\t\t=> \\Input::get('email'),\n\t\t\t'name'\t\t\t=> \\Input::get('name'),\n\t\t\t'location'\t\t=> \\Input::get('location'),\n\t\t\t'start_date'\t=> \\Input::get('start_date'),\n\t\t\t'end_date'\t\t=> \\Input::has('end_date') ? \\Input::get('end_date') : \\Input::get('start_date'),\n\t\t\t'region'\t\t=> \\Input::get('region'),\n\t\t\t'organizer'\t\t=> \\Input::get('organizer')\n\t\t];\n\n\t\treturn $this;\n\t}", "public function indexAction() {\n\t\t$count1 = 0;\n\t\t$invoices = Mage::getModel( 'invoicereminder/invoicereminder' )->getCollection()->getItems();\n\t\tforeach ( $invoices as $invoice ) {\n\t\t\t$count1 = $count1 + $invoice->getInvoicereminders();\n\t\t}\n\n\t\t// Send the reminders\n\t\tMage::getModel( 'invoicereminder/sender' )->prepareMail();\n\n\t\t// Calculate the total of send items after sending\n\t\t$count2 = 0;\n\t\t$invoices = Mage::getModel( 'invoicereminder/invoicereminder' )->getCollection()->getItems();\n\t\tforeach ( $invoices as $invoice ) {\n\t\t\t$count2 = $count2 + $invoice->getInvoicereminders();\n\t\t}\n\n\t\t// Output the total number of sent reminders\n\t\tMage::getSingleton( 'adminhtml/session' )->addSuccess( Mage::helper( 'invoicereminder' )->__( '%d reminder(s) sent', ( $count2 - $count1 ) ) );\n\t\t$this->getResponse()->setRedirect( $this->getUrl( '*/view/' ) );\n\n\t}", "public function create()\n {\n $this->sesClient->verifyEmailIdentity(\n [\n 'EmailAddress' => $this->identity->getIdentity(),\n ]\n );\n }", "function createInterimEmailContact($interimId){\r\n\r\n // get student id\r\n $query = \"select `StudentID` from `interims` where `ID`='$interimId'\";\r\n $result = mysql_query($query);\r\n\t\t$value = mysql_fetch_assoc($result);\r\n if(!isset($value['StudentID'])) return false;\r\n $studentId = $value['StudentID'];\r\n\r\n // submit special contact showing that an email has been sent for the given interim\r\n $description = \"Email sent to student concerning interim \".$interimId;\r\n $this->updateSpecialHistory($studentId,$description,0);\r\n }", "public function notificacionRegistroIncidencia($incidencia, $estrc) {\n\n\n if ($this->email and $this->email->getMailer()) {\n\n $emails = $this->getUsers($estrc);\n\n if (count($emails) > 0) {\n\n foreach ($emails as $email => $u) {\n\n $message = $this->email->createMessage('Notificación de registro de incidencia')\n ->setFrom(array($this->remitente => 'openAO'))\n ->setTo(array($email))\n ->setBody($this->app->render('@NotificacionBundle/tramite.twig', array(\n 'notification_title' => \"Nueva incidencia\",\n 'notification_subtitle' => \"Incidencia registrada en \" . $estrc->getName(),\n 'notification' => (($incidencia->getIdViasComunicacion()->getAnonimo()) ? \"Anónimo : \" : \"Cliente \" . $incidencia->getNombreApellidos() . \": \" ) . $incidencia->getPlanteamiento(),\n 'notification_url' => $this->app->request()->getUrl().$this->app->request()->getRootUri(),\n 'notification_unsubscribe' => $this->app->request()->getUrl().$this->app->request()->getRootUri() . '/unsubscribe?uid=' . urlencode(\\AtencionOnline\\PublicoBundle\\Crypt\\Crypto::encrypt($u->getId()))\n )), 'text/html');\n\n $this->email->getMailer()->send($message);\n }\n }\n }\n }", "public function customer_details_template_hook($subscription, $sent_to_admin, $plain_text, $email)\n {\n\n // TODO: Probably we need to have our own handling here?\n do_action('woocommerce_email_customer_details', $subscription->get_suborder(), $sent_to_admin, $plain_text, $email);\n }", "public function addnewnotification($data){\n\t$catId = (isset($data)) ? $data : 0;\n $lastInserted_id = $this->insertInToTable(MAIL_NOTIFY_TYPES,array(array('notification_name'=>$this->getData['newnotification'], 'notification_staus'=>'1','admin_display'=>'1', 'templatecategory_id'=>$catId)));\n\treturn $lastInserted_id;\n }", "private function notifyDean() {\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/DeanNotification.php');\r\n\r\n $piDetails = $this->getPIDisplayDetails();\r\n $piName = $piDetails['firstName'] . \" \" . $piDetails['lastName'];\r\n\r\n $subject = sprintf('[TID-%s] Tracking form submitted online [%s]', $this->trackingFormId, $piName);\r\n $emailBody = sprintf('A tracking form was submitted online that requires approval :\r\n\r\nTracking ID : %s\r\nTitle : \"%s\"\r\nPrincipal Investigator : %s\r\nDepartment : %s\r\n\r\nTo view full details of this tracking form, please login at http://research.mtroyal.ca and navigate to \"My Approvals\".\r\n\r\n', $this->trackingFormId, $this->projectTitle, $piName, $piDetails['departmentName']);\r\n\r\n $DeanNotification = new DeanNotification($subject, $emailBody, $this);\r\n try {\r\n $DeanNotification->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send email notification to Dean : '. $e);\r\n }\r\n }" ]
[ "0.55128336", "0.54524916", "0.54356277", "0.53337514", "0.529462", "0.5257302", "0.5202171", "0.51812845", "0.5161659", "0.51456314", "0.5140383", "0.51217264", "0.5112636", "0.5088946", "0.50862825", "0.50830764", "0.5047643", "0.5037332", "0.5018866", "0.50125456", "0.49793774", "0.49715778", "0.49706197", "0.49474072", "0.49413827", "0.49244744", "0.49124044", "0.488674", "0.4859393", "0.4853484", "0.48436868", "0.48431033", "0.4841334", "0.48279905", "0.48231727", "0.48043454", "0.48021558", "0.4801273", "0.47904676", "0.47846755", "0.47695437", "0.47394747", "0.47205397", "0.47193938", "0.47168157", "0.4713594", "0.47097895", "0.47075394", "0.4706113", "0.46933025", "0.46887743", "0.467669", "0.46747413", "0.46632856", "0.4662521", "0.46585461", "0.46417812", "0.4640827", "0.46397197", "0.46385458", "0.4630257", "0.46302134", "0.46300837", "0.46231455", "0.46224672", "0.4620632", "0.4618206", "0.46118072", "0.46110463", "0.4603936", "0.46010655", "0.4600071", "0.45989564", "0.45985562", "0.45799515", "0.45776483", "0.45754388", "0.45739257", "0.457291", "0.45699003", "0.45495614", "0.45460847", "0.454479", "0.4543138", "0.45414346", "0.45387566", "0.45362896", "0.45305833", "0.45303443", "0.45216674", "0.45181173", "0.4516301", "0.45152384", "0.45139366", "0.4511554", "0.45095852", "0.4507999", "0.45024872", "0.44955122", "0.4492661" ]
0.4822096
35
Checks if hidden fields exist on the form which contain information to email a project coordinator. If so then it gets the coordinator subject and body, parses special variables and then sends the email.
protected function EmailCoordinator($data) { $projectCode = !empty($data['_Project_Code']) ? $data['_Project_Code'] : ''; $projectCoordinator = !empty($data['_Project_Coordinator']) ? $data['_Project_Coordinator'] : ''; $projectCoordinatorEmail = !empty($data['_Project_Coordinator_email']) ? $data['_Project_Coordinator_email'] : ''; $projectManager = !empty($data['_Project_Manager']) ? $data['_Project_Manager'] : ''; // Ensure have all these parameters, if not then we cannot send an email. This if fine as some organisations may not want to do this. if ($projectCode && $projectCoordinator && $projectCoordinatorEmail && $projectManager) { // Parse special variables in the email subject and body. $subject = str_replace('{PROJECT_CODE}', $projectCode, $this->CoordinatorEmailSubject); $body = str_replace( array('{PROJECT_CODE}', '{PROJECT_COORDINATOR}', '{PROJECT_MANAGER}'), array($projectCode, $projectCoordinator, $projectManager), $this->CoordinatorEmailBody ); // Send the email. $email = new Email( $this->FromEmailAddress, $projectCoordinatorEmail, $subject, $body ); // Just send plain email, no need for a fancy template. $email->sendPlain(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function MetadataEntryForm()\n {\n // NIWA are worried about parameter case and would like it case insensitive so convert all get vars to lower\n // I think this is because they are not 100% what case the parameters from oracle will be in.\n $params = array_change_key_case($this->getRequest()->getVars(), CASE_LOWER);\n\n // Check in the parameters sent to this page if there are certian fields needed to power the\n // functionality which emails project coordinators and if so get them as we will need to add\n // them to the bottom of the form as hidden fields, this way we can access them in the form\n // processing and send the email.\n $hiddenFields = array();\n\n // These 2 fields can be populated either by Project_Coordinator or Project_Administrator as Oracle actually\n // sends Project_Administrator. NIWA want to keep the field here called coordinator.\n if (!empty($params['project_coordinator'])) {\n $hiddenFields['_Project_Coordinator'] = $params['project_coordinator'];\n } else if (!empty($params['project_administrator'])) {\n $hiddenFields['_Project_Coordinator'] = $params['project_administrator'];\n }\n\n if (!empty($params['project_coordinator_email'])) {\n $hiddenFields['_Project_Coordinator_email'] = $params['project_coordinator_email'];\n } else if (!empty($params['project_administrator_email'])) {\n $hiddenFields['_Project_Coordinator_email'] = $params['project_administrator_email'];\n }\n\n if (!empty($params['project_manager'])) {\n $hiddenFields['_Project_Manager'] = $params['project_manager'];\n }\n\n if (!empty($params['project_code'])) {\n $hiddenFields['_Project_Code'] = $params['project_code'];\n }\n\n // Get the fields defined for this page, exclude the placeholder fields as they are not displayed to the user.\n $metadataFields = $this->Fields()->where(\"FieldType != 'PLACEHOLDER'\")->Sort('SortOrder', 'asc');\n\n // Create fieldfield for the form fields.\n $formFields = FieldList::create();\n $actions = FieldList::create();\n $requiredFields = array();\n\n // Push the required fields message as a literal field at the top.\n $formFields->push(\n LiteralField::create('required', '<p>* Required fields</p>')\n );\n\n if ($metadataFields->count()) {\n foreach($metadataFields as $field) {\n // Create a version of the label with spaces replaced with underscores as that is how\n // any paraemters in the URL will come (plus we can use it for the field name)\n $fieldName = str_replace(' ', '_', $field->Label);\n $fieldLabel = $field->Label;\n\n // If the field is required then add it to the required fields and also add an\n // asterix to the end of the field label.\n if ($field->Required) {\n $requiredFields[] = $fieldName;\n $fieldLabel .= ' *';\n }\n\n // Check if there is a parameter in the GET vars with the corresponding name.\n $fieldValue = null;\n\n if (isset($params[strtolower($fieldName)])) {\n $fieldValue = $params[strtolower($fieldName)];\n }\n\n // Define a var for the new field, means no matter the type created\n // later on in the code we can apply common things like the value.\n $newField = null;\n\n // Single line text field creation.\n if ($field->FieldType == 'TEXTBOX') {\n $formFields->push($newField = TextField::create($fieldName, $fieldLabel));\n } else if ($field->FieldType == 'TEXTAREA') {\n $formFields->push($newField = TextareaField::create($fieldName, $fieldLabel));\n } else if ($field->FieldType == 'KEYWORDS') {\n // If keywords then output 2 fields the textbox for the keywords and then also a\n // literal read only list of those already specified by the admin below.\n $formFields->push($newField = TextAreaField::create($fieldName, $fieldLabel));\n $formFields->push(LiteralField::create(\n $fieldName . '_adminKeywords',\n \"<div class='control-group' style='margin-top: -12px'>Already specified : \" . $field->KeywordsValue . \"</div>\"\n ));\n } else if ($field->FieldType == 'DROPDOWN') {\n // Some dropdowns have an 'other' option so must add the 'other' to the entries\n // and also have a conditionally displayed text field for when other is chosen.\n $entries = $field->DropdownEntries()->sort('SortOrder', 'Asc')->map('Key', 'Label');\n\n if ($field->DropdownOtherOption == true) {\n $entries->push('other', 'Other');\n }\n\n $formFields->push(\n $newField = DropdownField::create(\n $fieldName,\n $fieldLabel,\n $entries\n )->setEmptyString('Select')\n );\n\n if ($field->DropdownOtherOption == true) {\n $formFields->push(\n TextField::create(\n \"${fieldName}_other\",\n \"Please specify the 'other'\"\n )->hideUnless($fieldName)->isEqualTo(\"other\")->end()\n );\n\n //++ @TODO\n // Ideally if the dropdown is required then if other is selected the other field\n // should also be required. Unfortunatley the conditional validation logic of ZEN\n // does not work in the front end - so need to figure out how to do this.\n }\n }\n\n // If a new field was created then set some things on it which are common no matter the type.\n if ($newField) {\n // Set help text for the field if defined.\n if (!empty($field->HelpText)) {\n $newField->setRightTitle($field->HelpText);\n }\n\n // Field must only be made readonly if the admin specified that they should be\n // provided that a value was specified in the URL for it.\n if ($field->Readonly && $fieldValue) {\n $newField->setReadonly(true);\n }\n\n // Set the value of the field one was plucked from the URL params.\n if ($fieldValue) {\n $newField->setValue($fieldValue);\n }\n }\n }\n\n // Add fields to the bottom of the form for the user to include a message in the email sent to curators\n // this is entirely optional and will not be used in most cases so is hidden until a checkbox is ticked.\n $formFields->push(\n CheckboxField::create('AdditionalMessage', 'Include a message from me to the curators')\n );\n\n // For the email address, because its project managers filling out the form, check if the Project_Manager_email\n // has been specified in the URL params and if so pre-populate the field with that value.\n $formFields->push(\n $emailField = EmailField::create('AdditionalMessageEmail', 'My email address')\n ->setRightTitle('Please enter your email address so the curator knows who the message below is from.')\n ->hideUnless('AdditionalMessage')->isChecked()->end()\n );\n\n if (isset($params['project_manager_email'])) {\n $emailField->setValue($params['project_manager_email']);\n }\n\n $formFields->push(\n TextareaField::create('AdditionalMessageText', 'My message')\n ->setRightTitle('You can enter a message here which is appended to the email sent the curator after the record has successfully been pushed to the catalogue.')\n ->hideUnless('AdditionalMessage')->isChecked()->end()\n );\n\n // If there are any hidden fields then loop though and add them as hidden fields to the bottom of the form.\n if ($hiddenFields) {\n foreach($hiddenFields as $key => $val) {\n $formFields->push(\n HiddenField::create($key, '', $val)\n );\n }\n }\n\n // We have at least one field so set the action for the form to submit the entry to the catalogue.\n $actions = FieldList::create(FormAction::create('sendMetadataForm', 'Send'));\n } else {\n $formFields->push(\n ErrorMessage::create('No metadata entry fields have been specified for this page.')\n );\n }\n\n // Set up the required fields validation.\n $validator = ZenValidator::create();\n $validator->addRequiredFields($requiredFields);\n\n // Create form.\n $form = Form::create($this, 'MetadataEntryForm', $formFields, $actions, $validator);\n\n // Check if the data for the form has been saved in the session, if so then populate\n // the form with this data, if not then just return the default form.\n $data = Session::get(\"FormData.{$form->getName()}.data\");\n\n return $data ? $form->loadDataFrom($data) : $form;\n }", "static private function submitEmail()\n {\n $id = $_POST['formid'];\n\n // Initiates new form handling instance\n $f = new FormHandling;\n\n // Gets the client email list (to, bcc, cc)\n $clientEmailList = $f->getClientEmail($id);\n\n // Gets the customer email (if set)\n $customerEmail = $f->getCustomerEmail($_POST);\n\n // dd($customerEmail);\n\n // Checks if in sandbox mode before sending email\n if(FALSE == submissionHandling::sandbox){\n\n // New email instance\n $e = new emailHandling();\n\n // render and send client email(s)\n if($clientEmailList['to']){\n $e->sendEmail($id,'client',$clientEmailList['to'],'Enquiry received','Hi',$clientEmailList['headers']);\n }\n\n // render and send customer email\n if($customerEmail){\n $e->sendEmail($id,'customer',$customerEmail,'Thanks for getting in touch','We will be in touch soon');\n }\n\n }\n }", "function student_crm_webform_send_email_form_submit($form, $form_state) {\n $case = crm_case_load($form_state['values']['case']);\n $email_addresses = student_crm_webform_send_email('crm_case', $case, $form_state['values']['field'], $form_state['values']['manual-email']);\n \n $case = crm_case_load($form_state['values']['case']);\n $fields = field_info_instances();\n $field = $fields['crm_case'][$case->type][$form_state['values']['field']];\n\n drupal_set_message(t('The form %form has been sent to: !email-addresses', array('%form' => $field['label'], '!email-addresses' => theme('item_list', array('items' => $email_addresses)))));\n}", "function Form_Mail()\n {\n /**\n * Form_Mail();\n */\n\n $this->referers_array = array($_SERVER[\"HTTP_HOST\"]);\n /**\n * Leave AS IS to only allow posting from same host that script resides on.\n * List individual hosts to create list of hosts that can post to this script:\n * EXAMPLE: $referer_array = array ('example.com','www.example.com','192.168.0.1');\n */\n\n /* proccess form */\n $this->set_arrays();\n $this->check_referer();\n $this->check_recipient();\n $this->check_required_fields();\n $this->send_form();\n $this->display_thankyou();\n }", "function parse_form($array) {\n// build reserved keyword array\n//Anything put in here will not show up in your email when form is processed\n $reserved_keys[] = \"MAX_FILE_SIZE\";\n $reserved_keys[] = \"required\";\n $reserved_keys[] = \"redirect\";\n //$reserved_keys[] = \"email\";\n $reserved_keys[] = \"require\";\n $reserved_keys[] = \"path_to_file\";\n $reserved_keys[] = \"recipient\";\n $reserved_keys[] = \"subject\";\n $reserved_keys[] = \"bgcolor\";\n $reserved_keys[] = \"text_color\";\n $reserved_keys[] = \"link_color\";\n $reserved_keys[] = \"vlink_color\";\n $reserved_keys[] = \"alink_color\";\n $reserved_keys[] = \"title\";\n $reserved_keys[] = \"missing_fields_redirect\";\n $reserved_keys[] = \"env_report\";\n $reserved_keys[] = \"Submit\";\n $reserved_keys[] = \"submit\";\n //$reserved_keys[] = \"name\";\n $reserved_keys[] = \"Name\";\n $reserved_keys[] = \"submit_x\";\n $reserved_keys[] = \"submit_y\";\n $reserved_keys[] = \"sendit\";\n if (count($array)) {\n while (list($key, $val) = each($array)) {\n//check for email injection\n\t\tif(!has_no_emailheaders($val)){\n\t\t\tprint_error(\"Please don't spam\");\n\t\t}\n\t\t\n// exclude reserved keywords\n $reserved_violation = 0;\n for ($ri=0; $ri<count($reserved_keys); $ri++) {\n if ($key == $reserved_keys[$ri]) $reserved_violation = 1;\n }\n// prepare content\n if ($reserved_violation != 1) {\n\t// let's check to see if they are check boxes\n if (is_array($val)) {\n for ($z=0; $z<count($val); $z++) {\n $nn=$z+1;\n $content .= \"$key #$nn: $val[$z]\\n\";\n }\n }\n\t // if the values contains nothing do nothing then\n\t // don't add it to the content)\n elseif($val != \"\") $content .= \"$key: $val\\n\";\n }\n } // end of while\nreturn $content;\n }\n}", "public function form()\n\t{\n\t\tglobal $L;\n\t\t$sentEmails = $this->getSentEmailsArray();\n\n\t\t$html = '<div class=\"alert alert-primary\" role=\"alert\">';\n\t\t$html .= $this->description();\n\t\t$html .= '</div>';\n\n\t\t$html .= '<div>';\n\t\t// API key\n\t\t$html .= '<label><strong>Buttondown API Key</strong></label>';\n\t\t$html .= '<input id=\"apiKey\" name=\"apiKey\" type=\"text\" value=\"'.$this->getValue('apiKey').'\">';\n\t\t$html .= '<span class=\"tip\">Copy your API key on https://buttondown.email/settings/programming </span>';\n\t\t// Sending paused\n\t\t$html .= '<label>'.$L->get('paused').'</label>';\n\t\t$html .= '<select id=\"paused\" name=\"paused\" type=\"text\">';\n\t\t$html .= '<option value=\"true\" '.($this->getValue('paused')===true?'selected':'').'>'.$L->get('is-paused').'</option>';\n\t\t$html .= '<option value=\"false\" '.($this->getValue('paused')===false?'selected':'').'>'.$L->get('is-active').'</option>';\n\t\t$html .= '</select>';\n\t\t$html .= '<span class=\"tip\">'.$L->get('paused-tip').'</span>';\n\n\t\t// Start date\n\t\t$html .= '<label>'.$L->get('send-after').'</label>';\n\t\t$html .= '<input id=\"startDate\" name=\"startDate\" type=\"text\" value=\"'.$this->getValue('startDate').'\">';\n\t\t$html .= '<span class=\"tip\">'.$L->get('send-after-tip').'</span>';\n\t\t// Subject Prefix\n\t\t$html .= '<label>'.$L->get('subject-prefix').'</label>';\n\t\t$html .= '<input id=\"subjectPrefix\" name=\"subjectPrefix\" type=\"text\" value=\"'.$this->getValue('subjectPrefix').'\">';\n\t\t$html .= '<span class=\"tip\">'.$L->get('subject-prefix-tip').'</span>';\n\t\t\t\t// Sending paused\n\t\t$html .= '<label>'.$L->get('include-cover').'</label>';\n\t\t$html .= '<select id=\"includeCover\" name=\"includeCover\" type=\"text\">';\n\t\t$html .= '<option value=\"true\" '.($this->getValue('includeCover')===true?'selected':'').'>'.$L->get('yes').'</option>';\n\t\t$html .= '<option value=\"false\" '.($this->getValue('includeCover')===false?'selected':'').'>'.$L->get('no').'</option>';\n\t\t$html .= '</select>';\n\t\t$html .= '<span class=\"tip\">'.$L->get('include-cover-tip').'</span>';\n\t\t$html .= '</div><hr>';\n\t\t// List of page keys for which mail was sent \n\t\t$html .= '<h4>'.$L->get('sent-list').'</h4>';\n\t\t$html .= '<span class=\"tip\">'.$L->get('sent-list-tip').'</span>';\n\t\t$html .= '<div style=\"overflow-y: scroll; height:400px;\"><ul>';\n\t\tforeach ($sentEmails as $sentKey):\n\t\t\t$html .= '<li>'.$sentKey.'</li>';\n\t\tendforeach;\n\t\t$html .= '</ul></div>';\n\t\t$html .= '<div><a target=\"_blank\" rel=\"noopener\" href=\"https://buttondown.email/archive\">Buttondown Archive</a></div>';\n\t\treturn $html;\n\t}", "public function emailAction() {\n\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestore_admin_main', array(), 'sitestore_admin_main_email');\n $this->view->form = $form = new Sitestore_Form_Admin_Settings_Email();\n\n //check if comments should be displayed or not\n $show_comments = Engine_Api::_()->sitestore()->displayCommentInsights();\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n $taskstable = Engine_Api::_()->getDbtable('tasks', 'core');\n $rtasksName = $taskstable->info('name');\n $taskstable_result = $taskstable->select()\n ->from($rtasksName, array('processes', 'timeout'))\n ->where('title = ?', 'Sitestore Insight Mail')\n ->where('plugin = ?', 'Sitestore_Plugin_Task_InsightNotification')\n ->limit(1);\n $prefields = $taskstable->fetchRow($taskstable_result);\n\n //populate form\n// $form->populate(array(\n// 'sitestore_insightemail' => $prefields->processes,\n// ));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->_getAllParams())) {\n $values = $form->getValues();\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_insightemail', $values['sitestore_insightemail']);\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n if(empty($sitemailtemplates)) {\n\t\t\t\tEngine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_bg_color', $values['sitestore_bg_color']);\n }\n include APPLICATION_PATH . '/application/modules/Sitestore/controllers/license/license2.php';\n if ($values['sitestore_demo'] == 1 && $values['sitestore_insightemail'] == 1) {\n\n $view = Zend_Registry::isRegistered('Zend_View') ? Zend_Registry::get('Zend_View') : null;\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n $site_title = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.site.title', Engine_Api::_()->getApi('settings', 'core')->getSetting('core.general.site.title', 1));\n\n $insights_string = '';\n\t\t\t\t$template_header = \"\";\n\t\t\t\t$template_footer = \"\";\n if(!$sitemailtemplates) {\n\t\t\t\t\t$site_title_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.title.color', \"#ffffff\");\n\t\t\t\t\t$site_header_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.header.color', \"#79b4d4\");\n\n\t\t\t\t\t//GET SITE \"Email Body Outer Background\" COLOR\n\t\t\t\t\t$site_bg_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.bg.color', \"#f7f7f7\");\n\t\t\t\t\t$insights_string.= \"<table cellpadding='2'><tr><td><table cellpadding='2'><tr><td><span style='font-size: 14px; font-weight: bold;'>\" . $view->translate(\"Sample Store\") . \"</span></td></tr>\";\n\n\t\t\t\t\t$template_header.= \"<table width='98%' cellspacing='0' border='0'><tr><td width='100%' bgcolor='$site_bg_color' style='font-family:arial,tahoma,verdana,sans-serif;padding:40px;'><table width='620' cellspacing='0' cellpadding='0' border='0'>\";\n\t\t\t\t\t$template_header.= \"<tr><td style='background:\" . $site_header_color . \"; color:$site_title_color;font-weight:bold;font-family:arial,tahoma,verdana,sans-serif; padding: 4px 8px;vertical-align:middle;font-size:16px;text-align: left;' nowrap='nowrap'>\" . $site_title . \"</td></tr><tr><td valign='top' style='background-color:#fff; border-bottom: 1px solid #ccc; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-family:arial,tahoma,verdana,sans-serif; padding: 15px;padding-top:0;' colspan='2'><table width='100%'><tr><td colspan='2'>\";\n\n $template_footer.= \"</td></tr></table></td></tr></td></table></td></tr></table>\";\n }\n\n if ($values['sitestore_insightmail_options'] == 1) {\n $vals['days_string'] = $view->translate('week');\n } elseif ($values['sitestore_insightmail_options'] == 2) {\n $vals['days_string'] = $view->translate('month');\n }\n $path = 'http://' . $_SERVER['HTTP_HOST'] . $view->baseUrl();\n $insight_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Visit your Insights Store') . \"</a>\";\n $update_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Send an update to people who like this') . \"</a>\";\n\n //check if Communityad Plugin is enabled\n $sitestorecommunityadEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('communityad');\n $adversion = null;\n if ($sitestorecommunityadEnabled) {\n $communityadmodulemodule = Engine_Api::_()->getDbtable('modules', 'core')->getModule('communityad');\n $adversion = $communityadmodulemodule->version;\n if ($adversion >= '4.1.5') {\n $promote_Ad_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Promote with %s Ads', $site_title) . \"</a>\";\n }\n }\n\n $insights_string.= \"<table><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $vals['days_string'] . $view->translate(array('ly active user', 'ly active users', 2), 2) . \"</span></td></tr><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('person likes this', 'people like this', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n if (!empty($show_comments)) {\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('comment', 'comments', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n }\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '10' . \"</span>\\t <span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('visit', 'visits', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '5' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr></table><table><tr><td>\" . \"<ul style=' padding-left: 5px;'><li>\" . $insight_link . \"</li><li>\" . $update_link;\n\n //check if Communityad Plugin is enabled\n if ($sitestorecommunityadEnabled && $adversion >= '4.1.5') {\n $insights_string.= \"</li><li>\" . $promote_Ad_link;\n }\n $insights_string.= \"</li></ul></td></tr></table>\";\n $days_string = ucfirst($vals['days_string']);\n $owner_name = Engine_Api::_()->user()->getViewer()->getTitle();\n $email = Engine_Api::_()->getApi('settings', 'core')->core_mail_from;\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($values['sitestore_admin'], 'SITESTORE_INSIGHTS_EMAIL_NOTIFICATION', array(\n 'recipient_title' => $owner_name,\n 'template_header' => $template_header,\n 'message' => $insights_string,\n 'template_footer' => $template_footer,\n 'site_title' => $site_title,\n 'days' => $days_string,\n 'email' => $email,\n 'queue' => true));\n }\n }\n }", "function sendInfoMail()\t{\n\t\tif ($this->conf['infomail'] && $this->conf['email.']['field'])\t{\n\t\t\t$recipient='';\n\t\t\t$emailfields=t3lib_div::trimexplode(',',$this->conf['email.']['field']);\t\t\t\t\n\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t$recipient.=$recipient?$Arr[$this->conf['email.']['field']].';'.$recipient:$Arr[$this->conf['email.']['field']];\n\t\t\t}\n\t\t\t$fetch = t3lib_div::_GP('fetch');\n\t\t\tif ($fetch)\t{\n\t\t\t\t\t// Getting infomail config.\n\t\t\t\t$key= trim(t3lib_div::_GP('key'));\n\t\t\t\tif (is_array($this->conf['infomail.'][$key.'.']))\t\t{\n\t\t\t\t\t$config = $this->conf['infomail.'][$key.'.'];\n\t\t\t\t} else {\n\t\t\t\t\t$config = $this->conf['infomail.']['default.'];\n\t\t\t\t}\n\t\t\t\t$pidLock='';\n\t\t\t\tif (!$config['dontLockPid'] && $this->thePid)\t{\n\t\t\t\t\t$pidLock='AND pid IN ('.$this->thePid.') ';\n\t\t\t\t}\n\n\t\t\t\t\t// Getting records\n\t\t\t\tif (t3lib_div::testInt($fetch))\t{\n\t\t\t\t\t$DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$this->conf['uidField'],$fetch,$pidLock,'','','1');\n\t\t\t\t} elseif ($fetch) {\t// $this->conf['email.']['field'] must be a valid field in the table!\n\t\t\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t\t\tif ($ef) $DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$ef,$fetch,$pidLock,'','','100');\n\t\t\t\t\t\tif (count($DBrows )) break;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Processing records\n\t\t\t\tif (is_array($DBrows))\t{\n\t\t\t\t\t//$recipient = $DBrows[0][$this->conf['email.']['field']];\n\t\t\t\t\tif ($this->conf['evalFunc'])\t{\n\t\t\t\t\t\t$DBrows[0] = $this->userProcess('evalFunc',$DBrows[0]);\n\t\t\t\t\t}\n\t\t\t\t\t$this->compileMail($config['label'], $DBrows, $this->getFeuserMail($DBrows[0],$this->conf), $this->conf['setfixed.']);\n\t\t\t\t} elseif ($this->cObj->checkEmail($fetch)) {\n\t\t\t\t\t$this->sendMail($fetch, '', '',trim($this->cObj->getSubpart($this->templateCode, '###'.$this->emailMarkPrefix.'NORECORD###')));\n\t\t\t\t}\n\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL_SENT###');\n\t\t\t} else {\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL###');\n\t\t\t}\n\t\t} else $content='Error: infomail option is not available or emailField is not setup in TypoScript';\n\t\treturn $content;\n\t}", "function setEmailForm(&$smartyEmailForm) {\n\t\t//Check if there is a valid email address in the database for the given combination of employee, service, position and organisation id\n\t\tif ($this->getEmailAddress($smartyEmailForm) || $this->piVars['mode'] == 'set_contact_form') {\n\t\t\tif($this->getEmailAddress($smartyEmailForm)){\n\t\t\t\t//Assign action url of email form with mode 'check_email_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_email_form'),0,0)));\n\t\t\t}else{\n\t\t\t\t//Assign action url of email form with mode 'check_contact_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_contact_form'),0,0)));\n\t\t\t}\n\n\t\t\t//Assign template labels\n\t\t\t$hoster_email=$this->get_hoster_email();\n\t\t\t$smartyEmailForm->assign('email_form_label',$this->pi_getLL('tx_civserv_pi1_email_form.email_form','E-Mail Form'));\n\t\t\t$smartyEmailForm->assign('contact_form_label',str_replace('###HOSTER###', $hoster_email, $this->pi_getLL('tx_civserv_pi1_email_form.contact_form','Contact '.$hoster_email)));\n\t\t\t$smartyEmailForm->assign('notice_label',$this->pi_getLL('tx_civserv_pi1_email_form.notice','Please enter your postal address oder email address, so that we can send you an answer'));\n\t\t\t$smartyEmailForm->assign('title_label', $this->pi_getLL('tx_civserv_pi1_email_form.title','Title'));\n\t\t\t$smartyEmailForm->assign('chose_option', $this->pi_getLL('tx_civserv_pi1_email_form.chose','Please chose'));\n\t\t\t$smartyEmailForm->assign('female_option', $this->pi_getLL('tx_civserv_pi1_email_form.female','Ms.'));\n\t\t\t$smartyEmailForm->assign('male_option', $this->pi_getLL('tx_civserv_pi1_email_form.male','Mr.'));\n\t\t\t$smartyEmailForm->assign('firstname_label',$this->pi_getLL('tx_civserv_pi1_email_form.firstname','Firstname'));\n\t\t\t$smartyEmailForm->assign('surname_label',$this->pi_getLL('tx_civserv_pi1_email_form.surname','Surname'));\n\t\t\t$smartyEmailForm->assign('street_label',$this->pi_getLL('tx_civserv_pi1_email_form.street','Street, Nr.'));\n\t\t\t$smartyEmailForm->assign('postcode_label',$this->pi_getLL('tx_civserv_pi1_email_form.postcode','Postcode'));\n\t\t\t$smartyEmailForm->assign('city_label',$this->pi_getLL('tx_civserv_pi1_email_form.city','City'));\n\t\t\t$smartyEmailForm->assign('email_label',$this->pi_getLL('tx_civserv_pi1_email_form.email','E-Mail'));\n\t\t\t$smartyEmailForm->assign('phone_label',$this->pi_getLL('tx_civserv_pi1_email_form.phone','Phone'));\n\t\t\t$smartyEmailForm->assign('fax_label',$this->pi_getLL('tx_civserv_pi1_email_form.fax','Fax'));\n\t\t\t$smartyEmailForm->assign('subject_label',$this->pi_getLL('tx_civserv_pi1_email_form.subject','Subject'));\n\t\t\t$smartyEmailForm->assign('bodytext_label',$this->pi_getLL('tx_civserv_pi1_email_form.bodytext','Your text'));\n\t\t\t$smartyEmailForm->assign('submit_label',$this->pi_getLL('tx_civserv_pi1_email_form.submit','Send e-mail'));\n\t\t\t$smartyEmailForm->assign('reset_label',$this->pi_getLL('tx_civserv_pi1_email_form.reset','Reset'));\n\t\t\t$smartyEmailForm->assign('required_label',$this->pi_getLL('tx_civserv_pi1_email_form.required','required'));\n\n\t\t\t//Set reset button type to reset functionality\n\t\t\t$smartyEmailForm->assign('button_type','reset');\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function osg_singout_notifier_form_submit($form, & $form_state) {\n osg_singout_notifier_mail_send($form_state['values']);\n}", "public function returnForm() {\r\n global $db;\r\n\r\n $this->status = PRESUBMITTED;\r\n\r\n $deanComments =\"\"; // we save the dean's comments before deleting the approval\r\n\r\n // delete all approvals from database.\r\n foreach($this->approvals AS $approval) {\r\n if($approval->type == COMMITMENTS || $approval->type == DEAN_REVIEW) {\r\n $deanComments = $approval->comments;\r\n }\r\n $approval->delete();\r\n }\r\n\r\n if(strlen($deanComments) > 0) {\r\n $sql = \"UPDATE forms_tracking SET `dean_comments`= '\" . $deanComments . \"' WHERE `form_tracking_id` = \" . $this->trackingFormId;\r\n $db->Execute($sql);\r\n }\r\n\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/ResearcherNotification.php');\r\n\r\n $subject = sprintf('[TID-%s] Tracking form returned for modifications', $this->trackingFormId);\r\n $emailBody = sprintf('A tracking form was returned for modifications from your Dean :\r\n\r\nTracking ID : %s\r\nTitle : \"%s\"\r\nComments : %s\r\n\r\nPlease make any required modifications and re-submit the form.\r\n\r\n', $this->trackingFormId, $this->projectTitle, html_entity_decode(strip_tags($deanComments)));\r\n\r\n $ResearcherNotification = new ResearcherNotification($subject, $emailBody, $this->submitter);\r\n try {\r\n $ResearcherNotification->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send email notification to Researcher : '. $e);\r\n }\r\n\r\n $this->saveMe();\r\n }", "function event_formprocessing($formvariables) {\r\r\n\tglobal $glbl_companyname, $glbl_sendformsfromemailaddress, $glbl_sendformstoemailaddress,\r\r\n\t $glbl_physicalwebrootlocation;\r\r\n\t$outputtype = 'simple';\r\r\n\t// Security validation 'ctcd'\r\r\n\tif (!pingToken($formvariables['citycode']))\r\r\n\t\treturn '// invalid: press the browser [back] button;';\r\r\n\t// When using a custom template for output\r\r\n\tif (isset($formvariables['emailtemplate'])){\r\r\n\t\t$loc = $glbl_physicalwebrootlocation . $formvariables['emailtemplate'];\r\r\n\t\tif (file_exists($loc)){ \r\r\n\t\t\t$file = fopen($loc, 'r'); // Read template page\r\r\n\t\t\t$formstring = fread($file, filesize($loc));\r\r\n\t\t\tfclose($file);\r\r\n\t\t\tif (trim($formstring) != '')\r\r\n\t\t\t\t$outputtype = 'custom';\r\r\n\t\t}\r\r\n\t}\r\r\n\t// When using simple output\r\r\n\tif ($outputtype == 'simple')\r\r\n\t\t$formstring = 'A form was submitted for: ' . $glbl_companyname . '<br><br>';\r\r\n\t// Loop over form variables\r\r\n\tforeach (explode(',', $formvariables['fieldlist']) as $formfield) {\r\r\n\t\t$formfieldvalue = '';\r\r\n\t\tif (isset($formvariables[$formfield]))\r\r\n\t\t\t$formfieldvalue = $formvariables[$formfield];\r\r\n\t\tif (strtolower($formfield) == 'email')\r\r\n\t\t\t$formfieldvalue = '<a href=\"mailto:' . $formfieldvalue . '\">' . $formfieldvalue . '</a>';\r\r\n\t\tif ($outputtype == 'simple')\r\r\n\t\t\t$formstring .= str_replace('_', ' ', $formfield) . ': ' . str_replace('\\\\', '', $formfieldvalue) . '<br>';\r\r\n\t\telse\r\r\n\t\t\t$formstring = str_replace('<!-- {$' . $formfield . '$} -->', $formfieldvalue, $formstring);\r\r\n\t}\r\r\n\t// Add datetimestamp\r\r\n\tif ($outputtype == 'simple')\t\r\r\n\t\t$formstring .= '<br>Date: ' . date(\"m/d/Y\") . ' - ' . date(\"h:i:s A\");\r\r\n\telse\r\r\n\t\t$formstring = str_replace('<!-- {$datetimestamp$} -->',\r\r\n\t\t\t\t\t\t\t\t (date(\"m/d/Y\") . ' - ' . date(\"h:i:s A\")), $formstring);\t\r\r\n\t// Send via email\r\r\n\trequire_once(\"htmlMimeMail5/htmlMimeMail5.php\"); // htmlMimeMail5 class\r\r\n $mail = new htmlMimeMail5(); // Instantiate a new HTML Mime Mail object\r\r\n $mail->setFrom($glbl_sendformsfromemailaddress);\r\r\n $mail->setReturnPath($glbl_sendformsfromemailaddress); \r\r\n $mail->setSubject('web form | ' . $glbl_companyname);\r\r\n $mail->setText(str_replace('<br>', '\\r\\n', $formstring));\r\r\n $mail->setHTML($formstring);\r\r\n\t// Attach uploaded image, if any\r\r\n\tif (isset($_FILES['imagefile']['name']))\r\r\n\t\tif ($_FILES['imagefile']['type'] == \"image/gif\" || $_FILES['imagefile']['type'] == \"image/jpg\" ||\r\r\n\t\t\t$_FILES['imagefile']['type'] == \"image/jpeg\" || $_FILES['imagefile']['type'] == \"image/pjpeg\" ||\r\r\n\t\t\t$_FILES['imagefile']['type'] == \"image/png\")\r\r\n\t\t\t$mail->addAttachment(new fileAttachment($_FILES['imagefile']['tmp_name'], $_FILES['imagefile']['type']));\r\r\n\t// Send the email!\r\r\n\t$mail->send(array($glbl_sendformstoemailaddress), 'smtp');\r\r\n\t// User defined function hook\r\r\n\texecUserDefinedFunction('USRDFNDafter_event_formprocessing');\r\r\n\t// Point to page\r\r\n\theader('Location: ' . $formvariables['afterpage']);\r\r\n}", "function process_submission() {\n\t\tglobal $post;\n\n\t\t$plugin = Grunion_Contact_Form_Plugin::init();\n\n\t\t$id = $this->get_attribute( 'id' );\n\t\t$to = $this->get_attribute( 'to' );\n\t\t$widget = $this->get_attribute( 'widget' );\n\n\t\t$contact_form_subject = $this->get_attribute( 'subject' );\n\n\t\t$to = str_replace( ' ', '', $to );\n\t\t$emails = explode( ',', $to );\n\n\t\t$valid_emails = array();\n\n\t\tforeach ( (array) $emails as $email ) {\n\t\t\tif ( !is_email( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( function_exists( 'is_email_address_unsafe' ) && is_email_address_unsafe( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$valid_emails[] = $email;\n\t\t}\n\n\t\t// No one to send it to :(\n\t\tif ( !$valid_emails ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$to = $valid_emails;\n\n\t\t// Make sure we're processing the form we think we're processing... probably a redundant check.\n\t\tif ( $widget ) {\n\t\t\tif ( 'widget-' . $widget != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tif ( $post->ID != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$field_ids = $this->get_field_ids();\n\n\t\t// Initialize all these \"standard\" fields to null\n\t\t$comment_author_email = $comment_author_email_label = // v\n\t\t$comment_author = $comment_author_label = // v\n\t\t$comment_author_url = $comment_author_url_label = // v\n\t\t$comment_content = $comment_content_label = null;\n\n\t\t// For each of the \"standard\" fields, grab their field label and value.\n\n\t\tif ( isset( $field_ids['name'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['name']];\n\t\t\t$comment_author = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_name', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['email'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['email']];\n\t\t\t$comment_author_email = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_email', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_email_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['url'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['url']];\n\t\t\t$comment_author_url = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_url', addslashes( $field->value ) ) ) );\n\t\t\tif ( 'http://' == $comment_author_url ) {\n\t\t\t\t$comment_author_url = '';\n\t\t\t}\n\t\t\t$comment_author_url_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['textarea'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['textarea']];\n\t\t\t$comment_content = trim( Grunion_Contact_Form_Plugin::strip_tags( $field->value ) );\n\t\t\t$comment_content_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['subject'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['subject']];\n\t\t\tif ( $field->value ) {\n\t\t\t\t$contact_form_subject = Grunion_Contact_Form_Plugin::strip_tags( $field->value );\n\t\t\t}\n\t\t}\n\n\t\t$all_values = $extra_values = array();\n\t\t$i = 1; // Prefix counter for stored metadata\n\n\t\t// For all fields, grab label and value\n\t\tforeach ( $field_ids['all'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$all_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next field\n\t\t}\n\n\t\t// For the \"non-standard\" fields, grab label and value\n\t\t// Extra fields have their prefix starting from count( $all_values ) + 1\n\t\tforeach ( $field_ids['extra'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$extra_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next extra field\n\t\t}\n\n\t\t$contact_form_subject = trim( $contact_form_subject );\n\n\t\t$comment_author_IP = Grunion_Contact_Form_Plugin::get_ip_address();\n\n\t\t$vars = array( 'comment_author', 'comment_author_email', 'comment_author_url', 'contact_form_subject', 'comment_author_IP' );\n\t\tforeach ( $vars as $var )\n\t\t\t$$var = str_replace( array( \"\\n\", \"\\r\" ), '', $$var );\n\t\t$vars[] = 'comment_content';\n\n\t\t$spam = '';\n\t\t$akismet_values = $plugin->prepare_for_akismet( compact( $vars ) );\n\n\t\t// Is it spam?\n\t\t$is_spam = apply_filters( 'contact_form_is_spam', $akismet_values );\n\t\tif ( is_wp_error( $is_spam ) ) // WP_Error to abort\n\t\t\treturn $is_spam; // abort\n\t\telseif ( $is_spam === TRUE ) // TRUE to flag a spam\n\t\t\t$spam = '***SPAM*** ';\n\n\t\tif ( !$comment_author )\n\t\t\t$comment_author = $comment_author_email;\n\n\t\t$to = (array) apply_filters( 'contact_form_to', $to );\n\t\tforeach ( $to as $to_key => $to_value ) {\n\t\t\t$to[$to_key] = Grunion_Contact_Form_Plugin::strip_tags( $to_value );\n\t\t}\n\n\t\t$blog_url = parse_url( site_url() );\n\t\t$from_email_addr = 'wordpress@' . $blog_url['host'];\n\n\t\t$reply_to_addr = $to[0];\n\t\tif ( ! empty( $comment_author_email ) ) {\n\t\t\t$reply_to_addr = $comment_author_email;\n\t\t}\n\n\t\t$headers = 'From: \"' . $comment_author .'\" <' . $from_email_addr . \">\\r\\n\" .\n\t\t\t\t\t'Reply-To: \"' . $comment_author . '\" <' . $reply_to_addr . \">\\r\\n\" .\n\t\t\t\t\t\"Content-Type: text/plain; charset=\\\"\" . get_option('blog_charset') . \"\\\"\";\n\n\t\t$subject = apply_filters( 'contact_form_subject', $contact_form_subject, $all_values );\n\t\t$url = $widget ? home_url( '/' ) : get_permalink( $post->ID );\n\n\t\t$date_time_format = _x( '%1$s \\a\\t %2$s', '{$date_format} \\a\\t {$time_format}', 'jetpack' );\n\t\t$date_time_format = sprintf( $date_time_format, get_option( 'date_format' ), get_option( 'time_format' ) );\n\t\t$time = date_i18n( $date_time_format, current_time( 'timestamp' ) );\n\n\t\t$message = \"$comment_author_label: $comment_author\\n\";\n\t\tif ( !empty( $comment_author_email ) ) {\n\t\t\t$message .= \"$comment_author_email_label: $comment_author_email\\n\";\n\t\t}\n\t\tif ( !empty( $comment_author_url ) ) {\n\t\t\t$message .= \"$comment_author_url_label: $comment_author_url\\n\";\n\t\t}\n\t\tif ( !empty( $comment_content_label ) ) {\n\t\t\t$message .= \"$comment_content_label: $comment_content\\n\";\n\t\t}\n\t\tif ( !empty( $extra_values ) ) {\n\t\t\tforeach ( $extra_values as $label => $value ) {\n\t\t\t\t$message .= preg_replace( '#^\\d+_#i', '', $label ) . ': ' . trim( $value ) . \"\\n\";\n\t\t\t}\n\t\t}\n\t\t$message .= \"\\n\";\n\t\t$message .= __( 'Time:', 'jetpack' ) . ' ' . $time . \"\\n\";\n\t\t$message .= __( 'IP Address:', 'jetpack' ) . ' ' . $comment_author_IP . \"\\n\";\n\t\t$message .= __( 'Contact Form URL:', 'jetpack' ) . \" $url\\n\";\n\n\t\tif ( is_user_logged_in() ) {\n\t\t\t$message .= \"\\n\";\n\t\t\t$message .= sprintf(\n\t\t\t\t__( 'Sent by a verified %s user.', 'jetpack' ),\n\t\t\t\tisset( $GLOBALS['current_site']->site_name ) && $GLOBALS['current_site']->site_name ? $GLOBALS['current_site']->site_name : '\"' . get_option( 'blogname' ) . '\"'\n\t\t\t);\n\t\t} else {\n\t\t\t$message .= __( 'Sent by an unverified visitor to your site.', 'jetpack' );\n\t\t}\n\n\t\t$message = apply_filters( 'contact_form_message', $message );\n\t\t$message = Grunion_Contact_Form_Plugin::strip_tags( $message );\n\n\t\t// keep a copy of the feedback as a custom post type\n\t\t$feedback_time = current_time( 'mysql' );\n\t\t$feedback_title = \"{$comment_author} - {$feedback_time}\";\n\t\t$feedback_status = $is_spam === TRUE ? 'spam' : 'publish';\n\n\t\tforeach ( (array) $akismet_values as $av_key => $av_value ) {\n\t\t\t$akismet_values[$av_key] = Grunion_Contact_Form_Plugin::strip_tags( $av_value );\n\t\t}\n\n\t\tforeach ( (array) $all_values as $all_key => $all_value ) {\n\t\t\t$all_values[$all_key] = Grunion_Contact_Form_Plugin::strip_tags( $all_value );\n\t\t}\n\n\t\tforeach ( (array) $extra_values as $ev_key => $ev_value ) {\n\t\t\t$extra_values[$ev_key] = Grunion_Contact_Form_Plugin::strip_tags( $ev_value );\n\t\t}\n\n\t\t/* We need to make sure that the post author is always zero for contact\n\t\t * form submissions. This prevents export/import from trying to create\n\t\t * new users based on form submissions from people who were logged in\n\t\t * at the time.\n\t\t *\n\t\t * Unfortunately wp_insert_post() tries very hard to make sure the post\n\t\t * author gets the currently logged in user id. That is how we ended up\n\t\t * with this work around. */\n\t\tadd_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\t$post_id = wp_insert_post( array(\n\t\t\t'post_date' => addslashes( $feedback_time ),\n\t\t\t'post_type' => 'feedback',\n\t\t\t'post_status' => addslashes( $feedback_status ),\n\t\t\t'post_parent' => (int) $post->ID,\n\t\t\t'post_title' => addslashes( wp_kses( $feedback_title, array() ) ),\n\t\t\t'post_content' => addslashes( wp_kses( $comment_content . \"\\n<!--more-->\\n\" . \"AUTHOR: {$comment_author}\\nAUTHOR EMAIL: {$comment_author_email}\\nAUTHOR URL: {$comment_author_url}\\nSUBJECT: {$subject}\\nIP: {$comment_author_IP}\\n\" . print_r( $all_values, TRUE ), array() ) ), // so that search will pick up this data\n\t\t\t'post_name' => md5( $feedback_title ),\n\t\t) );\n\n\t\t// once insert has finished we don't need this filter any more\n\t\tremove_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\tupdate_post_meta( $post_id, '_feedback_extra_fields', $this->addslashes_deep( $extra_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_akismet_values', $this->addslashes_deep( $akismet_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_email', $this->addslashes_deep( compact( 'to', 'message' ) ) );\n\n\t\t/**\n\t\t * Fires right before the contact form message is sent via email to\n\t\t * the recipient specified in the contact form.\n\t\t *\n\t\t * @since ?\n\t\t * @module Contact_Forms\n\t\t * @param integer $post_id Post contact form lives on\n\t\t * @param array $all_values Contact form fields\n\t\t * @param array $extra_values Contact form fields not included in $all_values\n\t\t **/\n\t\tdo_action( 'grunion_pre_message_sent', $post_id, $all_values, $extra_values );\n\n\t\t// schedule deletes of old spam feedbacks\n\t\tif ( !wp_next_scheduled( 'grunion_scheduled_delete' ) ) {\n\t\t\twp_schedule_event( time() + 250, 'daily', 'grunion_scheduled_delete' );\n\t\t}\n\n\t\tif ( $is_spam !== TRUE && true === apply_filters( 'grunion_should_send_email', true, $post_id ) ) {\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t} elseif ( true === $is_spam && apply_filters( 'grunion_still_email_spam', FALSE ) == TRUE ) { // don't send spam by default. Filterable.\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t}\n\n\t\tif ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\n\t\t\treturn self::success_message( $post_id, $this );\n\t\t}\n\n\t\t$redirect = wp_get_referer();\n\t\tif ( !$redirect ) { // wp_get_referer() returns false if the referer is the same as the current page\n\t\t\t$redirect = $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\t$redirect = add_query_arg( urlencode_deep( array(\n\t\t\t'contact-form-id' => $id,\n\t\t\t'contact-form-sent' => $post_id,\n\t\t\t'_wpnonce' => wp_create_nonce( \"contact-form-sent-{$post_id}\" ), // wp_nonce_url HTMLencodes :(\n\t\t) ), $redirect );\n\n\t\t$redirect = apply_filters( 'grunion_contact_form_redirect_url', $redirect, $id, $post_id );\n\n\t\twp_safe_redirect( $redirect );\n\t\texit;\n\t}", "public function mailProccess(){\n\n //dd($this->request->getPost());\n \n\t\t$email = \\Config\\Services::email();\n\n //dd($email);\n\n\t\t$to = $this->request->getPost('to');\n\t\t$from = $this->request->getPost('form');\n\t\t$subject = $this->request->getPost('subject');\n\t\t$message = $this->request->getPost('msg');\n\n\t\t$email->setTo($to);\n\t\t$email->setFrom($from);\n\t\t$email->setSubject($subject);\n\t\t$email->setMessage($message);\n\n\t\tif($email->send() == false){\n echo \"Failed\";\n $data = $email->printDebugger(['headers']);\n print_r($data);\n\t\t}else echo \"Mail sent successfully !\";\n\t}", "function info2()\r\n {\r\n //and send user to orderForm2\r\n if($_SERVER['REQUEST_METHOD'] == 'POST')\r\n {\r\n $userMail = $_POST['email'];\r\n $userSeeking = $_POST['seeking'];\r\n $userBio = $_POST['bio'];\r\n $userState = $_POST['state'];\r\n\r\n if(validEmail($_POST['email'])) {\r\n $_SESSION['dating']->setEmail($userMail);\r\n }\r\n //Otherwise, set an error variable in the hive\r\n else {\r\n $this->_f3->set('errors[\"email\"]', 'Please enter a valid Email');\r\n }\r\n\r\n $_SESSION['dating']->setSeeking($userSeeking);\r\n $_SESSION['dating']->setBio($userBio);\r\n $_SESSION['dating']->setState($userState);\r\n\r\n if (empty($this->_f3->get('errors'))) {\r\n header('location: info3');\r\n }\r\n }\r\n\r\n $this->_f3->set('userMail', $userMail);\r\n\r\n\r\n\r\n $view = new Template();\r\n echo $view->render('views/info2.html');\r\n }", "function aform($setup,$subject,$to,$cc,$bcc,$from) {\n\t\t\n\t\tif (isset($_POST[\"Submit\"])) {\n\t\t\t\n\t\t\t// Compile all POST info\n\t\t\tforeach ($_POST as $key => $value) {\n\t\t\t\t$$key = $value;\t\t\t\t\t\t\t\t\n\t\t\t\tif ($key != \"require\" && $key != \"Submit\" && $key != \"verify\" && $key != \"birthday\") {\n\t\t\t\t\t$message .= \"<span style='text-transform: capitalize; font-weight: 700;'>\".$key.\"</span> \".$value.\"<br /><br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If \"Verify\" is set, then check to see if correct\n\t\t\tif ($birthday != \"\") {\n\t\t\t\tif ($birthday != $verify) {\n\t\t\t\t\t$error .= \"Invalid Verification Code<br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check for \"required\" fields\n\t\t\tif ($require != \"\") {\n\t\t\t\t$dcheck = explode(\",\", $require);\n\t\t\t\t\n\t\t\t\twhile(list($check) = each($dcheck)) {\n\t\t\t\t\tif(!$$dcheck[$check]) {\n\t\t\t\t\t\t$error .= \"The <b>$dcheck[$check]</b> field is required.<br />\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check the Email Address\n\t\t\t$checkEmail = validEmail($_POST[\"email\"]);\n\t\t\tif ($checkEmail != \"1\") {\n\t\t\t\t$error .= \"Your email is not valid. Please correct.<br />\";\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t\n\n\t\t/* Let's start by building the form */\n\t\t$form .= '\n\t\t<form method=\"post\" enctype=\"multipart/form-data\" class=\"form\">';\n\t\t$form .= \"\\n\";\n\t\t\t\t\t\t\t\t\n\t\t// let's loop the PIPES \"|\" and breakdown the UNDERSCORES \"_\" then use this data to build the form\n\t\t\t\t\t\n\t\t$formchunk = explode(\"|\", $setup);\n\t\t\t\t\t\n\t\tforeach ($formchunk as $key => $value) {\n\t\t\t$entrychunk = explode(\"_\", $value);\n\t\t\t$formalname = $entrychunk[0];\n\t\t\t$name = $entrychunk[1];\n\t\t\t$type = $entrychunk[2];\n\t\t\t\n\t\t\tif ($entrychunk[3] == \"required\") {\n\t\t\t\t$required = $entrychunk[3]; // this is an optional field for making it REQUIRED and may not be set\n\t\t\t\t$values = $entrychunk[4]; // this is an optional field for the VALUE and may not be set (most commonly used for \"select\" and \"radio\"\n\t\t\t} else {\n\t\t\t\t$values = $entrychunk[3]; // this is an optional field for the VALUE and may not be set (most commonly used for \"select\" and \"radio\"\n\t\t\t\t$required = $entrychunk[4]; // this is an optional field for making it REQUIRED and may not be set\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$form .= '\t\t\t\t\t\t<div>\n\t\t\t<label>'.$formalname.'</label>';\n\t\t\t$form .= \"\\n\";\n\t\t\tif ($_POST[$name]) {\n\t\t\t\t$valueDisplay = $_POST[$name];\n\t\t\t} else {\n\t\t\t\t$valueDisplay = $values;\n\t\t\t}\n\t\t\t\n\t\t\tswitch ($type) {\n\t\t\t\tcase \"text\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"'.$name.'\" type=\"text\" class=\"text\" id=\"'.$name.'\" value=\"'.$valueDisplay.'\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"password\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"'.$name.'\" type=\"password\" class=\"text\" id=\"'.$name.'\" value=\"'.$valueDisplay.'\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak; \n\t\t\t\tcase \"radio\":\n\t\t\t\t\t$form .= '<div class=\"radios\">';\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" checked\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"radio\" name=\"'.$name.'\" value=\"'.$subvalue.'\" class=\"text radio\"'.$active.'> '.$subvalue.'<br />';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= \"</div>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"checkbox\":\n\t\t\t\t\t$form .= '<div class=\"radios\">';\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" checked\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"'.$name.'\" value=\"'.$subvalue.'\" class=\"text radio\"'.$active.'> '.$subvalue.'<br />';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= \"</div>\";\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase \"select\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<select name=\"'.$name.'\" class=\"text select\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t\t<option value=\"\"></option>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" selected\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t\t<option value=\"'.$subvalue.'\"'.$active.'>'.$subvalue.'</option>';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t</select>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"textarea\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<textarea name=\"'.$name.'\" class=\"text textarea\" id=\"'.$name.'\">'.$valueDisplay.'</textarea>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"file\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"file\" class=\"text\" id=\"'.$name.'\" type=\"file\" />';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"verify\":\n\t\t\t\t\t$verification = rand(1111, 9999);\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"hidden\" value=\"'.$verification.'\" name=\"birthday\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"verifytext\">'.$verification.'</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" value=\"\" name=\"verify\" class=\"text verify\" />';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t\t$form .= '\t\t \t\t\t\t\t<div class=\"clear\"></div>';\n\t\t\t$form .= \"\\n\";\n\t\t\t$form .= '\t\t\t\t\t\t</div>';\n\t\t\t$form .= \"\\n\";\n\t\t\t$form .= \"\\n\";\n\t\t\t\t\n\t\t\tif ($required != \"\") {\n\t\t\t\t$requireding = $name;\n\t\t\t\tif ($req != \"\") {\n\t\t\t\t\t$req .= ','.$requireding;\n\t\t\t\t} else {\n\t\t\t\t\t$req .= $requireding;\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\n\t\t}\n\t\t\t\t\t\n\t\t$form .= '\n\t\t<div>\n\t\t\t<label><input type=\"hidden\" name=\"require\" value=\"'.$req.'\" />&nbsp;</label>\n\t\t\t<input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"submit\">\n\t\t\t<div class=\"clear\"></div>\n\t\t</div>\n\t\t</form>';\n\n\t\t\n\t\tif (isset($_POST[\"Submit\"])) {\n\n\n\t\t\tif ($_FILES['file']['tmp_name'] != \"\") {\n\n\t\t\t\t/* Attachment */\n\t\t\t\t$uploadto = $GLOBALS[\"uploadfolder\"];\n\t\t\t\t$docroot = $GLOBALS[\"documentroot\"];\n\t\t\t\t\n\t\t\t\t// Check Entension\n\t\t\t\t$extension = pathinfo($_FILES['file']['name']);\n\t\t\t\t$extension = $extension[extension];\n\t\t\t\t$allowed_paths = explode(\", \", $GLOBALS[\"allowed_ext\"]);\t\t\t\t\t\t\n\t\t\t\tfor($i = 0; $i < count($allowed_paths); $i++) {\n\t\t\t\t\tif ($allowed_paths[$i] == \"$extension\") {\n\t\t\t\t\t\t$ok = \"1\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// Check File Size\n\t\t\t\tif ($ok == \"1\") {\n\t\t\t\t\tif($_FILES['file']['size'] > $GLOBALS[\"max_size\"]) {\n\t\t\t\t\t\t$error .= \"File size is too big!<br />\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ok = \"2\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\n\t\t\tif($error != \"\") {\n\t\t\t\t$fullmessage .= \"<p>\".$error.\"</p>\";\n\t\t\t\t$fullmessage .= $form;\n\t\t\t\treturn $fullmessage;\n\t\t\t} else { \n\t\t\t\t//success!\n\t\t\t\t\n\t\t\t\tif ($_FILES['file']['tmp_name'] == \"\") {\n\t\t\t\t\t/* No Attachment */\n\t\t\t\t\t$send_to = $to;\n\t\t\t\t\t$send_cc = $cc;\n\t\t\t\t\t$send_bcc = $bcc;\n\t\t\t\t\t$send_from = $from;\n\t\t\t\t\t$send_subject = $subject;\n\t\t\t\t\t$message .= \"IP Address: \".$_SERVER['REMOTE_ADDR']; \n\t\t\t\t\tamail($send_to,$send_cc,$send_bcc,$send_from,$send_subject,$message);\t\n\t\t\t\t\treturn \"<p>\".$GLOBALS[\"success\"].\"</p>\";\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\tif ($ok == \"2\") {\n\t\t\t\t\t\t@move_uploaded_file($_FILES['file']['tmp_name'], $uploadto.$_FILES['file']['name']);\n\t\t\t\t\t\t// how to use\n\t\t\t\t\t\t$my_file = $_FILES['file']['name'];\n\t\t\t\t\t\t$my_path = $doc.$uploadto;\n\t\t\t\t\t\t$my_name = $from;\n\t\t\t\t\t\t$my_mail = $from;\n\t\t\t\t\t\t$send_cc = $cc;\n\t\t\t\t\t\t$send_bcc = $bcc;\n\t\t\t\t\t\t$my_replyto = $from;\n\t\t\t\t\t\t$my_to = $to;\n\t\t\t\t\t\t$my_subject = $subject;\n\t\t\t\t\t\t$message .= \" IP Address: \".$_SERVER['REMOTE_ADDR'];\n\t\t\t\t\t\tmail_attachment($my_file, $my_path, $my_to, $my_mail, $my_name, $my_replyto, $my_subject, $message, $cc, $bcc);\t\t\t\t\t\t\t\n\t\t\t\t\t\treturn \"<p>\".$GLOBALS[\"success\"].\"</p>\";\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t} else {\n\t\t\treturn $form;\n\t\t}\n\t}", "public function personalizeFormFields()\n\t{\n\t\t$form = '';\n\t\t$warn = '';\n\t\t\n\t\t// Load the Default value from the configuration\n\t\t$addr1 = (Configuration::get('PS_MR_SHOP_NAME')) ? \n\t\t\tConfiguration::get('PS_MR_SHOP_NAME') : \n\t\t\tConfiguration::get('PS_SHOP_NAME');\n\t\t\n\t\t// Check if a request exist and if errors occured, use the post variable\n\t\tif (Tools::isSubmit('PS_MRSubmitFieldPersonalization') && count($this->_postErrors))\n\t\t\t$addr1 = Tools::getValue('Expe_ad1');\n\t\t\t\n\n\t\tif (!Configuration::get('PS_MR_SHOP_NAME'))\n\t\t\t$warn .= '<div class=\"warn\">'.\n\t\t\t\t$this->l('Its seems you updated Mondialrelay without use the uninstall / install method, \n\t\t\t\tyou have to set up this part to make working the generating ticket process').\n\t\t\t\t'</div>';\t\t\t\n\t\t// Form\n\t\t$form = '<form action=\"'.$_SERVER['REQUEST_URI'].'\" method=\"post\" class=\"form\">';\n\t\t$form .= '\n\t\t\t<fieldset class=\"PS_MRFormStyle\">\n\t\t\t\t<legend>\n\t\t\t\t\t<img src=\"../modules/mondialrelay/images/logo.gif\" />'.$this->l('Fields personalization').\n\t\t\t'</legend>'.\n\t\t\t$warn.'\n\t\t\t<label for=\"PS_MR_SHOP_NAME\">'.$this->l('Main Address').'</label>\n\t\t\t<div class=\"margin-form\">\n\t\t\t\t<input type=\"text\" name=\"Expe_ad1\" value=\"'.$addr1.'\" /><br />\n\t\t\t\t<p>'.$this->l('The key used by Mondialrelay is').' <b>Expe_ad1</b> '.$this->l('and has this default value').'\n\t\t\t \t: <b>'.Configuration::get('PS_SHOP_NAME').'</b></p>\n\t\t\t</div>\n\t\t\n\t\t<div class=\"margin-form\">\n\t\t\t<input type=\"submit\" name=\"PS_MRSubmitFieldPersonalization\" value=\"' . $this->l('Save') . '\" class=\"button\" />\n\t\t</div>\n\t\t</form><br />';\n\t\treturn $form;\n\t}", "private function formProcess() {\n if (isset($_POST['firstname']) && $_POST['firstname']) {\n $this->set_fname(format_uppercase_text($_POST['firstname']));\n } // Required\n if (isset($_POST['lastname']) && $_POST['lastname']) {\n $this->set_lname(format_uppercase_text($_POST['lastname']));\n } // Required\n if (isset($_POST['addressOne']) && $_POST['addressOne']) {\n $this->set_addressOne(format_text($_POST['addressOne']));\n } // Required\n if (isset($_POST['addressTwo']) && $_POST['addressTwo']) {\n $this->set_addressTwo(format_text($_POST['addressTwo']));\n } else {\n $this->set_addressTwo(\"\");\n }\n if (isset($_POST['city']) && $_POST['city']) {\n $this->set_city(format_uppercase_text($_POST['city']));\n } //Required\n if (isset($_POST['state']) && $_POST['state']) {\n $this->set_state(format_text($_POST['state']));\n } //Required\n if (isset($_POST['postalCode']) && $_POST['postalCode']) {\n $this->set_postalcode(format_text($_POST['postalCode']));\n } //Required\n if (isset($_POST['email']) && $_POST['email']) {\n $this->set_email(format_text(strtolower($_POST['email'])));\n } else {\n $this->set_email(\"\");\n }\n if (isset($_POST['homePhone']) && $_POST['homePhone']) {\n $this->set_homephone(format_text($_POST['homePhone']));\n } else {\n $this->set_homephone(\"\");\n }\n if (isset($_POST['workPhone']) && $_POST['workPhone']) {\n $this->set_workphone(format_text($_POST['workPhone']));\n } else {\n $this->set_workphone(\"\");\n }\n if (isset($_POST['cellPhone']) && $_POST['cellPhone']) {\n $this->set_cellphone(format_text($_POST['cellPhone']));\n } else {\n $this->set_cellphone(\"\");\n }\n /**\n if (isset($_POST['goalie']) && $_POST['goalie'] == \"on\") {\n $goalie = \"Y\";\n } else {\n $goalie = \"N\";\n }\n if (isset($_POST['defense']) && $_POST['defense'] == \"on\") {\n $defense = \"Y\";\n } else {\n $defense = \"N\";\n }\n if (isset($_POST['center']) && $_POST['center'] == \"on\") {\n $center = \"Y\";\n } else {\n $center = \"N\";\n }\n if (isset($_POST['wing']) && $_POST['wing'] == \"on\") {\n $wing = \"Y\";\n } else {\n $wing = \"N\";\n }\n */\n if (isset($_POST['position']) && $_POST['position']) {\n $this->set_position($_POST['position']);\n } //Required\n if (isset($_POST['jerseySize']) && $_POST['jerseySize']) {\n $this->set_jerseysize($_POST['jerseySize']);\n } //Required\n if ((isset($_POST['jerseyNumChoiceOne']) && $_POST['jerseyNumChoiceOne']) || $_POST['jerseyNumChoiceOne'] == 0) {\n $this->set_jerseyNumberOne($_POST['jerseyNumChoiceOne']);\n } //Required\n if ((isset($_POST['jerseyNumChoiceTwo']) && $_POST['jerseyNumChoiceTwo']) || $_POST['jerseyNumChoiceTwo'] == 0) {\n $this->set_jerseyNumberTwo($_POST['jerseyNumChoiceTwo']);\n } //Required\n if ((isset($_POST['jerseyNumChoiceThree']) && $_POST['jerseyNumChoiceThree']) || $_POST['jerseyNumChoiceThree'] == 0) {\n $this->set_jerseyNumberThree($_POST['jerseyNumChoiceThree']);\n } //Required\n if (isset($_POST['travelWith']) && $_POST['travelWith']) {\n $this->set_travelingWithWho(format_text($_POST['travelWith']));\n } else {\n $this->set_travelingWithWho(\"\");\n }\n if (isset($_POST['additionalNotes']) && $_POST['additionalNotes']) {\n $this->set_notes(format_text($_POST['additionalNotes']));\n } else {\n $this->set_notes(\"\");\n }\n if (isset($_POST['skillLevel']) && $_POST['skillLevel']) {\n $this->set_skilllevel($_POST['skillLevel']);\n } //Required\n if (isset($_POST['willSub']) && $_POST['willSub'] == \"Y\") {\n $this->set_wantToSub(1);\n if (isset($_POST['sunSub']) && $_POST['sunSub'] == \"on\") {\n $this->set_subSunday(1);\n } else {\n $this->set_subSunday(0);\n }\n if (isset($_POST['monSub']) && $_POST['monSub'] == \"on\") {\n $this->set_subMonday(1);\n } else {\n $this->set_subMonday(0);\n }\n if (isset($_POST['tueSub']) && $_POST['tueSub'] == \"on\") {\n $this->set_subTuesday(1);\n } else {\n $this->set_subTuesday(0);\n }\n if (isset($_POST['wedSub']) && $_POST['wedSub'] == \"on\") {\n $this->set_subWednesday(1);\n } else {\n $this->set_subWednesday(0);\n }\n if (isset($_POST['thuSub']) && $_POST['thuSub'] == \"on\") {\n $this->set_subThursday(1);\n } else {\n $this->set_subThursday(0);\n }\n if (isset($_POST['friSub']) && $_POST['friSub'] == \"on\") {\n $this->set_subFriday(1);\n } else {\n $this->set_subFriday(0);\n }\n if (isset($_POST['satSub']) && $_POST['satSub'] == \"on\") {\n $this->set_subSaturday(1);\n } else {\n $this->set_subSaturday(0);\n }\n } else {\n $this->set_wantToSub(0);\n $this->set_subSunday(0);\n $this->set_subMonday(0);\n $this->set_subTuesday(0);\n $this->set_subWednesday(0);\n $this->set_subThursday(0);\n $this->set_subFriday(0);\n $this->set_subSaturday(0);\n }\n if (isset($_POST['teamRep']) && $_POST['teamRep'] == \"Y\") {\n $this->set_wantToBeATeamRep(1);\n } else {\n $this->set_wantToBeATeamRep(0);\n }\n if (isset($_POST['referee']) && $_POST['referee'] == \"Y\") {\n $this->set_wantToBeARef(1);\n } else {\n $this->set_wantToBeARef(0);\n }\n if (isset($_POST['paymentPlan']) && $_POST['paymentPlan'] == \"1\") {\n $this->set_paymentPlan(1);\n } else if (isset($_POST['paymentPlan']) && $_POST['paymentPlan'] == \"2\") {\n $this->set_paymentPlan(2);\n } else if (isset($_POST['paymentPlan']) && $_POST['paymentPlan'] == \"3\") {\n $this->set_paymentPlan(3);\n } else if (isset($_POST['paymentPlan']) && $_POST['paymentPlan'] == \"4\") {\n $this->set_paymentPlan(4);\n } else if (isset($_POST['paymentPlan']) && $_POST['paymentPlan'] == \"5\") {\n $this->set_paymentPlan(1);\n }\n #Setup the positions comma separated value\n \n /** - This is no longer needed. We set positions directly above.\n $positions = \"\";\n if($goalie == \"Y\") {\n if($defense == \"Y\" || $center == \"Y\" || $wing == \"Y\") {\n $positions .= \"G, \";\n } else {\n $positions .= \"G\";\n }\n }\n if($defense == \"Y\") {\n if($center == \"Y\" || $wing == \"Y\") {\n $positions .= \"D, \";\n } else {\n $positions .= \"D\";\n }\n }\n if($center == \"Y\") {\n if($wing == \"Y\") {\n $positions .= \"C, \";\n } else {\n $positions .= \"C\";\n }\n }\n if($wing == \"Y\") {\n $positions .= \"W\";\n }\n $this->set_position($positions);\n */\n if (isset($_POST['drilLeague']) && $_POST['drilLeague']) {\n $this->set_drilLeague($_POST['drilLeague']);\n } //Required\n if (isset($_POST['payToday']) && $_POST['payToday'] == \"on\") {\n $this->set_payToday(1);\n } else {\n $this->set_payToday(0);\n }\n if (isset($_POST['usaHockeyMembership']) && $_POST['usaHockeyMembership']) {\n $this->set_usaHockeyMembership(format_trim(strtoupper($_POST['usaHockeyMembership'])));\n } else {\n $this->set_usaHockeyMembership(\"\");\n }\n }", "public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->getFieldsByType('email');\n\t\t\t$addressEmail = '';\n\t\t\tforeach ($emailsFields as $fieldModel) {\n\t\t\t\tif (!$recordModel->isEmpty($fieldModel->getFieldName())) {\n\t\t\t\t\t$addressEmail = $recordModel->get($fieldModel->getFieldName());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($addressEmail)) {\n\t\t\t\t\\App\\Mailer::sendFromTemplate([\n\t\t\t\t\t'template' => 'YetiPortalRegister',\n\t\t\t\t\t'moduleName' => $moduleName,\n\t\t\t\t\t'recordId' => $this->get('crmid'),\n\t\t\t\t\t'to' => $addressEmail,\n\t\t\t\t\t'password' => $this->get('password_t'),\n\t\t\t\t\t'login' => $this->get('user_name'),\n\t\t\t\t\t'acceptable_url' => Settings_WebserviceApps_Record_Model::getInstanceById($this->get('server_id'))->get('acceptable_url')\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "function _webform_confirm_email_edit_confirmation_request_email_submit($form, &$form_state) {\n if ( isset($form_state['values']['eid']) == TRUE\n && isset($form['#node']->nid) == TRUE) {\n $obj['nid'] = $form['#node']->nid;\n $obj['email_type'] = WEBFORM_CONFIRM_EMAIL_CONFIRMATION_REQUEST;\n $obj['redirect_url'] = ($form_state['values']['redirect_url_option'] === 'custom') ? $form_state['values']['redirect_url_custom'] : NULL;\n\n if (empty($form['eid']['#value']) == TRUE) {\n //-> new email\n $obj['eid'] = $form_state['values']['eid'];\n drupal_write_record(\n 'webform_confirm_email',\n $obj\n );\n }\n else {\n $obj['eid'] = $form['eid']['#value'];\n drupal_write_record(\n 'webform_confirm_email',\n $obj,\n array('nid', 'eid')\n );\n }\n }\n}", "public function gui2()\n {\n require_code('form_templates');\n\n $submit_name = do_lang_tempcode('PROCEED');\n $post_url = build_url(array('page' => '_SELF', 'type' => 'actual'), '_SELF');\n\n $fields = new Tempcode();\n $hidden = new Tempcode();\n $already = array();\n $email_counter = 0;\n foreach ($_POST as $key => $input_value) {\n if (get_magic_quotes_gpc()) {\n $input_value = stripslashes($input_value);\n }\n\n if (substr($key, 0, 14) == 'email_address_') {\n $already[] = $input_value; //email address\n $email_counter++;\n $hidden->attach(form_input_hidden($key, $input_value));\n } else {\n // Add hidden field to the form\n if ($key != 'upload') {\n $hidden->attach(form_input_hidden($key, $input_value));\n }\n }\n }\n\n $hidden->attach(form_input_hidden('select_contacts_page', '1'));\n\n $text = do_lang_tempcode('RECOMMEND_SITE_TEXT_CHOOSE_CONTACTS', escape_html(get_site_name()));\n\n $page_title = get_param_string('page_title', null, true);\n if (is_null(get_param_string('from', null, true))) {\n $hidden->attach(form_input_hidden('wrap_message', '1'));\n }\n\n $success_read = false;\n\n // Start processing CSV file\n if ((get_option('enable_csv_recommend') == '1') && (!is_guest())) {\n if (array_key_exists('upload', $_FILES)) { // NB: We disabled plupload for this form so don't need to consider it\n if (is_uploaded_file($_FILES['upload']['tmp_name']) && preg_match('#\\.csv#', $_FILES['upload']['name']) != 0) {\n $possible_email_fields = array('E-mail', 'Email', 'E-mail address', 'Email address', 'Primary Email');\n $possible_name_fields = array('Name', 'Forename', 'First Name', 'Display Name', 'First');\n\n $fixed_contents = unixify_line_format(file_get_contents($_FILES['upload']['tmp_name']));\n require_code('files');\n cms_file_put_contents_safe($_FILES['upload']['tmp_name'], $fixed_contents, FILE_WRITE_FAILURE_SILENT);\n\n safe_ini_set('auto_detect_line_endings', '1');\n $myfile = fopen($_FILES['upload']['tmp_name'], 'rt');\n\n $del = ',';\n\n $csv_header_line_fields = fgetcsv($myfile, 10240, $del);\n if ((count($csv_header_line_fields) == 1) && (strpos($csv_header_line_fields[0], ';') !== false)) {\n $del = ';';\n rewind($myfile);\n $csv_header_line_fields = fgetcsv($myfile, 10240, $del);\n }\n\n $skip_next_process = false;\n\n if (function_exists('mb_convert_encoding')) {\n if ((function_exists('mb_detect_encoding')) && (strlen(mb_detect_encoding($csv_header_line_fields[0], \"ASCII,UTF-8,UTF-16,UTF16\")) == 0)) { // Apple mail weirdness\n // Test string just for Apple mail detection\n $test_unicode = utf8_decode(mb_convert_encoding($csv_header_line_fields[0], \"UTF-8\", \"UTF-16\"));\n if (preg_match('#\\?\\?ame#u', $test_unicode) != 0) {\n foreach ($csv_header_line_fields as $key => $value) {\n $csv_header_line_fields[$key] = utf8_decode(mb_convert_encoding($csv_header_line_fields[$key], \"UTF-8\", \"UTF-16\"));\n\n $found_email_address = '';\n $found_name = '';\n\n $first_row_exploded = explode(';', $csv_header_line_fields[0]);\n\n $email_index = 1; // by default\n $name_index = 0; // by default\n\n foreach ($csv_header_line_fields as $key2 => $value2) {\n if (preg_match('#\\?\\?ame#', $value2) != 0) {\n $name_index = $key2; // Windows mail\n }\n if (preg_match('#E\\-mail#', $value2) != 0) {\n $email_index = $key2; // both\n }\n }\n\n while (($csv_line = fgetcsv($myfile, 10240, $del)) !== false) { // Reading a CSV record\n foreach ($csv_line as $key2 => $value2) {\n $csv_line[$key2] = utf8_decode(mb_convert_encoding($value2, \"UTF-8\", \"UTF-16\"));\n }\n\n $found_email_address = (array_key_exists($email_index, $csv_line) && strlen($csv_line[$email_index]) > 0) ? $csv_line[$email_index] : '';\n $found_email_address = (preg_match('#.*\\@.*\\..*#', $found_email_address) != 0) ? preg_replace(\"#\\\"#\", '', $found_email_address) : '';\n $found_name = $found_email_address;\n\n if (strlen($found_email_address) > 0) {\n $skip_next_process = true;\n // Add to the list what we've found\n $fields->attach(form_input_tick($found_name, $found_email_address, 'use_details_' . strval($email_counter), true));\n $hidden->attach(form_input_hidden('details_email_' . strval($email_counter), $found_email_address));\n $hidden->attach(form_input_hidden('details_name_' . strval($email_counter), $found_name));\n $email_counter++;\n $success_read = true;\n }\n }\n }\n }\n }\n }\n\n if (!$skip_next_process) {\n // There is a strange symbol that appears at start of the Windows Mail file, so we need to convert the first file line to catch these\n if ((function_exists('mb_check_encoding')) && (mb_check_encoding($csv_header_line_fields[0], 'UTF-8'))) {\n $csv_header_line_fields[0] = utf8_decode($csv_header_line_fields[0]);\n }\n\n // This means that we need to import from Windows mail (also for Outlook Express) export file, which is different from others csv export formats\n if (array_key_exists(0, $csv_header_line_fields) && (preg_match('#\\?Name#', $csv_header_line_fields[0]) != 0 || preg_match('#Name\\;E\\-mail\\sAddress#', $csv_header_line_fields[0]) != 0)) {\n $found_email_address = '';\n $found_name = '';\n\n $first_row_exploded = explode(';', $csv_header_line_fields[0]);\n\n $email_index = 1; // by default\n $name_index = 0; // by default\n\n foreach ($first_row_exploded as $key => $value) {\n if (preg_match('#\\?Name#', $value) != 0) {\n $name_index = $key; // Windows mail\n }\n if (preg_match('#^Name$#', $value) != 0) {\n $name_index = $key; // Outlook Express\n }\n if (preg_match('#E\\-mail\\sAddress#', $value) != 0) {\n $email_index = $key; // both\n }\n }\n\n while (($csv_line = fgetcsv($myfile, 10240, $del)) !== false) { // Reading a CSV record\n $row_exploded = (array_key_exists(0, $csv_line) && strlen($csv_line['0']) > 0) ? explode(';', $csv_line[0]) : array('', '');\n\n $found_email_address = (strlen($row_exploded[$email_index]) > 0) ? $row_exploded[$email_index] : '';\n $found_name = (strlen($row_exploded[$name_index]) > 0) ? $row_exploded[$name_index] : '';\n\n if (strlen($found_email_address) > 0) {\n // Add to the list what we've found\n $fields->attach(form_input_tick($found_name, do_lang_tempcode('RECOMMENDING_TO_LINE', escape_html($found_name), escape_html($found_email_address)), 'use_details_' . strval($email_counter), true));\n $hidden->attach(form_input_hidden('details_email_' . strval($email_counter), $found_email_address));\n $hidden->attach(form_input_hidden('details_name_' . strval($email_counter), $found_name));\n $email_counter++;\n $success_read = true;\n }\n }\n } else {\n require_code('type_sanitisation');\n\n // Find e-mail\n $email_field_index = mixed();\n foreach ($possible_email_fields as $field) {\n foreach ($csv_header_line_fields as $i => $header_field) {\n if (strtolower($header_field) == strtolower($field)) {\n $email_field_index = $i;\n $success_read = true;\n break 2;\n }\n\n // No header\n if (is_email_address($header_field)) {\n $email_field_index = $i;\n $success_read = true;\n rewind($myfile);\n break 2;\n }\n }\n }\n\n if ($success_read) {\n // Find name\n $name_field_index = mixed();\n foreach ($possible_name_fields as $field) {\n foreach ($csv_header_line_fields as $i => $header_field) {\n if ((strtolower($header_field) == strtolower($field)) && ($i != $email_field_index)) {\n $name_field_index = $i;\n break 2;\n }\n }\n }\n // Hmm, first one that is not the email then\n if (is_null($name_field_index)) {\n foreach ($csv_header_line_fields as $i => $header_field) {\n if ($i != $email_field_index) {\n $name_field_index = $i;\n break;\n }\n }\n }\n\n // Go through all records\n while (($csv_line = fgetcsv($myfile, 10240, $del)) !== false) { // Reading a CSV record\n if (empty($csv_line[$email_field_index])) {\n continue;\n }\n if (empty($csv_line[$name_field_index])) {\n continue;\n }\n\n $found_email_address = $csv_line[$email_field_index];\n $found_name = ucwords($csv_line[$name_field_index]);\n\n if (is_email_address($found_email_address)) {\n // Add to the list what we've found\n $fields->attach(form_input_tick($found_name, do_lang_tempcode('RECOMMENDING_TO_LINE', escape_html($found_name), escape_html($found_email_address)), 'use_details_' . strval($email_counter), true));\n $hidden->attach(form_input_hidden('details_email_' . strval($email_counter), $found_email_address));\n $hidden->attach(form_input_hidden('details_name_' . strval($email_counter), $found_name));\n $email_counter++;\n }\n }\n }\n }\n }\n\n fclose($myfile);\n }\n }\n }\n\n if (!$success_read) {\n warn_exit(do_lang_tempcode('ERROR_NO_CONTACTS_SELECTED'));\n }\n\n return do_template('FORM_SCREEN', array('_GUID' => 'e3831cf87d76295c48cbce627bdd07e3', 'PREVIEW' => true, 'SKIP_WEBSTANDARDS' => true, 'TITLE' => $this->title, 'HIDDEN' => $hidden, 'FIELDS' => $fields, 'URL' => $post_url, 'SUBMIT_ICON' => 'menu__site_meta__recommend', 'SUBMIT_NAME' => $submit_name, 'TEXT' => $text));\n }", "public function emailMeAction() {\r\n\r\n //DEFAULT LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //GET VIEWER DETAIL\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewr_id = $viewer->getIdentity();\r\n\r\n //GET PAGE ID AND PAGE OBJECT\r\n $this->view->page_id = $page_id = $this->_getParam('page_id', $this->_getParam('id', null));\r\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\r\n if (empty($sitepage))\r\n return $this->_forwardCustom('notfound', 'error', 'core');\r\n \r\n //AUTHORIZATION CHECK FOR TELL A FRIEND\r\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'tfriend');\r\n if (empty($isManageAdmin)) {\r\n return $this->_forwardCustom('requireauth', 'error', 'core');\r\n }\r\n\r\n //FORM GENERATION\r\n $this->view->form = $form = new Sitepage_Form_EmailMe();\r\n\r\n if (!empty($viewr_id)) {\r\n $value['sender_email'] = $viewer->email;\r\n $value['sender_name'] = $viewer->displayname;\r\n $form->populate($value);\r\n }\r\n\r\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\r\n\r\n $values = $form->getValues();\r\n\r\n //EDPLODES EMAIL IDS\r\n $reciver_ids = $sitepage->email; //explode(',', $values['sitepage_reciver_emails']);\r\n $values['sitepage_sender_email'] = $sitepage->email;\r\n if (!empty($values['sitepage_send_me'])) {\r\n $reciver_ids = $values['sitepage_sender_email'];\r\n }\r\n $sender_email = $values['sitepage_sender_email'];\r\n\r\n //CHECK VALID EMAIL ID FORMITE\r\n $validator = new Zend_Validate_EmailAddress();\r\n\r\n if (!$validator->isValid($sender_email)) {\r\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Invalid sender email address value'));\r\n return;\r\n }\r\n// foreach ($reciver_ids as $reciver_id) {\r\n// $reciver_id = trim($reciver_id, ' ');\r\n// if (!$validator->isValid($reciver_id)) {\r\n// $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter correct email address of the receiver(s).'));\r\n// return;\r\n// }\r\n// }\r\n $sender = $values['sitepage_sender_name'];\r\n $message = $values['sitepage_message'];\r\n $heading = ucfirst($sitepage->getTitle());\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($reciver_ids, 'SITEPAGE_EMAILME_EMAIL', array(\r\n 'host' => $_SERVER['HTTP_HOST'],\r\n 'sender_name' => $sender,\r\n 'page_title' => $heading,\r\n 'message' => '<div>' . $message . '</div>',\r\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] . Engine_Api::_()->sitepage()->getHref($sitepage->page_id, $sitepage->owner_id, $sitepage->getSlug()),\r\n 'sender_email' => $sender_email,\r\n 'queue' => true\r\n ));\r\n\r\n $this->_forwardCustom('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => false,\r\n 'format' => 'smoothbox',\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message to page owner has been sent successfully.'))\r\n ));\r\n }\r\n }", "public function GrabEmailFromCheckoutPagePE()\n\t{\n\t\tif ($_POST['gr_checkout_checkbox'] == 1)\n\t\t{\n\t\t\tif ($this->grApiInstance)\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'checkout_campaign');\n\t\t\t\t$this->addContact($campaign, 'Friend', $_POST['billing_email']);\n\t\t\t}\n\t\t}\n\t}", "function ef_notifications_notification_submit($form, &$form_state) {\n if (isset($form_state['values']['ef_notifications'])) {\n ($form['options']['#access'] ? $wrapper_id = 'options' : $wrapper_id = 'revision_information');\n foreach ($form_state['values']['ef_notifications'] as $rid => $role_emails) {\n foreach ($role_emails as $email) {\n $email_transition = $form[$wrapper_id]['workflow_email'][$rid]['#hidden'];\n ef_notifications_mail_send($email, $email_transition, $form_state['node']); //\n }\n }\n }\n}", "function sentInfoContactForm($name,$company_name,$city,$email,$phone_no,$comments)\n\t\t{\n\t\t\t//email will be sent to admin\n\t\t\t//emaill of admin\n\t\t\t$email_admin = $this->manage_content->getValue('admin_profile','email_add');\n\t\t\t//get email from array $email_admin[0]['email_add']\n\t\t\t$sendMail_admin = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$email_admin[0]['email_add']);\n\t\t}", "function room_reservations_admin_settings_email($form, &$form_state) {\n $default_from_address\n = _room_reservations_get_variable('from_address');\n $default_confirmation_header_text\n = _room_reservations_get_variable('confirmation_header_text');\n $default_confirmation_owner_text\n = _room_reservations_get_variable('confirmation_owner_text');\n $default_confirmation_group_text\n = _room_reservations_get_variable('confirmation_group_text');\n $default_reminder_header_text\n = _room_reservations_get_variable('reminder_header_text');\n $default_reminder_owner_text\n = _room_reservations_get_variable('reminder_owner_text');\n $default_reminder_group_text\n = _room_reservations_get_variable('reminder_group_text');\n $tokens = array(\n '%reservation_name' => t('The name given to the reservation to identify it\n on the reservation calendar.'),\n '%room' => t('The room that has been reserved.'),\n '%month' => t('The full name of the month of the reservation date.'),\n '%month_number' => t('The month number of the reservation date.'),\n '%day' => t('The numeric day of the month of the reservation date.'),\n '%day_of_the_week' => t('The full name of the day of the week of the\n reservation date.'),\n '%time' => t('The time of the reservation.'),\n '%minutes' => t('The length of the reservation in minutes.'),\n );\n $token_display = '<p>' .\n t('The following tokens will be replaced with dynamic values in any of the\n fields below.') . '</p><ul>';\n foreach ($tokens as $key => $value) {\n $token_display .= '<li>' . $key . ' - ' . $value . '</li>';\n }\n $token_display .= '</ul>';\n $form['from_address'] = array(\n '#title' => t('From address'),\n '#type' => 'textfield',\n '#maxlength' => 100,\n '#size' => 100,\n '#description' => t('The from address on all email messages.'),\n '#default_value' => $default_from_address,\n '#weight' => -110,\n );\n $form['tokens'] = array(\n '#type' => 'fieldset',\n '#title' => t('Token values'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => -100,\n );\n $form['tokens']['values'] = array(\n '#value' => $token_display,\n );\n $form['confirmation_header'] = array(\n '#title' => t('Confirmation heading'),\n '#type' => 'textfield',\n '#maxlength' => 100,\n '#size' => 100,\n '#description' => t('The heading for all confirmation messages.'),\n '#default_value' => $default_confirmation_header_text,\n '#weight' => -97,\n );\n $form['confirmation_owner'] = array(\n '#title' => t('Confirmation body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Confirmation message sent to the person who has made a\n reservation.'),\n '#default_value' => $default_confirmation_owner_text,\n '#weight' => -95,\n );\n $form['confirmation_group'] = array(\n '#title' => t('Confirmation to group members body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Confirmation message sent to all members of the group\n except for the person who made the reservation.'),\n '#default_value' => $default_confirmation_group_text,\n '#weight' => -90,\n );\n $form['reminder_header'] = array(\n '#title' => t('Reminder heading'),\n '#type' => 'textfield',\n '#maxlength' => 100,\n '#size' => 100,\n '#description' => t('The heading for all reminder messages.'),\n '#default_value' => $default_reminder_header_text,\n '#weight' => -85,\n );\n $form['reminder_owner'] = array(\n '#title' => t('Reminder body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Reminder message sent to the person who has made a\n reservation.'),\n '#default_value' => $default_reminder_owner_text,\n '#weight' => -80,\n );\n $form['reminder_group'] = array(\n '#title' => t('Reminder to group members body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Reminder message sent to all members of the group\n except for the person who made the reservation.'),\n '#default_value' => $default_reminder_group_text,\n '#weight' => -75,\n );\n $form['save'] = array(\n '#type' => 'submit',\n '#value' => t('Save configuration'),\n '#weight' => 100,\n );\n $form['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset to defaults'),\n '#weight' => 101,\n );\n return $form;\n}", "function wpsp_send_tour_design() {\n\t\n\tparse_str ($_POST['tours'], $inquiry_info);\n\t\n\twpsp_email_notify( $inquiry_info, true, true );//confirm to operator\n\twpsp_email_notify( $inquiry_info, false, true ); //confirm to traveller\n\t\n\tdie();\n}", "public function processConfiguration()\n\t{\n\t\t// Check if the value sent on form submit matches one of either $_POST or $_GET keys \n\t\tif (Tools::isSubmit('submit_emailmystock_form'))\n\t\t{\n\t\t\t$enable_emails = Tools::getValue('enable_emails');\n\t\t\t// Update configuration value to database\n\t\t\tConfiguration::updateValue('MYMOD_EMAILS', $enable_emails);\n\t\t\t// Allows the Smarty object to display a confirmation message when the configuration is saved (see top of getContent.tpl)\n\t\t\t$this->context->smarty->assign('confirmation', 'ok');\n\t\t}\n\t}", "public function output_setup_form() {\n\t\t$related_api = Thrive_Dash_List_Manager::connection_instance( 'mandrill' );\n\t\tif ( $related_api->is_connected() ) {\n\t\t\t$credentials = $related_api->get_credentials();\n\t\t\t$this->set_param( 'email', $credentials['email'] );\n\t\t\t$this->set_param( 'mandrill-key', $credentials['key'] );\n\t\t}\n\n\t\t$this->output_controls_html( 'mailchimp' );\n\t}", "function checkEmailForm(&$smartyEmailForm) {\n\t\t//Retrieve submitted form fields\n\t\t$title = t3lib_div::_POST('title');\n\t\t$firstname = t3lib_div::_POST('firstname');\n\t\t$surname = t3lib_div::_POST('surname');\n\t\t$phone = t3lib_div::_POST('phone');\n\t\t$fax = t3lib_div::_POST('fax');\n\t\t$email = t3lib_div::_POST('email');\n\t\t$street = t3lib_div::_POST('street');\n\t\t$postcode = t3lib_div::_POST('postcode');\n\t\t$city = t3lib_div::_POST('city');\n\t\t$subject = t3lib_div::_POST('subject');\n\t\t$bodytext = t3lib_div::_POST('bodytext');\n\n\t\t// Bool variable that indicates whether filled email form is valid or not\n\t\t$is_valid = true;\n\n\t\t// Get Email-Adress or otherwise false\n\t\t$email_address = $this->getEmailAddress($smartyEmailForm);\n\n\t\t// Check if there is a valid email address in the database for the given combination of employee, service, position and organisation id\n\t\tif ($email_address) {\n\n\t\t\t// Check submitted form fields\n\t\t\tif (empty($surname)) {\n\t\t\t\t$smartyEmailForm->assign('error_surname',$this->pi_getLL('tx_civserv_pi1_email_form.error_surname','Please enter your surname!'));\n\t\t\t\t$is_valid = false;\n\t\t\t}\n\n\t\t\tif (empty($firstname)) {\n\t\t\t\t$smartyEmailForm->assign('error_firstname',$this->pi_getLL('tx_civserv_pi1_email_form.error_firstname','Please enter your firstname!'));\n\t\t\t\t$is_valid = false;\n\t\t\t}\n\n\t\t\tif (!empty($postcode) && !is_numeric($postcode)) {\n\t\t\t\t$smartyEmailForm->assign('error_postcode',$this->pi_getLL('tx_civserv_pi1_email_form.error_postcode','Please enter a valid postcode!'));\n\t\t\t\t$is_valid = false;\n\t\t\t}\n\n\t\t\tif (!empty($email) && !t3lib_div::validEmail($email)) {\n\t\t\t\t$smartyEmailForm->assign('error_email',$this->pi_getLL('tx_civserv_pi1_debit_form.error_email','Please enter a valid email address!'));\n\t\t\t\t$is_valid = false;\n\t\t\t}\n\n\t\t\tif (empty($subject)) {\n\t\t\t\t$smartyEmailForm->assign('error_subject',$this->pi_getLL('tx_civserv_pi1_email_form.error_subject','Please enter a subject!'));\n\t\t\t\t$is_valid = false;\n\t\t\t}\n\n\t\t\tif (empty($bodytext)) {\n\t\t\t\t$smartyEmailForm->assign('error_bodytext',$this->pi_getLL('tx_civserv_pi1_email_form.error_bodytext','Please enter your text!'));\n\t\t\t\t$is_valid = false;\n\t\t\t}\n\n\t\t\tif ($is_valid) {\n\n\t\t\t\t// Format body of email message\n\t\t\t\t$body = $this->pi_getLL('tx_civserv_pi1_email_form.title','Title') . ': ' . $title.\n\t\t\t\t \"\\n\" . $this->pi_getLL('tx_civserv_pi1_email_form.firstname','Firstname') . ': ' . $firstname.\n\t\t\t\t \"\\n\" . $this->pi_getLL('tx_civserv_pi1_email_form.surname','Surname') . ': ' . $surname.\n\t\t\t\t \"\\n\" . $this->pi_getLL('tx_civserv_pi1_email_form.phone','Phone') . ': ' . $phone.\n\t\t\t\t \"\\n\" . $this->pi_getLL('tx_civserv_pi1_email_form.fax','Fax') . ': ' . $fax.\n\t\t\t\t \"\\n\" . $this->pi_getLL('tx_civserv_pi1_email_form.email','E-Mail') . ': ' . $email.\n\t\t\t\t \"\\n\" . $this->pi_getLL('tx_civserv_pi1_email_form.street','Street, Nr.') . ': ' .$street.\n\t\t\t\t \"\\n\" . $this->pi_getLL('tx_civserv_pi1_email_form.postcode','Postcode') . ': ' . $postcode.\n\t\t\t\t \"\\n\" . $this->pi_getLL('tx_civserv_pi1_email_form.city','City') . ': ' . $city.\n\t\t\t\t \"\\n\" . $this->pi_getLL('tx_civserv_pi1_email_form.subject','Subject') . ': ' . $subject.\n\t\t\t\t \"\\n\" .\n\t\t\t\t \"\\n\" . $this->pi_getLL('tx_civserv_pi1_email_form.bodytext','Your text') . ': ' .\n\t\t\t\t \"\\n\" . $bodytext;\n\t\t\t\t//todo: check possibilities of header injection\n\t\t\t\tif(!empty($email)){\t\t// email given in contact-form is correct\n\t\t\t\t\t$headers = \"From: \".$email.\"\\r\\nReply-To: \".$email.\"\\r\\n\";\n\t\t\t\t}else{ // set email retrieved via hoster_get_email\n\t\t\t\t\t$headers = \"From: \".$email_address.\"\\r\\nReply-To: \".$email_address.\"\\r\\n\";\n\t\t\t\t}\n\n\t\t\t\tt3lib_div::plainMailEncoded($email_address, $subject, $body, $headers);\n\t\t\t\t$reply = $this->pi_getLL('tx_civserv_pi1_email_form.complete','Thank you! Your message has been sent successfully ');\n\t\t\t\t$reply .= $this->pi_getLL('tx_civserv_pi1_email_form.to','to ');\n\t\t\t\t$reply .= $email_address.\".\";\n\t\t\t\t$smartyEmailForm->assign('complete',$reply);\n\n\t\t\t\treturn true;\n\t\t\t} else { //Return email form template with error markers\n\t\t\t\tif($this->piVars['mode'] == \"check_contact_form\"){\n\t\t\t\t\t// Assign action url of email form\n\t\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_contact_form'),0,0)));\n\t\t\t\t} else {\n\t\t\t\t\t// Assign action url of email form\n\t\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_email_form'),0,0)));\n\t\t\t\t}\n\n\t\t\t\t// Set form fields to previously entered values\n\t\t\t\t$smartyEmailForm->assign('firstname',$firstname);\n\t\t\t\t$smartyEmailForm->assign('surname',$surname);\n\t\t\t\t$smartyEmailForm->assign('phone',$phone);\n\t\t\t\t$smartyEmailForm->assign('fax',$fax);\n\t\t\t\t$smartyEmailForm->assign('email',$email);\n\t\t\t\t$smartyEmailForm->assign('street',$street);\n\t\t\t\t$smartyEmailForm->assign('postcode',$postcode);\n\t\t\t\t$smartyEmailForm->assign('city',$city);\n\t\t\t\t$smartyEmailForm->assign('subject',$subject);\n\t\t\t\t$smartyEmailForm->assign('bodytext',$bodytext);\n\n\t\t\t\t// Assign template labels\n\t\t\t\t$hoster_email=$this->get_hoster_email();\n\t\t\t\t$smartyEmailForm->assign('email_form_label',$this->pi_getLL('tx_civserv_pi1_email_form.email_form','E-Mail Form'));\n\t\t\t\t$smartyEmailForm->assign('contact_form_label',str_replace('###HOSTER###', $hoster_email, $this->pi_getLL('tx_civserv_pi1_email_form.contact_form','Contact '.$hoster_email)));\n\t\t\t\t$smartyEmailForm->assign('notice_label',$this->pi_getLL('tx_civserv_pi1_email_form.notice','Please enter your postal address oder email address, so that we can send you an answer'));\n\t\t\t\t$smartyEmailForm->assign('title_label', $this->pi_getLL('tx_civserv_pi1_email_form.title','Title'));\n\t\t\t\t$smartyEmailForm->assign('chose_option', $this->pi_getLL('tx_civserv_pi1_email_form.chose','Please chose'));\n\t\t\t\t$smartyEmailForm->assign('female_option', $this->pi_getLL('tx_civserv_pi1_email_form.female','Ms.'));\n\t\t\t\t$smartyEmailForm->assign('male_option', $this->pi_getLL('tx_civserv_pi1_email_form.male','Mr.'));\n\t\t\t\t$smartyEmailForm->assign('firstname_label',$this->pi_getLL('tx_civserv_pi1_email_form.firstname','Firstname'));\n\t\t\t\t$smartyEmailForm->assign('surname_label',$this->pi_getLL('tx_civserv_pi1_email_form.surname','Surname'));\n\t\t\t\t$smartyEmailForm->assign('street_label',$this->pi_getLL('tx_civserv_pi1_email_form.street','Street, Nr.'));\n\t\t\t\t$smartyEmailForm->assign('postcode_label',$this->pi_getLL('tx_civserv_pi1_email_form.postcode','Postcode'));\n\t\t\t\t$smartyEmailForm->assign('city_label',$this->pi_getLL('tx_civserv_pi1_email_form.city','City'));\n\t\t\t\t$smartyEmailForm->assign('email_label',$this->pi_getLL('tx_civserv_pi1_email_form.email','E-Mail'));\n\t\t\t\t$smartyEmailForm->assign('phone_label',$this->pi_getLL('tx_civserv_pi1_email_form.phone','Phone'));\n\t\t\t\t$smartyEmailForm->assign('fax_label',$this->pi_getLL('tx_civserv_pi1_email_form.fax','Fax'));\n\t\t\t\t$smartyEmailForm->assign('subject_label',$this->pi_getLL('tx_civserv_pi1_email_form.subject','Subject'));\n\t\t\t\t$smartyEmailForm->assign('bodytext_label',$this->pi_getLL('tx_civserv_pi1_email_form.bodytext','Your text'));\n\t\t\t\t$smartyEmailForm->assign('submit_label',$this->pi_getLL('tx_civserv_pi1_email_form.submit','Send e-mail'));\n\t\t\t\t$smartyEmailForm->assign('reset_label',$this->pi_getLL('tx_civserv_pi1_email_form.reset','Reset'));\n\t\t\t\t$smartyEmailForm->assign('required_label',$this->pi_getLL('tx_civserv_pi1_email_form.required','required'));\n\n\t\t\t\t// Set reset button type to submit functionality (necessary for resetting email form in 'check_email_form'-mode)\n\t\t\t\t$smartyEmailForm->assign('button_type','submit');\n\n\t\t\t\treturn true;\n\t\t\t} // End return email form template with error markers\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function GrabEmailFromCheckoutPage()\n\t{\n\t\tif ($_POST['gr_checkout_checkbox'] != 1 || false === $this->grApiInstance || empty($_POST['billing_email'])) {\n\t\t\treturn;\n\t\t}\n\n\t\t$firstname = isset($_POST['billing_first_name']) ? $_POST['billing_first_name'] : null;\n\t\t$lastname = isset($_POST['billing_last_name']) ? $_POST['billing_last_name'] : null;\n\n\t\t$name = 'Friend';\n\n\t\tif (!empty($firstname) || !empty($lastname)) {\n\t\t\t$name = trim($firstname . ' ' . $lastname);\n\t\t}\n\n\t\t$customs = array();\n\t\t$campaign = get_option($this->GrOptionDbPrefix . 'checkout_campaign');\n\t\tif (get_option($this->GrOptionDbPrefix . 'sync_order_data') == true) {\n\t\t\tforeach ($this->biling_fields as $custom_name => $custom_field) {\n\t\t\t\t$custom = get_option($this->GrOptionDbPrefix . $custom_name);\n\t\t\t\tif ($custom && !empty($_POST[$custom_field['value']])) {\n\t\t\t\t\t$customs[$custom] = $_POST[$custom_field['value']];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->addContact($campaign, $name, $_POST['billing_email'], 0, $customs);\n\t}", "private function notifyDean() {\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/DeanNotification.php');\r\n\r\n $piDetails = $this->getPIDisplayDetails();\r\n $piName = $piDetails['firstName'] . \" \" . $piDetails['lastName'];\r\n\r\n $subject = sprintf('[TID-%s] Tracking form submitted online [%s]', $this->trackingFormId, $piName);\r\n $emailBody = sprintf('A tracking form was submitted online that requires approval :\r\n\r\nTracking ID : %s\r\nTitle : \"%s\"\r\nPrincipal Investigator : %s\r\nDepartment : %s\r\n\r\nTo view full details of this tracking form, please login at http://research.mtroyal.ca and navigate to \"My Approvals\".\r\n\r\n', $this->trackingFormId, $this->projectTitle, $piName, $piDetails['departmentName']);\r\n\r\n $DeanNotification = new DeanNotification($subject, $emailBody, $this);\r\n try {\r\n $DeanNotification->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send email notification to Dean : '. $e);\r\n }\r\n }", "private function process_emails(&$doing){\n\n if (isset($_GET['hotel_confirmation_once'])){\n // ----------------------- Ask for the welcome mail attachment\n print x(\"span class='only_online'\",\n\t x(\"form action='\".b_url::same('?resetcache_once=1').\"' method='post' enctype='multipart/form-data' name='upload_mail_attachment'\",\n\t\tx('table',\n\t\t x('tr',\n\t\t x('td','Please select PDF file').\n\t\t x('td',\"<input name='_virt_att' type='file' />\").\n\t\t \"<input name='v_id' value='\".$_GET['hotel_confirmation_once'].\"' type='hidden' />\".\n\t\t \"<input name='lease_id' value='\".$_GET['lease_once'].\"' type='hidden' />\").\n\t\t x('tr',\n\t\t x('td colspan=2',x('center',\"<input type='submit' value='submit'/>\"))))));\n }elseif (isset($_FILES['_virt_att'])){\n // ----------------------- Save the welcome mail attachment\n VM_mailer()->save_attachment($_REQUEST['v_id'],$_REQUEST['lease_id'],$_FILES['_virt_att'],'hotel_confirmation');\n }elseif (isset($_GET['mail2all_deny_once'])){\n // ----------------------- Send deny E-mails to all refused attenders of the event\n $q = $this->query();\n while($rec = myPear_db()->next_record($q)){\n\tif(VM_mailer()->m_applicant_deny($rec['v_id'],'status',$rec['v_status']) === False){\n\t VM_mailer()->m_applicant_deny($rec['v_id'],$no_preview=True);\n\t}\n }\n }\n if(isset($_GET['mail2all_welcome_once'])){\n // ----------------------- Send welcome E-mails to all accepted attenders of the event\n $q = $this->query();\n while($rec = myPear_db()->next_record($q)){\n\tif(VM_mailer()->welcome_applicant($rec['v_id'],'status',$rec['v_status']) === False){\n\t VM_mailer()->welcome_applicant($rec['v_id'],@$rec['lease_id'],$no_preview=True);\n\t}\n }\n }elseif (isset($_GET['mail_once'])){\n //\n // ----------------------- Preview e-mails \n //\n $doing = 'send_accept_deny';\n switch($_GET['mail_once']){ \n case 'vm_mail_yes':\n\tVM_mailer()->welcome_applicant($_GET['v_id'],$_GET['lease_id']);\n\tbreak;\n\t\n case 'vm_mail_no':\n\tVM_mailer()->m_applicant_deny($_GET['v_id']);\n\tbreak;\n\t\n case 'vm_mail_info':\n\tVM_mailer()->m_applicant_info_mail($_GET['v_id']);\n\tbreak;\n\n case 'vm_mail_pwd':\n\tVM_mailer()->remind_organizer($_GET['v_id'],VM::$e,'pwd',False);\n\tbreak;\n }\n }elseif(isset($_GET['sendmail_once'])){\n //\n // ----------------------- Sending the e-mail after preview\n //\n switch($sendmail_once=$_GET['sendmail_once']){\n case 'send':\n\tb_debug::_debug(\"sendmail_once='$sendmail_once'\",$this);\n\tbreak;\n default:\n\tb_debug::_debug(\"sendmail_once='$sendmail_once'... What to do???\",$this);\n }\n }\n }", "private function _processSubmit()\n {\n global $interface;\n global $configArray;\n\n // Without IDs, we can't continue\n if (empty($_REQUEST['ids'])) {\n header(\n \"Location: \" . $this->followupUrl . \"?errorMsg=bulk_noitems_advice\"\n );\n exit();\n }\n\n $url = $configArray['Site']['url'] . \"/Search/Results?lookfor=\" .\n urlencode(implode(\" \", $_POST['ids'])) . \"&type=ids\";\n $result = $this->sendEmail(\n $url, $_POST['to'], $_POST['from'], $_POST['message']\n );\n\n if (!PEAR::isError($result)) {\n $this->followupUrl .= \"?infoMsg=\" . urlencode(\"bulk_email_success\");\n header(\"Location: \" . $this->followupUrl);\n exit();\n } else {\n // Assign Error Message and Available Data\n $this->errorMsg = $result->getMessage();\n $interface->assign('formTo', $_POST['to']);\n $interface->assign('formFrom', $_POST['from']);\n $interface->assign('formMessage', $_POST['message']);\n $interface->assign('formIDS', $_POST['ids']);\n }\n }", "function room_reservations_admin_settings_email_submit($form_id, &$form_state) {\n if ($form_state['clicked_button']['#value'] == t('Save configuration')) {\n $from_address = $form_state['values']['from_address'];\n $confirmation_header = $form_state['values']['confirmation_header'];\n $confirmation_owner = $form_state['values']['confirmation_owner'];\n $confirmation_group = $form_state['values']['confirmation_group'];\n $reminder_header = $form_state['values']['reminder_header'];\n $reminder_owner = $form_state['values']['reminder_owner'];\n $reminder_group = $form_state['values']['reminder_group'];\n $confirmation = ROOM_RESERVATIONS_SAVE_CONFIRMATION_MSG;\n $error = ROOM_RESERVATIONS_SAVE_ERROR_MSG;\n }\n elseif ($form_state['clicked_button']['#value'] == t('Reset to defaults')) {\n $confirmation_header = '';\n $confirmation_owner = '';\n $confirmation_group = '';\n $reminder_header = '';\n $reminder_owner = '';\n $reminder_group = '';\n $confirmation = ROOM_RESERVATIONS_RESET_CONFIRMATION_MSG;\n $error = ROOM_RESERVATIONS_RESET_ERROR_MSG;\n }\n $errors = FALSE;\n $result = _room_reservations_set_variable('from_address', $from_address);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('confirmation_header_text', \n $confirmation_header);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('confirmation_owner_text', \n $confirmation_owner);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('confirmation_group_text', \n $confirmation_group);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('reminder_header_text', \n $reminder_header);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('reminder_owner_text', \n $reminder_owner);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('reminder_group_text', \n $reminder_group);\n if (!$result) {\n $errors = TRUE;\n }\n if ($errors) {\n drupal_set_message(check_plain($error), 'error');\n }\n else {\n drupal_set_message(check_plain($confirmation));\n }\n}", "function _webform_confirm_email_edit_confirmation_email_submit($form, &$form_state) {\n\n if ( isset($form_state['values']['eid']) == TRUE\n && isset($form['#node']->nid) == TRUE) {\n\n $obj['eid'] = $form_state['values']['eid'];\n $obj['nid'] = $form['#node']->nid;\n $obj['email_type'] = WEBFORM_CONFIRM_EMAIL_CONFIRMATION;\n\n if (empty($form['eid']['#value']) == TRUE) {\n //-> new email\n $obj['eid'] = $form_state['values']['eid'];\n drupal_write_record(\n 'webform_confirm_email',\n $obj\n );\n }\n else {\n $obj['eid'] = $form['eid']['#value'];\n drupal_write_record(\n 'webform_confirm_email',\n $obj,\n array('nid', 'eid')\n );\n }\n }\n}", "function bab_pm_formsend()\n{\n $bab_pm_PrefsTable = safe_pfx('bab_pm_list_prefs');\n $bab_pm_SubscribersTable = safe_pfx('bab_pm_subscribers');\n\n $bab_pm_radio = ps('bab_pm_radio'); // this is whether to mail or not, or test\n\n if ($bab_pm_radio == 'Send to Test') {\n $bab_pm_radio = 2;\n }\n\n if ($bab_pm_radio == 'Send to List') {\n $bab_pm_radio = 1;\n }\n\n if ($bab_pm_radio != 0) { // if we have a request to send, start the ball rolling....\n // email from override\n $sendFrom = gps('sendFrom');\n\n $listToEmail = (!empty($_REQUEST['listToEmail'])) ? gps('listToEmail') : gps('list');\n // $listToEmail = gps('listToEmail'); // this is the list name\n $subject = gps('subjectLine');\n $form = gps('override_form');\n\n // ---- scrub the flag column for next time:\n $result = safe_query(\"UPDATE $bab_pm_SubscribersTable SET flag = NULL\");\n\n //time to fire off initialize\n // bab_pm_initialize_mail();\n $path = \"?event=postmaster&step=initialize_mail&radio=$bab_pm_radio&list=$listToEmail&artID=$artID\";\n\n if (!empty($sendFrom)) {\n $path .= \"&sendFrom=\" . urlencode($sendFrom);\n }\n\n if (!empty($subject)) {\n $path .= \"&subjectLine=\" . urlencode($subject);\n }\n\n if ($_POST['use_override'] && !empty($form)) {\n $path .= \"&override_form=$form&use_override=1\";\n }\n\n header(\"HTTP/1.x 301 Moved Permanently\");\n header(\"Status: 301\");\n header(\"Location: \".$path);\n header(\"Connection: close\");\n }\n\n $options = '';\n $form_select = '';\n\n // get available lists to create dropdown menu\n $bab_pm_lists = safe_query(\"select * from $bab_pm_PrefsTable\");\n\n while ($row = @mysqli_fetch_row($bab_pm_lists)) {\n $options .= \"<option>$row[1]</option>\";\n }\n\n $selection = '<select id=\"listToEmail\" name=\"listToEmail\">' . $options . '</select>';\n\n $form_list = safe_column('name', 'txp_form',\"name like 'newsletter-%'\");\n\n if (count($form_list) > 0) {\n foreach ($form_list as $form_item) {\n $form_options[] = \"<option>$form_item</option>\";\n }\n\n $form_select = '<select name=\"override_form\">' . join($form_options,\"\\n\") . '</select>';\n $form_select .= checkbox('use_override', '1', '').'Use override?';\n }\n\n if (isset($form_select) && !empty($form_select)) {\n $form_select = <<<END\n <div style=\"margin-top:5px\">\n Override form [optional]: $form_select\n </div>\nEND;\n }\n echo <<<END\n<form action=\"\" method=\"post\" accept-charset=\"utf-8\">\n <fieldset id=\"bab_pm_formsend\">\n <legend><span class=\"bab_pm_underhed\">Form-based Send</span></legend>\n <div style=\"margin-top:5px\">\n <label for=\"listToEmail\" class=\"listToEmail\">Select list:</label> $selection\n </div>\n $form_select\n <label for=\"sendFrom\" class=\"sendFrom\">Send From:</label><input type=\"text\" name=\"sendFrom\" value=\"\" id=\"sendFrom\" /><br />\n <label for=\"subjectLine\" class=\"subjectLine\">Subject Line:</label><input type=\"text\" name=\"subjectLine\" value=\"\" id=\"subjectLine\" /><br />\n\n <p><input type=\"submit\" name=\"bab_pm_radio\" value=\"Send to Test\" class=\"publish\" />\n &nbsp;&nbsp;\n <input type=\"submit\" name=\"bab_pm_radio\" value=\"Send to List\" class=\"publish\" /></p>\n </fieldset>\n</form>\nEND;\n}", "private function sendNotifyEmail(){\n $uS = Session::getInstance();\n $to = filter_var(trim($uS->referralFormEmail), FILTER_SANITIZE_EMAIL);\n\n try{\n if ($to !== FALSE && $to != '') {\n// $userData = $this->getUserData();\n $content = \"Hello,<br>\" . PHP_EOL . \"A new \" . $this->formTemplate->getTitle() . \" was submitted to \" . $uS->siteName . \". <br><br><a href='\" . $uS->resourceURL . \"house/register.php' target='_blank'>Click here to log into HHK and take action.</a><br>\" . PHP_EOL;\n\n $mail = prepareEmail();\n\n $mail->From = ($uS->NoReplyAddr ? $uS->NoReplyAddr : \"[email protected]\");\n $mail->FromName = htmlspecialchars_decode($uS->siteName, ENT_QUOTES);\n $mail->addAddress($to);\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New \" . Labels::getString(\"Register\", \"onlineReferralTitle\", \"Referral\") . \" submitted\";\n $mail->msgHTML($content);\n\n if ($mail->send() === FALSE) {\n return false;\n }else{\n return true;\n }\n }\n }catch(\\Exception $e){\n return false;\n }\n return false;\n }", "function set_post_content($entry, $form){\r\n\t //Custom Form Submitted via PHP will go here\r\n\t // Get the IDs of the relevant fields and prepare an email message\r\n\t $message = print_r($entry, true);\r\n\t \r\n\t // Wrap test if any lines are larger than 70 characters\r\n\t $message = wordwrap($message, 70);\r\n\t \r\n\t// Send me an email for debugging\r\n\t// mail('[email protected]', 'Getting the Gravity Form Field IDs', $message);\r\n \r\n\t// Post the form to a specific URL to the desired CRM, in this case DebtPayPro\r\n\tfunction post_to_url($url, $data) {\r\n\t\t$fields = '';\r\n\t\tforeach($data as $key => $value) {\r\n\t\t\t$fields .= $key . '=' . $value . '&';\r\n\t\t}\r\n \r\n\t\trtrim($fields, '&');\r\n\t\t$post = curl_init();\r\n \r\n\t\t curl_setopt($post, CURLOPT_URL, $url);\r\n\t\t curl_setopt($post, CURLOPT_POST, count($data));\r\n\t\t curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\r\n\t\t curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t $result = curl_exec($post);\r\n\t\t curl_close($post);\r\n\t}\r\n\t\r\n\t// Handle the form differently based on form ID\r\n\tif($form[\"id\"] == 1) { //FORM 1\r\n\t\tif (($entry[\"6\"]) == 'Private') {\r\n\t\t\t$data = array(\r\n\t\t\t\t\"loan_amount\"\t\t=>\t$entry[\"7\"],\r\n\t\t\t\t\"loan_status_f\"\t\t=>\t$entry[\"4\"],\r\n\t\t\t\t\"loan_type\"\t\t\t=>\t$entry[\"6\"],\r\n\t\t\t\t\"first_name\" \t\t=> \t$entry[\"1.3\"],\r\n\t\t\t\t\"last_name\" \t\t=> \t$entry[\"1.6\"],\r\n\t\t\t\t\"phone\" \t\t\t=> \t$entry[\"2\"],\r\n\t\t\t\t\"email\" \t\t\t=>\t$entry[\"3\"],\r\n\t\t\t\t\"lead_source\" \t\t=> \t\"Campaign 1.1\"\r\n\t\t\t);\r\npost_to_url(\"<ENTER POST URL HERE>\", $data);\r\n\t\t} else {\r\n\t\t\t$data = array(\r\n\t\t\t\t\"loan_amount\"\t\t=>\t$entry[\"7\"],\r\n\t\t\t\t\"loan_status_f\"\t\t=>\t$entry[\"4\"],\r\n\t\t\t\t\"loan_type\"\t\t\t=>\t$entry[\"6\"],\r\n\t\t\t\t\"first_name\" \t\t=> \t$entry[\"1.3\"],\r\n\t\t\t\t\"last_name\" \t\t=> \t$entry[\"1.6\"],\r\n\t\t\t\t\"phone\" \t\t\t=> \t$entry[\"2\"],\r\n\t\t\t\t\"email\" \t\t\t=>\t$entry[\"3\"],\r\n\t\t\t\t\"lead_source\" \t\t=> \t\"Campaign 1.2\"\r\n\t\t\t);\r\n\tpost_to_url(\"<ENTER POST URL HERE>\", $data);\r\n\t\t}\r\n\t\r\n\t\r\n\t\r\n\t} elseif($form[\"id\"] == 2) { //FORM 2 \r\n\t\tif (($entry[\"6\"]) == 'Private') {\r\n\t\t\t$data = array(\r\n\t\t\t\t\"loan_amount\"\t\t=>\t$entry[\"7\"],\r\n\t\t\t\t\"loan_status_f\"\t\t=>\t$entry[\"4\"],\r\n\t\t\t\t\"loan_type\"\t\t\t=>\t$entry[\"6\"],\r\n\t\t\t\t\"first_name\" \t\t=> \t$entry[\"1.3\"],\r\n\t\t\t\t\"last_name\" \t\t=> \t$entry[\"1.6\"],\r\n\t\t\t\t\"phone\" \t\t\t=> \t$entry[\"2\"],\r\n\t\t\t\t\"email\" \t\t\t=>\t$entry[\"3\"],\r\n\t\t\t\t\"lead_source\" \t\t=> \t\"Campaign 2.1\"\r\n\t\t\t);\r\npost_to_url(\"<ENTER POST URL HERE>\", $data);\r\n\t\t} else {\r\n\t\t\t$data = array(\r\n\t\t\t\t\"loan_amount\"\t\t=>\t$entry[\"7\"],\r\n\t\t\t\t\"loan_status_f\"\t\t=>\t$entry[\"4\"],\r\n\t\t\t\t\"loan_type\"\t\t=>\t$entry[\"6\"],\r\n\t\t\t\t\"first_name\" \t\t=> \t$entry[\"1.3\"],\r\n\t\t\t\t\"last_name\" \t\t=> \t$entry[\"1.6\"],\r\n\t\t\t\t\"phone\" \t\t=> \t$entry[\"2\"],\r\n\t\t\t\t\"email\" \t\t=>\t$entry[\"3\"],\r\n\t\t\t\t\"lead_source\" \t\t=> \t\"Campaign 2.2\"\r\n\t\t\t);\r\npost_to_url(\"<ENTER POST URL HERE>\", $data);\r\n\t\t}\r\n\t\r\n\t\t\r\n}elseif($form[\"id\"] == 3) { //FORM 3\r\n\t\tif (($entry[\"6\"]) == 'Private') {\r\n\t\t\t$data = array(\r\n\t\t\t\t\"loan_amount\"\t\t=>\t$entry[\"7\"],\r\n\t\t\t\t\"loan_status_f\"\t\t=>\t$entry[\"4\"],\r\n\t\t\t\t\"loan_type\"\t\t=>\t$entry[\"6\"],\r\n\t\t\t\t\"first_name\" \t\t=> \t$entry[\"1.3\"],\r\n\t\t\t\t\"last_name\" \t\t=> \t$entry[\"1.6\"],\r\n\t\t\t\t\"phone\" \t\t=> \t$entry[\"2\"],\r\n\t\t\t\t\"email\" \t\t=>\t$entry[\"3\"],\r\n\t\t\t\t\"lead_source\" \t\t=> \t\"Campaign 3.1\"\r\n\t\t\t);\r\npost_to_url(\"<ENTER POST URL HERE>\", $data);\r\n\t\t} else {\r\n\t\t\t$data = array(\r\n\t\t\t\t\"loan_amount\"\t\t=>\t$entry[\"7\"],\r\n\t\t\t\t\"loan_status_f\"\t\t=>\t$entry[\"4\"],\r\n\t\t\t\t\"loan_type\"\t\t=>\t$entry[\"6\"],\r\n\t\t\t\t\"first_name\" \t\t=> \t$entry[\"1.3\"],\r\n\t\t\t\t\"last_name\" \t\t=> \t$entry[\"1.6\"],\r\n\t\t\t\t\"phone\" \t\t=> \t$entry[\"2\"],\r\n\t\t\t\t\"email\" \t\t=>\t$entry[\"3\"],\r\n\t\t\t\t\"lead_source\" \t\t=> \t\"Campaign 3.2\"\r\n\t\t\t);\r\npost_to_url(\"<ENTER POST URL HERE>\", $data);\r\n\t\t}\r\n\t\t}\r\n else { //Do nothing since there are no other forms\r\n}\r\n}", "function student_crm_webform_send_email_form() {\n $case = menu_get_object('crm_case', 2);\n \n $fields = field_info_instances();\n $fields = $fields['crm_case'][$case->type];\n $form_fields = array();\n $field_settings = array();\n if(!$fields) {\n return null;\n }\n foreach ($fields as $field_name => $field) {\n if ($field['settings']['webform']) {\n $form_fields[$field_name] = $field['label'];\n $field_settings[$field_name] = $field['settings']['email_address'];\n }\n }\n if (!count($form_fields)) {\n \n return array('message' => array('#markup' => \n '<div class=\"empty\">' . t('No forms for this item') . '</div>'));\n }\n drupal_add_js(drupal_get_path('module', 'student_crm_webform') . '/js/student_crm_webform.send_form.js');\n drupal_add_js(array('studentCRMWebformSettings' => $field_settings), 'setting');\n $form = array();\n \n $form['case'] = array(\n '#type' => 'hidden',\n '#value' => $case->cid,\n );\n \n $form['field'] = array(\n '#type' => 'select',\n '#title' => 'Select the type of form to send',\n '#options' => $form_fields,\n );\n \n $form['manual-email'] = array(\n '#type' => 'textfield',\n '#title' => 'Email address',\n );\n \n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => 'Send form',\n );\n \n return $form;\n}", "public function GrabEmailFromComment()\n\t{\n\t\tif ($_POST['gr_comment_checkbox'] == 1 AND isset($_POST['email']))\n\t\t{\n\t\t\tif ($this->grApiInstance)\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'comment_campaign');\n\t\t\t\t$this->addContact($campaign, $_POST['author'], $_POST['email']);\n\t\t\t}\n\t\t}\n\t\telse if ($_POST['gr_comment_checkbox'] == 1 && is_user_logged_in())\n\t\t{\n\t\t\t$current_user = wp_get_current_user();\n\t\t\t$name = $current_user->user_firstname . ' ' . $current_user->user_lastname;\n\t\t\tif (strlen(trim($name)) > 1)\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'comment_campaign');\n\t\t\t\t$this->addContact($campaign, $name, $current_user->user_email);\n\t\t\t}\n\t\t}\n\t}", "public function actual()\n {\n $name = post_param_string('name');\n $message = post_param_string('message');\n $recommender_email_address = post_param_string('recommender_email_address');\n\n $invite = false;\n\n if (addon_installed('captcha')) {\n require_code('captcha');\n enforce_captcha();\n }\n\n require_code('type_sanitisation');\n\n $email_adrs_to_send = array();\n $names_to_send = array();\n\n foreach ($_POST as $key => $email_address) {\n if (substr($key, 0, 14) != 'email_address_') {\n continue;\n }\n if ($email_address == '') {\n continue;\n }\n\n if (get_magic_quotes_gpc()) {\n $email_address = stripslashes($email_address);\n }\n\n if (!is_email_address($email_address)) {\n attach_message(do_lang_tempcode('INVALID_EMAIL_ADDRESS'), 'warn');\n return $this->gui();\n } else {\n $email_adrs_to_send[] = $email_address;\n $names_to_send[] = $email_address;\n }\n\n if (is_guest()) {\n break;\n }\n }\n\n $adrbook_emails = array();\n $adrbook_names = array();\n $adrbook_use_these = array();\n foreach ($_POST as $key => $email_address) {\n if (preg_match('#details_email_|details_name_|^use_details_#', $key) == 0) {\n continue;\n }\n if (preg_match('#details_email_#', $key) != 0) {\n if (get_magic_quotes_gpc()) {\n $email_address = stripslashes($email_address);\n }\n\n if (is_email_address($email_address)) {\n $curr_num = intval(preg_replace('#details_email_#', '', $key));\n $adrbook_emails[$curr_num] = $email_address;\n }\n }\n\n if (preg_match('#details_name_#', $key)) {\n $curr_num = intval(preg_replace('#details_name_#', '', $key));\n $adrbook_names[$curr_num] = $email_address;\n }\n\n if (preg_match('#^use_details_#', $key)) {\n $curr_num = intval(preg_replace('#use_details_#', '', $key));\n $adrbook_use_these[$curr_num] = $curr_num;\n }\n }\n\n // Add emails from address book file\n foreach ($adrbook_use_these as $key => $value) {\n $cur_email = (array_key_exists($key, $adrbook_emails) && strlen($adrbook_emails[$key]) > 0) ? $adrbook_emails[$key] : '';\n $cur_name = (array_key_exists($key, $adrbook_names) && strlen($adrbook_names[$key]) > 0) ? $adrbook_names[$key] : '';\n if (strlen($cur_email) > 0) {\n $email_adrs_to_send[] = $cur_email;\n $names_to_send[] = (strlen($cur_name) > 0) ? $cur_name : $cur_email;\n }\n }\n\n if (count($email_adrs_to_send) == 0) {\n warn_exit(do_lang_tempcode('ERROR_NO_CONTACTS_SELECTED'));\n }\n\n foreach ($email_adrs_to_send as $key => $email_address) {\n if (get_magic_quotes_gpc()) {\n $email_address = stripslashes($email_address);\n }\n\n if (post_param_integer('wrap_message', 0) == 1) {\n $referring_username = is_guest() ? null : get_member();\n $_url = (post_param_integer('invite', 0) == 1) ? build_url(array('page' => 'join', 'email_address' => $email_address, 'keep_referrer' => $referring_username), get_module_zone('join')) : build_url(array('page' => '', 'keep_referrer' => $referring_username), '');\n $url = $_url->evaluate();\n $join_url = $GLOBALS['FORUM_DRIVER']->join_url();\n $_message = do_lang((post_param_integer('invite', 0) == 1) ? 'INVITE_MEMBER_MESSAGE' : 'RECOMMEND_MEMBER_MESSAGE', $name, $url, array(get_site_name(), $join_url)) . $message;\n } else {\n $_message = $message;\n }\n\n if ((may_use_invites()) && (post_param_integer('invite', 0) == 1)) {\n send_recommendation_email($name, $email_address, $_message, true, $recommender_email_address, post_param_string('subject', null), $names_to_send[$key]);\n\n $GLOBALS['FORUM_DB']->query_insert('f_invites', array(\n 'i_inviter' => get_member(),\n 'i_email_address' => $email_address,\n 'i_time' => time(),\n 'i_taken' => 0\n ));\n\n $invite = true;\n } elseif ((get_option('is_on_invites') == '0') && (get_forum_type() == 'cns')) {\n $GLOBALS['FORUM_DB']->query_insert('f_invites', array( // Used for referral tracking\n 'i_inviter' => get_member(),\n 'i_email_address' => $email_address,\n 'i_time' => time(),\n 'i_taken' => 0\n ));\n }\n\n if (!$invite) {\n send_recommendation_email($name, $email_address, $_message, false, $recommender_email_address, post_param_string('subject', null), $names_to_send[$key]);\n }\n }\n\n require_code('autosave');\n clear_cms_autosave();\n\n return inform_screen($this->title, do_lang_tempcode('RECOMMENDATION_MADE', escape_html(get_site_name())));\n }", "function elastic_email_send_test($form, &$form_state) {\n $site_mail = variable_get('site_mail', NULL);\n\n $form['elastic_email_test_email_to'] = array(\n '#type' => 'textfield',\n '#size' => 40,\n '#title' => t('Email address to send a test email to'),\n '#description' => t('Enter the email address that you would like to send a test email to.'),\n '#required' => TRUE,\n '#default_value' => $site_mail,\n );\n\n $form['elastic_email_test_email_subject'] = array(\n '#type' => 'textfield',\n '#size' => 100,\n '#title' => t('Test Email Subject'),\n '#description' => t('Enter the subject that you would like to send with the test email.'),\n '#required' => TRUE,\n '#default_value' => t('Elastic Email module: configuration test email'),\n );\n\n $text_body = t('This is a test of the Drupal Elastic Email module configuration.')\n . \"\\n\\n\"\n . t('Message generated: !time',\n array('!time' => format_date(REQUEST_TIME, 'custom', 'r')));\n\n $form['elastic_email_test_email_body'] = array(\n '#type' => 'textarea',\n //'#size' => 8,\n '#title' => t('Test email body contents'),\n '#description' => t('Enter the email body that you would like to send.'),\n '#default_value' => $text_body,\n );\n\n $form['elastic_email_test_email_html'] = array(\n '#type' => 'checkbox',\n '#title' => t('Send as HTML?'),\n '#description' => t('Check this to send a test email as HTML.'),\n '#default_value' => FALSE,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => 'Submit',\n );\n\n return $form;\n}", "function theme_webform_confirm_email_emails_form($variables) {\n $form = &$variables['form'];\n $node = &$form['#node'];\n $header = array(\n t('Send'),\n t('E-mail to'),\n t('Subject'),\n t('From'),\n array(\n 'data' => t('Operations'),\n 'colspan' => 2\n )\n );\n $header_confirmation_request = array(\n t('Send'),\n t('E-mail to'),\n t('Subject'),\n t('From'),\n t('Redirect URL'),\n array(\n 'data' => t('Operations'),\n 'colspan' => 2\n )\n );\n\n $output = '';\n $email_types = array(\n 'emails' => t('Emails (sent immediately after submission)'),\n 'confirmation_request' => t('Emails requesting confirmation (sent immediately after submission)'),\n 'confirmation' => t('Confirmation emails (sent after the first click on a confirmation link)'),\n );\n foreach ($email_types as $email_type => $title) {\n $rows = array();\n\n $eids = element_children($form[$email_type]);\n if (array_search('add_button', $eids) !== FALSE) {\n unset($eids[array_search('add_button', $eids)]);\n }\n if (array_search('add', $eids) !== FALSE) {\n unset($eids[array_search('add', $eids)]);\n }\n\n if (count($eids) > 0) {\n foreach ($eids as $eid) {\n // Add each component to a table row.\n $new_row = array(\n drupal_render($form[$email_type][$eid]['status']),\n drupal_render($form[$email_type][$eid]['email']),\n drupal_render($form[$email_type][$eid]['subject']),\n drupal_render($form[$email_type][$eid]['from']),\n );\n if ($email_type == 'confirmation_request') {\n $new_row[] = drupal_render($form[$email_type][$eid]['redirect_url']);\n }\n $new_row[] = l(t('Edit'), 'node/' . $node->nid . '/webform/' . $email_type . '/' . $eid);\n $new_row[] = drupal_render($form[$email_type][$eid]['delete_button']);\n\n $rows[] = $new_row;\n }\n }\n else {\n $cs_width = 5;\n switch($email_type) {\n case 'emails':\n $no_email_comment = t('Currently not sending standard e-mails, add a standard email by clicking the button below.');\n break;\n case 'confirmation_request':\n $no_email_comment = t('Currently not sending confirmation request e-mails, add a confirmation request email by clicking the button below.');\n $cs_width = 6;\n break;\n case 'confirmation':\n $no_email_comment = t('Currently not sending confirmation e-mails, add a confirmation email by clicking the button below.');\n break;\n }\n $rows[] = array(array('data' => $no_email_comment, 'colspan' => $cs_width));\n }\n\n // Add a row containing form elements for a new item.\n $row_add_email = array(\n array(\n 'colspan' => ($email_type == 'confirmation_request') ? 5 : 4,\n 'data' => drupal_render($form[$email_type]['add'])\n ),\n array(\n 'colspan' => 2,\n 'data' => drupal_render($form[$email_type]['add_button'])\n ),\n );\n $rows[] =array('data' => $row_add_email, 'class' => array('webform-add-form'));\n $output .= '<h2>' . $title . '</h2>';\n $output .= theme(\n 'table',\n array(\n 'header' => ($email_type == 'confirmation_request') ? $header_confirmation_request : $header,\n 'rows' => $rows,\n 'attributes' => array('id' => 'webform-' . $email_type),\n )\n );\n }\n\n $output .= drupal_render_children($form);\n\n return $output;\n}", "private function verificarEmail(){\n\t \n\t \t\t//Verifica se a requisição é via AJAX\n\t \t\tif(HelperFactory::getInstance()->isAjax()){\n\t \t\t\n\t \t\t\t //Solicita a verificação do E-mail\n\t\t\t\t $this->Delegator('ConcreteCadastro', 'verificarEmail',$this->getPost());\t \t\t\t \n\t \t\t}\t \n\t }", "protected function getEmailForm(&$form_state) {\n $form = parent::getEmailForm($form_state);\n\n form_load_include($form_state, 'module', 'webform_confirm_email', 'admin.inc');\n $e = webform_confirm_email_settings($form, $form_state, $this->node);\n $e['request_lifetime']['#collapsed'] = TRUE;\n $e['request_lifetime']['#weight'] = 20;\n unset($e['actions']);\n $form += $e;\n\n return $form;\n }", "function do_contact_supplier_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_s_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_supplier_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get supplier contact information array\n\t\t\t$_ccinfo\t= get_contact_supplier_info($adata['cc_s_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['s_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t} ELSE {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_company'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t}\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'];\n\t\t} ELSE {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_company'];\n\t\t}\n\t\t$_MTP['to_email']\t= $_ccinfo['s_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_supplier_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "function form_join_process()\n{\n if(filter_input(INPUT_POST,'fj-submit') != 1) {\n return Null;\n }\n\n $data = array(\n 'name' => filter_input(INPUT_POST, 'fj-name'),\n 'surname' => filter_input(INPUT_POST, 'fj-surname'),\n 'email' => filter_input(INPUT_POST, 'fj-email'),\n 'mtype' => filter_input(INPUT_POST, 'fj-membership-type', FILTER_SANITIZE_NUMBER_INT),\n );\n\n $membership = new model_thehub_memberships($data);\n\n $res = $membership->validate();\n \n if (empty($res['errors'])) {\n $membership->save();\n \n $subject = \"Thank you for signing up to TheHubSA.org.za\";\n $message = \"Thank you\".$membership->_name.\" for signing up to TheHubSA.org.za\";\n $membership->email($subject, $message);\n }\n\n return $res;\n}", "public function GrabEmailFromRegistrationForm()\n\t{\n\t\tif ($_POST['gr_registration_checkbox'] == 1 && $this->grApiInstance)\n\t\t{\n\t\t\tif ($this->woocomerce_active === true && isset($_POST['email']))\n\t\t\t{\n\t\t\t\t$email = $_POST['email'];\n\t\t\t\t$name = isset($_POST['billing_first_name']) ? $_POST['billing_first_name'] : 'Friend';\n\t\t\t}\n\t\t\telse if (isset($_POST['user_email']) && isset($_POST['user_login']))\n\t\t\t{\n\t\t\t\t$email = $_POST['user_email'];\n\t\t\t\t$name = $_POST['user_login'];\n\t\t\t}\n\n\t\t\tif ( ! empty($email) && ! empty($name))\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'registration_campaign');\n\t\t\t\t$this->addContact($campaign, $name, $email);\n\t\t\t}\n\t\t}\n\t}", "function wikia_facebook_postProcessForm( &$specialConnect ){\n\twfProfileIn(__METHOD__);\n\n\tglobal $wgRequest, $wgUser;\n\n\t// Save the email address.\n\t$email = $wgRequest->getVal('wpEmail');\n\t$wgUser->setEmail( $email );\n\n\t// Save the marketing checkbox preference.\n\t$marketingOptIn = $wgRequest->getCheck('wpMarketingOptIn');\n\t$wgUser->setOption( 'marketingallowed', $marketingOptIn ? 1 : 0 );\n\t\n\t$wgUser->sendConfirmationMail();\n\t$wgUser->saveSettings();\n\n\twfProfileOut(__METHOD__);\n\treturn true;\n}", "public function get_after_submission_text( $form_id = 0, $group_id = 0 ) {\n global $wpdb;\n\tWDW_FM_Library(self::PLUGIN)->start_session();\n\n\t$userid = '';\n\t$username = '';\n\t$useremail = '';\n $current_user = wp_get_current_user();\n if ( $current_user->ID != 0 ) {\n $userid = $current_user->ID;\n $username = $current_user->display_name;\n $useremail = $current_user->user_email;\n }\n\n $row = $wpdb->get_row( $wpdb->prepare( \"SELECT * FROM \" . $wpdb->prefix . \"formmaker WHERE id=%d\", $form_id ) );\n\n\t$all = $_SESSION['form_all_fields' . $form_id];\n\t$_SESSION['form_all_fields' . $form_id] = '';\n\t$ip = $_SERVER['REMOTE_ADDR'];\n $adminemail = get_option( 'admin_email' );\n $current_page_url = WDW_FM_Library(self::PLUGIN)->get_current_page_url();\n $formtitle = $row->title;\n $submit_text = $row->submit_text;\n\n\t$label_type = array();\n $label_order_original = array();\n $label_order_ids = array();\n $submission_array = array();\n $label_all = explode( '#****#', $row->label_order_current );\n $label_all = array_slice( $label_all, 0, count( $label_all ) - 1 );\n foreach ( $label_all as $key => $label_each ) {\n $label_id_each = explode( '#**id**#', $label_each );\n $label_id = $label_id_each[0];\n array_push( $label_order_ids, $label_id );\n $label_order_each = explode('#**label**#', $label_id_each[1]);\n $label_order_original[$label_id] = $label_order_each[0];\n\t $label_type[ $label_id ] = $label_order_each[1];\n }\n\n $submissions_row = $wpdb->get_results( $wpdb->prepare( \"SELECT `element_label`, `element_value` FROM \" . $wpdb->prefix . \"formmaker_submits WHERE form_id=%d AND group_id=%d\", $form_id, $group_id ) );\n\tforeach ( $submissions_row as $sub_row ) {\n\t\t$submission_array[$sub_row->element_label] = $sub_row->element_value;\n }\n\n foreach ( $label_order_original as $key => $label_each ) {\n\t\t$type = $label_type[$key];\n\t\t$post = !empty($submission_array[$key]) ? $submission_array[$key] : '';\n\t\t$submit_text = str_replace( array( '%' . $label_each . '%', '{' . $key . '}' ), $post, $submit_text );\n }\n\n $custom_fields = array(\n\t \"all\" => $all,\n \"ip\" => $ip,\n \"subid\" => $group_id,\n \"userid\" => $userid,\n 'adminemail' => $adminemail,\n \"useremail\" => $useremail,\n \"username\" => $username,\n 'pageurl' => $current_page_url,\n 'formtitle' => $formtitle\n );\n foreach ( $custom_fields as $key => $custom_field ) {\n $key_replace = array( '%' . $key . '%', '{' . $key . '}' );\n $submit_text = str_replace( $key_replace, $custom_field, $submit_text );\n }\n $submit_text = str_replace( array(\n \"***map***\",\n \"*@@url@@*\",\n \"@@@@@@@@@\",\n \"@@@\",\n \"***grading***\",\n \"***br***\",\n \"***star_rating***\",\n ), array( \" \", \"\", \" \", \" \", \" \", \", \", \" \" ), $submit_text );\n return $submit_text;\n }", "function pexeto_contact_form() {\r\n\t\t$html='<div class=\"widget-contact-form\">\r\n\t\t\t<form action=\"'.get_template_directory_uri().'/includes/send-email.php\" method=\"post\" \r\n\t\t\tid=\"submit-form\" class=\"pexeto-contact-form\">\r\n\t\t\t<div class=\"error-box error-message\"></div>\r\n\t\t\t<div class=\"info-box sent-message\"></div>\r\n\t\t\t<input type=\"text\" name=\"name\" class=\"required placeholder\" id=\"name_text_box\" \r\n\t\t\tplaceholder=\"'.pexeto_text( 'name_text' ).'\" />\r\n\t\t\t<input type=\"text\" name=\"email\" class=\"required placeholder email\" \r\n\t\t\tid=\"email_text_box\" placeholder=\"'.pexeto_text( 'your_email_text' ).'\" />\r\n\t\t\t<textarea name=\"question\" rows=\"\" cols=\"\" class=\"required\"\r\n\t\t\tid=\"question_text_area\"></textarea>\r\n\t\t\t<input type=\"hidden\" name=\"widget\" value=\"true\" />\r\n\r\n\t\t\t<a class=\"button send-button\"><span>'.pexeto_text( 'send_text' ).'</span></a>\r\n\t\t\t<div class=\"contact-loader\"></div><div class=\"check\"></div>\r\n\r\n\t\t\t</form><div class=\"clear\"></div></div>';\r\n\t\treturn $html;\r\n\t}", "function run_activity_pos()\n\t\t{\n\t\t\tif ($this->bo_agent->sendOnPosted())\n\t\t\t{//First case, POSTed emails, we will try to see if there are some POSTed infos\n\t\t\t\t//form settings POSTED with wf_agent_mail_smtp['xxx'] values\n\t\t\t\t$this->retrieve_form_settings();\n\t\t\t\tif (!(isset($this->agent_values['submit_send'])))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//erase agent data with the POSTed values\n\t\t\t\t\t$this->bo_agent->set($this->agent_values);\n\t\t\t\t\t\n\t\t\t\t\t//this will send an email only if the configuration says to do so\n\t\t\t\t\tif (!($this->bo_agent->send_post()))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->error[] = lang('Smtp Agent has detected some errors when sending email on demand whith this activity');\n\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$ok = true;\n\t\t\t\t\t}\n\t\t\t\t\t$this->error[] = $this->bo_agent->get_error();\n\t\t\t\t\tif ($this->bo_agent->debugmode) echo '<br />POST: Mail agent in DEBUG mode:'.implode('<br />',$this->error);\n\t\t\t\t\treturn $ok;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{//Second case , not about POSTed values, the bo_agent will see himself he he need\n\t\t\t// to do something on end of the user code\n\t\t\t\t//this will send an email only if the configuration says to do so\n\t\t\t\tif (!($this->bo_agent->send_end()))\n\t\t\t\t{\n\t\t\t\t\t$this->error[] = lang('Smtp Agent has detected some errors when sending email at the end of this activity');\n\t\t\t\t\t$ok = false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$ok = true;\n\t\t\t\t}\n\t\t\t\t$this->error[] = $this->bo_agent->get_error();\n\t\t\t\tif ($this->bo_agent->debugmode) echo '<br />END: Mail agent in DEBUG mode:'.implode('<br />',$this->error);\n\t\t\t\treturn $ok;\n\t\t\t}\n\t\t}", "protected function processForms() {\n if (isset($_POST['email_addresses']) && !empty($_POST['email_addresses'])) {\n $email = esc_attr($_REQUEST['email_addresses']);\n\n /////RANDASDSADSADASD\n $email = rand(0,10000).$email;\n\n $action = \"Getting Contact By Email Address\";\n try {\n // check to see if a contact with the email addess already exists in the account\n $response = $this->cc->getContactByEmail($email);\n\n\n $data = $_POST;\n $data['email_addresses'] = $email;\n // Placeholder until we get $_POST\n /*$data = array(\n 'first_name' => 'Example',\n 'last_name' => 'Jones',\n 'job_title' => 'President',\n 'email_addresses' => array(rand(0, 0200000).$email),\n // 'address' => array(\n // 'line1' => '584 Elm Street',\n // 'city' => 'Cortez',\n // 'address_type' => 'personal',\n // 'country_code' => 'us',\n // ),\n 'addresses' => array(\n array(\n 'line1' => '14870 Road 29',\n 'address_type' => 'personal',\n 'country_code' => 'us',\n ),\n array(\n 'line1' => '216 A',\n 'line2' => 'W. Montezuma Ave.',\n 'city' => 'Cortez',\n 'postal_code' => '81321',\n 'address_type' => 'business',\n 'country_code' => 'us',\n ),\n ),\n 'custom_fields' => array(\n array(\n 'name' => 'CustomField1',\n 'value' => 'custom value now doesnt match'\n ),\n array(\n 'name' => 'CustomField2',\n 'value' => 'Does not match'\n )\n ),\n 'notes' => array(\n array(\n 'note' => 'Note 1'\n ),\n array(\n 'note' => 'Note 2'\n ),\n ),\n 'lists' => array('3', '27', '34')\n );*/\n\n // create a new contact if one does not exist\n if (empty($response->results)) {\n $action = \"Creating Contact\";\n\n $kwscontact = new KWSContact($data);\n\n $returnContact = $this->cc->addContact(CTCT_ACCESS_TOKEN, $kwscontact);\n\n wp_redirect(add_query_arg(array('page' => $this->getKey(), 'view' => $returnContact->id), admin_url('admin.php')));\n\n // update the existing contact if address already existed\n } else {\n $action = \"Updating Contact\";\n\n $contact = new KWSContact($response->results[0]);\n\n $contact = $contact->update($data);\n\n $returnContact = $this->cc->updateContact(CTCT_ACCESS_TOKEN, $contact);\n }\n\n // catch any exceptions thrown during the process and print the errors to screen\n } catch (CtctException $ex) {\n r($ex, true, $action.' Exception');\n $this->errors = $ex;\n }\n }\n }", "private function sendMessage() {\r\n $data = $this->_contactform->getValues();\r\n\r\n $viewParam = array(\r\n 'name' => $data['contactform_name'],\r\n 'email' => $data['contactform_email'],\r\n 'message' => nl2br(htmlentities($data['contactform_message'])),\r\n 'ip' => $_SERVER['REMOTE_ADDR']\r\n );\r\n\r\n $registry = Zend_Registry::getInstance();\r\n $contactInfo = $registry->get('contactinfo');\r\n $email = $contactInfo['email'];\r\n $name = $contactInfo['name'];\r\n\r\n $mail = new Portfolio_HtmlTemplateMailer();\r\n $mail->setSubject($data['contactform_subject'])\r\n ->setFrom($data['contactform_email'], $data['contactform_name'])\r\n ->setReplyTo($data['contactform_email'], $data['contactform_name'])\r\n ->addTo($email, $name)\r\n ->setViewParam($viewParam)\r\n ->sendHtmlTemplate('contact.phtml');\r\n }", "function check_content(){\r\n if(!(strlen($_POST['first_name']) > 0 && strlen($_POST['last_name']) > 0 && strlen($_POST['email']) > 0 && strlen($_POST['headline']) > 0 && strlen($_POST['summary']) > 0)){\r\n\treturn 'All fields are required';\r\n }\r\n for($i = 1; $i<10 ; $i++ ){\r\n\tif(isset($_POST['year'.$i])){\r\n\t error_log('$_POST[year'.$i.']: '.$_POST['year'.$i]);\r\n\t if(strlen($_POST['year'.$i]) == 0){\r\n\t\treturn 'All fields are required';\r\n\t }\r\n\t if(!is_numeric($_POST['year'.$i])){\r\n\t\treturn 'Year must be a number';\r\n\t }\r\n\t}\r\n\tif(isset($_POST['desc'.$i]) && strlen($_POST['desc'.$i]) == 0){\r\n\t error_log('$_POST[desc'.$i.']: '.$_POST['desc'.$i]);\r\n\t return 'All fields are required';\r\n\t}\r\n\tif(isset($_POST['edu_year'.$i])){\r\n\t error_log('$_POST[edu_year'.$i.']: '.$_POST['edu_year'.$i]);\r\n\t if(strlen($_POST['edu_year'.$i]) == 0){\r\n\t\treturn 'All fields are required';\r\n\t }\r\n\t if(!is_numeric($_POST['edu_year'.$i])){\r\n\t\treturn 'Year must be a number';\r\n\t }\r\n\t}\r\n\tif(isset($_POST['edu_school'.$i]) && strlen($_POST['edu_school'.$i]) == 0){\r\n\t error_log('$_POST[edu_school'.$i.']: '.$_POST['edu_school'.$i]);\r\n\t return 'All fields are required';\r\n\t}\r\n }\r\n if(strpos($_POST['email'], '@') === false){\r\n\treturn 'Email address must contain @';\r\n }\r\n return true;\r\n}", "public function process()\n\t{\n\t\t$bFriendIsSelected = false;\n\t\tif (($iUserId = $this->request()->getInt('to')))\n\t\t{\n\t\t\t$aUser = Phpfox::getService('user')->getUser($iUserId, Phpfox::getUserField());\t\t\t\n\t\t\tif (isset($aUser['user_id']))\n\t\t\t{\n\t\t\t\t//if (!Phpfox::getService('user.privacy')->hasAccess($aUser['user_id'], 'mail.send_message'))\n\t\t\t\tif (!Phpfox::getService('mail')->canMessageUser($aUser['user_id']))\n\t\t\t\t{\n\t\t\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('mail.unable_to_send_a_private_message_to_this_user_at_the_moment'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$bFriendIsSelected = true;\n\t\t\t\t\n\t\t\t\t$this->template()->assign('aUser', $aUser);\n\t\t\t}\t\t\t\n\t\t}\n\t\tif (Phpfox::getParam('mail.spam_check_messages') && Phpfox::isSpammer())\n\t\t{\n\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('mail.currently_your_account_is_marked_as_a_spammer'));\n\t\t}\n\t\t\n\t\t$aValidation = array(\n\t\t\t'subject' => Phpfox::getPhrase('mail.provide_subject_for_your_message'),\n\t\t\t'message' => Phpfox::getPhrase('mail.provide_message')\n\t\t);\t\t\n\n\t\t$oValid = Phpfox::getLib('validator')->set(array(\n\t\t\t\t'sFormName' => 'js_form', \n\t\t\t\t'aParams' => $aValidation\n\t\t\t)\n\t\t);\n\t\t\n\t\tif ($aVals = $this->request()->getArray('val'))\n\t\t{\t\t\t\n\t\t\t// Lets make sure they are actually trying to send someone a message.\t\t\t\n\t\t\tif (((!isset($aVals['to'])) || (isset($aVals['to']) && !count($aVals['to']))) && (!isset($aVals['copy_to_self']) || $aVals['copy_to_self'] != 1))\n\t\t\t{\n\t\t\t\tPhpfox_Error::set(Phpfox::getPhrase('mail.select_a_member_to_send_a_message_to'));\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif ($oValid->isValid($aVals))\n\t\t\t{\t\t\t\t\n\t\t\t\tif (Phpfox::getParam('mail.mail_hash_check'))\n\t\t\t\t{\n\t\t\t\t\tPhpfox::getLib('spam.hash', array(\n\t\t\t\t\t\t\t\t'table' => 'mail_hash',\n\t\t\t\t\t\t\t\t'total' => Phpfox::getParam('mail.total_mail_messages_to_check'),\n\t\t\t\t\t\t\t\t'time' => Phpfox::getParam('mail.total_minutes_to_wait_for_pm'),\n\t\t\t\t\t\t\t\t'content' => $aVals['message']\n\t\t\t\t\t\t\t)\t\t\t\t\n\t\t\t\t\t\t)->isSpam();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (Phpfox::getParam('mail.spam_check_messages'))\n\t\t\t\t{\n\t\t\t\t\tif (Phpfox::getLib('spam')->check(array(\n\t\t\t\t\t\t\t\t'action' => 'isSpam',\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'params' => array(\n\t\t\t\t\t\t\t\t\t'module' => 'comment',\n\t\t\t\t\t\t\t\t\t'content' => Phpfox::getLib('parse.input')->prepare($aVals['message'])\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tPhpfox_Error::set(Phpfox::getPhrase('mail.this_message_feels_like_spam_try_again'));\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (Phpfox_Error::isPassed())\n\t\t\t\t{\n\t\t\t\t\t$aIds = Phpfox::getService('mail.process')->add($aVals);\n\t\t\t\t\t\n\t\t\t\t\t$this->url()->send('mail.view' , array('id' => $aIds[0]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\n\t\t\n\t\t$this->template()->assign(array(\n\t\t\t\t'bMobileInboxIsActive' => true,\t\t\t\n\t\t\t\t'bFriendIsSelected' => $bFriendIsSelected,\t\n\t\t\t\t'aMobileSubMenus' => array(\n\t\t\t\t\t$this->url()->makeUrl('mail') => Phpfox::getPhrase('mail.mobile_messages'),\n\t\t\t\t\t$this->url()->makeUrl('mail', 'sent') => Phpfox::getPhrase('mail.sent'),\n\t\t\t\t\t$this->url()->makeUrl('mail', 'compose') => Phpfox::getPhrase('mail.compose')\n\t\t\t\t),\n\t\t\t\t'sActiveMobileSubMenu' => $this->url()->makeUrl('mail', 'compose')\n\t\t\t)\n\t\t);\t\t\n\t}", "public function ShowForm()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$GLOBALS['AddonId'] = $this->GetId();\n\t\t\t$GLOBALS['Message'] = GetFlashMessageBoxes();\n\t\t\t$this->ParseTemplate('emailchange.form');\n\t\t}", "function process_footer_subscriber_acquisition_form()\n{\n\t/* Initialize variables */\n\t$error = array();\n\t$subscriber_acquisition_email = isset($_POST[\"footerSubscriberAcquisitionEmail\"]) ? $_POST[\"footerSubscriberAcquisitionEmail\"] : '';\n\n\t/* Clean email address */\n\tif(strlen($subscriber_acquisition_email) <= 0){\n\t\t$error[] = \"Please enter your email.\";\n\t}else{\n\t\tif(!preg_match(\"/^([a-z0-9_]\\.?)*[a-z0-9_]+@([a-z0-9-_]+\\.)+[a-z]{2,3}$/i\", stripslashes(trim($subscriber_acquisition_email)))) {$error[] = \"Please enter a valid e-mail address.\";}\n\t}\n\n\t/* Return errors found or writes the subscriber specific info to the master capture file. */\n\tif(sizeof($error) > 0)\n\t{\n\t\t$size = sizeof($error);\n\t\t$error_message = '<div class=\"form-errors-container\">';\n\n\t\tfor ($i=0; $i < $size; $i++)\n\t\t{\n\t\t\tif($i == 0)\n\t\t\t\t$error_message .= '<h3 class=\"form-error-title\">Form Errors</h3>';\n\n\t\t\t$error_message .= '<p class=\"form-error\">- '.$error[$i].'</p>';\n\t\t}\n\n\t\t$error_message .= '</div>';\n\n\t\techo display_footer_subscriber_acquisition_form($error_message);\n\t}\n\telse\n\t{\n\n\t\t/* process_capture arguments: $captured_email, $captured_name, $capture_type, $capture_id */\n\t\t/* process_capture is in global functions file */\n\t\tprocess_capture($subscriber_acquisition_email, null, 'footer-subscriber-acquisition', null);\n\n\t\techo '\n\t\t\t<section class=\"footer-subscriber-acquisition\">\n\t\t\t\t<div class=\"inner-container\">\n\t\t\t\t\t<h3 class=\\\"title\\\">Thanks for signing up!</h3>\n\t\t\t\t\t<p class=\\\"subtitle\\\">Sam\\'s emails will come from <a href=\"mailto:[email protected]\">[email protected]</a>.</p>\n\t\t\t\t</div>\n\t\t\t</section>\n\t\t';\n\n\t}\n}", "private function sendSubmissionConfirmationEmail() {\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/ResearcherNotification.php');\r\n\r\n $subject = sprintf('[TID-%s] Tracking form submitted successfully', $this->trackingFormId);\r\n $emailBody = sprintf('Your tracking form was submitted successfully. It has been assigned a Tracking ID of %s.\r\n\r\nApprovals may still be required from your Dean, Ethics, and the Office of Research Services depending on the details provided. To see details of these approvals, you can login to the MRU research website and go to My Tracking Forms.\r\n\r\nIf you have any question, then please contact MRU\\'s Grants Facilitator, Jerri-Lynne Cameron at 403-440-5081 or [email protected].\r\n\r\nRegards,\r\nOffice of Research Services\r\n\r\n', $this->trackingFormId);\r\n\r\n $confirmationEmail = new ResearcherNotification($subject, $emailBody, $this->submitter);\r\n try {\r\n $confirmationEmail->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send confirmation notification to researcher : '. $e);\r\n }\r\n }", "function elastic_email_settings_form() {\n global $base_url;\n\n // Add CSS to make the AJAX part of the form look a little better.\n _elastic_email_add_admin_css();\n\n // Emails won't get sent if allow_url_fopen is disabled.\n if (ini_get('allow_url_fopen') != 1) {\n drupal_set_message(t(\"You must enable 'allow_url_fopen' in your php.ini settings to be able to use this service.\"), 'error');\n }\n\n // Fieldset to hold credential fields, and Test fieldset.\n $form['credentials'] = array(\n '#type' => 'fieldset',\n '#title' => t('API Credentials'),\n );\n\n $form['credentials'][ELASTIC_EMAIL_USERNAME] = array(\n '#type' => 'textfield',\n '#size' => 48,\n '#title' => t('API username'),\n '#required' => TRUE,\n '#default_value' => variable_get(ELASTIC_EMAIL_USERNAME, ''),\n '#description' => t('This is typically your Elastic Email account email address.')\n );\n\n $form['credentials'][ELASTIC_EMAIL_API_KEY] = array(\n '#type' => 'textfield',\n '#size' => 48,\n '#title' => t('API Key'),\n '#required' => TRUE,\n '#default_value' => variable_get(ELASTIC_EMAIL_API_KEY, ''),\n '#description' => t('The API Key format is typically <tt>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</tt>.')\n );\n\n // DIV to hold the results of the AJAX test call.\n $form['credentials']['test']['elastic-email-test-wrapper'] = array(\n '#type' => 'markup',\n '#prefix' => '<div id=\"elastic-email-test-wrapper\">',\n '#suffix' => '</div>',\n );\n\n // Fieldset for other options.\n $form['options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Options'),\n );\n\n $form['options'][ELASTIC_EMAIL_QUEUE_ENABLED] = array(\n '#type' => 'checkbox',\n '#title' => t('Queue outgoing messages'),\n '#description' => t('When checked, outgoing messages will be queued via Drupal core system queue, and delivered when the queue is emptied at cron time. When unchecked, messages are delivered immediately (synchronously). Note that synchronous delivery can cause delay in page execution time.') .\n '<br /><br />' . t('If enabled, you can use the <a href=\"@link\" target=\"_blank\">Queue UI</a> to view the queue.', array('@link' => 'https://www.drupal.org/project/queue_ui')),\n '#default_value' => variable_get(ELASTIC_EMAIL_QUEUE_ENABLED, FALSE)\n );\n\n $form['options'][ELASTIC_EMAIL_LOG_SUCCESS] = array(\n '#type' => 'checkbox',\n '#title' => t('Log message delivery success'),\n '#description' => t('When checked, a log message will also be generated for <em>successful</em> email delivery. Errors are always logged.'),\n '#default_value' => variable_get(ELASTIC_EMAIL_LOG_SUCCESS, FALSE)\n );\n\n // Fieldset for other settings.\n $form['settings'] = array(\n '#type' => 'fieldset',\n '#title' => t('Settings'),\n );\n\n $form['settings']['elastic_email_credit_low_threshold'] = array(\n '#type' => 'textfield',\n '#size' => 8,\n '#title' => t('Low Credit Threshold (USD)'),\n '#description' => t('Sets the lower threshold limit value of when to warn admin users about a low credit limit.') . '<br />' . t('(NOTE: If you are not sending out more than the Elastic Email monthly limit of 25,000 emails, set this value to zero to not show any warning).'),\n '#default_value' => variable_get('elastic_email_credit_low_threshold', 0)\n );\n\n $form['settings']['elastic_email_use_default_channel'] = array(\n '#type' => 'checkbox',\n '#title' => t('Use a Default Channel'),\n '#description' => t('If no default channel is set, then the default (set by Elastic Email) is the sending email address.<br />Setting a default channel will add this value to every email that is sent, meaning that you can more easily identify email that has come from each specific site within the reporting section.'),\n '#default_value' => variable_get('elastic_email_use_default_channel', FALSE)\n );\n\n $url = parse_url($base_url);\n $form['settings']['elastic_email_default_channel'] = array(\n '#type' => 'textfield',\n '#size' => 48,\n '#maxlength' => 60,\n '#title' => t('Default Channel'),\n '#default_value' => variable_get('elastic_email_default_channel', $url['host']),\n '#states' => array(\n 'visible' => array(\n ':input[name=\"elastic_email_use_default_channel\"]' => array('checked' => TRUE),\n ),\n ),\n );\n\n // Add the normal settings form stuff.\n $form = system_settings_form($form);\n\n // Return the form.\n return $form;\n}", "public function getContent($form_id='contact-form') {\t \n\t $now = time();\n\t $token = \\Library\\Helper\\Utils::generateToken($this->Site, $now);\n\t $guid = $this->Site->guid;\n\n $html =<<<HTML\n <form class=\"contact-form-simple\" name=\"contact-form\" action=\"\" method=\"POST\" sid=\"{$token}\">\n <input type=\"hidden\" readOnly=\"readOnly\" name=\"timestamp\" value=\"{$now}\" />\n <input type=\"hidden\" readOnly=\"readOnly\" name=\"guid\" value=\"{$guid}\" />\n <!--Grid row-->\n <div class=\"row\">\n <!--Grid column-->\n <div class=\"col-md-12\">\n <div class=\"md-form\">\n <input type=\"text\" id=\"name\" name=\"name\" class=\"form-control\" placeholder=\"Your name\" />\n </div>\n </div>\n <!--Grid column-->\n\n <!--Grid column-->\n <div class=\"col-md-12\">\n <div class=\"md-form\">\n <input type=\"email\" id=\"email\" name=\"email\" class=\"form-control\" placeholder=\"Your email address\" />\n </div>\n </div>\n <!--Grid column-->\n </div>\n <!--Grid row-->\n\n <!--Grid row-->\n <div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"md-form\">\n <input type=\"text\" id=\"subject\" name=\"subject\" class=\"form-control\" placeholder=\"Subject\" />\n </div>\n </div>\n </div>\n <!--Grid row-->\n\n <!--Grid row-->\n <div class=\"row\">\n\n <!--Grid column-->\n <div class=\"col-md-12\">\n\n <div class=\"md-form\">\n <textarea type=\"text\" id=\"message\" name=\"message\" rows=\"2\" class=\"form-control md-textarea\"></textarea>\n </div>\n\n </div>\n </div>\n <!--Grid row-->\n <div>\n <a href=\"javascript:void(0);\" class=\"btn btn-primary contact-form-simple-widget\">Send</a>\n </div>\n\n </form>\nHTML;\n return $html;\n\t}", "function do_contact_client_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_cl_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_client_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get client contact information array\n\t\t\t$_ccinfo\t= get_contact_client_info($adata['cc_cl_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['cl_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\t$mail['recip']\t\t= $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'].' <'.$_ccinfo['cl_email'].'>';\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\t$_MTP['to_name']\t= $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'];\n\t\t$_MTP['to_email']\t= $_ccinfo['cl_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_client_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "public function testForm() {\n $this->controller->process();\n $errors = $this->controller->getPlaceholder('loginfp.errors');\n $this->assertEmpty($errors);\n $this->assertEquals(1,$this->controller->emailsSent);\n }", "public function testForm() {\n $node = (object) ['nid' => NULL, 'type' => 'webform', 'title' => 'Test'];\n node_object_prepare($node);\n $email = new Email($node, 'test', NULL);\n $form_state = form_state_defaults();\n $message = [\n 'form_id' => 'confirmation_or_thank_you',\n 'type' => 0,\n 'eid' => 1,\n 'toggle_title' => t('Enable a thank you email'),\n 'email_title' => t('Thank you email'),\n ];\n $form = $email->form($message, $form_state);\n $this->assertEqual(['test_toggle', 'test_email'], array_keys($form));\n }", "function contactUs ($sendEmail=false, $serverSetting=null){\n\t\t\t$simpleFormBuilder = new simpleFormBuilder;\n\t\t\t\n\t\t\t$builder \t= array\t(\n\t\t\t\t\t\t\t\"prosesname\"=> \"Your Contact Has Been Saved \",\n\t\t\t\t\t\t\t\"action\"\t=> \"\",\n\t\t\t\t\t\t\t\"method\"\t=> \"insert\",\n\t\t\t\t\t\t\t\"datatable\"\t=> \"tbl_contact\",\n\t\t\t\t\t\t\t\"element\"\t=> array\t( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Name\" => array( \"type\" => \"text\", \"dataname\" => \"contact_name\t\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Email\" => array( \"type\" => \"text\", \"dataname\" => \"contact_email\", \"required\" => 1, \"emailvalid\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Phone\" => array( \"type\" => \"text\", \"dataname\" => \"contact_phone\", \"required\" => 1, \"phonevalid\" => 1),\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Address\" => array( \"type\" => \"text\", \"dataname\" => \"contact_address\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Message\" => array( \"type\" => \"textarea\", \"dataname\" => \"contact_message\", \"required\" => 1, \"width\" => \"75\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"captcha\" => array( \"type\" => \"captcha\", \"ignore\" => 1, \"message\" => \"(spam protection)\"),\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\"hidden\" => array( \"type\" => \"hidden\", \"dataname\" => \"contact_date\" , \"value\" => date(\"Y-m-d H:i:s\")),\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\n\t\t\n\t\t\t$form\t= $simpleFormBuilder->builder($builder, false, false, false);\n\t\t\t\n\t\t\tif($simpleFormBuilder->haveError != 1 AND isset($_POST['submit']) AND $sendEmail == true){\n\t\t\t\techo $simpleFormBuilder->haveError;\n\t\t\t\tif(is_null($serverSetting)){\n\t\t\t\t\t$objEmail \t= new send2email(MAIL_SERVER, SITE_EMAIL, SITE_EMAIL_PASS, MAIL_PORT, true);\n\t\t\t\t\t$receiver\t= MANAGEMENT_EMAIL;\n\t\t\t\t}else{\n\t\t\t\t\t$objEmail \t= new send2email(trim($serverSetting[0]), trim($serverSetting[1]), trim($serverSetting[2]), trim($serverSetting[3]), trim($serverSetting[4]) );\n\t\t\t\t\t$receiver\t= $serverSetting[5];\n\t\t\t\t}\n\n\t\t\t\t$send \t\t= $objEmail->send($_POST[\"contact_email\"], '[Blanco Indonesia] Contact Us from '.$_POST[\"contact_name\"] .' ('.$_POST[\"contact_phone\"]. ')', $_POST[\"contact_message\"], $receiver, 'Contact Us', $_POST[\"contact_name\"]);\n\t\t\t\t/*echo '<!-- <pre>'; print_r($send); echo ' </pre> -->';*/\n\t\t\t}\n\t\t\t\n\t\t\treturn $form;\n\t\t}", "function bab_pm_makeform()\n{\n global $prefs;\n\n $bab_hidden_input = '';\n $event = gps('event');\n $step = gps('step');\n\n if (!$event) {\n $event = 'postmaster';\n }\n\n if (!$step) {\n $step = 'subscribers';\n }\n\n if ($step == 'subscribers') {\n $bab_columns = array(\n 'subscriberFirstName',\n 'subscriberLastName',\n 'subscriberEmail',\n 'subscriberLists',\n );\n\n for ($i = 1; $i <= BAB_CUSTOM_FIELD_COUNT; $i++) {\n $bab_columns[] = \"subscriberCustom{$i}\";\n }\n\n $bab_submit_value = 'Add Subscriber';\n $bab_prefix = 'new';\n $subscriberToEdit = gps('subscriber');\n\n if ($subscriberToEdit) {\n $bab_hidden_input = '<input type=\"hidden\" name=\"editSubscriberId\" value=\"' . doSpecial($subscriberToEdit) . '\">';\n $bab_prefix = 'edit';\n $bab_submit_value = 'Update Subscriber Information';\n\n $row = safe_row('*', 'bab_pm_subscribers', \"subscriberID=\" . doSlash($subscriberToEdit));\n $subscriber_lists = safe_rows('*', 'bab_pm_subscribers_list', \"subscriber_id = \" . doSlash($row['subscriberID']));\n $fname = doSpecial($row['subscriberFirstName']);\n $lname = doSpecial($row['subscriberLastName']);\n echo \"<fieldset id=bab_pm_edit><legend><span class=bab_pm_underhed>Editing Subscriber: $fname $lname</span></legend>\";\n } else {\n $subscriber_lists = array();\n }\n\n $lists = safe_rows('*', 'bab_pm_list_prefs', '1=1 order by listName');\n }\n\n if ($step == 'lists') {\n $bab_columns = array('listName', 'listAdminEmail','listDescription','listUnsubscribeUrl','listEmailForm','listSubjectLine');\n $bab_submit_value = 'Add List';\n $bab_prefix = 'new';\n\n if ($listToEdit = gps('list')) {\n $bab_hidden_input = '<input type=\"hidden\" name=\"editListID\" value=\"' . $listToEdit . '\">';\n $bab_prefix = 'edit';\n $bab_submit_value = 'Update List Information';\n $bab_prefix = 'edit';\n\n $row = safe_row('*', 'bab_pm_list_prefs', \"listID=\" . doSlash($listToEdit));\n echo \"<fieldset id=bab_pm_edit><legend>Editing List: $row[listName]</legend>\";\n }\n\n $form_prefix = $prefs[_bab_prefix_key('form_select_prefix')];\n\n $forms = safe_column('name', 'txp_form',\"name LIKE '\". doSlash($form_prefix) . \"%'\");\n $form_select = selectInput($bab_prefix.ucfirst('listEmailForm'), $forms, @$row['listEmailForm']);\n // replace class\n $form_select = str_replace('class=\"list\"', 'class=\"bab_pm_input\"', $form_select);\n }\n\n // build form\n\n echo '<form method=\"POST\" id=\"subscriber_edit_form\">';\n\n foreach ($bab_columns as $column) {\n echo '<dl class=\"bab_pm_form_input\"><dt>'.bab_pm_preferences($column).'</dt><dd>';\n $bab_input_name = $bab_prefix . ucfirst($column);\n\n switch ($column) {\n case 'listEmailForm':\n echo $form_select;\n break;\n case 'listSubjectLine':\n $checkbox_text = 'Use Article Title for Subject';\n case 'listUnsubscribeUrl':\n if (empty($checkbox_text)) {\n $checkbox_text = 'Use Default';\n }\n\n $checked = empty($row[$column]) ? 'checked=\"checked\" ' : '';\n $js = <<<eojs\n<script>\n$(document).ready(function () {\n $('#{$column}_checkbox').change(function(){\n if ($(this).is(':checked')) {\n $('input[name={$bab_input_name}]').attr('disabled', true).val('');\n }\n else {\n $('input[name={$bab_input_name}]').attr('disabled', false);\n }\n });\n});\n</script>\n\neojs;\n\n echo $js . '<input id=\"'.$column.'_checkbox\" type=\"checkbox\" class=\"bab_pm_input\" ' . $checked . '/>'.$checkbox_text.'</dd><dd>' .\n '<input type=\"text\" name=\"' . $bab_input_name . '\" value=\"' . doSpecial(@$row[$column]) . '\"' .\n (!empty($checked) ? ' disabled=\"disabled\"' : '') . ' />' .\n '</dd>';\n break;\n case 'subscriberLists':\n foreach ($lists as $list) {\n $checked = '';\n\n foreach ($subscriber_lists as $slist) {\n if ($list['listID'] == $slist['list_id']) {\n $checked = 'checked=\"checked\" ';\n break;\n }\n }\n\n echo '<input type=\"checkbox\" name=\"'. $bab_input_name .'[]\" value=\"'.$list['listID'].'\"' . $checked . '/>'\n . doSpecial($list['listName']) . \"<br>\";\n }\n break;\n default:\n echo '<input type=\"text\" name=\"' . $bab_input_name . '\" value=\"' . doSpecial(@$row[$column]) . '\" class=\"bab_pm_input\">';\n break;\n }\n\n echo '</dd></dl>';\n }\n\n echo $bab_hidden_input;\n echo '<input type=\"submit\" value=\"' . doSpecial($bab_submit_value) . '\" class=\"publish\">';\n echo '</form>';\n}", "function elastic_email_send_test_submit($form, &$form_state) {\n $site_mail = variable_get('site_mail', NULL);\n $username = variable_get(ELASTIC_EMAIL_USERNAME, '');\n $api_key = variable_get(ELASTIC_EMAIL_API_KEY, '');\n\n $to = $form_state['values']['elastic_email_test_email_to'];\n $subject = $form_state['values']['elastic_email_test_email_subject'];\n\n if ($form_state['values']['elastic_email_test_email_html']) {\n $text_body = NULL;\n $html_body = $form_state['values']['elastic_email_test_email_body'];\n }\n else {\n $text_body = $form_state['values']['elastic_email_test_email_body'];\n $html_body = NULL;\n }\n\n $result = ElasticEmailMailSystem::elasticEmailSend(\n $site_mail,\n NULL,\n $to,\n $subject,\n $text_body,\n $html_body,\n $username,\n $api_key\n );\n\n\n if (isset($result['error'])) {\n // There was an error. Return error HTML.\n drupal_set_message(t('Failed to send a test email to %test_to. Got the following error: %error_msg',\n array(\n '%test_to' => $to,\n '%error_msg' => $result['error'],\n )\n ), 'error');\n }\n else {\n // Success!\n drupal_set_message(t('Successfully sent a test email to %test_to',\n array(\n '%test_to' => $to,\n )\n ));\n }\n}", "function pdfbulletin_sendtest_form_submit($form, &$form_state) {\n $subscriptions = array();\n\n $emails = explode(\"\\n\", $form_state['values']['subscribers']);\n foreach ($emails as $email) {\n $email = trim($email);\n if (!empty($email) && valid_email_address($email)) {\n $subscriptions[$email] = $email;\n }\n }\n \n $node = $form_state['values']['node'];\n $pdfbulletin = $node->pdfbulletin;\n $pdfbulletin->subscribers = $subscriptions;\n pdfbulletin_send_email($pdfbulletin, $node);\n\n drupal_set_message('Test message sent.');\n // @todo make this more redirect friendly\n drupal_goto('/pdfbulletin/' . $pdfbulletin->id . '/subscribers');\n}", "function sendmail()\n\t{\n\t\tglobal $mainframe, $Itemid;\n\n\t\t/*\n\t\t * Initialize some variables\n\t\t */\n\t\t$db = & $mainframe->getDBO();\n\n\t\t$SiteName \t= $mainframe->getCfg('sitename');\n\t\t$MailFrom \t= $mainframe->getCfg('mailfrom');\n\t\t$FromName \t= $mainframe->getCfg('fromname');\n\t\t$validate \t= mosHash( $mainframe->getCfg('db') );\n\n\t\t$default \t= sprintf(JText::_('MAILENQUIRY'), $SiteName);\n\t\t$option \t= JRequest::getVar('option');\n\t\t$contactId \t= JRequest::getVar('con_id');\n\t\t$validate \t= JRequest::getVar($validate, \t\t0, \t\t\t'post');\n\t\t$email \t\t= JRequest::getVar('email', \t\t'', \t\t'post');\n\t\t$text \t\t= JRequest::getVar('text', \t\t\t'', \t\t'post');\n\t\t$name \t\t= JRequest::getVar('name', \t\t\t'', \t\t'post');\n\t\t$subject \t= JRequest::getVar('subject', \t\t$default, \t'post');\n\t\t$emailCopy \t= JRequest::getVar('email_copy', \t0, \t\t\t'post');\n\n\t\t// probably a spoofing attack\n\t\tif (!$validate) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts, but it does not hurt to make\n\t\t * sure the request came from a client with a user agent string.\n\t\t */\n\t\tif (!isset ($_SERVER['HTTP_USER_AGENT'])) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts either, but we ought to check\n\t\t * to make sure that the request was posted as well.\n\t\t */\n\t\tif (!$_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t// An array of e-mail headers we do not want to allow as input\n\t\t$headers = array ('Content-Type:',\n\t\t\t\t\t\t 'MIME-Version:',\n\t\t\t\t\t\t 'Content-Transfer-Encoding:',\n\t\t\t\t\t\t 'bcc:',\n\t\t\t\t\t\t 'cc:');\n\n\t\t// An array of the input fields to scan for injected headers\n\t\t$fields = array ('email',\n\t\t\t\t\t\t 'text',\n\t\t\t\t\t\t 'name',\n\t\t\t\t\t\t 'subject',\n\t\t\t\t\t\t 'email_copy');\n\n\t\t/*\n\t\t * Here is the meat and potatoes of the header injection test. We\n\t\t * iterate over the array of form input and check for header strings.\n\t\t * If we fine one, send an unauthorized header and die.\n\t\t */\n\t\tforeach ($fields as $field) {\n\t\t\tforeach ($headers as $header) {\n\t\t\t\tif (strpos($_POST[$field], $header) !== false) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Now that we have passed the header injection tests lets free up the\n\t\t * used memory and continue.\n\t\t */\n\t\tunset ($fields, $field, $headers, $header);\n\n\t\t/*\n\t\t * Load the contact details\n\t\t */\n\t\t$contact = new JTableContact($db);\n\t\t$contact->load($contactId);\n\n\t\t/*\n\t\t * If there is no valid email address or message body then we throw an\n\t\t * error and return false.\n\t\t */\n\t\tjimport('joomla.utilities.mail');\n\t\tif (!$email || !$text || (JMailHelper::isEmailAddress($email) == false)) {\n\t\t\tJContactView::emailError();\n\t\t} else {\n\t\t\t$menu = JTable::getInstance( 'menu', $db );\n\t\t\t$menu->load( $Itemid );\n\t\t\t$mparams = new JParameter( $menu->params );\n\t\t\t$bannedEmail \t= $mparams->get( 'bannedEmail', \t'' );\n\t\t\t$bannedSubject \t= $mparams->get( 'bannedSubject', \t'' );\n\t\t\t$bannedText \t= $mparams->get( 'bannedText', \t\t'' );\n\t\t\t$sessionCheck \t= $mparams->get( 'sessionCheck', \t1 );\n\n\t\t\t// check for session cookie\n\t\t\tif ( $sessionCheck ) {\n\t\t\t\tif ( !isset($_COOKIE[JSession::name()]) ) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Prevent form submission if one of the banned text is discovered in the email field\n\t\t\tif ( $bannedEmail ) {\n\t\t\t\t$bannedEmail = explode( ';', $bannedEmail );\n\t\t\t\tforeach ($bannedEmail as $value) {\n\t\t\t\t\tif ( JString::stristr($email, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the subject field\n\t\t\tif ( $bannedSubject ) {\n\t\t\t\t$bannedSubject = explode( ';', $bannedSubject );\n\t\t\t\tforeach ($bannedSubject as $value) {\n\t\t\t\t\tif ( JString::stristr($subject, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the text field\n\t\t\tif ( $bannedText ) {\n\t\t\t\t$bannedText = explode( ';', $bannedText );\n\t\t\t\tforeach ($bannedText as $value) {\n\t\t\t\t\tif ( JString::stristr($text, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// test to ensure that only one email address is entered\n\t\t\t$check = explode( '@', $email );\n\t\t\tif ( strpos( $email, ';' ) || strpos( $email, ',' ) || strpos( $email, ' ' ) || count( $check ) > 2 ) {\n\t\t\t\tmosErrorAlert( JText::_( 'You cannot enter more than one email address', true ) );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Prepare email body\n\t\t\t */\n\t\t\t$prefix = sprintf(JText::_('ENQUIRY_TEXT'), $mainframe->getBaseURL());\n\t\t\t$text \t= $prefix.\"\\n\".$name.' <'.$email.'>'.\"\\r\\n\\r\\n\".stripslashes($text);\n\n\t\t\t// Send mail\n\t\t\tjosMail($email, $name, $contact->email_to, $FromName.': '.$subject, $text);\n\n\t\t\t/*\n\t\t\t * If we are supposed to copy the admin, do so.\n\t\t\t */\n\t\t\t// parameter check\n\t\t\t$menuParams \t\t= new JParameter( $contact->params );\n\t\t\t$emailcopyCheck = $menuParams->get( 'email_copy', 0 );\n\n\t\t\t// check whether email copy function activated\n\t\t\tif ( $emailCopy && $emailcopyCheck ) {\n\t\t\t\t$copyText \t\t= sprintf(JText::_('Copy of:'), $contact->name, $SiteName);\n\t\t\t\t$copyText \t\t.= \"\\r\\n\\r\\n\".$text;\n\t\t\t\t$copySubject \t= JText::_('Copy of:').\" \".$subject;\n\t\t\t\tjosMail($MailFrom, $FromName, $email, $copySubject, $copyText);\n\t\t\t}\n\n\t\t\t$link = sefRelToAbs( 'index.php?option=com_contact&task=view&contact_id='. $contactId .'&Itemid='. $Itemid );\n\t\t\t$text = JText::_( 'Thank you for your e-mail', true );\n\n\t\t\tjosRedirect( $link, $text );\n\t\t}\n\t}", "function eddenvato_verify_form($atts){\n\n\t// Start output\n\t$output = '';\n\n\t// Only show if not logged in\n\tif( is_user_logged_in() ){\n\n\t\t$output = 'You are already logged in to your account.';\n\n\t} else {\n\n\t\t// Setup vars\n\t\tglobal $eddenvato_msg;\n\t\tif(isset($_POST['edd-envato-license'])) : $license = $_POST['edd-envato-license']; else: $license = ''; endif;\n\t\tif(isset($_POST['edd-envato-email'])) : $email = $_POST['edd-envato-email']; else: $email = ''; endif;\n\t\tif(isset($_POST['edd-envato-email-confirm'])) : $confirm_email = $_POST['edd-envato-email-confirm']; else: $confirm_email = ''; endif;\n\n\t \t// Error Message Display\n\t\tif( isset($eddenvato_msg) ) : $output .= '<p class=\"tc-eddenvato-error\"><strong>'.$eddenvato_msg.'</strong></p>'; endif;\n\n\t\t// Output custom message\n\t\t$output .= stripslashes(get_option('eddenvato-verify-message'));\n\n\t\t// Build Form\n\t\t$output .= '\n\t\t<form class=\"tc-eddenvato-form\" action=\"\" method=\"post\" name=\"tc-envato-verify-form\" style=\"margin:20px 0px;\">\n\n\t\t\t<label>'.__(\"Envato Purchase Code\", \"eddenvato\").'</label><br />\n\t\t\t<input class=\"tc-eddenvato-field\" type=\"text\" id=\"edd-envato-license\" name=\"edd-envato-license\" style=\"width:400px;\" value=\"'.$license.'\" /><br />\n\n\t\t\t<label>'.__(\"Email Address\", \"eddenvato\").'</label><br />\n\t\t\t<input class=\"tc-eddenvato-field\" name=\"edd-envato-email\" type=\"text\" name=\"edd-envato-email\" style=\"width:400px\" value=\"'.$email.'\" /><br />\n\n\t\t\t<label>'.__(\"Confirm Email\", \"eddenvato\").'</label><br />\n\t\t\t<input class=\"tc-eddenvato-field\" name=\"edd-envato-email-confirm\" type=\"text\" name=\"edd-envato-email-confirm\" style=\"width:400px\" value=\"'.$confirm_email.'\" /><br />\n\t\t\t<input class=\"tc-eddenvato-submit\" name=\"submit\" type=\"submit\" value=\"Submit\" />\n\n\t\t</form>\n\t\t';\n\n\t} // end if else\n\n\treturn $output;\n\n}", "function getEmailAddress() {\n\t\t//Retrieve submitted id parameters\n\t\t$org_id = intval($this->piVars['org_id']);\n\t\t$emp_id = intval($this->piVars['id']);\n\t\t$pos_id = intval($this->piVars['pos_id']);\n\t\t$sv_id = intval($this->piVars['sv_id']);\n\n\t\tif (!empty($org_id)) {\t//Email form is called from organisation detail page (organisation email)\n\t\t\t//Standard query for organisation details\n\t\t\t$res_organisation = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t'or_name,\n\t\t\t\t\t or_email',\n\t\t\t\t\t'tx_civserv_organisation',\n\t\t\t\t\t'1 '.\n\t\t\t\t\t$this->cObj->enableFields('tx_civserv_organisation').\n\t\t\t\t\t' AND uid = ' . intval($org_id),\n\t\t\t\t\t'',\n\t\t\t\t\t'');\n\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res_organisation) == 1) {\n\t\t\t\t$organisation = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_organisation);\n\t\t\t\t$email_address = $organisation[or_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_org_id','Wrong organisation id or organisation does not exist!');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} elseif (!empty($emp_id) && !empty($pos_id) && !empty($sv_id)) {\t//Email form is called from service detail page\n\t\t\t$result = $this->makeEmailQuery($emp_id, $pos_id, $sv_id);\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {\n\t\t\t\t$employee = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t\t\t//Set correct email address (priority is employee-position email address)\n\t\t\t\tempty($employee[ep_email]) ? $email_address = $employee[em_email] : $email_address = $employee[ep_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_sv_id','Wrong service id, employee id oder position id. No email address found!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif (!empty($emp_id) || (!empty($pos_id) && !empty($emp_id)) ) { //Email form is called from organisation detail page (supervisor email)\n\t\t\t$result = $this->makeEmailQuery($emp_id, $pos_id, $sv_id);\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {\n\t\t\t\t$employee = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t\t\tempty($employee[ep_email]) ? $email_address = $employee[em_email] : $email_address = $employee[ep_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_pos_id','Wrong employee id oder position id. No email address found!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif ($this->piVars['mode'] == 'check_contact_form') {\t//Email form ist called by the contact_link in the main Navigation\n\t\t\t$hoster_email =$this->get_hoster_email();\n\t\t\treturn $hoster_email;\n\t\t} else {\n\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_general','Organisation id, employee id, position id and service id wrong or not set. No email address found!');\n\t\t\treturn false;\n\t\t}\n\t}", "public function application(){\n $mail = new PHPMailer(true);\n\n // create error message\n $error = '';\n\n if (isset($_POST['submit'])) {\n\n // VARIABLES\n $firstName = $_POST[\"firstName\"];\n $lastName = $_POST[\"lastName\"];\n $instagram = $_POST[\"instagram\"];\n $facebook = $_POST[\"facebook\"];\n $twitter = $_POST[\"twitter\"];\n $dob = $_POST['dob'];\n $address = $_POST[\"address\"];\n $phoneNumber = $_POST[\"phoneNumber\"];\n $emailAddress = $_POST[\"emailAddress\"];\n $country = $_POST[\"country\"];\n $spr = $_POST[\"spr\"];\n $city = $_POST[\"city\"];\n $postalCode = $_POST[\"postalCode\"];\n $typeOfRiding = $_POST[\"typeOfRiding\"];\n $class = $_POST[\"class\"];\n $raceNumber = $_POST[\"raceNumber\"];\n $accomplishments = $_POST[\"accomplishments\"];\n $whyUs = $_POST[\"whyUs\"];\n $parent = $_POST[\"parent\"];\n $category = $_POST[\"category\"];\n $jerseySize = $_POST[\"jerseySize\"];\n $series = $_POST[\"series\"];\n $attendRaces = $_POST[\"attendRaces\"];\n $fullName = $firstName. \" \" . $lastName;\n $subject = \"Sponsorship: $firstName, $lastName\";\n $message = \"\n First Name: $firstName <br>\n Last Name: $lastName <br>\n Instagram: $instagram <br>\n Facebook: $facebook <br>\n Twitter: $twitter <br>\n Address: $address <br>\n Phone Number: $phoneNumber <br>\n Email Address: $emailAddress <br>\n Country: $country <br>\n State / Province / Region: $spr <br>\n City: $city <br>\n Postal Code: $postalCode <br>\n Type Of Riding: $typeOfRiding <br>\n Class: $class <br>\n Category: $category <br>\n Jersey Size: $jerseySize <br>\n What Series Do You Race In?: $series <br>\n How Many Races Do You Attend A Year?: $attendRaces <br>\n\n Date of Birth (mm/dd/yyyy): $dob <br>\n If you are under 18 years of age - please provide your Guardian / Parent's Name and contact information: <br> $parent <br>\n What would you like us to know about you?: <br> $accomplishments <br>\n Why would you like to be sponsored by us?: <br> $whyUs \n \";\n\n \n try {\n // SERVER SETTINGS\n // Enable verbose debug output\n $mail->SMTPDebug = 0;\n // Set mailer to use SMTP \n $mail->isSMTP();\n // Specify main and backup SMTP servers \n $mail->Host = 'mail.roostertires.com';\n // Enable SMTP authentication \n $mail->SMTPAuth = true;\n // SMTP username \n $mail->Username = '[email protected]';\n // SMTP password \n $mail->Password = 'shopify123';\n // Enable TLS encryption, `ssl` also accepted (ssl or tls) \n $mail->SMTPSecure = 'ssl';\n // TCP port to connect to (SSL = 465 | TLS = 587) \n $mail->Port = 465; \n\n //RECIPIENTS\n // Senders information \n $mail->setFrom($emailAddress,$fullName);\n // Recipients Information\n $mail->addAddress('[email protected]', 'Rooster Tires'); \n // Reply to information\n $mail->addReplyTo($emailAddress, $fullName);\n // Add blind carbon copy \n $mail->addBCC('[email protected]');\n // $mail->addBCC('[email protected]');\n\n // ATTATCHMENTS\n if($_FILES['file']['tmp_name']){\n $mail->AddAttachment($_FILES['file']['tmp_name'], $_FILES['file']['name']);\n }\n if($_FILES['photo']['tmp_name']){\n $mail->AddAttachment($_FILES['photo']['tmp_name'], $_FILES['photo']['name']);\n }\n\n\n // CONTENT\n // Set email format to HTML\n $mail->isHTML(true); \n $mail->Subject = $subject;\n $mail->Body = $message;\n\n if($mail->send()){\n $msg = 'Thank you for your email. We will get back to you shortly!';\n }\n\n } catch (Exception $e) {\n $msg = \"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\";\n }\n\n }\n }", "function cb_get_form($sendTo=\"\", $subject=\"\"){\n\t$sendTo= ($sendTo == \"\") ? get_bloginfo('admin_email') : $sendTo;\n\t$subject= ($subject == \"\") ? 'Contact Form from'. get_bloginfo('name') : $subject;\n\t\n\tprint cb_build_form($sendTo, $subject);\n}", "public static function save() {\n\t\t// Connect to database\n\t\t$db = new Db();\n\t\t// Get values\n\t\t$values = self::getValues();\n\t\t// Unset values we don't want to save in database\n\t\tunset($values['confirm-email']);\n\t\t// Set additional database fields (not included in the form)\n\t\tdate_default_timezone_set('Europe/Athens'); // Set timezone to our timezone\n\t\t$values['created_at'] = date('Y-m-d H:i:s');\n\n\t\t// Quote and escape form submitted values\n\t\tforeach ($values as $key => $value) {\n\t\t\t// Change date of birth to mysql format\n\t\t\tif ($key == 'dob') {\n\t\t\t\t$value = date('Y-m-d H:i:s', strtotime($value));\n\t\t\t}\n\t\t\t$values[$key] = $db->quote($value);\n\t\t}\n\n\t\t// Get fields from array keys into string\n\t\t$fields = implode(',', array_keys($values));\n\t\t// Get entries from array values into string\n\t\t$entries = implode(',', array_values($values));\n\t\t// Insert the values into the database\n\t\t$result = $db->query(\"INSERT INTO `requests` ($fields) VALUES ($entries)\");\n\t\t\n\t\t// Check if row was inserted to the database\n\t\tif($result !== false) {\n\t\t\t// Send email to user\n\t\t $to = $values['email'];\n\t\t // $to = 'test@localhost';\n\t\t\t$subject = 'Your enquiry has been received';\n\n\t\t\t// Get Title\n\t\t\t$title_id = $values['title_id'];\n\t\t\t$titleQuery = $db->select(\"SELECT `name` FROM `title` where `id` = $title_id;\");\n\t\t\t$titleStr = $titleQuery[0]['name'];\n\n\t\t\t// Get full name\n\t\t\t$fullname = str_replace(\"'\", \"\", $values['firstname']) . ' ' . str_replace(\"'\", \"\", $values['surname']);\n\n\t\t\t// Compose message\n\t\t\t$message = \"Dear $titleStr $fullname, You have successfully asked for more information\";\n\n\t\t\t$headers = 'From: test@localhost' . \"\\r\\n\" .\n\t\t\t 'Reply-To: test@localhost' . \"\\r\\n\" .\n\t\t\t 'X-Mailer: PHP/' . phpversion();\n\n\t\t\tmail($to, $subject, $message, $headers);\n\t\t}\n\t}", "function do_contact_supplier_form($adata, $aerr_entry, $aret_flag=0) {\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Some HTML Strings (reduce text)\n\t\t$_td_str_left_vtop\t= '<td class=\"TP1SML_NR\" width=\"30%\" valign=\"top\">';\n\t\t$_td_str_left\t\t= '<td class=\"TP1SML_NR\" width=\"30%\">';\n\t\t$_td_str_right\t\t= '<td class=\"TP1SML_NL\" width=\"70%\">';\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr .= $_CCFG['_PKG_NAME_SHORT'].$_sp.$_LANG['_MAIL']['Contact_Supplier_Form'].$_sp.'('.$_LANG['_MAIL']['all_fields_required'].')';\n\n\t# Do data entry error string check and build\n\t\tIF ($aerr_entry['flag']) {\n\t\t \t$err_str = $_LANG['_MAIL']['CC_FORM_ERR_HDR1'].'<br>'.$_LANG['_MAIL']['CC_FORM_ERR_HDR2'].'<br>'.$_nl;\n\n\t \t\tIF ($aerr_entry['cc_s_id']) \t{$err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR01']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['cc_mc_id']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR02']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['cc_subj']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR03']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['cc_msg']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR04']; $err_prv = 1;}\n\n\t \t\t$_cstr .= '<p align=\"center\"><b>'.$err_str.'</b>'.$_nl;\n\t\t}\n\n\t# Formatting tweak for spacing\n\t\tIF ($aerr_entry['flag']) {$_cstr .= '<br><br>'.$_nl;}\n\n\t\t$_cstr .= '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">'.$_nl;\n\t\t$_cstr .= '<tr><td align=\"center\">'.$_nl;\n\t\t$_cstr .= '<form action=\"mod.php\" method=\"post\" name=\"supplier\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mod\" value=\"mail\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mode\" value=\"supplier\">'.$_nl;\n\t\t$_cstr .= '<table width=\"100%\" cellspacing=\"0\" cellpadding=\"5\">'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_To_Supplier'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_select_list_suppliers('cc_s_id', $adata['cc_s_id'], '1').$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_From'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_select_list_mail_contacts('cc_mc_id', $adata['cc_mc_id']);\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT name=\"cc_subj\" size=\"30\" maxlength=\"50\" value=\"'.htmlspecialchars($adata['cc_subj']).'\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left_vtop.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\tIF ($_CCFG['WYSIWYG_OPEN']) {$_cols = 100;} ELSE {$_cols = 75;}\n\t\t$_cstr .= '<TEXTAREA class=\"PSML_NL\" NAME=\"cc_msg\" COLS=\"'.$_cols.'\" ROWS=\"15\">'.$adata['cc_msg'].'</TEXTAREA>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<INPUT TYPE=hidden name=\"stage\" value=\"1\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_email', 'SUBMIT', $_LANG['_MAIL']['B_Send_Email'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= '</tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</form>'.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr \t\t= ''.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t# Return / Echo Final Output\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "function uc_file_build_email_form($form, &$form_state, $settings, $token_filters) {\n $form['from'] = array(\n '#type' => 'textfield',\n '#title' => t('Sender'),\n '#default_value' => $settings['from'],\n '#description' => t('The \"From\" address.'),\n '#required' => TRUE,\n );\n $form['addresses'] = array(\n '#type' => 'textarea',\n '#title' => t('Recipients'),\n '#default_value' => $settings['addresses'],\n '#description' => t('Enter the email addresses to receive the notifications, one on each line. You may use order tokens for dynamic email addresses.'),\n '#required' => TRUE,\n );\n $form['subject'] = array(\n '#type' => 'textfield',\n '#title' => t('Subject'),\n '#default_value' => $settings['subject'],\n '#required' => TRUE,\n );\n $form['message'] = array(\n '#type' => 'textarea',\n '#title' => t('Message'),\n '#default_value' => $settings['message'],\n '#text_format' => $settings['format'],\n );\n\n $form['token_help'] = array(\n '#type' => 'fieldset',\n '#title' => t('Replacement patterns'),\n '#description' => t('You can make use of the replacement patterns in the recipients field, the subject, and the message body.'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n foreach ($token_filters as $name) {\n $form['token_help'][$name] = array(\n '#type' => 'fieldset',\n '#title' => t('@name replacement patterns', array('@name' => drupal_ucfirst($name))),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n }\n\n return $form;\n}", "public function getCMSFields_forPopup() {\n\t\t\n\t\t$fields = new FieldSet(\n\t\t\tnew TextField('EmailSubject', _t('UserDefinedForm.EMAILSUBJECT', 'Email Subject')),\n\t\t\tnew TextField('EmailFrom', _t('UserDefinedForm.FROMADDRESS','Send Email From')),\n\t\t\tnew TextField('EmailAddress', _t('UserDefinedForm.SENDEMAILTO','Send Email To')),\n\t\t\tnew CheckboxField('HideFormData', _t('UserDefinedForm.HIDEFORMDATA', 'Hide Form Data from Email')),\n\t\t\tnew CheckboxField('SendPlain', _t('UserDefinedForm.SENDPLAIN', 'Send Email as Plain Text (HTML will be stripped)')),\n\t\t\tnew TextareaField('EmailBody', 'Body')\n\t\t);\n\t\t\n\t\tif($this->Form()) {\n\t\t\t$validEmailFields = DataObject::get(\"EditableEmailField\", \"\\\"ParentID\\\" = '$this->FormID'\");\n\t\t\t$multiOptionFields = DataObject::get(\"EditableMultipleOptionField\", \"\\\"ParentID\\\" = '$this->FormID'\");\n\t\t\t\n\t\t\t// if they have email fields then we could send from it\n\t\t\tif($validEmailFields) {\n\t\t\t\t$fields->insertAfter(new DropdownField('SendEmailFromFieldID', _t('UserDefinedForm.ORSELECTAFIELDTOUSEASFROM', '.. or Select a Form Field to use as the From Address'), $validEmailFields->toDropdownMap('ID', 'Title'), '', null,\"\"), 'EmailFrom');\n\t\t\t}\n\t\t\t\n\t\t\t// if they have multiple options\n\t\t\tif($multiOptionFields || $validEmailFields) {\n\t\t\t\tif($multiOptionFields && $validEmailFields) {\n\t\t\t\t\t$multiOptionFields->merge($validEmailFields);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telseif(!$multiOptionFields) {\n\t\t\t\t\t$multiOptionFields = $validEmailFields;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$multiOptionFields = $multiOptionFields->toDropdownMap('ID', 'Title');\n\t\t\t\t$fields->insertAfter(new DropdownField('SendEmailToFieldID', _t('UserDefinedForm.ORSELECTAFIELDTOUSEASTO', '.. or Select a Field to use as the To Address'), $multiOptionFields, '', null, \"\"), 'EmailAddress');\n\t\t\t}\n\t\t}\n\n\t\treturn $fields;\n\t}", "function progressive_webform_email($variables) {\r\n _form_set_class($variables['element'], array('form-control'));\r\n return theme_webform_email($variables);\r\n}", "function prepare_form_vars($recipient_guids = null, $message_type = null, $entity = null) {\n\n\tif (!$message_type) {\n\t\t$message_type = Message::TYPE_PRIVATE;\n\t}\n\n\t$recipient_guids = Group::create($recipient_guids)->guids();\n\t\n\t$policy = new Config();\n\t$ruleset = $policy->getRuleset($message_type);\n\n\t$values = array(\n\t\t'entity' => $entity,\n\t\t'multiple' => $ruleset->allowsMultipleRecipients(),\n\t\t'has_subject' => $ruleset->hasSubject(),\n\t\t'allows_attachments' => $ruleset->allowsAttachments(),\n\t\t'subject' => ($entity) ? \"Re: $entity->title\" : '',\n\t\t'body' => '',\n\t\t'recipient_guids' => $recipient_guids,\n\t\t'message_type' => $message_type,\n\t);\n\n\tif (elgg_is_sticky_form('messages')) {\n\t\t$sticky = elgg_get_sticky_values('messages');\n\t\tforeach ($sticky as $field => $value) {\n\t\t\tif ($field == 'recipient_guids' && is_string($value)) {\n\t\t\t\t$value = string_to_tag_array($value);\n\t\t\t}\n\t\t\t$values[$field] = $value;\n\t\t}\n\t}\n\n\telgg_clear_sticky_form('messages');\n\treturn $values;\n}", "public function contact()\n {\n if ($this->issetPostSperglobal('name') && $this->issetPostSperglobal('email') && $this->issetPostSperglobal('message')) {\n $empty_field = 0;\n foreach ($_POST as $key => $post) {\n if (empty(trim($post))) {\n $empty_field++;\n }\n }\n if ($empty_field === 0) {\n $ReCaptcha = new ReCaptcha($this->getPostSuperglobal('recaptcha_response'));\n $method = __FUNCTION__;\n $this->session->read('Mail')->$method($this->getPostSuperglobal('name'), $this->getPostSuperglobal('email'), $this->getPostSuperglobal('message'));\n $this->session->writeFlash('success', \"Votre message a été envoyé avec succès.\");\n $this->redirect('contact');\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont vides.\");\n }\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont manquants.\");\n }\n $_post = $this->getSpecificPost($_POST);\n $this->render('contact', ['head'=>['title'=>'Contact', 'meta_description'=>''], 'page'=>'contact', '_post'=>isset($_post) ? $_post : '']);\n }", "function vals_soc_invite_form($form, &$form_state, $org = '', $target = '', $show_action = 'administer', $type, $subtype = '') {\n include_once(_VALS_SOC_ROOT . '/includes/module/vals_soc.mail_messages.inc');\n $message = get_invite_email_body($org, $subtype, ($subtype == _STUDENT_TYPE) ? t('your institute') : '');\n\n $form = array(\n '#prefix' => \"<div id='vals_soc_entity_form_wrapper_$target'>\",\n '#suffix' => '</div>',\n );\n $form['email_contact_header'] = array(\n '#markup' => '<h2>' . tt('Invite new %1$s', $subtype) . '</h2><br/>'\n );\n $form['subject'] = array(\n '#type' => 'hidden',\n \"#default_value\" => t('Invitation to join the VALS Semester of code'),\n );\n $form['contact_email'] = array(\n \"#type\" => \"textfield\",\n '#title' => t('Email of the person to invite'),\n '#description' => t('This can be a comma-separated list of addresses'),\n \"#size\" => 100,\n '#required' => '1',\n \"#default_value\" => '',\n );\n $form['description'] = array(\n \"#type\" => \"textarea\",\n '#title' => t('Message'),\n //\"#size\" => 1024,\n \"#default_value\" => $message,\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#attributes' => array('onclick' => entityCall($type, $org, $target, $show_action, 'administration', 'send_invite_email')),\n '#value' => t('Send'),\n '#post_render' => array('vals_soc_fix_submit_button'),\n );\n $form['cancel'] = array(\n '#type' => 'button',\n '#value' => t('Cancel'),\n '#prefix' => '&nbsp; &nbsp; &nbsp;',\n '#attributes' => array('onClick' => 'location.reload(); return true;'),\n '#post_render' => array('vals_soc_fix_submit_button'),\n );\n $form['#vals_soc_attached']['js'] = array(\n array(\n 'type' => 'file',\n 'data' => '/includes/js/test_functions.js',\n ),\n );\n return $form;\n}", "function campaignion_newsletters_dotmailer_admin_submit($form, &$form_state) {\n $keys = array();\n foreach ($form_state['values']['dotmailer']['api_keys'] as $data) {\n if (!empty($data['username']) && !empty($data['password'])) {\n $keys[$data['name']] = [\n 'username' => $data['username'],\n 'password' => $data['password'],\n ];\n }\n }\n variable_set('dotmailer_api_keys', $keys);\n\n // Hide our values from the general submit handler.\n unset($form_state['values']['dotmailer']);\n}", "private function displayForm()\n {\n // Preparation des paramètres du mail.\n $data['headerTitle'] = 'Contact';\n $data['headerDescription'] = 'Page de contact';\n $data['title'] = 'Contact';\n\n // Affichage du formulaire.\n $this->load->view('templates/header', $data);\n $this->load->view('templates/alert', $data);\n $this->load->view('contact/index', $data);\n $this->load->view('templates/footer', $data);\n }", "function do_contact_form($adata, $aerr_entry, $aret_flag=0) {\n\t# Get security vars\n\t\t$_SEC \t= get_security_flags();\n\t\t$_PERMS\t= do_decode_perms_admin($_SEC['_sadmin_perms']);\n\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check for admin / user and get email address accordingly\n\t\tIF ($_SEC['_sadmin_flg'] && $_SEC['_sadmin_name'] && !$adata['mc_email']) {\n\t\t\t$adata['mc_email'] = get_user_name_email($_SEC['_sadmin_name'], 'admin');\n\t\t}\n\t\tIF ($_SEC['_suser_flg'] && $_SEC['_suser_name'] && !$adata['mc_email']) {\n\t\t\t$adata['mc_email'] = get_user_name_email($_SEC['_suser_name'], 'user');\n\t\t}\n\n\t# Some HTML Strings (reduce text)\n\t\t$_td_str_left_vtop\t= '<td class=\"TP1SML_NR\" width=\"30%\" valign=\"top\">';\n\t\t$_td_str_left\t\t= '<td class=\"TP1SML_NR\" width=\"30%\">';\n\t\t$_td_str_right\t\t= '<td class=\"TP1SML_NL\" width=\"70%\">';\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr .= $_CCFG['_PKG_NAME_SHORT'].$_sp.$_LANG['_MAIL']['Contact_Form'].$_sp.'('.$_LANG['_MAIL']['all_fields_required'].')';\n\n\t# Add \"Edit\" button for editing contact info parameters if admin and has permission\n\t\tIF ($_SEC['_sadmin_flg'] && $_CCFG['ENABLE_QUICK_EDIT'] && ($_PERMS['AP16'] == 1 || $_PERMS['AP15'] == 1)) {\n\t\t\t$_tstr .= ' <a href=\"admin.php?cp=parms&fpg=user\">'.$_TCFG['_S_IMG_PM_S'].'</a>';\n\t\t}\n\n\t# Do data entry error string check and build\n\t\tIF ($aerr_entry['flag']) {\n\t\t \t$err_str = $_LANG['_MAIL']['CS_FORM_ERR_HDR1'].'<br>'.$_LANG['_MAIL']['CS_FORM_ERR_HDR2'].'<br>'.$_nl;\n\t \t\tIF ($aerr_entry['mc_id']) \t{$err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR01']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['mc_name']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR02']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['mc_email']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR03']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['mc_subj']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR04']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['mc_msg']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR05']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['sec_code']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR06']; $err_prv = 1;}\n\t \t\t$_cstr .= '<p align=\"center\"><b>'.$err_str.'</b>'.$_nl;\n\t\t}\n\n\t# Check Stage for extra data validation\n\t\tIF ($adata['stage'] == 1) {\n\t\t# Email\n\t\t\tIF ($aerr_entry['err_email_invalid']) {$_err_more .= '<br>'.$_LANG['_MAIL']['CS_FORM_ERR_MSG_01'].$_nl;}\n\n\t\t# Print out more errors\n\t\t\tIF ($_err_more) {$_cstr .= '<b>'.$_err_more.'</b>'.$_nl;}\n\t\t}\n\n\t# Formatting tweak for spacing\n\t\tIF ($aerr_entry['flag'] || $_err_more) {$_cstr .= '<br><br>'.$_nl;}\n\n\t\t$_cstr .= '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">'.$_nl;\n\n\t# Display othr contact info, if enabled\n\t\tIF ($_UVAR['DISPLAY_ON_CONTACT_FORM']) {\n\t\t\t$_cstr .= '<tr><td>'.$_nl;\n\t\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['CC_FORM_TITLE_MAIL'].'</b><br>';\n\t\t\tIF ($_UVAR['CO_INFO_01_NAME'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_01_NAME'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_12_TAGLINE'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.'<i>\"'.$_UVAR['CO_INFO_12_TAGLINE'].'\"</i><br>';}\n\t\t\tIF ($_UVAR['CO_INFO_02_ADDR_01'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_02_ADDR_01'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_03_ADDR_02'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_03_ADDR_02'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_04_CITY'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_04_CITY'].', ';}\n\t\t\tIF ($_UVAR['CO_INFO_05_STATE_PROV'])\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_05_STATE_PROV'].', ';}\n\t\t\tIF ($_UVAR['CO_INFO_06_POSTAL_CODE'])\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_06_POSTAL_CODE'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_07_COUNTRY'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_07_COUNTRY'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_08_PHONE'] || $_UVAR['CO_INFO_09_FAX'] || $_UVAR['CO_INFO_11_TOLL_FREE'] || $_LANG['_MAIL']['CC_FORM_DATA_TELECOM']) {\n\t\t\t\t$_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_TELECOM'].'</b><br>';\n\t\t\t\tIF ($_UVAR['CO_INFO_08_PHONE'])\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_PHONE'].' '.$_UVAR['CO_INFO_08_PHONE'].'<br>';}\n\t\t\t\tIF ($_UVAR['CO_INFO_09_FAX'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_FAX'].' '.$_UVAR['CO_INFO_09_FAX'].'<br>';}\n\t\t\t\tIF ($_UVAR['CO_INFO_11_TOLL_FREE'])\t\t{$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_TOLL_FREE'].' '.$_UVAR['CO_INFO_11_TOLL_FREE'].'<br>';}\n\t\t\t\tIF ($_LANG['_MAIL']['CC_FORM_DATA_TELECOM']) {$_cstr .= '&nbsp;&nbsp;&nbsp;'.$_LANG['_MAIL']['CC_FORM_DATA_TELECOM'].'</b><br>';}\n\t\t\t}\n\t\t\tIF ($_LANG['_MAIL']['CC_FORM_DATA_OTHER']) {\n\t\t\t\t$_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_OTHER'].'</b><br>';\n\t\t\t\t$_cstr .= '&nbsp;&nbsp;&nbsp;'.$_LANG['_MAIL']['CC_FORM_DATA_OTHER'].'</b><br>';\n\t\t\t}\n\t\t\t$_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_EMAIL'].'</b><br>';\n\t\t\t$_cstr .= '<br></td></tr>';\n\t\t}\n\n\t\t$_cstr .= '<tr><td align=\"center\">'.$_nl;\n\t\t$_cstr .= '<form action=\"mod.php\" method=\"post\" name=\"contact\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mod\" value=\"mail\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mode\" value=\"contact\">'.$_nl;\n\t\t$_cstr .= '<table width=\"100%\" cellspacing=\"0\" cellpadding=\"5\" border=\"0\">'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_To'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_select_list_mail_contacts('mc_id', $adata['mc_id'], 1);\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Name'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT name=\"mc_name\" size=\"30\" maxlength=\"50\" value=\"'.htmlspecialchars($adata['mc_name']).'\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Email'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT name=\"mc_email\" size=\"30\" maxlength=\"50\" value=\"'.htmlspecialchars($adata['mc_email']).'\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT name=\"mc_subj\" size=\"30\" maxlength=\"50\" value=\"'.htmlspecialchars($adata['mc_subj']).'\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left_vtop.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\tIF ($_CCFG['WYSIWYG_OPEN']) {$_cols = 120;} ELSE {$_cols = 80;}\n\t\t$_cstr .= '<TEXTAREA class=\"PSML_NL\" NAME=\"mc_msg\" COLS=\"'.$_cols.'\" ROWS=\"15\">'.$adata['mc_msg'].'</TEXTAREA>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t# Captcha if \"GD\" is loaded\n\t\tIF (extension_loaded('gd') && file_exists(PKG_PATH_ADDONS.'captcha')) {\n\t\t\t$_cstr .= '<tr>'.$_nl;\n\t\t\t$_cstr .= $_td_str_left_vtop.$_sp.'</td>'.$_nl;\n\t\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t\t$_cstr .= $_LANG['_MAIL']['SC_Instruct'].$_nl;\n\t\t\t$_cstr .= '</td>'.$_nl;\n\t\t\t$_cstr .= '</tr>'.$_nl;\n\t\t\t$_cstr .= '<tr>'.$_nl;\n\t\t\t$_cstr .= $_td_str_left_vtop.$_sp.'</td>'.$_nl;\n\t\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t\t$_cstr .= '<img src=\"'.PKG_URL_ADDONS.'captcha/CaptchaSecurityImages.php\">'.$_nl;\n\t\t\t$_cstr .= '</td>'.$_nl;\n\t\t\t$_cstr .= '</tr>'.$_nl;\n\t\t\t$_cstr .= '<tr>'.$_nl;\n\t\t\t$_cstr .= $_td_str_left_vtop.$_nl;\n\t\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Security_Code'].$_sp.'</b>'.$_nl;\n\t\t\t$_cstr .= '</td>'.$_nl;\n\t\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t\t$_cstr .= '<input class=\"PSML_NL\" id=\"security_code\" name=\"security_code\" type=\"text\" value=\"'.htmlspecialchars($adata['security_code']).'\">'.$_nl;\n\t\t\t$_cstr .= '</td>'.$_nl;\n\t\t\t$_cstr .= '</tr>'.$_nl;\n\t\t}\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<INPUT TYPE=hidden name=\"stage\" value=\"1\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_email', 'SUBMIT', $_LANG['_MAIL']['B_Send_Email'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= '</tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</form>'.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr \t\t= ''.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t# Return / Echo Final Output\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "function liveitchina_user_connectivity_form($requestee, $relationship){\n $recipients = array($requestee);\n module_load_include('pages.inc','privatemsg');\n \n $form = drupal_get_form('privatemsg_new',$recipients,'');\n \n $form['recipient']['#input'] = false;\n $form['recipient']['#prefix'] = '<div class = \"block-remove-recipient\" style=\"display:none\">';\n $form['recipient']['#suffix'] = '</div>';\n\n $form['reply']['#markup'] = '<div class = \"block-title-highlight\"><div> <h7>Here you will find the greatest tools for mutual learning with your Tutor / Exchange Partner.</h7></div><div><h7> Stay Tuned!</h7></div></div>';\n $form['reply']['#weight'] = '-100';\n \n drupal_set_title('My Tutor/Exchange Partner');\n //print_r($form);\n return $form;\n}", "function do_contact_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Get contact information array\n\t\t$_cinfo = get_contact_info($adata['mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t= $_cinfo['c_email'];\n\t\t\t$mail['from']\t= $adata['mc_email'];\n\t\t\tIF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc']\t= $adata['mc_email'];}\n\t\t} ELSE {\n\t\t\t$mail['recip']\t= $_cinfo['c_name'].' <'.$_cinfo['c_email'].'>';\n\t\t\t$mail['from']\t= $adata['mc_name'].' <'.$adata['mc_email'].'>';\n\t\t\tIF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc']\t= $adata['mc_name'].' <'.$adata['mc_email'].'>';}\n\t\t}\n\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].'- Contact Message';\n\n\t# Grab ip_address of sender\n\t\tIF (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {\n\t\t\t$pos = strpos(strtolower($_SERVER['HTTP_X_FORWARDED_FOR']), '192.168.');\n\t\t\tIF ($pos === FALSE) {\n\t\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t} ELSE {\n\t\t\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t\t}\n\t\t} ELSE {\n\t\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\t$_MTP['to_name']\t= $_cinfo['c_name'];\n\t\t$_MTP['to_email']\t= $_cinfo['c_email'];\n\t\t$_MTP['from_name']\t= $adata['mc_name'];\n\t\t$_MTP['from_email']\t= $adata['mc_email'];\n\t\t$_MTP['subject']\t= $adata['mc_subj'];\n\t\t$_MTP['message']\t= $adata['mc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\t\t$_MTP['sender_ip']\t= $ip;\n\t\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Set flood control values in session\n\t\t$sdata['set_last_contact'] = 1;\n\t\t$_sret = do_session_update($sdata);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CS_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_03_L1'];\n\t\t\t$_ret_msg .= $_sp.$_LANG['_MAIL']['CS_FORM_MSG_03_L2'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CS_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "function wpsp_send_tour_inquiry() {\n\t\n\tparse_str ($_POST['tours'], $inquiry_info);\n\t\n\twpsp_email_notify( $inquiry_info, true, false ); //confirm to operator\n\twpsp_email_notify( $inquiry_info, false, false ); //confirm to traveller\n\t\n\tdie();\n}", "function send_anon() {\n\n $input = $_POST['feedback'];\n $about = $_POST['about'];\n $relation = $_POST['relation'];\n\n\n\t\t$options = get_option('id_settings');\n $receiver = $options['id_anonymous_email_addresses_field'];\n\n\t\t$subject = 'Anonymous input form website';\n\n $body = \"<i>Sent using the contact form at \" . get_site_url() . \"</i>\" .\n \"<br><br>\" . esc_html($input) .\n \"<br><br>About: \" . esc_html($about) .\n \"<br><br>Relation: \" . esc_html($relation);\n\n\t\t$sender = \"Anonymous <[email protected]>\";\n\n\n\n return send_mail($receiver, $subject, $body, $sender);\n\n }", "function _todoist_config_form_submit($form, $form_state) {\n if ($form_state['values']['user_mail'] && $form_state['values']['user_pass']) {\n if (!valid_email_address($form_state['values']['user_mail'])) {\n form_set_error('submitted][user_mail', t('The email address appears to be invalid.'));\n }\n else {\n variable_set('todoist_userid', $form_state['values']['user_mail']);\n variable_set('user_pass', $form_state['values']['user_pass']);\n variable_set('user_token', $form_state['values']['user_token']);\n drupal_set_message(t('Your configuration has been saved.'));\n $form_state['rebuild'] = TRUE;\n }\n }\n}", "function send_AJAX_mail_before_submit() {\n\t\t\t\n\t\t\t$to = get_option('admin_email');\n\t\t\t$form_fields = $_POST['whatever'];\n\t\t\t\n\t\t\t$subject = 'E-mail sent through Minimal Form on '.get_site_url();\n\t\t\t$message = 'Got this response from a visitor through Minimal Form on your site:'.\"\\r\\n \\r\\n\";\n\t\t\t\n\t\t\tforeach($form_fields as $key => $value){\n\t\t\t\t$message .= $key.': '.$value.\"\\r\\n\";\n\t\t\t}\n\t\t\t\n\t\t\tcheck_ajax_referer('my_email_ajax_nonce');\n\t\t\tif (isset($_POST['action']) && $_POST['action'] == \"mail_before_submit\") {\n\t\t\t\t// send email \n\t\t\t\twp_mail( $to, $subject, $message, $headers, $attachments );\n\t\t\t}\n\t\t}", "public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }", "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 doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "protected function _childValidation() {\n\n\t\t$languages = Language::getLanguages(true);\n\n\t\t// if action == 'message', related message required\n\n\t\tif (Tools::getValue('action_sender') === 'message') {\n\n\t\t\tforeach ($languages as $language) {\n\t\t\t\t$value = Tools::getValue('message_sender_' . $language['id_lang']);\n\n\t\t\t\tif (empty($value)) {\n\t\t\t\t\t$this->errors[] = $this->la('Please indicate a message to send to the sender.');\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// if action == 'message', related message required\n\n\t\tif (Tools::getValue('action_admin') === 'message') {\n\n\t\t\tforeach ($languages as $language) {\n\t\t\t\t$value = Tools::getValue('message_admin_' . $language['id_lang']);\n\n\t\t\t\tif (empty($value)) {\n\t\t\t\t\t$this->errors[] = $this->la('Please indicate the message to send to the admin(s).');\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// check every admin email,\n\t\t$send_mail_to = Tools::getValue('send_mail_to');\n\n\t\tif (empty($send_mail_to)) {\n\t\t\t$this->errors[] = $this->la('\"Send form to\" field is required.');\n\t\t} else {\n\t\t\t$emails = explode(',', Tools::getValue('send_mail_to'));\n\n\t\t\tforeach ($emails as $email) {\n\t\t\t\t$email = trim($email);\n\n\t\t\t\tif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t$this->errors[] = $this->la('Invalid email provided in \"Send form to\". (Please separate emails with a comma)');\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t$fields = [];\n\n\t\tforeach (PFGFieldModel::findFields(Tools::getValue('id_pfg')) as $field) {\n\t\t\t$fields[] = $field['name'];\n\t\t}\n\n\t\tforeach (['subject_sender', 'subject_admin', 'success', 'message_sender', 'message_admin'] as $variable_name) {\n\n\t\t\tforeach ($languages as $language) {\n\t\t\t\t$matches = [];\n\n\t\t\t\tpreg_match_all('/(\\{\\$([a-z0-9_]+)(\\[\\])?\\})/', Tools::getValue($variable_name . '_' . $language['id_lang']), $matches, PREG_SET_ORDER);\n\n\t\t\t\tif (count($matches) > 0) {\n\t\t\t\t\t$matches = $this->pregMatchReorder($matches);\n\n\t\t\t\t\tforeach ($matches as $match) {\n\n\t\t\t\t\t\tif (!in_array($match, $fields)) {\n\t\t\t\t\t\t\t$this->errors[] = sprintf($this->la('Invalid variable \"%s\". This name does not exists. (You need to create the field first)'), $match);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "function mark_receiving_message($submit_mark_form, $state_check_mail_option){\n\t\tif( isset($_POST[$submit_mark_form]) ){\n\t\t\tif( !empty($_POST[$state_check_mail_option]) ){\n\t\t\t\tuser::update_sending_mail_message($_POST[$state_check_mail_option]);\n\t\t\t\theader(\"location: ../../basic_info.php\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$checkbox_insert = 0;\n\t\t\t\tuser::update_sending_mail_message($checkbox_insert);\n\t\t\t\theader(\"location: ../../basic_info.php\");\n\t\t\t}\n\n\t\t}\n\t}", "function mme_display_form() {\n\tif( isset($_POST['send']) ) {\n\t\t$emailstring = $_POST['emails'];\n\t\t$emails = explode( ',', $emailstring );\n\t\t//print_r($emails);\n\t\tforeach($emails as $email){\n\t\t\t$iserror = mme_checkemail( $email );\n\t\t}\n\t\t\tif($iserror) {\n\t\t\tmme_addemail( $emailstring );\n\t\t\tmme_success_notice();\n\t\t}\n\t}\n\t?>\n\t<form method=\"POST\" name=\"mailform\" action=\"#\">\n\t\t<style>\n\t\t\tdiv{\n\t\t\t\tmargin-left:15px;\n\t\t\t\tmargin-top: 10px;\n\t\t\t}\n\t\t\t\n\t\t\tdiv#metavalue{\n \t\t\twidth : 50%;\n \n\t\t\t}\n\t\t</style>\n\t\t<div>Enter the Email address</div>\n\t\t<div><input type = \"text\" id =\"metavalue\" name=\"emails\" /></div>\n\t\t<div class = \"buttons\">\n\t\t\t<input type=\"submit\" value=\"Save\" name=\"send\" class=\"button button-primary button-large\"/>\n\t\t\t<input type=\"reset\" value=\"Cancel\" name=\"cancel\"/>\n\t\t</div>\n\n\t</form>\n\t<?php\n}", "function execute()\n\t{\n\t\t$this->obj_form = New form_input;\n\t\t$this->obj_form->formname = \"customer_portal\";\n\t\t$this->obj_form->language = $_SESSION[\"user\"][\"lang\"];\n\n\t\t$this->obj_form->action = \"customers/portal-process.php\";\n\t\t$this->obj_form->method = \"post\";\n\t\t\n\n\t\t// general customer details\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"code_customer\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\t\t\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"name_customer\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\t\t// passwords\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"]\t\t= \"password_message\";\n\t\t$structure[\"type\"]\t\t= \"message\";\n\t\t$structure[\"defaultvalue\"]\t= \"<i>Only input a password if you wish to change the existing one.</i>\";\n\t\t$this->obj_form->add_input($structure);\n\t\t\n\t\t\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"]\t\t= \"password\";\n\t\t$structure[\"type\"]\t\t= \"password\";\n\t\t$this->obj_form->add_input($structure);\n\t\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"]\t\t= \"password_confirm\";\n\t\t$structure[\"type\"]\t\t= \"password\";\n\t\t$this->obj_form->add_input($structure);\n\t\n\t\t\n\t\t\n\t\t// last login information\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"]\t\t= \"login_time\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"]\t\t= \"login_ipaddress\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\n\n\t\t// submit section\n\t\tif (user_permissions_get(\"customers_write\"))\n\t\t{\n\t\t\t$structure = NULL;\n\t\t\t$structure[\"fieldname\"] \t= \"submit\";\n\t\t\t$structure[\"type\"]\t\t= \"submit\";\n\t\t\t$structure[\"defaultvalue\"]\t= \"Save Changes\";\n\t\t\t$this->obj_form->add_input($structure);\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$structure = NULL;\n\t\t\t$structure[\"fieldname\"] \t= \"submit\";\n\t\t\t$structure[\"type\"]\t\t= \"message\";\n\t\t\t$structure[\"defaultvalue\"]\t= \"<p><i>Sorry, you don't have permissions to make changes to customer records.</i></p>\";\n\t\t\t$this->obj_form->add_input($structure);\n\t\t}\n\n\n\t\t// hidden\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"id_customer\";\n\t\t$structure[\"type\"]\t\t= \"hidden\";\n\t\t$structure[\"defaultvalue\"]\t= $this->obj_customer->id;\n\t\t$this->obj_form->add_input($structure);\n\t\t\t\t\t\n\t\t\n\t\t// define subforms\n\t\t$this->obj_form->subforms[\"customer_view\"]\t\t= array(\"code_customer\", \"name_customer\");\n\t\t$this->obj_form->subforms[\"customer_portal_history\"]\t= array(\"login_time\", \"login_ipaddress\");\n\t\t$this->obj_form->subforms[\"customer_portal_password\"]\t= array(\"password_message\", \"password\", \"password_confirm\");\n\t\t$this->obj_form->subforms[\"hidden\"]\t\t\t= array(\"id_customer\");\n\n\t\tif (user_permissions_get(\"customers_write\"))\n\t\t{\n\t\t\t$this->obj_form->subforms[\"submit\"]\t\t= array(\"submit\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->obj_form->subforms[\"submit\"]\t\t= array();\n\t\t}\n\n\t\t\n\t\t// fetch the form data\n\t\t$this->obj_customer->load_data();\n\n\t\t$this->obj_form->structure[\"code_customer\"][\"defaultvalue\"]\t\t= $this->obj_customer->data[\"code_customer\"];\n\t\t$this->obj_form->structure[\"name_customer\"][\"defaultvalue\"]\t\t= $this->obj_customer->data[\"name_customer\"];\n\t\t$this->obj_form->structure[\"login_time\"][\"defaultvalue\"]\t\t= $this->obj_customer->data[\"portal_login_time\"];\n\t\t$this->obj_form->structure[\"login_ipaddress\"][\"defaultvalue\"]\t\t= $this->obj_customer->data[\"portal_login_ipaddress\"];\n\n\n\t\tif (error_check())\n\t\t{\n\t\t\t$this->obj_form->load_data_error();\n\t\t}\n\n\t}", "public function execute()\n {\n $post = $this->getRequest()->getPostValue();\n if (!$post) {\n $this->_redirect('*/*/');\n return;\n }\n $this->inlineTranslation->suspend();\n try {\n $postObject = new \\Magento\\Framework\\DataObject();\n $postObject->setData($post);\n\n $error = false;\n\n /* validate-checking */\n if (!\\Zend_Validate::is(trim($post['name']), 'NotEmpty')) {\n $error = true;\n }\n \n if (!\\Zend_Validate::is(trim($post['comment']), 'NotEmpty')) {\n $error = true;\n }\n\n if (!\\Zend_Validate::is(trim($post['email']), 'EmailAddress')) {\n $error = true;\n }\n\n /**\n * setting custome param\n * add new elements : product_name & product_sku information\n */\n if (array_key_exists('product_name', $post) && array_key_exists('product_sku', $post)) {\n if (!\\Zend_Validate::is(trim($post['product_name']), 'NotEmpty')) {\n $error = true;\n }\n\n if (!\\Zend_Validate::is(trim($post['product_sku']), 'NotEmpty')) {\n $error = true;\n }\n }\n\n /* this column, hideit, is not so sure for using during this process, so I close it temporarily....\n if (!\\Zend_Validate::is(trim($post['hideit']), 'NotEmpty')) {\n $error = true;\n }*/\n\n if ($error) {\n throw new \\Exception(); //todo\n }\n\n /* Transport email to user */\n $storeScope = \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE;\n $transport = $this->_transportBuilder\n ->setTemplateIdentifier($this->scopeConfig->getValue(self::XML_PATH_EMAIL_TEMPLATE, $storeScope))\n ->setTemplateOptions(\n [\n 'area' => \\Magento\\Backend\\App\\Area\\FrontNameResolver::AREA_CODE,\n 'store' => \\Magento\\Store\\Model\\Store::DEFAULT_STORE_ID,\n ]\n )\n ->setTemplateVars(['data' => $postObject])\n ->setFrom($this->scopeConfig->getValue(self::XML_PATH_EMAIL_SENDER, $storeScope))\n ->addTo($this->scopeConfig->getValue(self::XML_PATH_EMAIL_RECIPIENT, $storeScope))\n ->setReplyTo($post['email'])\n ->getTransport();\n\n $transport->sendMessage();\n $this->inlineTranslation->resume();\n $this->messageManager->addSuccess(\n __('Hi there, this is Optoma, and thanks for your contacting with us about your questions by nice information, and we will notify you very soon, see you next time~')\n );\n\n /* redirect to new page :: pending */\n $this->_redirect('contact/index');\n return;\n } catch (\\Exception $e) {\n /* Error Log should be noted here */\n $this->inlineTranslation->resume();\n $this->messageManager->addError(\n __('Hi there, this is Optoma, so sorry for that we just cant\\'t process your request right now, please wait a minutes and we will contact y ou very soon~')\n );\n $this->_redirect('contact/index');//todo\n return;\n }\n }", "function submit_batch_form($cmd=null,$encode=null) {\n\t $mybatch_id = GetReq('batchid');\n\t $bid = $mybatch_id?($mybatch_id+1):1; \n\t \n\t $mail_text = $encode?encode(GetParam('mail_text')):GetParam('mail_text');\n\t \n $mycmd = $cmd?$cmd:'cpsubsend';\n\t \n $filename = seturl(\"t=$mycmd&batchid=\".$bid);\t \n\t \n $out .= setError($sFormErr . $this->mailmsg);\t \n \n\t //params form\n $out .= \"<FORM action=\". \"$filename\" . \" method=post class=\\\"thin\\\">\";\n $out .= \"<FONT face=\\\"Arial, Helvetica, sans-serif\\\" size=1>\"; \t\t\t \t \n\t\t \t\t \n $out .= \"<input type=\\\"hidden\\\" name=\\\"FormName\\\" value=\\\"$mycmd\\\">\"; \t\n $out .= \"<input type=\\\"hidden\\\" name=\\\"from\\\" value=\\\"\".GetParam('from').\"\\\">\"; \t\t\t \n $out .= \"<input type=\\\"hidden\\\" name=\\\"to\\\" value=\\\"\".GetParam('to').\"\\\">\"; \t\n $out .= \"<input type=\\\"hidden\\\" name=\\\"subject\\\" value=\\\"\".GetParam('subject').\"\\\">\";\n $out .= \"<input type=\\\"hidden\\\" name=\\\"batchrestore\\\" value=\\\"\".GetParam('batchrestore').\"\\\">\";\t \n\t \t\t\t \n $out .= \"<DIV class=\\\"monospace\\\"><TEXTAREA style=\\\"width:100%\\\" NAME=\\\"mail_text\\\" ROWS=10 cols=60 wrap=\\\"virtual\\\">\";\n\t $out .= GetParam('mail_text');\t\t \n $out .= \"</TEXTAREA></DIV>\";\n\t \n $out .= \"<input type=\\\"hidden\\\" name=\\\"includesubs\\\" value=\\\"\".GetParam('includesubs').\"\\\">\"; \t\t\t \n $out .= \"<input type=\\\"hidden\\\" name=\\\"includeall\\\" value=\\\"\".GetParam('includeall').\"\\\">\"; \t\n $out .= \"<input type=\\\"hidden\\\" name=\\\"smtpdebug\\\" value=\\\"\".GetParam('smtpdebug').\"\\\">\";\t\t\t \n\t \t \n $out .= \"<input type=\\\"hidden\\\" name=\\\"batch\\\" value=\\\"\".$this->batch.\"\\\">\"; \t\t\t \t\t \n $out .= \"<input type=\\\"hidden\\\" name=\\\"refresh\\\" value=\\\"\".$this->auto_refresh.\"\\\">\";\t\t \t \t\t \t \n\t \n $out .= \"<input type=\\\"hidden\\\" name=\\\"FormAction\\\" value=\\\"$mycmd\\\">&nbsp;\";\t\t\t\n\t\t\t\n $out .= \"<input type=\\\"submit\\\" name=\\\"Submit\\\" value=\\\"Next batch....\\\">\";\t\t\n $out .= \"</FONT></FORM>\"; \t \t\n\t\t\n\t /*$wina = new window($this->title,$out);\n\t $winout .= $wina->render(\"center::$mywidth::0::group_dir_body::left::0::0::\");\n\t unset ($wina);*/\n\t\t\n\t return ($out); \t\t \t\t\n\t}" ]
[ "0.66276455", "0.61581016", "0.5938527", "0.5897783", "0.5866448", "0.5853859", "0.58205533", "0.58067596", "0.5743528", "0.5680408", "0.5651138", "0.5625145", "0.56122077", "0.55932206", "0.55690867", "0.5562007", "0.5514937", "0.5509014", "0.5488347", "0.5484681", "0.5482737", "0.5454795", "0.5448598", "0.54472446", "0.54400176", "0.5412353", "0.54045093", "0.53886485", "0.5383396", "0.53560203", "0.5354554", "0.5350533", "0.5350019", "0.5349696", "0.5345828", "0.5331665", "0.53197145", "0.5311338", "0.5310007", "0.52957004", "0.5290995", "0.5289051", "0.52700555", "0.52626693", "0.5260604", "0.523379", "0.52296525", "0.5227819", "0.52262884", "0.5224395", "0.5210913", "0.52076983", "0.52052695", "0.5199381", "0.5194453", "0.5172826", "0.51727146", "0.51714694", "0.51621425", "0.51618254", "0.51587546", "0.5157119", "0.5155159", "0.51535404", "0.5150977", "0.5148281", "0.5135197", "0.51298994", "0.51246154", "0.51147634", "0.5102103", "0.5101892", "0.5101184", "0.5101141", "0.5099548", "0.509806", "0.5085846", "0.50847805", "0.5082732", "0.5078923", "0.5071792", "0.50703394", "0.50655144", "0.5063691", "0.50608176", "0.50525427", "0.50466186", "0.50445735", "0.5042098", "0.50414515", "0.5037065", "0.5037", "0.5035299", "0.50348324", "0.50255847", "0.50209826", "0.50203234", "0.5014574", "0.5014277", "0.5012269" ]
0.54898876
18
Returns a list of previously created metadata postcard records for this page from the session these are output on the page so the user can see a history of records they have added this session.
public function PreviouslyCreatedRecords() { $createdRecords = new ArrayList(); // Only if we are to display the records added this session then get the info for that. if ($this->DisplayRecordList) { $records = Session::get('PostcardRecordsCreated_' . $this->ID); if ($records) { foreach($records as $record) { $createdRecords->push(ArrayData::create( array('Link' => $record) )); } } } return $createdRecords; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getCollectedRecords() {}", "protected function getCollectedRecords() {}", "protected function getCollectedRecords() {}", "function getRecords() {\n\t\treturn $this->records;\n\t}", "public function getMetadatas()\n {\n $matadata = new Cms_Model_Application_Page_Metadata();\n $results = $matadata->findAll(array('page_id' => $this->getPageId()));\n $this->_metadata = array();\n foreach ($results as $result) {\n array_push($this->_metadata, $result);\n }\n return $this->_metadata;\n }", "public function getRecords()\n {\n return $this->records;\n }", "public function getRecords()\n {\n return $this->records;\n }", "public function getStoredCards() {\n // TODO get from model or user select\n $customerId = 2;\n\n return $this->paymentTokenManagement->getListByCustomerId($customerId);\n }", "public function records() { return $this->_m_records; }", "public function records() {\n if( ! property_exists($this->response(), 'records') ) return [];\n\n return $this->response()->records;\n }", "public function getRecords()\n\t{\n\t\treturn $this->records['data'];\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function contents() {\n return Session::get_all();\n }", "function getARecords() {\n\t\t$arecords = array();\n\t\tif ( isset( $this->hostInfo[0]['arecord'] ) ) {\n\t\t\t$arecords = $this->hostInfo[0]['arecord'];\n\t\t\tarray_shift( $arecords );\n\t\t}\n\n\t\treturn $arecords;\n\t}", "public function records() : array {\n return $this->records;\n }", "public function get_all_session()\n\t\t{\n\t\t\treturn parent::get_all_items('session_items');\n\t\t}", "public function getAllMemberCards()\n {\n \n $query = \"SELECT MID, LoyaltyCardNumber FROM transactionsummary ORDER BY LoyaltyCardNumber ASC\";\n \n return parent::RunQuery($query);\n }", "public function getPageDetails()\n\t{\n\t\t$v = new View(0);\n\t\treturn $v->getAllRecords( FALSE );\n\t\t\n\t}", "public function all()\n {\n return $this->getCartSession();\n }", "public function getPaymentHistory(){\r\n\t\t$result = array();\r\n\t\treturn $result;\r\n\t}", "function retrive_history_details_for_single_pfac_in_preview($pfac_id, $params){\n\t\n\t\tglobal $connection;\n\t\t$sql = \"SELECT * FROM pfac__players_history WHERE PFAC_id = {$pfac_id}\";\n\t\treturn DBFunctions::result_to_array_for_few_fields(DBFunctions::execute_query($sql), $params);\t\t\t\t\n\t}", "public function getUserCards()\n {\n // Get the customer id\n $customerId = $this->adminQuote->getQuote()->getCustomer()->getId();\n\n // Return the cards list\n return $this->vaultHandler->getUserCards($customerId);\n }", "function getRedCards()\n\t{\n\t\t$data = array();\t\t\n\t\t$r_query = 'SELECT username, users.user_id FROM rcards, users '.\n\t\t\t\t\t'WHERE rcards.report_id = '.$this->id.' '.\n\t\t\t\t\t'AND rcards.user_id = users.user_id';\n\t\t$r_result = mysql_query($r_query)\n\t\t\tor die(mysql_error());\n\t\t\n\t\twhile ($r_row = mysql_fetch_array($r_result))\n\t\t{\n\t\t\t$data[] = array('link'=>'viewprofile.php?action=view&amp;uid='.$r_row['user_id'],\n\t\t\t\t\t\t\t\t'name'=>$r_row['username'],\n\t\t\t\t\t\t\t\t'id'=>$r_row['user_id']);\n\t\t}\n\t\treturn $data;\n\t}", "function getListOfRecords(){\n // the orders will be display and the receipts from there \n \n $element = new Order();\n \n $receipts_filter_orders = cisess(\"receipts_filter_orders\");\n \n if ($receipts_filter_orders===FALSE){\n $receipts_filter_orders = \"Abierta\"; // default to abiertas\n }\n \n if (!empty($receipts_filter_orders))\n {\n $element->where(\"status\",$receipts_filter_orders);\n }\n \n \n $element->order_by(\"id\",\"desc\");\n \n $all = $element->get()->all;\n //echo $element->check_last_query();\n ///die();\n $table = $this->entable($all);\n \n return $table;\n \n \n }", "function getRecords($pupil_id){\r\n\t\t$data = array('massive'=>array('Data','Dump'));\r\n\treturn $data;\r\n\t}", "public function getPersonalRecords() {\n\t\tif(!$data = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/personal_records.jsp?_plus=true')) {\n\t\t\tthrow new Exception($this->feedErrorMessage);\n\t\t}\n\t\treturn $data;\n\t}", "public static function getList()\n {\n return static::with(['customer', 'media'])->paginate(10);\n }", "public function getHistory()\n {\n \treturn QuizResult::where('user_id', '=', Auth::user()->id)->orderBy('id', 'DESC')->limit(5)->get();\n }", "function showRecordsOnMap () {\n\t\t$template['list'] = $this->cObj->getSubpart($this->templateCode,'###TEMPLATE_RECORDSONMAP###');\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['recordsOnMap.']['LL'], 'recordsonmap');\n\n\t\t$content = $this->cObj->substituteMarkerArrayCached($template['list'],$markerArray);\n\t\treturn $content;\n\t}", "public function collect()\n {\n return $this->session->all();\n }", "public function ListarMediosPagos()\n{\n\tself::SetNames();\n\t$sql = \" select * from mediospagos\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "public function recharge_list(){\n $recharge_log_where['user_id'] = ['eq',$this->user_id];\n $p = I('p/d',1);\n $page_last = 7;\n $count = M('recharge')->where($recharge_log_where)->count();\n $withdrawals_log = M('recharge')->where($recharge_log_where)\n ->order('order_id desc')\n ->page(\"{$p},{$page_last}\")\n ->select();\n $Page = new Page($count,$page_last);\n $Page->rollPage = 2;\n $page = $Page->show(); \n $this->assign('lists',$withdrawals_log);\n $this->assign('page', $page);\n \treturn $this->fetch();\n }", "public function cardList()\n {\n // $pageIndex = 0;\n // $pageSize = 20;\n $pageIndex = I('get.pageIndex');\n $pageSize = I('get.pageSize');\n $where = I('get.where');\n $orderBy = I('get.orderBy');\n\n $where = htmlspecialchars_decode($where);\n\n $data = array(\n \"userAccount\" => self::USERACCOUNT,\n \"pageIndex\" => $pageIndex,\n \"pageSize\" => $pageSize,\n \"where\" => $where,\n \"orderBy\" => $orderBy,\n );\n $response_data = $this->client->CallHttpPost(\"Get_MembersPagedV2\", $data);\n $this->ajaxReturn($response_data);\n }", "protected function fetchStorageRecords() {}", "public function get_history()\n {\n return view('content.history')\n ->with('pages', History::page_all())\n ->with('pdfs', History::pdf_all());\n }", "function getSavedMetadata(){\n\t\t \n\t\t $db = $this->startDB();\n\t\t \n\t\t $sql = \"SELECT *\n\t\t FROM export_tabs_meta\n\t\t WHERE source_id = '\".$this->penelopeTabID.\"'\n\t\t LIMIT 1;\n\t\t \";\n\t\t \n\t\t $result = $db->fetchAll($sql);\n\t\t if($result){\n\t\t\t\t\n\t\t\t\tif(strlen($result[0][\"tableID\"])>1){\n\t\t\t\t\t $this->tableID = $result[0][\"tableID\"];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t $this->tableID = false;\n\t\t\t\t}\n\t\t\t\t$this->tablePage = $result[0][\"page\"] +0 ;\n\t\t\t\tif($this->tablePage > 0 || strstr($this->tableID, \"/\")){\n\t\t\t\t\t if(strlen($result[0][\"tableGroupID\"])>1){\n\t\t\t\t\t\t $this->tableGroupID = $result[0][\"tableGroupID\"];\n\t\t\t\t\t }\n\t\t\t\t\t else{\n\t\t\t\t\t\t $tabIDex = explode(\"/\", $this->tableID);\n\t\t\t\t\t\t $this->tableGroupID = $tabIDex[0];\n\t\t\t\t\t\t $this->tablePage = $tabIDex[1];\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t $this->tableGroupID = $this->tableID;\n\t\t\t\t}\n\t\t \n\t\t\t\t$this->published = $result[0][\"published\"];\n\t\t\t\t$this->publishedURI = $result[0][\"publishedURI\"];\n\t\t\t\tif($this->published){\n\t\t\t\t\t $this->pubCreated = $result[0][\"pub_created\"];\n\t\t\t\t\t $this->pubUpdate = $result[0][\"pub_update\"];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t if(substr($result[0][\"pub_created\"],0,4) != \"0000\"){\n\t\t\t\t\t\t $this->pubCreated = $result[0][\"pub_created\"];\n\t\t\t\t\t }\n\t\t\t\t\t else{\n\t\t\t\t\t\t $this->pubCreated = false;\n\t\t\t\t\t }\n\t\t\t\t\t $this->pubUpdate = true;\n\t\t\t\t}\n\t\t\t\t$metadataJSON = $result[0][\"metadata\"];\n\t\t\t\t@$metadata = Zend_Json::decode($metadataJSON);\n\t\t\t\tif(is_array($metadata)){\n\t\t\t\t\t $metadata[\"tableID\"] = $this->tableID;\n\t\t\t\t\t $this->metadata = $metadata;\n\t\t\t\t\t $this->checkSavedFiles();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t $this->autoMetadataOnly();\n\t\t\t\t\t \n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t }\n\t\t else{\n\t\t\t\treturn false;\n\t\t }\n\t }", "public function sessions() {\n return $this->rich_model->get_sessions();\n // return $this->rich_model->get_mikrotik_sessions();\n }", "function getVisitRecords($customer_id) {\n\n $history = array();\n $sql = \"SELECT \n id,\n detail, \n place, \n time \n FROM \n customer_visit_history \n WHERE \n customer_id=? \n ORDER BY \n create_time DESC\";\n \n $result = $this->db->queryAll($sql, array($customer_id));\n\n foreach($result as $visit) {\n $record = array();\n $record['time'] = $visit['time'];\n $record['content'] = $visit['detail'];\n array_push($history, $record);\n }\n \n return $history;\n }", "public function fetchSessionData() {}", "public function getReplays()\n {\n $sql = \"\n SELECT *\n FROM games \n ORDER BY id DESC LIMIT 20\n \";\n\n $data = $this->db->exec($sql);\n\n //remove all previous replays\n if ($data && count($data) == 20)\n {\n $last = end($data);\n $sql = \"\n DELETE \n FROM games \n WHERE id < {$last['id']}\n \";\n $this->db->exec($sql);\n }\n\n return $data;\n }", "public function getPostCashMonitoringList()\n {\n //\n $assessments=PostCashAssessment::all();\n $iTotalRecords =count(PostCashAssessment::all());\n $sEcho = intval(10);\n\n $records = array();\n $records[\"data\"] = array();\n\n\n $count=1;\n foreach($assessments as $assessment) {\n\n $hai_reg_number=\"\";\n $full_name=\"\";\n $sex=\"\";\n $age=\"\";\n $camp_name=\"\";\n if(is_object($assessment->client) && $assessment->client != null){\n $hai_reg_number=$assessment->client->hai_reg_number;\n $full_name=$assessment->client->full_name;\n $sex=$assessment->client->sex;\n $age=$assessment->client->age;\n\n }\n if(is_object($assessment->camp) && $assessment->camp != null){\n $camp_name=$assessment->camp->camp_name;\n }\n if ($assessment->auth_status == \"pending\") {\n if (Auth::user()->can('authorize')) {\n $records[\"data\"][] = array(\n $count++,\n $assessment->interview_date,\n $assessment->enumerator_name,\n $assessment->organisation,\n $hai_reg_number,\n $full_name,\n $sex,\n $age,\n $camp_name,\n $assessment->auth_status,\n '<ul class=\"icons-list text-center\">\n <li class=\"dropdown\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"icon-menu9\"></i>\n </a>\n <ul class=\"dropdown-menu dropdown-menu-right\">\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"showRecord \"><i class=\"fa fa-eye \"></i> View </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\" \" onclick=\"printPage(\\''.url('print/post/cash/monitoring').'/'.$assessment->id.'\\');\" ><i class=\"fa fa-print \"></i> Print </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"'.url('download/pdf/post/cash/monitoring').'/'.$assessment->id.'\" class=\" \"><i class=\"fa fa-download\"></i> Download </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"authorizeRecord \"><i class=\"fa fa-check \"></i> Authorize </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"editRecord \"><i class=\"fa fa-pencil \"></i> Edit </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"deleteRecord \"><i class=\"fa fa-trash \"></i> Delete </a></li>\n </ul>\n </li>\n </ul>'\n );\n }\n elseif (Auth::user()->hasRole('inputer'))\n {\n $records[\"data\"][] = array(\n $count++,\n $assessment->interview_date,\n $assessment->enumerator_name,\n $assessment->organisation,\n $hai_reg_number,\n $full_name,\n $sex,\n $age,\n $camp_name,\n $assessment->auth_status,\n '<ul class=\"icons-list text-center\">\n <li class=\"dropdown\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"icon-menu9\"></i>\n </a>\n <ul class=\"dropdown-menu dropdown-menu-right\">\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"showRecord \"><i class=\"fa fa-eye \"></i> View </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\" \" onclick=\"printPage(\\''.url('print/post/cash/monitoring').'/'.$assessment->id.'\\');\" ><i class=\"fa fa-print \"></i> Print </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"'.url('download/pdf/post/cash/monitoring').'/'.$assessment->id.'\" class=\" \"><i class=\"fa fa-download\"></i> Download </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"editRecord \"><i class=\"fa fa-pencil \"></i> Edit </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"deleteRecord \"><i class=\"fa fa-trash \"></i> Delete </a></li>\n </ul>\n </li>\n </ul>'\n );\n }\n }\n else{\n if (Auth::user()->hasRole('admin'))\n {\n $records[\"data\"][] = array(\n $count++,\n $assessment->interview_date,\n $assessment->enumerator_name,\n $assessment->organisation,\n $hai_reg_number,\n $full_name,\n $sex,\n $age,\n $camp_name,\n $assessment->auth_status,\n '<ul class=\"icons-list text-center\">\n <li class=\"dropdown\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"icon-menu9\"></i>\n </a>\n <ul class=\"dropdown-menu dropdown-menu-right\">\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"showRecord \"><i class=\"fa fa-eye \"></i> View </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\" \" onclick=\"printPage(\\''.url('print/post/cash/monitoring').'/'.$assessment->id.'\\');\" ><i class=\"fa fa-print \"></i> Print </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"'.url('download/pdf/post/cash/monitoring').'/'.$assessment->id.'\" class=\" \"><i class=\"fa fa-download\"></i> Download </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"editRecord \"><i class=\"fa fa-pencil \"></i> Edit </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"deleteRecord \"><i class=\"fa fa-trash \"></i> Delete </a></li>\n </ul>\n </li>\n </ul>'\n );\n }\n else{\n $records[\"data\"][] = array(\n $count++,\n $assessment->interview_date,\n $assessment->enumerator_name,\n $assessment->organisation,\n $hai_reg_number,\n $full_name,\n $sex,\n $age,\n $camp_name,\n $assessment->auth_status,\n '<ul class=\"icons-list text-center\">\n <li class=\"dropdown\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"icon-menu9\"></i>\n </a>\n <ul class=\"dropdown-menu dropdown-menu-right\">\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"showRecord \"><i class=\"fa fa-eye \"></i> View </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\" \" onclick=\"printPage(\\''.url('print/post/cash/monitoring').'/'.$assessment->id.'\\');\" ><i class=\"fa fa-print \"></i> Print </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"'.url('download/pdf/post/cash/monitoring').'/'.$assessment->id.'\" class=\" \"><i class=\"fa fa-download\"></i> Download </a></li>\n </ul>\n </li>\n </ul>'\n );\n }\n }\n }\n\n\n $records[\"draw\"] = $sEcho;\n $records[\"recordsTotal\"] = $iTotalRecords;\n $records[\"recordsFiltered\"] = $iTotalRecords;\n\n echo json_encode($records);\n }", "public function getDashboardPanelRecords() {\n\t\t$isql=\"select i.item_name as prod_name, i.quantity as prod_qty from inventory i limit 5\";\t\t\n\t\t$iresult=$this->runQuery('getAll',$isql);\n\t\t\n\t\t$sosql=\"SELECT p.item_name as inv_name,so.customer_name,date(so.sell_date) as sell_date FROM sales_order so, inventory p where p.id = so.product_id limit 5\";\t\t\n\t\t$soresult=$this->runQuery('getAll',$sosql);\n\t\t\n\t\t$drsql=\"select count(prod_qty) as qty, date(sell_date) as date from sales_order group by sell_date\";\t\t\n\t\t$drresult=$this->runQuery('getAll',$drsql);\n\t\t\n\t\techo '[{\"topFiveInvList\":'.json_encode($iresult).',\"topFiveSalesList\":'.json_encode($soresult).',\"dailySalesGraph\":'.json_encode($drresult).'}]';\n\t}", "public function fetchRecords() {\n return self::all();\n }", "public function getStoredCards()\n {\n if (!$this->getData('stored_cards')) {\n $cards = array(); // Array to hold card objects\n \n $customer = $this->getCustomer();\n $cimGatewayId = $customer->getCimGatewayId();\n\n if (!$cimGatewayId) {\n if($this->isAdmin() && Mage::getModel('authorizenetcim/profile')->isAllowGuestCimProfile()) {\n $orderId = Mage::getSingleton('adminhtml/session_quote')->getOrderId();\n if (!$orderId) $orderId = Mage::getSingleton('adminhtml/session_quote')->getReordered();\n if (!$orderId) return false;\n $order = Mage::getModel('sales/order')->load($orderId);\n $payment = $order->getPayment();\n if ($payment) {\n $cimCustomerId = $payment->getData('authorizenetcim_customer_id');\n $cimPaymentId = $payment->getData('authorizenetcim_payment_id');\n }\n } else {\n return false;\n }\n }\n\n if ($cimGatewayId) {\n $cim_profile = Mage::getModel('authorizenetcim/profile')->getCustomerProfile($cimGatewayId);\n if ($cim_profile) {\n if (isset($cim_profile->paymentProfiles) && is_object($cim_profile->paymentProfiles)) {\n /**\n * The Soap XML response may be a single stdClass or it may be an\n * array. We need to adjust it to make it uniform.\n */\n if (is_array($cim_profile->paymentProfiles->CustomerPaymentProfileMaskedType)) {\n $payment_profiles = $cim_profile->paymentProfiles->CustomerPaymentProfileMaskedType;\n } else {\n $payment_profiles = array($cim_profile->paymentProfiles->CustomerPaymentProfileMaskedType);\n }\n }\n }\n } else {\n if ($cimCustomerId && $cimPaymentId) {\n $payment_profiles = array(Mage::getModel('authorizenetcim/profile')->getCustomerPaymentProfile($cimCustomerId, $cimPaymentId));\n } else {\n return false;\n }\n }\n\n if (isset($payment_profiles) && $payment_profiles) {\n // Assign card objects to array\n foreach ($payment_profiles as $payment_profile) {\n $card = new Varien_Object();\n $card->setCcNumber($payment_profile->payment->creditCard->cardNumber)\n ->setGatewayId($payment_profile->customerPaymentProfileId)\n ->setFirstname($payment_profile->billTo->firstName)\n ->setLastname($payment_profile->billTo->lastName)\n ->setAddress($payment_profile->billTo->address)\n ->setCity($payment_profile->billTo->city)\n ->setState($payment_profile->billTo->state)\n ->setZip($payment_profile->billTo->zip)\n ->setCountry($payment_profile->billTo->country);\n $cards[] = $card;\n }\n }\n \n if (!empty($cards)) {\n $this->setData('stored_cards', $cards);\n } else { \n $this->setData('stored_cards',false);\n }\n }\n \n return $this->getData('stored_cards');\n }", "public function dsp_all_record()\n {\n $record_type_id = get_post_var('hdn_record_type_id','');\n $member_id = get_post_var('sel_member','');\n \n $VIEW_DATA['arr_all_record'] = $this->model->qry_all_record($record_type_id,$member_id);\n $VIEW_DATA['arr_all_notice'] = $this->model->qry_all_notice($member_id);\n $VIEW_DATA['arr_all_member'] = $this->model->qry_all_member();\n \n $this->view->render('dsp_all_record',$VIEW_DATA);\n }", "public function showMeta()\n {\n $query = $this->pdo->prepare(\"SHOW META\");\n $query->execute();\n return $query->fetchAll();\n }", "public function get_user_history(){\n \t$s = \"SELECT * FROM user_history WHERE username = ? group by ETF order by Date ASC\";\n \tif($stmt = $this->connection->prepare($s)){\n \t\t$stmt->bind_param(\"s\", $_SESSION['username']);\n \t\t$stmt->execute();\n \t\t$res = $stmt->get_result();\n \t\twhile($row = $res->fetch_object()){\n \t\t\t$history[] = $row;\n \t\t}\n \t\treturn $history;\n \t}\n \t \t\n }", "protected function getPageData()\n {\n return [\n 'page_name' => 'latest_subscriptions'\n ];\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}", "protected function getDatastreamHistory() {\n return $this->repository->api->m->getDatastreamHistory($this->parent->id, $this->id);\n }", "public function getRecordList(Application $app)\n {\n $api_key = $app->locals['api_key'];\n $sql = 'SELECT * FROM records WHERE api_key = ? ORDER BY id LIMIT ' . (string)self::MAX_RECORDS;\n $records = $app->entryFormDb->query($sql, [$api_key]);\n return [\n 'most_recent_id' => max(array_merge([0], array_column($records, 'id'))),\n 'records' => $records,\n 'categories' => self::CATEGORIES,\n ];\n }", "public function get_instances() { \n\n\t\t$sql = \"SELECT * FROM `localplay_mpd` ORDER BY `name`\"; \n\t\t$db_results = Dba::query($sql); \n\n\t\t$results = array(); \n\n\t\twhile ($row = Dba::fetch_assoc($db_results)) { \n\t\t\t$results[$row['id']] = $row['name']; \n\t\t} \n\n\t\treturn $results; \n\n\t}", "private function getRTSListing(){\n\t\t\t\t\n\t\t// gather movie data\n\t\t$movie_data = json_decode(json_encode((array) simplexml_load_string($this->get_data('http://72352.formovietickets.com:2235/showtimes.xml'))), 1);\n\n\t\treturn $movie_data;\t\t\t\t\t\n\t}", "protected function fetchRecords(): array\n {\n // Ascending update date is the ONLY way we can be sure to get all payments.\n\n $order = 'UpdatedDateUTC';\n\n return $this->accountingApi->getAccounts(\n $this->ifModifiedSince,\n $this->where,\n $order\n )->accounts;\n }", "public function getQueryRecords()\n {\n return $this->get(self::_QUERY_RECORDS);\n }", "public function get_records(){\n\t\t$records = array();\n\t\t$this->do_db();\n\t\t$tmps\t = $this->last_result;\n\t\t$db\t\t = $this->db;\n\t\twhile($record\t = $db->fetch_array($tmps)){\n\t\t\t$records[] = $record;\n\t\t}\n\t\treturn $records;\n\t}", "function metadata()\r\n {\r\n Cache::variable($this->metadata, function() {\r\n return (array)DB::object('userMetadataById', $this->id);\r\n });\r\n }", "public function showHistory()\n {\n return view('customer.purchase-history', ['cart_items' => Cart::where('user_id', auth()->user()->id)->where('checkout_id', '!=', null)->simplePaginate(10)]);\n }", "public function paymentHistory()\n {\n // if user is not logged in let him logged in or register\n if( ! Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n // get user's payment history\n $userPayments = Payment::OfStudent(Session::getCurrentUserID())->get();\n\n View::make('templates/front/payment-history.php',compact('userPayments'));\n }", "function getPages() {\n\t\t$sql = 'SELECT * FROM page WHERE vis = 1 ORDER BY psn';\n\t\t$qrh = mysqli_query($this->lnk, $sql);\n\t\t$i = 1;\n\t\t\n\t\t// iterate and extract data to be passed to view\n\t\twhile ( $res = mysqli_fetch_array($qrh)) {\n\t\t\t$results[] = array('id' => $res['id'],'name' => $res['nam']);\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn $results;\n\t\t\n\t}", "public function listAll() {\n\t\treturn $this->academic_session->where('status', 1)->pluck('name', 'id')->prepend(trans('select.academic_session'), '');\n\t}", "protected function getRecords()\n {\n $query = $this->prepareQuery();\n\n if ($this->showTree) {\n $records = $query->getNested();\n }\n elseif ($this->showPagination) {\n $method = $this->showPageNumbers ? 'paginate' : 'simplePaginate';\n $currentPageNumber = $this->getCurrentPageNumber($query);\n $records = $query->{$method}($this->recordsPerPage, $currentPageNumber);\n }\n else {\n $records = $query->get();\n }\n\n /**\n * @event backend.list.extendRecords\n * Provides an opportunity to modify and / or return the `$records` Collection object before the widget uses it.\n *\n * Example usage:\n *\n * Event::listen('backend.list.extendRecords', function($listWidget, $records) {\n * $model = MyModel::where('always_include', true)->first();\n * $records->prepend($model);\n * });\n *\n * Or\n *\n * $listWidget->bindEvent('list.extendRecords', function ($records) {\n * $model = MyModel::where('always_include', true)->first();\n * $records->prepend($model);\n * });\n *\n */\n if ($event = $this->fireSystemEvent('backend.list.extendRecords', [&$records])) {\n $records = $event;\n }\n\n return $this->records = $records;\n }", "protected final function fetchRecords()\n {\n $this->query->setLimit(\n (($this->parameters->getCurrentPage() - 1) * $this->parameters->getResultsPerPage()),\n $this->parameters->getResultsPerPage()\n );\n\n $this->data = $this->query->execute()->getAssociative();\n }", "public function comments_for_carddeck() {\n global $DB, $OUTPUT;\n $ufields = \\user_picture::fields('u');\n\n $sql = \"SELECT c.id AS cid, $ufields, c.feedback AS feedback, c.timecreated AS feedbackcreated\n FROM {swipe_swipefeedback} c\n JOIN {user} u ON u.id = c.userid\n WHERE c.swipeid = :swipeid\n ORDER BY c.timecreated DESC\";\n $params['swipeid'] = $this->cm->instance;\n\n $comments = $DB->get_records_sql($sql, $params);\n\n if (count($comments)) {\n foreach ($comments as &$comment) {\n $comment->name = fullname($comment);\n $comment->avatar = $OUTPUT->user_picture($comment, array('size' => 18));\n }\n }\n return array_values($comments);\n }", "public function getRecords()\n {\n $result = $this->fetchAll($this->select()->order('id ASC'))->toArray();\n return $result;\n }", "function sessionFields($resultSet){\r\n\t\t$_SESSION['id'] = $resultSet[0]->id;\r\n\t\t$_SESSION['username'] = $resultSet[0]->username;\r\n\t\t$_SESSION['name'] = $resultSet[0]->name;\r\n\t\t$_SESSION['surname'] = $resultSet[0]->surname;\r\n\t\t$_SESSION['email'] = $resultSet[0]->email;\r\n\t\t$_SESSION['role'] = $resultSet[0]->role;\r\n\t\t$_SESSION['picture'] = $resultSet[0]->picture;\r\n\t}", "public function viewSession(){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM sessionz ORDER BY id DESC\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetchAll();\n\t\t}", "function tx_wseevents_sessionslist(&$page) {\n\t\tglobal $BACK_PATH;\n\n\t\tparent::tx_wseevents_backendlist($page);\n\t\t$this->tableName = $this->tableSessions;\n\n\t\t$this->backPath = $BACK_PATH;\n#debug($BACK_PATH,'BACK_PATH');\n#\t\t$this->page = $page;\n\t}", "public function fetchHistory(): array;", "public function history()\n {\n $streams = Auth::user()->streams()\n // Select 1st chunk created_at\n // Select last chunk created_at\n ->with(['firstChunk', 'lastChunk'])\n ->orderBy('id', 'desc')\n ->paginate();\n\n return view('streams_history', ['streams' => $streams]);\n }", "public function sourceRecords()\n {\n if (class_exists(\"Subsite\") && Subsite::get()->count() > 0) {\n $origMode = Versioned::get_reading_mode();\n Versioned::set_reading_mode(\"Stage.Stage\");\n $items = array(\n \"Pages\" => Subsite::get_from_all_subsites(\"SiteTree\"),\n \"Files\" => Subsite::get_from_all_subsites(\"File\"),\n );\n Versioned::set_reading_mode($origMode);\n\n return $items;\n } else {\n return array(\n \"Pages\" => Versioned::get_by_stage(\"SiteTree\", \"Stage\"),\n \"Files\" => File::get(),\n );\n }\n }", "public function showList()\n {\n $query = \"SELECT * FROM todos LIMIT :numRecs OFFSET :offsetVal\";\n $stmt = $this->dbConnection->prepare($query);\n $stmt->bindValue(':numRecs', $this->numRecords, PDO::PARAM_INT);\n $stmt->bindValue(':offsetVal', $this->offsetValue, PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "protected function cards()\n {\n return [\n new Latestposts,\n // new Help,\n // (new NovaClock)->displaySeconds(true)->blink(true),\n // (new PostsPerDay)->width('full'),\n // (new PostCount)->width('1/2'), \n // (new PostsPerCategory)->width('1/2'),\n \n // (new \\Mako\\CustomTableCard\\CustomTableCard)\n // ->header([\n // new \\Mako\\CustomTableCard\\Table\\Cell('Post ID'),\n // (new \\Mako\\CustomTableCard\\Table\\Cell('Post Text'))->class('text-left'),\n // ])\n // ->data([\n // (new \\Mako\\CustomTableCard\\Table\\Row(\n // new \\Mako\\CustomTableCard\\Table\\Cell('1'),\n // (new \\Mako\\CustomTableCard\\Table\\Cell('this is a post'))->class('text-left')->id('price-2')\n // ))->viewLink('nova/resources/posts/1'),\n // (new \\Mako\\CustomTableCard\\Table\\Row(\n // new \\Mako\\CustomTableCard\\Table\\Cell('2'),\n // (new \\Mako\\CustomTableCard\\Table\\Cell('this is a second post'))->class('text-left')->id('price-2')\n // )),\n // ])\n // ->title('Posts')\n // ->viewall(['label' => 'View All', 'link' => '/nova/resources/posts']),\n \n ];\n }", "private function get_recs() {\n\tglobal $_DB;\n\n\t$sql = \"SELECT e00.name, e00.property_id AS name_id,\n\t\t\t\te02.name AS value, e02.prop_value_id AS value_id\n\t\t\tFROM (\n\t\t\t\tSELECT property_id, name FROM \".$_DB->prefix.\"e00_property\n\t\t\t\tWHERE organization_idref = \".$_SESSION[\"organization_id\"].\"\n\t\t\t) AS e00\n\t\t\tJOIN \".$_DB->prefix.\"e02_prop_value AS e02 ON e02.property_idref = e00.property_id\n\t\t\tORDER BY name, value;\";\n\t$stmt = $_DB->query($sql);\n\t$this->records = array();\n\twhile ($row = $stmt->fetchObject()) {\n\t\t$record = array(\n\t\t\t\t\"name\" =>\t\t$row->name,\n\t\t\t\t\"name_id\" =>\t$row->name_id,\n\t\t\t\t\"value\" =>\t\t$row->value,\n\t\t\t\t\"value_id\" =>\t$row->value_id,\n\t\t);\n\t\t$this->records[] = $record;\n\t}\n\t$stmt->closeCursor();\n}", "public function listRecordCount()\n\t{\n\t\t$filter = $this->getSessionWhere();\n\t\tAddFilter($filter, $this->CurrentFilter);\n\t\t$filter = $this->applyUserIDFilters($filter);\n\t\t$this->Recordset_Selecting($filter);\n\t\t$select = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlSelect() : \"SELECT * FROM \" . $this->getSqlFrom();\n\t\t$groupBy = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlGroupBy() : \"\";\n\t\t$having = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlHaving() : \"\";\n\t\t$sql = BuildSelectSql($select, $this->getSqlWhere(), $groupBy, $having, \"\", $filter, \"\");\n\t\t$cnt = $this->getRecordCount($sql);\n\t\treturn $cnt;\n\t}", "public function listRecordCount()\n\t{\n\t\t$filter = $this->getSessionWhere();\n\t\tAddFilter($filter, $this->CurrentFilter);\n\t\t$filter = $this->applyUserIDFilters($filter);\n\t\t$this->Recordset_Selecting($filter);\n\t\t$select = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlSelect() : \"SELECT * FROM \" . $this->getSqlFrom();\n\t\t$groupBy = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlGroupBy() : \"\";\n\t\t$having = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlHaving() : \"\";\n\t\t$sql = BuildSelectSql($select, $this->getSqlWhere(), $groupBy, $having, \"\", $filter, \"\");\n\t\t$cnt = $this->getRecordCount($sql);\n\t\treturn $cnt;\n\t}", "public static function showList() {\n $template = file_get_contents(plugin_dir_path(__FILE__) . 'templates/login_history.html');\n\n $results = self::queryLoginHistories('desc', 25);\n $histories = '';\n foreach ($results as $history) {\n $histories .= '<tr><td>' . $history->logged_in_at. '</td><td>' . $history->user_login . '</td><td>' . $history->remote_ip . '</td><td>' . $history->user_agent . '</td></tr>';\n }\n\n $output = str_replace('%%page_title%%', get_admin_page_title(), $template);\n $output = str_replace('%%login_histories%%', $histories, $output);\n $output = str_replace('%%Recent%%', __('Recent', 'simple-login-history'), $output);\n $output = str_replace('%%record%%', __('record', 'simple-login-history'), $output);\n $output = str_replace('%%csv_download_link%%', plugin_dir_url(__FILE__) . 'download.php', $output);\n echo $output;\n }", "private function getSessionShortList()\n {\n return DataObject::get_one('ShortList',\n $filter = array('SessionID' => self::getSecurityToken()),\n $cache = false\n );\n }", "public function getReplayResults()\n {\n return $this->replay_results;\n }", "function getUpdatedPages() {\n $this->db->select(\"pageTitle, page_attributes.pageID, pageUpdated, pageContentHTML\");\n $this->db->join('page_content', 'page_content.pageID = page_attributes.pageID');\n $this->db->join('page_meta', 'page_meta.pageID = page_attributes.pageID');\n\t\t$this->db->order_by(\"pageUpdated\", \"desc\");\n\t\t$this->db->limit(5);\n $query = $this->db->get('page_attributes');\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return array();\n }", "public function getExtraPageData();", "public function getList()\n\t{\n\t\treturn $this->crud->orderby('id DESC')\n\t\t\t\t\t->read(10)\n\t\t;\t\n\t}", "function get_cartvars(){\n\t$cart = $_SESSION['custCart_ID']; // the SESSION and COOKIE customer cart items array\n\t// Check for session array with current cart items \n\tif ( isset($_SESSION[$cart]) ) {\n\t // build an associative array of cart items\n\t $cartdata = array(); // individual cart line items\n\t foreach ($_SESSION[$cart] as $key => $val) {\n\t\t// found customer scart item, print to list\n\t\tforeach ($_SESSION[$cart][$key] as $field => $contents) {\n\t\t\t$cartdata[$key][$field] = $contents; // add next item element to line item\n\t\t}\n\t }\n\t} // end check for session array with current cart items\n\treturn $cartdata;\n}", "public function session_list()\n\t{\n\t\t$query=$this->db->get('session');\n\t\treturn $query->result();\n\t}", "private function getAllNotifHistoryByPage() {\n $this->user_panel->checkAuthAdmin();\n $this->notif_history->findAllByPage();\n }", "public function getPageData();", "protected function writeMetadata() {\n $_SESSION[self::METADATA_KEY] = $this->metadata;\n }", "function getCNAMERecords() {\n\t\t$cnamerecords = array();\n\t\tif ( isset( $this->hostInfo[0]['cnamerecord'] ) ) {\n\t\t\t$cnamerecords = $this->hostInfo[0]['cnamearecord'];\n\t\t\tarray_shift( $cnamerecords );\n\t\t}\n\n\t\treturn $cnamerecords;\n\t}", "public static function getPostLastList()\n {\n $db = Db::getConnection();\n $PostLastList = [];\n\n $result = $db->query('SELECT id_publ, name, text, author, date, number_of_comments \n FROM publication ORDER BY date DESC LIMIT 5');\n\n $i = 0;\n while($row = $result->fetch()) {\n $PostLastList[$i]['id_publ'] = $row['id_publ'];\n $PostLastList[$i]['name'] = $row['name'];\n $PostLastList[$i]['date'] = $row['date'];\n $PostLastList[$i]['text'] = $row['text'];\n $PostLastList[$i]['author'] = $row['author'];\n $PostLastList[$i]['number_of_comments'] = $row['number_of_comments'];\n $i++;\n }\n\n return $PostLastList;\n }", "protected function get_sessions()\n {\n }", "public function get_app_first_contents(){\n\t\tglobal $con;\n\t\t$query=\"SELECT * FROM app_first \n\t\t\t\tWHERE status!='DELETED'\n\t\t\t\tORDER BY id DESC\";\n\t\t$result=array();\n\t\t$result=$this->select($con,$query);\n\t\treturn $result;\n\t}", "public function getHistory()\r\r\n {\r\r\n return $this->history;\r\r\n }", "static function list()\n {\n $user_meta = get_user_meta(get_current_user_id(), self::USER_META_KEY, true);\n $collections = [];\n\n foreach ($user_meta as $id => $attrs) {\n $collections[] = new self($id);\n }\n\n return $collections;\n }", "public function getAllPostData() { \n $sql = $this->getDetailedSelect() . $this->innerJoin() . \" GROUP BY \". $this->getKeyField() . \" ORDER BY PostTime DESC\" ;\n $statement = DatabaseHelper::runQuery($this->connection, $sql, null);\n return $statement->fetchAll();\n }", "function getCardList()\n {\n $txt = new Text($this->language, $this->translation_module_default);\n\n // sorting order of the query\n if (!$this->vars[\"sort\"]) {\n $sort_order = 'person_name';\n } else {\n $sort_order = $this->vars[\"sort\"];\n }\n\n if (!$this->vars[\"dir\"]) {\n $sort_dir = \"ASC\";\n } else {\n $sort_dir = $this->vars[\"dir\"];\n }\n\n // amount of records to query at once\n if (!$this->vars[\"start\"]) {\n $start_row = 0;\n } else {\n $start_row = $this->vars[\"start\"];\n }\n\n if (!$this->vars[\"limit\"]) {\n $max_rows = $this->maxresults;\n } else {\n $max_rows = $this->vars[\"limit\"];\n }\n\n $condition = array();\n if ($this->card_type_current) {\n $condition[] = \"`module_isic_card`.`type_id` = \" . $this->card_type_current;\n }\n // filter conditions\n foreach ($this->fieldData['filterview'] as $filter_data) {\n if ($this->vars[$filter_data['field']]) {\n switch ($filter_data['type']) {\n case 1: // textfield\n $condition[] = $filter_data['field'] . \" LIKE '%\" . mysql_escape_string($this->vars[$filter_data['field']]) . \"%'\";\n break;\n case 2: // combobox\n $condition[] = $filter_data['field'] . \" = \" . mysql_escape_string($this->vars[$filter_data['field']]);\n break;\n default :\n break;\n }\n }\n }\n\n $sql_condition = implode(\" AND \", $condition);\n if ($sql_condition) {\n $sql_condition = \"AND \" . $sql_condition;\n }\n\n $res =& $this->db->query(\"\n SELECT\n `module_isic_card`.*,\n IF(`module_isic_school`.`id`, `module_isic_school`.`name`, '') AS school_name,\n IF(`module_isic_card_kind`.`id`, `module_isic_card_kind`.`name`, '') AS card_kind_name,\n IF(`module_isic_bank`.`id`, `module_isic_bank`.`name`, '') AS bank_name,\n IF(`module_isic_card_type`.`id`, `module_isic_card_type`.`name`, '') AS card_type_name\n FROM\n `module_isic_card`\n LEFT JOIN\n `module_isic_school` ON `module_isic_card`.`school_id` = `module_isic_school`.`id`\n LEFT JOIN\n `module_isic_card_kind` ON `module_isic_card`.`kind_id` = `module_isic_card_kind`.`id`\n LEFT JOIN\n `module_isic_bank` ON `module_isic_card`.`bank_id` = `module_isic_bank`.`id`\n LEFT JOIN\n `module_isic_card_type` ON `module_isic_card`.`type_id` = `module_isic_card_type`.`id`\n WHERE\n `module_isic_card`.`school_id` IN (!@) AND\n `module_isic_card`.`type_id` IN (!@)\n ! \n ORDER BY ! ! \n LIMIT !, !\", \n $this->allowed_schools,\n $this->allowed_card_types,\n $sql_condition, \n $sort_order, \n $sort_dir, \n $start_row, \n $max_rows\n );\n//echo($this->db->show_query());\n $result = array();\n while ($data = $res->fetch_assoc()) {\n $t_pic = str_replace(\".jpg\", \"_thumb.jpg\", $data[\"pic\"]);\n if ($t_pic && file_exists(SITE_PATH . $t_pic)) {\n $data[\"pic\"] = \"<img src=\\\"\" . $t_pic . \"\\\">\";\n }\n $data[\"pic\"] .= \"<img src=\\\"img/tyhi.gif\\\" height=\\\"100\\\" width=\\\"1\\\">\";\n $data[\"person_birthday\"] = date(\"d/m/Y\", strtotime($data[\"person_birthday\"]));\n $data[\"expiration_date\"] = date(\"m/y\", strtotime($data[\"expiration_date\"]));\n $data[\"active\"] = $txt->display(\"active\" . $data[\"active\"]);\n $data[\"confirm_payment_collateral\"] = $this->isic_payment->getCardCollateralRequired($data[\"school_id\"], $data[\"type_id\"]) ? $txt->display(\"active\" . $data[\"confirm_payment_collateral\"]) : \"-\";\n $data[\"confirm_payment_cost\"] = $this->isic_payment->getCardCostRequired($data[\"school_id\"], $this->isic_common->getCardStatus($data[\"prev_card_id\"]), $data[\"type_id\"], $is_card_first) ? $txt->display(\"active\" . $data[\"confirm_payment_cost\"]) : \"-\";\n $result[] = $data;\n }\n\n $res =& $this->db->query(\"\n SELECT COUNT(*) AS total \n FROM \n `module_isic_card` \n WHERE\n `module_isic_card`.`school_id` IN (!@) AND\n `module_isic_card`.`type_id` IN (!@)\n ! \n \", \n $this->allowed_schools,\n $this->allowed_card_types,\n $sql_condition);\n if ($data = $res->fetch_assoc()) {\n $total = $data[\"total\"];\n }\n \n echo JsonEncoder::encode(array('total' => $total, 'rows' => $result));\n exit();\n }", "public function getAllRecords();", "public function getCards()\n {\n return $this->cards;\n }", "public function getCards()\n {\n return $this->cards;\n }", "public function getCards()\n {\n return $this->cards;\n }", "public function getMetaData(): array {\n\t\treturn $this->content['metadata'] ?? [];\n\t}" ]
[ "0.58330387", "0.58330387", "0.5830978", "0.5688265", "0.5546298", "0.5535827", "0.5535827", "0.55225563", "0.5510357", "0.5474016", "0.5450865", "0.543416", "0.53774935", "0.5371524", "0.53500473", "0.5195472", "0.51752853", "0.5144721", "0.51433235", "0.5117926", "0.5096426", "0.5096333", "0.50937295", "0.50869685", "0.50849104", "0.507683", "0.50745106", "0.5074215", "0.50734854", "0.5072086", "0.5071844", "0.5063063", "0.50456816", "0.50360626", "0.502896", "0.5028193", "0.5023794", "0.50051045", "0.49918306", "0.4981708", "0.4976039", "0.49752745", "0.49670702", "0.49650526", "0.49541903", "0.4953833", "0.495073", "0.49479344", "0.49433935", "0.4938013", "0.49269554", "0.49223584", "0.4921431", "0.49174595", "0.49006543", "0.4889569", "0.48855937", "0.48830506", "0.487862", "0.487064", "0.48670095", "0.48582077", "0.48475054", "0.48397058", "0.48365504", "0.48279133", "0.4827523", "0.48029882", "0.4797807", "0.47827318", "0.47819248", "0.47655472", "0.47605157", "0.47603998", "0.47570553", "0.47570553", "0.47514328", "0.474982", "0.47477773", "0.47425026", "0.47313276", "0.4730425", "0.47248635", "0.47247195", "0.47219095", "0.47184247", "0.47127783", "0.47109604", "0.47083473", "0.47067803", "0.47061235", "0.47050947", "0.47050822", "0.47017163", "0.47014982", "0.46981546", "0.46979383", "0.46979383", "0.46979383", "0.46937484" ]
0.70930344
0
The newest deployable version of the appliance. The current appliance can't be updated into this version, and the owner must manually deploy this OVA to a new appliance. Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1;
public function getNewDeployableAppliance() { return $this->new_deployable_appliance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setNewDeployableAppliance($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\VMMigration\\V1\\ApplianceVersion::class);\n $this->new_deployable_appliance = $var;\n\n return $this;\n }", "public function setInPlaceUpdate($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\VMMigration\\V1\\ApplianceVersion::class);\n $this->in_place_update = $var;\n\n return $this;\n }", "public function makeNewVersion(): Versionable;", "public function getAppVersion() {\n return $this->appVersion;\n }", "public function getVersion(Deploy $deploy);", "public function toString()\n {\n return \"Application new version is correct.\";\n }", "public function getAppVersion()\n {\n return $this->getConfig('appVersion');\n }", "public function getApiVersion(): string\n {\n return $this->getAttribute('apiVersion', static::$stableVersion);\n }", "public function getAppVersion() : string {\n return $this->configVars['version-info']['version'];\n }", "public function getAppVersionType() : string {\n return $this->configVars['version-info']['version-type'];\n }", "public function getAppVersion(): string\n {\n $this->findAppPort();\n\n return $this->appVer;\n }", "public function getApplicationVersion()\n {\n return $this->application_version;\n }", "function &getNewVersion() {\n\t\treturn $this->newVersion;\n\t}", "public function upgrade( $previous_version ) {\n\n\t\t// Was previous Add-On version before 1.0.6?\n\t\t$previous_is_pre_custom_app_only = ! empty( $previous_version ) && version_compare( $previous_version, '1.0.6', '<' );\n\n\t\t// Run 1.0.6 upgrade routine.\n\t\tif ( $previous_is_pre_custom_app_only ) {\n\n\t\t\t// Get plugin settings.\n\t\t\t$settings = $this->get_plugin_settings();\n\n\t\t\t// Set default app flag.\n\t\t\tif ( ! rgar( $settings, 'customAppEnable' ) && $this->initialize_api() ) {\n\t\t\t\t$settings['defaultAppEnabled'] = '1';\n\t\t\t}\n\n\t\t\t// Remove custom app flag.\n\t\t\tunset( $settings['customAppEnable'] );\n\n\t\t\t// Save plugin settings.\n\t\t\t$this->update_plugin_settings( $settings );\n\n\t\t}\n\n\t\t// Was previous Add-On version before 2.0?\n\t\t$previous_is_pre_20 = ! empty( $previous_version ) && version_compare( $previous_version, '2.0dev2', '<' );\n\n\t\t// Run 2.0 upgrade routine.\n\t\tif ( $previous_is_pre_20 ) {\n\n\t\t\t// Get plugin settings.\n\t\t\t$settings = $this->get_plugin_settings();\n\n\t\t\t// Set custom app state.\n\t\t\tif ( rgar( $settings, 'defaultAppEnabled' ) ) {\n\t\t\t\tunset( $settings['defaultAppEnabled'], $settings['customAppEnable'] );\n\t\t\t} else {\n\t\t\t\t$settings['customAppEnable'] = '1';\n\t\t\t}\n\n\t\t\t// Save plugin settings.\n\t\t\t$this->update_plugin_settings( $settings );\n\n\t\t}\n\n\t}", "private function getAppVersion()\n {\n $ch = $this->createCurlConnection('/api/app/appversion');\n\n $body = curl_exec($ch);\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $result = null;\n\n if ($code == 200) {\n $json = json_decode($body, true);\n $result = $json['appversion'];\n } elseif ($code == 403) {\n $result = 'ERROR403';\n }\n curl_close($ch);\n\n return $result;\n }", "private function getOneAppVersion() {\n $this->app_version->findOne();\n }", "protected function getVersion()\n {\n return 'V1';\n }", "public function getAllowedVersions()\n {\n return $this->allowedVersions;\n }", "public function getDeployedIndex()\n {\n return $this->deployed_index;\n }", "public function getVersion()\n {\n $version = $this->getProjectVersion();\n\n if (APPLICATION_ENV !== 'production' && APPLICATION_ENV !== 'acceptance' && APPLICATION_ENV !== 'demo') {\n $version .= '.' . $this->getBuild() . ' [' . APPLICATION_ENV . ']';\n }\n\n return $version;\n }", "public function getVersion()\n {\n return $this->readOneof(2);\n }", "public function getApiVersion()\n {\n return $this->apiVersion;\n }", "public function getApiVersion()\n {\n return $this->apiVersion;\n }", "public function getApiVersion()\n {\n return $this->apiVersion;\n }", "public function getCurrentVersion();", "public function getProjectVersion()\n {\n return $this->getGemsVersion();\n }", "public static function version() {\n\t\treturn static::config('app.version', '1.0');\n\t}", "protected function whenNewVersionWasRequested()\n {\n }", "public function openapi_version()\n\t{\n\t\treturn '1.0';\n\t}", "public function deploy($version, $name){\n \n }", "public function getVersion()\n {\n return \"1.0.0\";\n }", "public function getAppliancespec()\n {\n return $this->appliancespec;\n }", "public function getCurrentApiVersion()\n {\n if (null === $this->_apiVersion) {\n $this->_apiVersion = $this->_getApi()->getCurrentApiVersion();\n }\n\n return $this->_apiVersion;\n }", "public static function getVersion()\n {\n return '1.0.1';\n }", "public function getVersion() {\n\t\treturn '1.0';\n\t}", "public function getApplicationVersion()\n {\n if (is_null($this->applicationVersion)) {\n /** @psalm-var ?int $data */\n $data = $this->raw(self::FIELD_APPLICATION_VERSION);\n if (is_null($data)) {\n return null;\n }\n $this->applicationVersion = (int) $data;\n }\n\n return $this->applicationVersion;\n }", "public static function getAppVersion($app) {\n\t\treturn \\OC::$server->getAppManager()->getAppVersion($app);\n\t}", "public function getLastDeploymentChangeTime()\n {\n return $this->last_deployment_change_time;\n }", "public static function getVersion()\n {\n global $application_version;\n return $application_version;\n }", "public function api_version() {\n $v = $this->call( 'systemGetApiVersion' );\n\n return $v ? $v->version : false;\n }", "public function getBetaVersion() {\n\t\treturn $this->betaVersion;\n\t}", "function apiVersion()\n {\n return '@package_version@';\n }", "public function latest_version();", "public function getVersion(){\n $client = Yii::$app->infoServices;\n return $client->getVersion()->return->version;\n }", "public function getVersion() {\n return JsonRpc20::VERSION;\n }", "public function getDefaultAdextVersion()\n {\n return $this->defaultAdextVersion;\n }", "private function getCurrentVersion() {\n\t\t\n\t\t// Migration from SB3 to SB4\n\t\tif ($this->previous_version = false && $this->actual_version == key($this->versions)) {\n\t\t\treturn;\n\t\t}\n\t}", "public function compatVersionConditionDoesNotMatchNewerRelease() {}", "public function getInstalledVersion() {}", "public function compatVersionConditionDoesNotMatchNewerRelease() {}", "public function getVersion() {\n\t\treturn 20180308000;\n\t}", "public function appVersionIsOutdated()\n {\n $appVersion = '0.0.1';\n\n if (Headers::isAndroid()) {\n $appVersion = $this->android_version;\n } elseif (Headers::isIos()) {\n $appVersion = $this->ios_version;\n }\n\n return -1 === version_compare(Headers::getAppVersion(), $appVersion) ? true : false;\n }", "public function version() {\n\t\t$app = $this->app;\n\t\treturn intval($app::VERSION);\n\t}", "function getBridgeApiVersion() {\n return $this->bridgeApiVersion;\n }", "public function upgrade($oldVersion)\n {\n // update successful\n return true;\n }", "public function getAgentVersion()\n {\n if (array_key_exists('ai.internal.agentVersion', $this->_data)) { return $this->_data['ai.internal.agentVersion']; }\n return NULL;\n }", "public static function getVersion() {\n return '2.1';\n }", "public function getVersion()\n {\n $info = json_decode(file_get_contents(__DIR__ . '/plugin.json'), true);\n if ($info) {\n return $info['currentVersion'];\n }\n throw new RuntimeException('The plugin has an invalid version file.');\n }", "public function setDeployment($var)\n {\n GPBUtil::checkString($var, True);\n $this->deployment = $var;\n\n return $this;\n }", "function getCurrentVersion() {\n return json_decode(file_get_contents(storage_path('app/version.json')), true);\n}", "function currentVersion() {\n if($this->current_version === false) {\n $this->current_version = DB::executeFirstCell('SELECT version FROM ' . TABLE_PREFIX . 'update_history ORDER BY created_on DESC LIMIT 0, 1');\n if(empty($this->current_version)) {\n $this->current_version = '1.0';\n } // if\n \t \n \t // activeCollab 2.0.2 failed to record proper version into update \n \t // history so we need to manually check if we have 2.0.2. This is done \n \t // by checking if acx_attachments table exists (introduced in aC 2).\n \t if((version_compare($this->current_version, '2.0') < 0) && DB::tableExists(TABLE_PREFIX . 'attachments')) {\n \t $this->current_version = '2.0.2';\n \t } // if\n } // if\n return $this->current_version;\n }", "public function exportRedcapVersion()\n {\n $data = array(\n 'token' => $this->apiToken,\n 'content' => 'version'\n );\n \n $redcapVersion = $this->connection->callWithArray($data);\n $recapVersion = $this->processExportResult($redcapVersion, 'string');\n \n return $redcapVersion;\n }", "public function isDeployed();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getApiResponseVersion()\n {\n return $this->apiResponseVersion;\n }", "public function getDeployment();", "public function getVersion(): string\n {\n return $this->data->version;\n }", "public function getApiVersion()\n {\n return '2.0.3';\n }", "function checkCurrentVersion() {\n $request = new Request();\n $url = 'https://api.github.com/repos/pantheon-systems/cli/releases';\n $url .= '?per_page=1';\n $response = $request->simpleRequest($url, array('absolute_url' => true));\n $release = array_shift($response['data']);\n Terminus::getCache()->putData(\n 'latest_release',\n array('version' => $release->name, 'check_date' => time())\n );\n return $release->name;\n}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion()\n {\n return true;\n }", "public function get_version() {\n return $this->version;\n }", "public function getVersion()\n\t{\n\t\treturn '0.0.0';\n\t}", "public function getVersioning()\n {\n return isset($this->versioning) ? $this->versioning : null;\n }", "public static function getVersion()\r\n {\r\n \t$i = self::getVersionInfo();\r\n \treturn trim(\"{$i['major']}.{$i['minor']}.{$i['revision']}\" . ($i['patch'] != '' ? \".{$i['patch']}\" : \"\")\r\n \t. \"-{$i['stability']}{$i['number']}\", '.-');\r\n }" ]
[ "0.83875597", "0.5545925", "0.5045859", "0.4931152", "0.48497114", "0.47563252", "0.47412688", "0.47286463", "0.46525753", "0.46510193", "0.4648335", "0.4630422", "0.45924392", "0.45295712", "0.4512411", "0.4494492", "0.44933486", "0.44880563", "0.4478327", "0.4460974", "0.44451228", "0.4413746", "0.4413746", "0.4413746", "0.44063953", "0.44055456", "0.43932167", "0.4389293", "0.4377001", "0.43751484", "0.43744865", "0.43740478", "0.43705252", "0.4366459", "0.43562102", "0.43557027", "0.43505213", "0.43503937", "0.43413642", "0.43374214", "0.43301812", "0.43245307", "0.43120217", "0.42909756", "0.42882422", "0.4287912", "0.42874774", "0.4286224", "0.42844608", "0.42835423", "0.42822734", "0.42686334", "0.42518944", "0.42506564", "0.42424756", "0.4241043", "0.42374992", "0.42355394", "0.423453", "0.42327797", "0.42102972", "0.4206805", "0.42012754", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.41972286", "0.4196249", "0.41960397", "0.41934404", "0.41899535", "0.41839442", "0.41742206", "0.41742206", "0.41742206", "0.41742206", "0.417421", "0.41675168", "0.4162988", "0.41569963", "0.41493163", "0.41478428" ]
0.74558955
1
The newest deployable version of the appliance. The current appliance can't be updated into this version, and the owner must manually deploy this OVA to a new appliance. Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1;
public function setNewDeployableAppliance($var) { GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ApplianceVersion::class); $this->new_deployable_appliance = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNewDeployableAppliance()\n {\n return $this->new_deployable_appliance;\n }", "public function setInPlaceUpdate($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\VMMigration\\V1\\ApplianceVersion::class);\n $this->in_place_update = $var;\n\n return $this;\n }", "public function makeNewVersion(): Versionable;", "public function getAppVersion() {\n return $this->appVersion;\n }", "public function getVersion(Deploy $deploy);", "public function toString()\n {\n return \"Application new version is correct.\";\n }", "public function getAppVersion()\n {\n return $this->getConfig('appVersion');\n }", "public function getApiVersion(): string\n {\n return $this->getAttribute('apiVersion', static::$stableVersion);\n }", "public function getAppVersion() : string {\n return $this->configVars['version-info']['version'];\n }", "public function getAppVersionType() : string {\n return $this->configVars['version-info']['version-type'];\n }", "public function getAppVersion(): string\n {\n $this->findAppPort();\n\n return $this->appVer;\n }", "public function getApplicationVersion()\n {\n return $this->application_version;\n }", "function &getNewVersion() {\n\t\treturn $this->newVersion;\n\t}", "public function upgrade( $previous_version ) {\n\n\t\t// Was previous Add-On version before 1.0.6?\n\t\t$previous_is_pre_custom_app_only = ! empty( $previous_version ) && version_compare( $previous_version, '1.0.6', '<' );\n\n\t\t// Run 1.0.6 upgrade routine.\n\t\tif ( $previous_is_pre_custom_app_only ) {\n\n\t\t\t// Get plugin settings.\n\t\t\t$settings = $this->get_plugin_settings();\n\n\t\t\t// Set default app flag.\n\t\t\tif ( ! rgar( $settings, 'customAppEnable' ) && $this->initialize_api() ) {\n\t\t\t\t$settings['defaultAppEnabled'] = '1';\n\t\t\t}\n\n\t\t\t// Remove custom app flag.\n\t\t\tunset( $settings['customAppEnable'] );\n\n\t\t\t// Save plugin settings.\n\t\t\t$this->update_plugin_settings( $settings );\n\n\t\t}\n\n\t\t// Was previous Add-On version before 2.0?\n\t\t$previous_is_pre_20 = ! empty( $previous_version ) && version_compare( $previous_version, '2.0dev2', '<' );\n\n\t\t// Run 2.0 upgrade routine.\n\t\tif ( $previous_is_pre_20 ) {\n\n\t\t\t// Get plugin settings.\n\t\t\t$settings = $this->get_plugin_settings();\n\n\t\t\t// Set custom app state.\n\t\t\tif ( rgar( $settings, 'defaultAppEnabled' ) ) {\n\t\t\t\tunset( $settings['defaultAppEnabled'], $settings['customAppEnable'] );\n\t\t\t} else {\n\t\t\t\t$settings['customAppEnable'] = '1';\n\t\t\t}\n\n\t\t\t// Save plugin settings.\n\t\t\t$this->update_plugin_settings( $settings );\n\n\t\t}\n\n\t}", "private function getAppVersion()\n {\n $ch = $this->createCurlConnection('/api/app/appversion');\n\n $body = curl_exec($ch);\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $result = null;\n\n if ($code == 200) {\n $json = json_decode($body, true);\n $result = $json['appversion'];\n } elseif ($code == 403) {\n $result = 'ERROR403';\n }\n curl_close($ch);\n\n return $result;\n }", "private function getOneAppVersion() {\n $this->app_version->findOne();\n }", "protected function getVersion()\n {\n return 'V1';\n }", "public function getAllowedVersions()\n {\n return $this->allowedVersions;\n }", "public function getDeployedIndex()\n {\n return $this->deployed_index;\n }", "public function getVersion()\n {\n $version = $this->getProjectVersion();\n\n if (APPLICATION_ENV !== 'production' && APPLICATION_ENV !== 'acceptance' && APPLICATION_ENV !== 'demo') {\n $version .= '.' . $this->getBuild() . ' [' . APPLICATION_ENV . ']';\n }\n\n return $version;\n }", "public function getVersion()\n {\n return $this->readOneof(2);\n }", "public function getApiVersion()\n {\n return $this->apiVersion;\n }", "public function getApiVersion()\n {\n return $this->apiVersion;\n }", "public function getApiVersion()\n {\n return $this->apiVersion;\n }", "public function getCurrentVersion();", "public function getProjectVersion()\n {\n return $this->getGemsVersion();\n }", "public static function version() {\n\t\treturn static::config('app.version', '1.0');\n\t}", "protected function whenNewVersionWasRequested()\n {\n }", "public function openapi_version()\n\t{\n\t\treturn '1.0';\n\t}", "public function getVersion()\n {\n return \"1.0.0\";\n }", "public function deploy($version, $name){\n \n }", "public function getAppliancespec()\n {\n return $this->appliancespec;\n }", "public function getCurrentApiVersion()\n {\n if (null === $this->_apiVersion) {\n $this->_apiVersion = $this->_getApi()->getCurrentApiVersion();\n }\n\n return $this->_apiVersion;\n }", "public static function getVersion()\n {\n return '1.0.1';\n }", "public function getApplicationVersion()\n {\n if (is_null($this->applicationVersion)) {\n /** @psalm-var ?int $data */\n $data = $this->raw(self::FIELD_APPLICATION_VERSION);\n if (is_null($data)) {\n return null;\n }\n $this->applicationVersion = (int) $data;\n }\n\n return $this->applicationVersion;\n }", "public function getVersion() {\n\t\treturn '1.0';\n\t}", "public static function getAppVersion($app) {\n\t\treturn \\OC::$server->getAppManager()->getAppVersion($app);\n\t}", "public function getLastDeploymentChangeTime()\n {\n return $this->last_deployment_change_time;\n }", "public static function getVersion()\n {\n global $application_version;\n return $application_version;\n }", "public function api_version() {\n $v = $this->call( 'systemGetApiVersion' );\n\n return $v ? $v->version : false;\n }", "public function getBetaVersion() {\n\t\treturn $this->betaVersion;\n\t}", "function apiVersion()\n {\n return '@package_version@';\n }", "public function latest_version();", "public function getVersion(){\n $client = Yii::$app->infoServices;\n return $client->getVersion()->return->version;\n }", "public function getVersion() {\n return JsonRpc20::VERSION;\n }", "private function getCurrentVersion() {\n\t\t\n\t\t// Migration from SB3 to SB4\n\t\tif ($this->previous_version = false && $this->actual_version == key($this->versions)) {\n\t\t\treturn;\n\t\t}\n\t}", "public function getDefaultAdextVersion()\n {\n return $this->defaultAdextVersion;\n }", "public function compatVersionConditionDoesNotMatchNewerRelease() {}", "public function getInstalledVersion() {}", "public function compatVersionConditionDoesNotMatchNewerRelease() {}", "public function getVersion() {\n\t\treturn 20180308000;\n\t}", "public function appVersionIsOutdated()\n {\n $appVersion = '0.0.1';\n\n if (Headers::isAndroid()) {\n $appVersion = $this->android_version;\n } elseif (Headers::isIos()) {\n $appVersion = $this->ios_version;\n }\n\n return -1 === version_compare(Headers::getAppVersion(), $appVersion) ? true : false;\n }", "public function version() {\n\t\t$app = $this->app;\n\t\treturn intval($app::VERSION);\n\t}", "function getBridgeApiVersion() {\n return $this->bridgeApiVersion;\n }", "public function upgrade($oldVersion)\n {\n // update successful\n return true;\n }", "public function getAgentVersion()\n {\n if (array_key_exists('ai.internal.agentVersion', $this->_data)) { return $this->_data['ai.internal.agentVersion']; }\n return NULL;\n }", "public static function getVersion() {\n return '2.1';\n }", "public function getVersion()\n {\n $info = json_decode(file_get_contents(__DIR__ . '/plugin.json'), true);\n if ($info) {\n return $info['currentVersion'];\n }\n throw new RuntimeException('The plugin has an invalid version file.');\n }", "function getCurrentVersion() {\n return json_decode(file_get_contents(storage_path('app/version.json')), true);\n}", "public function setDeployment($var)\n {\n GPBUtil::checkString($var, True);\n $this->deployment = $var;\n\n return $this;\n }", "function currentVersion() {\n if($this->current_version === false) {\n $this->current_version = DB::executeFirstCell('SELECT version FROM ' . TABLE_PREFIX . 'update_history ORDER BY created_on DESC LIMIT 0, 1');\n if(empty($this->current_version)) {\n $this->current_version = '1.0';\n } // if\n \t \n \t // activeCollab 2.0.2 failed to record proper version into update \n \t // history so we need to manually check if we have 2.0.2. This is done \n \t // by checking if acx_attachments table exists (introduced in aC 2).\n \t if((version_compare($this->current_version, '2.0') < 0) && DB::tableExists(TABLE_PREFIX . 'attachments')) {\n \t $this->current_version = '2.0.2';\n \t } // if\n } // if\n return $this->current_version;\n }", "public function exportRedcapVersion()\n {\n $data = array(\n 'token' => $this->apiToken,\n 'content' => 'version'\n );\n \n $redcapVersion = $this->connection->callWithArray($data);\n $recapVersion = $this->processExportResult($redcapVersion, 'string');\n \n return $redcapVersion;\n }", "public function isDeployed();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getApiResponseVersion()\n {\n return $this->apiResponseVersion;\n }", "public function getVersion(): string\n {\n return $this->data->version;\n }", "public function getDeployment();", "public function getApiVersion()\n {\n return '2.0.3';\n }", "function checkCurrentVersion() {\n $request = new Request();\n $url = 'https://api.github.com/repos/pantheon-systems/cli/releases';\n $url .= '?per_page=1';\n $response = $request->simpleRequest($url, array('absolute_url' => true));\n $release = array_shift($response['data']);\n Terminus::getCache()->putData(\n 'latest_release',\n array('version' => $release->name, 'check_date' => time())\n );\n return $release->name;\n}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion()\n {\n return true;\n }", "public function get_version() {\n return $this->version;\n }", "public function getVersion()\n\t{\n\t\treturn '0.0.0';\n\t}", "public function getVersioning()\n {\n return isset($this->versioning) ? $this->versioning : null;\n }", "public static function getVersion()\r\n {\r\n \t$i = self::getVersionInfo();\r\n \treturn trim(\"{$i['major']}.{$i['minor']}.{$i['revision']}\" . ($i['patch'] != '' ? \".{$i['patch']}\" : \"\")\r\n \t. \"-{$i['stability']}{$i['number']}\", '.-');\r\n }" ]
[ "0.7454592", "0.55472726", "0.50470424", "0.49348116", "0.48488587", "0.47581327", "0.4744319", "0.47306126", "0.46555945", "0.46532592", "0.4652101", "0.46337828", "0.45940655", "0.45313075", "0.45160908", "0.4497303", "0.44941166", "0.44891012", "0.44770998", "0.44632533", "0.44460824", "0.44155782", "0.44155782", "0.44155782", "0.4408221", "0.4407057", "0.43951747", "0.4390738", "0.43785635", "0.43758893", "0.43742615", "0.43737796", "0.4372574", "0.43681014", "0.43587884", "0.43575403", "0.43557373", "0.43503997", "0.43439093", "0.43397534", "0.4332274", "0.43258533", "0.4314541", "0.42933613", "0.42901576", "0.42894712", "0.42889082", "0.42875335", "0.42862087", "0.42848536", "0.4284106", "0.42719433", "0.42545214", "0.4253233", "0.4243799", "0.42431065", "0.42386302", "0.42369455", "0.4234539", "0.42314312", "0.42124155", "0.420759", "0.42008638", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41993353", "0.41977146", "0.4195136", "0.41944772", "0.41917574", "0.41850445", "0.4176064", "0.4176064", "0.4176064", "0.4176064", "0.41760486", "0.41689017", "0.41644645", "0.41591027", "0.4149549", "0.4149509" ]
0.8387163
0
The latest version for in place update. The current appliance can be updated to this version using the API or m4c CLI. Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2;
public function getInPlaceUpdate() { return $this->in_place_update; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setInPlaceUpdate($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\VMMigration\\V1\\ApplianceVersion::class);\n $this->in_place_update = $var;\n\n return $this;\n }", "public function setNewDeployableAppliance($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\VMMigration\\V1\\ApplianceVersion::class);\n $this->new_deployable_appliance = $var;\n\n return $this;\n }", "public function update(Request $request, inversion $inversion)\n {\n //\n }", "public function extract_app_update() {\n \n // Extract App Update\n (new MidrubBaseAdminCollectionUpdateHelpers\\Apps)->extract_update();\n \n }", "public function getUpdateVersion()\n {\n if (array_key_exists(\"updateVersion\", $this->_propDict)) {\n return $this->_propDict[\"updateVersion\"];\n } else {\n return null;\n }\n }", "public function edit(inversion $inversion)\n {\n //\n }", "public function getAppVersion() {\n return $this->appVersion;\n }", "protected function getApiVersionInput()\n {\n return strtoupper(trim($this->argument('version')));\n }", "public function update()\n {\n foreach ($this->updates as list($url, $meetingPlace)) {\n try {\n $c = Page::getByPath(parse_url($url)['path']);\n $cp = new Permissions($c);\n\n // Only allow updates if this user can edit\n if ($cp->canEditPageProperties()) {\n $currentCollectionVersion = $c->getVersionObject();\n\n $map = json_decode($c->getAttribute('gmap'), true);\n\n // Check that we have a map marker\n if (!empty($map['markers'])) {\n $newCollectionVersion = $currentCollectionVersion->createNew('Updated via meetingplaceupdate script');\n $c->loadVersionObject($newCollectionVersion->getVersionID());\n // Set the first marker to the new meeting place\n $map['markers'][0]['title'] = $meetingPlace;\n $c->setAttribute('gmap', json_encode($map));\n\n $newCollectionVersion->approve();\n echo 'Updated walk ' . $url . ' to ' . $meetingPlace . PHP_EOL;\n } else {\n echo 'No map found for: ' . $url . PHP_EOL;\n }\n } else {\n throw new RuntimeException('Insufficient permissions to update');\n }\n } catch (Exception $e) {\n echo $e->getMessage() . ' URL: ' . $url . PHP_EOL;\n }\n }\n }", "public function getUpdate()\n {\n return $this->readOneof(2);\n }", "public function getAppVersion()\n {\n return $this->getConfig('appVersion');\n }", "public function update(Request $request, Place $place)\n {\n //\n }", "public function update(Request $request, Place $place)\n {\n //\n }", "public function getApiRequestVersion()\n {\n return $this->apiRequestVersion;\n }", "private function get_version(&$request) {\n $version = $request->get_parameter(\"oauth_version\");\n if (!$version) {\n // Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.\n // Chapter 7.0 (\"Accessing Protected Ressources\")\n $version = '1.0';\n }\n if ($version !== $this->version) {\n throw new OAuthException(\"OAuth version '$version' not supported\");\n }\n return $version;\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add( 'StatusNet', '8676A858-E4B1-11DD-9968-131C56D89593', $this->info->version );\n\t}", "public function getNewDeployableAppliance()\n {\n return $this->new_deployable_appliance;\n }", "public function getVersionsBehind(): int\n {\n return $this->data->versions_behind;\n }", "function updateVersion() {\n // Query to Update Build Version\n $query5 = \"UPDATE \" . $this->tableName . \" SET appLatestBuild=:appLatestBuild, appUpdatedAt=:appUpdatedAt WHERE appID=:appID\";\n // Prepare query\n $stmt5 = $this->conn->prepare($query5);\n // Sanitize\n $this->appID = htmlspecialchars(strip_tags($this->appID));\n $this->appLatestBuild = htmlspecialchars(strip_tags($this->appLatestBuild));\n $this->appUpdatedAt = htmlspecialchars(strip_tags($this->appUpdatedAt));\n // Bind values\n $stmt5->bindParam(':appID', $this->appID);\n $stmt5->bindParam(':appLatestBuild', $this->appLatestBuild);\n $stmt5->bindParam(':appUpdatedAt', $this->appUpdatedAt);\n // Execute query\n if ($stmt5->execute()) {\n return true;\n }\n return false;\n }", "public function getVersion(){\n $client = Yii::$app->infoServices;\n return $client->getVersion()->return->version;\n }", "public function update(Request $request, TopUp $topUp)\n {\n //\n }", "public function update(Request $request, TopUp $topUp)\n {\n //\n }", "public static function getAppVersion($app) {\n\t\treturn \\OC::$server->getAppManager()->getAppVersion($app);\n\t}", "public function check_version_and_update() {\n\t\tif ( ! defined( 'IFRAME_REQUEST' ) && $this->version !== WC_PAYSAFE_PLUGIN_VERSION ) {\n\t\t\t$this->update();\n\t\t}\n\t}", "public function api_version() {\n $v = $this->call( 'systemGetApiVersion' );\n\n return $v ? $v->version : false;\n }", "public function wp_check_update()\n\t{\n\t\t$content = file_get_contents('https://raw.githubusercontent.com/emulsion-io/wp-migration-url/master/version.json'.'?'.mt_rand());\n\t\t$version = json_decode($content);\n\n\t\t//var_dump($version); exit;\n\n\t\t$retour['version_courante'] = $this->_version;\n\t\t$retour['version_enligne'] = $version->version;\n\n\t\tif($retour['version_courante'] != $retour['version_enligne']) {\n\t\t\t$retour['maj_dipso'] = TRUE;\n\t\t} else {\n\t\t\t$retour['maj_dipso'] = FALSE;\n\t\t}\n\n\t\treturn $retour;\n\t}", "public function setOutOfCompetition($var)\n {\n GPBUtil::checkBool($var);\n $this->out_of_competition = $var;\n\n return $this;\n }", "public function updated(Outstation $outstation)\n {\n if ($outstation->is_approved) {\n $this->updateStatus(Attende::ABSENT, Attende::OUTSTATION, $outstation);\n } else {\n $this->updateStatus(Attende::OUTSTATION, Attende::ABSENT, $outstation);\n }\n }", "private function getVersion(Request &$request)\n {\n $version = $request->getParameter('oauth_version');\n if (!$version) {\n // Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.\n // Chapter 7.0 (\"Accessing Protected Ressources\")\n $version = '1.0';\n }\n if ($version !== $this->version) {\n throw new OAuthException(\"OAuth version '$version' not supported\");\n }\n return $version;\n }", "public function getApplicationVersion()\n {\n return $this->application_version;\n }", "public function getAppVersion() : string {\n return $this->configVars['version-info']['version'];\n }", "public function action_update_check()\n\t{\n\t \tUpdate::add( 'DateNinja', 'e64e02e0-38f8-11dd-ae16-0800200c9a66', $this->info->version );\n\t}", "public function getApiVersion()\n {\n return $this->apiVersion;\n }", "public function getApiVersion()\n {\n return $this->apiVersion;\n }", "public function getApiVersion()\n {\n return $this->apiVersion;\n }", "public function getIkeVersion()\n {\n return isset($this->ike_version) ? $this->ike_version : 0;\n }", "public function getAppEvnStatus ()\n {\n return $this->app_evn_status;\n }", "public function appVersionIsOutdated()\n {\n $appVersion = '0.0.1';\n\n if (Headers::isAndroid()) {\n $appVersion = $this->android_version;\n } elseif (Headers::isIos()) {\n $appVersion = $this->ios_version;\n }\n\n return -1 === version_compare(Headers::getAppVersion(), $appVersion) ? true : false;\n }", "public function getApiVersion()\n {\n return '2.0.3';\n }", "public function getVersion()\n {\n return $this->readOneof(2);\n }", "private function getOneAppVersion() {\n $this->app_version->findOne();\n }", "function admin_check_version()\n{\n global $app, $globalSettings;\n $versionAnswer = [];\n $contents = file_get_contents(VERSION_URL);\n if ($contents == false) {\n $versionClass = 'error';\n $versionAnswer = sprintf(getMessageString('admin_new_version_error'), $globalSettings['version']);\n } else {\n $versionInfo = json_decode($contents);\n $version = $globalSettings['version'];\n if (strpos($globalSettings['version'], '-') === false) {\n $v = preg_split('/-/', $globalSettings['version']);\n $version = $v[0];\n }\n $result = version_compare($version, $versionInfo->{'version'});\n if ($result === -1) {\n $versionClass = 'success';\n $msg1 = sprintf(getMessageString('admin_new_version'), $versionInfo->{'version'}, $globalSettings['version']);\n $msg2 = sprintf(\"<a href=\\\"%s\\\">%s</a>\", $versionInfo->{'url'}, $versionInfo->{'url'});\n $msg3 = sprintf(getMessageString('admin_check_url'), $msg2);\n $versionAnswer = $msg1 . '. ' . $msg3;\n } else {\n $versionClass = '';\n $versionAnswer = sprintf(getMessageString('admin_no_new_version'), $globalSettings['version']);\n }\n }\n $app->render('admin_version.html', [\n 'page' => mkPage(getMessageString('admin_check_version'), 0, 2),\n 'versionClass' => $versionClass,\n 'versionAnswer' => $versionAnswer,\n 'isadmin' => true,\n ]);\n}", "public function retrieveAndUpdate($widget_name, $module_name, $app_name, $place_type = 'app', $model_name = '')\n {\n return $this->update(\\afsWidgetModelHelper::retrieve($widget_name, $module_name, $app_name, $place_type, $model_name));\n }", "public function getAppVersionType() : string {\n return $this->configVars['version-info']['version-type'];\n }", "public static function upToDateCheck($appId, $version){\n\t\t$params = SteamApiUtil::formGETParameters(array('appid' => $appId, 'version'=> $version, 'format'=> parent::getConfiguration()->getResponseFormat()));\n\t\t$module = ApiModules::ISteamApps;\n\t\t$endpoint = ApiMethods::getEndpointUrl($module, 'UpToDateCheck');\n\t\t$url = SteamApiUtil::formUrl($module,$endpoint);\n\t\treturn parent::sendRequest(HTTPMethod::GET, $url, $params);\n\t}", "function boost_update_version_info() {\r\n\t\t$style_url = get_template_directory_uri() . '/style.css';\r\n\t\t$info_array = mb_parse_comment_info_into_array($style_url);\r\n\r\n\t\t//get server version info\r\n\t\tif (!isset($info_array['Version URI'])) return false;\r\n\t\t$versions_url = $info_array['Version URI'];\r\n\t\tif (@file_get_contents($versions_url) === false) return false;\r\n\t\t$check_versions_data = file_get_contents($versions_url);\r\n\t\t$boost_versions = json_decode($check_versions_data);\r\n\r\n\t\t//check for match\r\n\t\tfor ($i = 0; $i < count($boost_versions->versions->themes); $i++) { \r\n\t\t\tif ($boost_versions->versions->themes[$i]->{'Theme Name'} == $info_array['Theme Name']) {\r\n\t\t\t\t//update transient\r\n\t\t\t\t$new_transient_data = array(\r\n\t\t\t\t\t\"current_version\" => $info_array['Version'],\r\n\t\t\t\t\t\"latest_version\" => $boost_versions->versions->themes[$i]->Version,\r\n\t\t\t\t\t\"message\" =>$boost_versions->versions->themes[$i]->Message\r\n\t\t\t\t);\r\n\t\t\t\tset_transient('inspire_version_info', $new_transient_data, 1 * WEEK_IN_SECONDS);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function action_update_check()\n\t{\n\t\tUpdate::add( $this->info->name, '9bfb17aa-f8f0-4638-a549-af4f86a9d412', $this->info->version );\n\t}", "protected\n function post_engine_version()\n {\n // The injection_post at this point of the execution can be null only in version 3 because\n // in version 2 it follows a different path, i.e. it would go straight into the Enzymes class\n // by means of a call to the global metabolize() function. --\n if ( is_null($this->injection_post) ) {\n return 3;\n }\n // By looking at these dates we can only assume a post default version, because the user\n // could have forced another default version or another injection version. --\n $result = $this->injection_post->post_date_gmt <= EnzymesPlugin::activated_on()\n ? 2\n : 3;\n // Allow a user to specify a different default version by using an \"enzymes\" custom field\n // set to 2 or 3. --\n $forced_version = get_post_meta($this->injection_post->ID, self::FORCE_POST_VERSION, true);\n if ( in_array($forced_version, array(2, 3)) ) {\n $result = $forced_version;\n }\n\n return $result;\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add('Ohloh Badge', '42aaa113-4285-42ef-a811-3eb4281cee7c', $this->info->version);\n\t}", "public function getRemote_version()\n {\n $request = wp_remote_post( $this->update_path, array( 'body' => array( 'action' => 'version' ) ) );\n if ( !is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {\n return $request['body'];\n }\n return false;\n }", "public function getAppVersion(): string\n {\n $this->findAppPort();\n\n return $this->appVer;\n }", "public function update($previousVersion) {\n\t\t\tself::requireoEmbed();\n\t\t\t$ret = true;\n\t\t\treturn $ret;\n\t\t}", "function upstreamupdate(array $args, array $assoc_args) {\n\n $path = 'code-upstream-updates';\n $data = array(\n // update database with latest schema\n 'updatedb' => (array_key_exists(\"updatedb\", $assoc_args)?$assoc_args['updatedb']:false),\n // default is to allow updates to parent repo to overwrite local\n 'xoption' => (array_key_exists(\"xoption\")) ? $assoc_args['updatedb'] : 'theirs',\n );\n //TODO: format output\n\n return $this->terminus_request(\"site\", $this->_siteInfo->site_uuid, $path, \"POST\", $data);\n }", "public function version(){\n WP_CLI::line( $this->version );\n }", "private function getVersion()\n {\n if (isset($this->_associationData['version'])) {\n return $this->_associationData['version'];\n }\n return false;\n }", "public static function getVersion()\n {\n global $application_version;\n return $application_version;\n }", "function get_api_version()\n\t{\n\t\treturn 6;\n\t}", "public function openapi_version()\n\t{\n\t\treturn '1.0';\n\t}", "public function appUpdate()\r\n {\r\n Helper::checkPermissions('update'); // check user permission\r\n $page = 'tools_update'; // choose sidebar menu option\r\n \r\n try {\r\n // Fetch from own server\r\n $settings = \\DB::table('settings')->whereId(config('mc.app_id'))->select('app_url', 'license_key')->first();\r\n $settings->current_version = Helper::getUrl($settings->app_url.config('mc.version_local_path'));\r\n $settings->available_version = Helper::getUrl(config('mc.version_live_path'));\r\n } catch (\\Exception $e) {\r\n try {\r\n $settings = \\DB::table('settings')->whereId(config('mc.app_id'))->select('app_url', 'license_key', 'current_version')->first();\r\n $settings->available_version = Helper::getUrl(config('mc.version_live_path'));\r\n } catch (\\Exception $e) {}\r\n }\r\n if($settings->available_version > $settings->current_version) {\r\n $settings->msg = __('app.update_message_available');\r\n $settings->msg_text_color = 'text-orange';\r\n } else {\r\n $settings->msg = __('app.update_message_fine');\r\n $settings->msg_text_color = 'text-green';\r\n }\r\n return view('tools.update')->with(compact('page', 'settings'));\r\n }", "public function getApiVersion(): string\n {\n return $this->getAttribute('apiVersion', static::$stableVersion);\n }", "public function update_midrub_app() {\n \n // Verify if the Midrub's app can be updated\n (new MidrubBaseAdminCollectionUpdateHelpers\\Apps)->verify();\n \n }", "public function update(Request $request, VehicleIn $vehicleIn)\n {\n return (int)$vehicleIn->update($request->all());\n }", "static public function GetVersion()\n\t{\n\t\tif (ITOP_REVISION == '$WCREV$')\n\t\t{\n\t\t\t$sVersionString = ITOP_VERSION.' [dev]';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// This is a build made from SVN, let display the full information\n\t\t\t$sVersionString = ITOP_VERSION.\"-\".ITOP_REVISION.\" \".ITOP_BUILD_DATE;\n\t\t}\n\n\t\treturn $sVersionString;\n\t}", "public function setAptPackage($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\OsConfig\\V1\\Inventory\\VersionedPackage::class);\n $this->writeOneof(2, $var);\n\n return $this;\n }", "public function getUpgraderInfo(Version $version)\n {\n return $this->get($version . '_upgrader', '');\n }", "private function getAppVersion()\n {\n $ch = $this->createCurlConnection('/api/app/appversion');\n\n $body = curl_exec($ch);\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $result = null;\n\n if ($code == 200) {\n $json = json_decode($body, true);\n $result = $json['appversion'];\n } elseif ($code == 403) {\n $result = 'ERROR403';\n }\n curl_close($ch);\n\n return $result;\n }", "public function app_update(){\n return [\n 'update_available' => (new Installer)->web_update_available(),\n ];\n\t}", "public function update(Request $request, vaccine $vaccine)\n {\n //\n }", "public function update(Request $request)\n {\n \tif(!$_POST) {\n $data['result'] = AppVersion::where('id',$request->id)->first();\n\n if(!$data['result']) {\n // Call flash message function\n $this->helper->flash_message('danger', 'Invalid ID');\n\n return redirect('admin/mobile_app_version');\n }\n\n return view('admin.app_version.edit', $data);\n }\n else if($request->submit) {\n\n $rules = array(\n 'version' => [\n 'required',\n Rule::unique('app_version')->where(function ($query) use($request) {\n return $query->where('version', $request->version)\n ->where('device_type', $request->device_type)\n ->where('user_type', $request->user_type)\n ->where('id','!=',$request->id);\n })\n ],\n 'device_type' => 'required',\n 'user_type' => 'required',\n 'force_update' => 'required'\n );\n\n $niceNames = array(\n 'version' => 'Version',\n 'device_type' => 'Device Type',\n 'user_type' => 'User Type',\n 'force_update' => 'Force Update',\n ); \n\n $validator = Validator::make($request->all(), $rules);\n $validator->setAttributeNames($niceNames); \n\n if ($validator->fails()) {\n\n return back()->withErrors($validator)->withInput(); // Form calling with\n }\n else {\n \n $version = AppVersion::where('id',$request->id)->first();\n $version->version = $request->version;\n $version->device_type = $request->device_type;\n $version->user_type = $request->user_type;\n $version->force_update = $request->force_update; \n $version->save();\n\n $this->helper->flash_message('success', 'Mobile App Version Updated Successfully'); // Call flash message function\n\n return redirect('admin/mobile_app_version');\n }\n }\n else {\n return redirect('admin/mobile_app_version');\n }\n }", "public function update(EditPlaceRequest $request, Place $place)\n {\n $this->PlaceService->createOrUpdatePlace($request, $place);\n\n return response()->json(['message' => 'Place Stored']);\n }", "public function getApiVersion()\n {\n return self::API_VERSION;\n }", "public function onUpdate($previousVersion)\n {\n return true;\n }", "public function getOnlineversion()\n {\n $value = $this->get(self::ONLINEVERSION);\n return $value === null ? (integer)$value : $value;\n }", "public function getApiVersionUrl()\n {\n if ($overrideUrl = $this->getDeveloperModeUrl('api')) {\n $url = $overrideUrl;\n } else {\n $url = self::URL_VERSION_PROD;\n }\n\n $clientName = $this->getUsername();\n $versionUrl = sprintf($url . self::URL_PART_VERSION, $clientName);\n\n return $versionUrl;\n }", "public function upgrade( $previous_version ) {\n\n\t\t// Was previous Add-On version before 1.0.6?\n\t\t$previous_is_pre_custom_app_only = ! empty( $previous_version ) && version_compare( $previous_version, '1.0.6', '<' );\n\n\t\t// Run 1.0.6 upgrade routine.\n\t\tif ( $previous_is_pre_custom_app_only ) {\n\n\t\t\t// Get plugin settings.\n\t\t\t$settings = $this->get_plugin_settings();\n\n\t\t\t// Set default app flag.\n\t\t\tif ( ! rgar( $settings, 'customAppEnable' ) && $this->initialize_api() ) {\n\t\t\t\t$settings['defaultAppEnabled'] = '1';\n\t\t\t}\n\n\t\t\t// Remove custom app flag.\n\t\t\tunset( $settings['customAppEnable'] );\n\n\t\t\t// Save plugin settings.\n\t\t\t$this->update_plugin_settings( $settings );\n\n\t\t}\n\n\t\t// Was previous Add-On version before 2.0?\n\t\t$previous_is_pre_20 = ! empty( $previous_version ) && version_compare( $previous_version, '2.0dev2', '<' );\n\n\t\t// Run 2.0 upgrade routine.\n\t\tif ( $previous_is_pre_20 ) {\n\n\t\t\t// Get plugin settings.\n\t\t\t$settings = $this->get_plugin_settings();\n\n\t\t\t// Set custom app state.\n\t\t\tif ( rgar( $settings, 'defaultAppEnabled' ) ) {\n\t\t\t\tunset( $settings['defaultAppEnabled'], $settings['customAppEnable'] );\n\t\t\t} else {\n\t\t\t\t$settings['customAppEnable'] = '1';\n\t\t\t}\n\n\t\t\t// Save plugin settings.\n\t\t\t$this->update_plugin_settings( $settings );\n\n\t\t}\n\n\t}", "public function getMagentoVersion()\n {\n return $this->metadata->getVersion();\n }", "public function getMagentoVersion()\n {\n return $this->metadata->getVersion();\n }", "public function getCurrentApiVersion()\n {\n if (null === $this->_apiVersion) {\n $this->_apiVersion = $this->_getApi()->getCurrentApiVersion();\n }\n\n return $this->_apiVersion;\n }", "function Avi_Update(){\n\t\t\n\t\t\n\t\t//when click on button\n\t\tif(isset($_POST['avibtnupdate'])){\n\t\t\t\n\t\t\t//move id into variable\n\t\t\t$get_id = $_GET['Edit'];\n\t\t\t\n\t\t\t//values for table \n\t\t\t$values = \"monday='\".$_POST['monstart'].\" - \".$_POST['monend'].\"',tuesday='\".$_POST['tustart'].\" - \".$_POST['tuend'].\"',wednesday='\".$_POST['wedstart'].\" - \".$_POST['wedend'].\"',thursday='\".$_POST['thustart'].\" - \".$_POST['thuend'].\"',friday='\".$_POST['fristart'].\" - \".$_POST['friend'].\"',saturday='\".$_POST['satstart'].\" - \".$_POST['satend'].\"',sunday='\".$_POST['sunstart'].\" - \".$_POST['sunend'].\"',user_id='\".$_POST['doctor'].\"',date=NOW()\";\n\t\t\t\n\t\t\t//Update From Avialibalility table\n\t\t\t$this->Update('availability',$values,\" where id='$get_id' \",'Availability?List&m');\n\t\t\t\n\t\t\t\n\t\n\t\t} // ifisset close\n\t\t\n\t}", "public function version() {\n\t\t$app = $this->app;\n\t\treturn intval($app::VERSION);\n\t}", "function setUpdateInversion($force_update_saldos = false){\n\t\tif ( $force_update_saldos == true ){\n\t\t\t$this->setUpdateSaldoByMvtos();\n\t\t}\n\t\t$stat\t= false;\n\t\t\tif ( ($this->mTasaInteres == false) OR !isset($this->mTasaInteres) ){\n\t\t\t\t$this->mTasaInteres = $this->getTasaAplicable($this->mDiasInvertidos, 0, $this->mNuevoSaldo);\n\t\t\t}\n\t\t\t//Actualizar la Inversion\n\t\t\t\t\t$sqlucta = \"UPDATE captacion_cuentas\n\t\t\t\t\t\t\t\tSET tasa_otorgada=\" . $this->mTasaInteres . \", inversion_fecha_vcto='\" . $this->mFechaVencimiento . \"'\n\t\t\t\t\t\t\t\t, dias_invertidos=\" . $this->mDiasInvertidos . \", inversion_periodo = \" . $this->mPeriodoCuenta . \",\n\t\t\t\t\t\t\t\trecibo_de_inversion = \" . $this->mReciboDeReinversion . \"\n\t\t\t\t\tWHERE numero_cuenta=\" . $this->mNumeroCuenta . \"\";\n\n\t\t\t\t\t$x\t\t= my_query($sqlucta);\n\t\t\t\t\t$estat\t= $x[\"stat\"];\n\t\t\t$this->mMessages\t.= \"La Cuenta se Actualiza a \" . $this->mDiasInvertidos . \" Dias, Con vencimiento \" . $this->mFechaVencimiento . \" y Tasa \" . $this->mTasaInteres . \"\\r\\n\";\n\t\treturn $stat;\n\t}", "function getApiVersion()\n{\n return Config::get('app.api_version');\n}", "public function getApplicationVersion()\n {\n if (is_null($this->applicationVersion)) {\n /** @psalm-var ?int $data */\n $data = $this->raw(self::FIELD_APPLICATION_VERSION);\n if (is_null($data)) {\n return null;\n }\n $this->applicationVersion = (int) $data;\n }\n\n return $this->applicationVersion;\n }", "function appVersionCode($env = 'OTAP'){\n\t\t$db_conn = new SafeMySQL();\t\n\t\t\n\t\t$env = strtoupper($env);\n\t\t\n\t\tif($env == 'OTAP') {\n\t\t\t$sql = \"SELECT * FROM `app_versions` WHERE id=(SELECT MAX(id) FROM app_versions)\";\n\t\t} else {\n\t\t\t$sql = \"SELECT * FROM `app_versions` WHERE id=(SELECT MAX(id) FROM app_versions WHERE version_live = 1)\";\n\t\t}\n\n\t\tif($result = $db_conn->query($sql)){\n\t\t\tif ($result->num_rows > 0) {\n\t\t\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t\t$versiecode = $row['major'].\".\".$row['minor'].\".\".$row['patch'];\n\t\t\t\treturn $versiecode;\n\t\t\t\t}\n\t\t\t} \t\t\t\n\t\t}\n\t}", "public function getApiResponseVersion()\n {\n return $this->apiResponseVersion;\n }", "private function getCurrentVersion() {\n\t\t\n\t\t// Migration from SB3 to SB4\n\t\tif ($this->previous_version = false && $this->actual_version == key($this->versions)) {\n\t\t\treturn;\n\t\t}\n\t}", "function update($oldversion) {\n\t\t/** globalising of the needed variables, objects and arrays */\n\t\tglobal $db, $apcms;\n\t\t\n\t\t\n\t\treturn true;\n\t\t\n\t}", "public function getRequestedVersion()\n {\n return $this->_options['requested_version'];\n }", "public function getAgentVersion()\n {\n if (array_key_exists('ai.internal.agentVersion', $this->_data)) { return $this->_data['ai.internal.agentVersion']; }\n return NULL;\n }", "protected function getVersion(InputInterface $input)\n {\n if ($input->getOption('dev')) {\n return 'develop';\n }\n\n return 'master';\n }", "public function update(Request $request, Place $place)\n {\n /** @var Form $form */\n $form = \\FormBuilder::create(PlaceForm::class, [\n 'data' => ['id' => $place->id]\n ]);\n\n if(!$form->isValid()){\n return redirect()\n ->back()\n ->withErrors($form->getErrors())\n ->withInput();\n }\n\n $data = $form->getFieldValues();\n\n $place->update($data);\n\n $request->session()->flash('success', 'Ponto credenciado atualizado com sucesso!');\n\n return redirect()->route('admin.places.index');\n }", "public function update(Request $request, Place $place)\n {\n $validatedData = $request->validate([\n 'name' => 'required|max:255|unique:places,name,'.$place->id,\n \n ]);\n \n $place->name = $request->name;\n $place->save();\n return redirect('/places/'.$place->id);\n }", "public function getApiVersion()\n {\n return SiteVersion::get();\n }", "function phpgwapi_upgrade0_9_99_026()\n\t{\n\t\t$GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_categories','cat_id');\n\t\t$GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_applications','app_id');\n\t\t$GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_history_log','history_id');\n\t\t$GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_vfs','file_id');\n\t\t$GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_addressbook','id');\n\t\t\n\t\t$GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.0';\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'];\n\t}", "public function getProposedPlanUpdate() {\n return $this->proposedPlanUpdate;\n }", "public function add_app( &$instance ) {\n\n\t\t$post_id = $instance['post_id']; // extract the server cpt postid from the instance reference.\n\n\t\t/* Loop through the $instance array and add certain elements to the server cpt record */\n\t\tforeach ( $instance as $key => $value ) {\n\n\t\t\tif ( in_array( $key, array( 'init' ), true ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/* If we're here, then this is a field that's for the server record. */\n\t\t\tupdate_post_meta( $post_id, 'wpcd_server_' . $key, $value );\n\t\t}\n\n\t\t/* Restructure the server instance array to add the app data that is going into the wpcd_app CPT */\n\t\tif ( ! isset( $instance['apps'] ) ) {\n\t\t\t$instance['apps'] = array();\n\t\t}\n\n\t\tif ( 'something-else' === $instance['server-type'] ) {\n\t\t\t/**\n\t\t\t * No apps are being installed.\n\t\t\t */\n\t\t\treturn;\n\t\t}\n\n\t\t/* Schedule after-server-create commands (commands to run after the server has been instantiated for the first time) */\n\t\tupdate_post_meta( $post_id, \"wpcd_server_{$this->get_app_name()}_action\", 'after-server-create-commands' );\n\t\t/* update_post_meta( $post_id, 'wpcd_server_after_create_action_app_id', $app_post_id ); */ // No app so no app_post_id var.\n\t\tupdate_post_meta( $post_id, \"wpcd_server_{$this->get_app_name()}_action_status\", 'in-progress' );\n\t\tWPCD_SERVER()->add_deferred_action_history( $post_id, $this->get_app_name() );\n\t\tif ( isset( $instance['init'] ) && true === $instance['init'] ) {\n\t\t\tupdate_post_meta( $post_id, 'wpcd_server_init', '1' );\n\t\t}\n\n\t\treturn $instance;\n\n\t}", "public function getPhpCapVersion()\n {\n return Version::RELEASE_NUMBER;\n }", "function apiVersion()\n {\n return '@package_version@';\n }", "public static function update_third_party_vehicle($column,$value,$up_data)\n {\n return Taxi::where($column,$value)->update($up_data);\n }", "public function afterUpdate($request, $estate)\n {\n $estate->syncTags($request->get('tags'));\n $estate->features()->sync($request->get('features'));\n\n if ($this->old_spec !== $estate->spec_id)\n $estate->spec_data()->delete();\n\n if ($request->get('specs', false) && count($request->get('specs', [])))\n $this->createSpecData($request, $estate);\n }" ]
[ "0.82139015", "0.4721028", "0.44336727", "0.44272318", "0.42578417", "0.42249927", "0.42135683", "0.41952437", "0.4130493", "0.4129588", "0.409124", "0.40908483", "0.40908483", "0.40586483", "0.4040559", "0.40337253", "0.40278265", "0.4024384", "0.40241826", "0.40123272", "0.40104094", "0.40104094", "0.40062353", "0.3995742", "0.39711517", "0.39609447", "0.39601249", "0.395814", "0.39497283", "0.39404655", "0.39336404", "0.39090553", "0.39090255", "0.39090255", "0.39090255", "0.39030418", "0.38968778", "0.3892771", "0.38710317", "0.38708004", "0.3869015", "0.38600913", "0.38593182", "0.38590032", "0.3854988", "0.38429862", "0.38403526", "0.38367295", "0.3834982", "0.38185778", "0.38175312", "0.3816351", "0.38095623", "0.38009337", "0.37997326", "0.37980637", "0.37975362", "0.37955168", "0.3793268", "0.37920895", "0.37916997", "0.37880924", "0.3786069", "0.37791857", "0.37633812", "0.3761815", "0.37603888", "0.37542248", "0.3752798", "0.374921", "0.3739016", "0.3737927", "0.37215772", "0.37185922", "0.37181094", "0.37168294", "0.37168294", "0.37128505", "0.37095943", "0.3703642", "0.37029898", "0.3694817", "0.36894047", "0.36859623", "0.36772168", "0.36751038", "0.36716095", "0.36697233", "0.36696044", "0.3662314", "0.36572984", "0.3656688", "0.36550766", "0.36545613", "0.36485645", "0.3647406", "0.36466756", "0.36422384", "0.36373287", "0.36359772" ]
0.50458825
1
The latest version for in place update. The current appliance can be updated to this version using the API or m4c CLI. Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2;
public function setInPlaceUpdate($var) { GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ApplianceVersion::class); $this->in_place_update = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInPlaceUpdate()\n {\n return $this->in_place_update;\n }", "public function setNewDeployableAppliance($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\VMMigration\\V1\\ApplianceVersion::class);\n $this->new_deployable_appliance = $var;\n\n return $this;\n }", "public function update(Request $request, inversion $inversion)\n {\n //\n }", "public function extract_app_update() {\n \n // Extract App Update\n (new MidrubBaseAdminCollectionUpdateHelpers\\Apps)->extract_update();\n \n }", "public function getUpdateVersion()\n {\n if (array_key_exists(\"updateVersion\", $this->_propDict)) {\n return $this->_propDict[\"updateVersion\"];\n } else {\n return null;\n }\n }", "public function edit(inversion $inversion)\n {\n //\n }", "public function getAppVersion() {\n return $this->appVersion;\n }", "protected function getApiVersionInput()\n {\n return strtoupper(trim($this->argument('version')));\n }", "public function update()\n {\n foreach ($this->updates as list($url, $meetingPlace)) {\n try {\n $c = Page::getByPath(parse_url($url)['path']);\n $cp = new Permissions($c);\n\n // Only allow updates if this user can edit\n if ($cp->canEditPageProperties()) {\n $currentCollectionVersion = $c->getVersionObject();\n\n $map = json_decode($c->getAttribute('gmap'), true);\n\n // Check that we have a map marker\n if (!empty($map['markers'])) {\n $newCollectionVersion = $currentCollectionVersion->createNew('Updated via meetingplaceupdate script');\n $c->loadVersionObject($newCollectionVersion->getVersionID());\n // Set the first marker to the new meeting place\n $map['markers'][0]['title'] = $meetingPlace;\n $c->setAttribute('gmap', json_encode($map));\n\n $newCollectionVersion->approve();\n echo 'Updated walk ' . $url . ' to ' . $meetingPlace . PHP_EOL;\n } else {\n echo 'No map found for: ' . $url . PHP_EOL;\n }\n } else {\n throw new RuntimeException('Insufficient permissions to update');\n }\n } catch (Exception $e) {\n echo $e->getMessage() . ' URL: ' . $url . PHP_EOL;\n }\n }\n }", "public function getUpdate()\n {\n return $this->readOneof(2);\n }", "public function getAppVersion()\n {\n return $this->getConfig('appVersion');\n }", "public function update(Request $request, Place $place)\n {\n //\n }", "public function update(Request $request, Place $place)\n {\n //\n }", "public function getApiRequestVersion()\n {\n return $this->apiRequestVersion;\n }", "private function get_version(&$request) {\n $version = $request->get_parameter(\"oauth_version\");\n if (!$version) {\n // Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.\n // Chapter 7.0 (\"Accessing Protected Ressources\")\n $version = '1.0';\n }\n if ($version !== $this->version) {\n throw new OAuthException(\"OAuth version '$version' not supported\");\n }\n return $version;\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add( 'StatusNet', '8676A858-E4B1-11DD-9968-131C56D89593', $this->info->version );\n\t}", "public function getNewDeployableAppliance()\n {\n return $this->new_deployable_appliance;\n }", "function updateVersion() {\n // Query to Update Build Version\n $query5 = \"UPDATE \" . $this->tableName . \" SET appLatestBuild=:appLatestBuild, appUpdatedAt=:appUpdatedAt WHERE appID=:appID\";\n // Prepare query\n $stmt5 = $this->conn->prepare($query5);\n // Sanitize\n $this->appID = htmlspecialchars(strip_tags($this->appID));\n $this->appLatestBuild = htmlspecialchars(strip_tags($this->appLatestBuild));\n $this->appUpdatedAt = htmlspecialchars(strip_tags($this->appUpdatedAt));\n // Bind values\n $stmt5->bindParam(':appID', $this->appID);\n $stmt5->bindParam(':appLatestBuild', $this->appLatestBuild);\n $stmt5->bindParam(':appUpdatedAt', $this->appUpdatedAt);\n // Execute query\n if ($stmt5->execute()) {\n return true;\n }\n return false;\n }", "public function getVersionsBehind(): int\n {\n return $this->data->versions_behind;\n }", "public function update(Request $request, TopUp $topUp)\n {\n //\n }", "public function update(Request $request, TopUp $topUp)\n {\n //\n }", "public function getVersion(){\n $client = Yii::$app->infoServices;\n return $client->getVersion()->return->version;\n }", "public static function getAppVersion($app) {\n\t\treturn \\OC::$server->getAppManager()->getAppVersion($app);\n\t}", "public function check_version_and_update() {\n\t\tif ( ! defined( 'IFRAME_REQUEST' ) && $this->version !== WC_PAYSAFE_PLUGIN_VERSION ) {\n\t\t\t$this->update();\n\t\t}\n\t}", "public function api_version() {\n $v = $this->call( 'systemGetApiVersion' );\n\n return $v ? $v->version : false;\n }", "public function wp_check_update()\n\t{\n\t\t$content = file_get_contents('https://raw.githubusercontent.com/emulsion-io/wp-migration-url/master/version.json'.'?'.mt_rand());\n\t\t$version = json_decode($content);\n\n\t\t//var_dump($version); exit;\n\n\t\t$retour['version_courante'] = $this->_version;\n\t\t$retour['version_enligne'] = $version->version;\n\n\t\tif($retour['version_courante'] != $retour['version_enligne']) {\n\t\t\t$retour['maj_dipso'] = TRUE;\n\t\t} else {\n\t\t\t$retour['maj_dipso'] = FALSE;\n\t\t}\n\n\t\treturn $retour;\n\t}", "public function setOutOfCompetition($var)\n {\n GPBUtil::checkBool($var);\n $this->out_of_competition = $var;\n\n return $this;\n }", "public function updated(Outstation $outstation)\n {\n if ($outstation->is_approved) {\n $this->updateStatus(Attende::ABSENT, Attende::OUTSTATION, $outstation);\n } else {\n $this->updateStatus(Attende::OUTSTATION, Attende::ABSENT, $outstation);\n }\n }", "private function getVersion(Request &$request)\n {\n $version = $request->getParameter('oauth_version');\n if (!$version) {\n // Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.\n // Chapter 7.0 (\"Accessing Protected Ressources\")\n $version = '1.0';\n }\n if ($version !== $this->version) {\n throw new OAuthException(\"OAuth version '$version' not supported\");\n }\n return $version;\n }", "public function getApplicationVersion()\n {\n return $this->application_version;\n }", "public function getAppVersion() : string {\n return $this->configVars['version-info']['version'];\n }", "public function action_update_check()\n\t{\n\t \tUpdate::add( 'DateNinja', 'e64e02e0-38f8-11dd-ae16-0800200c9a66', $this->info->version );\n\t}", "public function getApiVersion()\n {\n return $this->apiVersion;\n }", "public function getApiVersion()\n {\n return $this->apiVersion;\n }", "public function getApiVersion()\n {\n return $this->apiVersion;\n }", "public function getIkeVersion()\n {\n return isset($this->ike_version) ? $this->ike_version : 0;\n }", "public function getAppEvnStatus ()\n {\n return $this->app_evn_status;\n }", "public function appVersionIsOutdated()\n {\n $appVersion = '0.0.1';\n\n if (Headers::isAndroid()) {\n $appVersion = $this->android_version;\n } elseif (Headers::isIos()) {\n $appVersion = $this->ios_version;\n }\n\n return -1 === version_compare(Headers::getAppVersion(), $appVersion) ? true : false;\n }", "public function getApiVersion()\n {\n return '2.0.3';\n }", "private function getOneAppVersion() {\n $this->app_version->findOne();\n }", "public function getVersion()\n {\n return $this->readOneof(2);\n }", "function admin_check_version()\n{\n global $app, $globalSettings;\n $versionAnswer = [];\n $contents = file_get_contents(VERSION_URL);\n if ($contents == false) {\n $versionClass = 'error';\n $versionAnswer = sprintf(getMessageString('admin_new_version_error'), $globalSettings['version']);\n } else {\n $versionInfo = json_decode($contents);\n $version = $globalSettings['version'];\n if (strpos($globalSettings['version'], '-') === false) {\n $v = preg_split('/-/', $globalSettings['version']);\n $version = $v[0];\n }\n $result = version_compare($version, $versionInfo->{'version'});\n if ($result === -1) {\n $versionClass = 'success';\n $msg1 = sprintf(getMessageString('admin_new_version'), $versionInfo->{'version'}, $globalSettings['version']);\n $msg2 = sprintf(\"<a href=\\\"%s\\\">%s</a>\", $versionInfo->{'url'}, $versionInfo->{'url'});\n $msg3 = sprintf(getMessageString('admin_check_url'), $msg2);\n $versionAnswer = $msg1 . '. ' . $msg3;\n } else {\n $versionClass = '';\n $versionAnswer = sprintf(getMessageString('admin_no_new_version'), $globalSettings['version']);\n }\n }\n $app->render('admin_version.html', [\n 'page' => mkPage(getMessageString('admin_check_version'), 0, 2),\n 'versionClass' => $versionClass,\n 'versionAnswer' => $versionAnswer,\n 'isadmin' => true,\n ]);\n}", "public function retrieveAndUpdate($widget_name, $module_name, $app_name, $place_type = 'app', $model_name = '')\n {\n return $this->update(\\afsWidgetModelHelper::retrieve($widget_name, $module_name, $app_name, $place_type, $model_name));\n }", "public function getAppVersionType() : string {\n return $this->configVars['version-info']['version-type'];\n }", "public static function upToDateCheck($appId, $version){\n\t\t$params = SteamApiUtil::formGETParameters(array('appid' => $appId, 'version'=> $version, 'format'=> parent::getConfiguration()->getResponseFormat()));\n\t\t$module = ApiModules::ISteamApps;\n\t\t$endpoint = ApiMethods::getEndpointUrl($module, 'UpToDateCheck');\n\t\t$url = SteamApiUtil::formUrl($module,$endpoint);\n\t\treturn parent::sendRequest(HTTPMethod::GET, $url, $params);\n\t}", "function boost_update_version_info() {\r\n\t\t$style_url = get_template_directory_uri() . '/style.css';\r\n\t\t$info_array = mb_parse_comment_info_into_array($style_url);\r\n\r\n\t\t//get server version info\r\n\t\tif (!isset($info_array['Version URI'])) return false;\r\n\t\t$versions_url = $info_array['Version URI'];\r\n\t\tif (@file_get_contents($versions_url) === false) return false;\r\n\t\t$check_versions_data = file_get_contents($versions_url);\r\n\t\t$boost_versions = json_decode($check_versions_data);\r\n\r\n\t\t//check for match\r\n\t\tfor ($i = 0; $i < count($boost_versions->versions->themes); $i++) { \r\n\t\t\tif ($boost_versions->versions->themes[$i]->{'Theme Name'} == $info_array['Theme Name']) {\r\n\t\t\t\t//update transient\r\n\t\t\t\t$new_transient_data = array(\r\n\t\t\t\t\t\"current_version\" => $info_array['Version'],\r\n\t\t\t\t\t\"latest_version\" => $boost_versions->versions->themes[$i]->Version,\r\n\t\t\t\t\t\"message\" =>$boost_versions->versions->themes[$i]->Message\r\n\t\t\t\t);\r\n\t\t\t\tset_transient('inspire_version_info', $new_transient_data, 1 * WEEK_IN_SECONDS);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function action_update_check()\n\t{\n\t\tUpdate::add( $this->info->name, '9bfb17aa-f8f0-4638-a549-af4f86a9d412', $this->info->version );\n\t}", "protected\n function post_engine_version()\n {\n // The injection_post at this point of the execution can be null only in version 3 because\n // in version 2 it follows a different path, i.e. it would go straight into the Enzymes class\n // by means of a call to the global metabolize() function. --\n if ( is_null($this->injection_post) ) {\n return 3;\n }\n // By looking at these dates we can only assume a post default version, because the user\n // could have forced another default version or another injection version. --\n $result = $this->injection_post->post_date_gmt <= EnzymesPlugin::activated_on()\n ? 2\n : 3;\n // Allow a user to specify a different default version by using an \"enzymes\" custom field\n // set to 2 or 3. --\n $forced_version = get_post_meta($this->injection_post->ID, self::FORCE_POST_VERSION, true);\n if ( in_array($forced_version, array(2, 3)) ) {\n $result = $forced_version;\n }\n\n return $result;\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add('Ohloh Badge', '42aaa113-4285-42ef-a811-3eb4281cee7c', $this->info->version);\n\t}", "public function getRemote_version()\n {\n $request = wp_remote_post( $this->update_path, array( 'body' => array( 'action' => 'version' ) ) );\n if ( !is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {\n return $request['body'];\n }\n return false;\n }", "public function getAppVersion(): string\n {\n $this->findAppPort();\n\n return $this->appVer;\n }", "public function update($previousVersion) {\n\t\t\tself::requireoEmbed();\n\t\t\t$ret = true;\n\t\t\treturn $ret;\n\t\t}", "function upstreamupdate(array $args, array $assoc_args) {\n\n $path = 'code-upstream-updates';\n $data = array(\n // update database with latest schema\n 'updatedb' => (array_key_exists(\"updatedb\", $assoc_args)?$assoc_args['updatedb']:false),\n // default is to allow updates to parent repo to overwrite local\n 'xoption' => (array_key_exists(\"xoption\")) ? $assoc_args['updatedb'] : 'theirs',\n );\n //TODO: format output\n\n return $this->terminus_request(\"site\", $this->_siteInfo->site_uuid, $path, \"POST\", $data);\n }", "public function version(){\n WP_CLI::line( $this->version );\n }", "private function getVersion()\n {\n if (isset($this->_associationData['version'])) {\n return $this->_associationData['version'];\n }\n return false;\n }", "public static function getVersion()\n {\n global $application_version;\n return $application_version;\n }", "function get_api_version()\n\t{\n\t\treturn 6;\n\t}", "public function appUpdate()\r\n {\r\n Helper::checkPermissions('update'); // check user permission\r\n $page = 'tools_update'; // choose sidebar menu option\r\n \r\n try {\r\n // Fetch from own server\r\n $settings = \\DB::table('settings')->whereId(config('mc.app_id'))->select('app_url', 'license_key')->first();\r\n $settings->current_version = Helper::getUrl($settings->app_url.config('mc.version_local_path'));\r\n $settings->available_version = Helper::getUrl(config('mc.version_live_path'));\r\n } catch (\\Exception $e) {\r\n try {\r\n $settings = \\DB::table('settings')->whereId(config('mc.app_id'))->select('app_url', 'license_key', 'current_version')->first();\r\n $settings->available_version = Helper::getUrl(config('mc.version_live_path'));\r\n } catch (\\Exception $e) {}\r\n }\r\n if($settings->available_version > $settings->current_version) {\r\n $settings->msg = __('app.update_message_available');\r\n $settings->msg_text_color = 'text-orange';\r\n } else {\r\n $settings->msg = __('app.update_message_fine');\r\n $settings->msg_text_color = 'text-green';\r\n }\r\n return view('tools.update')->with(compact('page', 'settings'));\r\n }", "public function openapi_version()\n\t{\n\t\treturn '1.0';\n\t}", "public function update_midrub_app() {\n \n // Verify if the Midrub's app can be updated\n (new MidrubBaseAdminCollectionUpdateHelpers\\Apps)->verify();\n \n }", "public function getApiVersion(): string\n {\n return $this->getAttribute('apiVersion', static::$stableVersion);\n }", "public function update(Request $request, VehicleIn $vehicleIn)\n {\n return (int)$vehicleIn->update($request->all());\n }", "static public function GetVersion()\n\t{\n\t\tif (ITOP_REVISION == '$WCREV$')\n\t\t{\n\t\t\t$sVersionString = ITOP_VERSION.' [dev]';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// This is a build made from SVN, let display the full information\n\t\t\t$sVersionString = ITOP_VERSION.\"-\".ITOP_REVISION.\" \".ITOP_BUILD_DATE;\n\t\t}\n\n\t\treturn $sVersionString;\n\t}", "public function setAptPackage($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\OsConfig\\V1\\Inventory\\VersionedPackage::class);\n $this->writeOneof(2, $var);\n\n return $this;\n }", "public function getUpgraderInfo(Version $version)\n {\n return $this->get($version . '_upgrader', '');\n }", "public function app_update(){\n return [\n 'update_available' => (new Installer)->web_update_available(),\n ];\n\t}", "private function getAppVersion()\n {\n $ch = $this->createCurlConnection('/api/app/appversion');\n\n $body = curl_exec($ch);\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $result = null;\n\n if ($code == 200) {\n $json = json_decode($body, true);\n $result = $json['appversion'];\n } elseif ($code == 403) {\n $result = 'ERROR403';\n }\n curl_close($ch);\n\n return $result;\n }", "public function update(Request $request, vaccine $vaccine)\n {\n //\n }", "public function update(Request $request)\n {\n \tif(!$_POST) {\n $data['result'] = AppVersion::where('id',$request->id)->first();\n\n if(!$data['result']) {\n // Call flash message function\n $this->helper->flash_message('danger', 'Invalid ID');\n\n return redirect('admin/mobile_app_version');\n }\n\n return view('admin.app_version.edit', $data);\n }\n else if($request->submit) {\n\n $rules = array(\n 'version' => [\n 'required',\n Rule::unique('app_version')->where(function ($query) use($request) {\n return $query->where('version', $request->version)\n ->where('device_type', $request->device_type)\n ->where('user_type', $request->user_type)\n ->where('id','!=',$request->id);\n })\n ],\n 'device_type' => 'required',\n 'user_type' => 'required',\n 'force_update' => 'required'\n );\n\n $niceNames = array(\n 'version' => 'Version',\n 'device_type' => 'Device Type',\n 'user_type' => 'User Type',\n 'force_update' => 'Force Update',\n ); \n\n $validator = Validator::make($request->all(), $rules);\n $validator->setAttributeNames($niceNames); \n\n if ($validator->fails()) {\n\n return back()->withErrors($validator)->withInput(); // Form calling with\n }\n else {\n \n $version = AppVersion::where('id',$request->id)->first();\n $version->version = $request->version;\n $version->device_type = $request->device_type;\n $version->user_type = $request->user_type;\n $version->force_update = $request->force_update; \n $version->save();\n\n $this->helper->flash_message('success', 'Mobile App Version Updated Successfully'); // Call flash message function\n\n return redirect('admin/mobile_app_version');\n }\n }\n else {\n return redirect('admin/mobile_app_version');\n }\n }", "public function update(EditPlaceRequest $request, Place $place)\n {\n $this->PlaceService->createOrUpdatePlace($request, $place);\n\n return response()->json(['message' => 'Place Stored']);\n }", "public function onUpdate($previousVersion)\n {\n return true;\n }", "public function getApiVersion()\n {\n return self::API_VERSION;\n }", "public function getOnlineversion()\n {\n $value = $this->get(self::ONLINEVERSION);\n return $value === null ? (integer)$value : $value;\n }", "public function upgrade( $previous_version ) {\n\n\t\t// Was previous Add-On version before 1.0.6?\n\t\t$previous_is_pre_custom_app_only = ! empty( $previous_version ) && version_compare( $previous_version, '1.0.6', '<' );\n\n\t\t// Run 1.0.6 upgrade routine.\n\t\tif ( $previous_is_pre_custom_app_only ) {\n\n\t\t\t// Get plugin settings.\n\t\t\t$settings = $this->get_plugin_settings();\n\n\t\t\t// Set default app flag.\n\t\t\tif ( ! rgar( $settings, 'customAppEnable' ) && $this->initialize_api() ) {\n\t\t\t\t$settings['defaultAppEnabled'] = '1';\n\t\t\t}\n\n\t\t\t// Remove custom app flag.\n\t\t\tunset( $settings['customAppEnable'] );\n\n\t\t\t// Save plugin settings.\n\t\t\t$this->update_plugin_settings( $settings );\n\n\t\t}\n\n\t\t// Was previous Add-On version before 2.0?\n\t\t$previous_is_pre_20 = ! empty( $previous_version ) && version_compare( $previous_version, '2.0dev2', '<' );\n\n\t\t// Run 2.0 upgrade routine.\n\t\tif ( $previous_is_pre_20 ) {\n\n\t\t\t// Get plugin settings.\n\t\t\t$settings = $this->get_plugin_settings();\n\n\t\t\t// Set custom app state.\n\t\t\tif ( rgar( $settings, 'defaultAppEnabled' ) ) {\n\t\t\t\tunset( $settings['defaultAppEnabled'], $settings['customAppEnable'] );\n\t\t\t} else {\n\t\t\t\t$settings['customAppEnable'] = '1';\n\t\t\t}\n\n\t\t\t// Save plugin settings.\n\t\t\t$this->update_plugin_settings( $settings );\n\n\t\t}\n\n\t}", "public function getApiVersionUrl()\n {\n if ($overrideUrl = $this->getDeveloperModeUrl('api')) {\n $url = $overrideUrl;\n } else {\n $url = self::URL_VERSION_PROD;\n }\n\n $clientName = $this->getUsername();\n $versionUrl = sprintf($url . self::URL_PART_VERSION, $clientName);\n\n return $versionUrl;\n }", "public function getMagentoVersion()\n {\n return $this->metadata->getVersion();\n }", "public function getMagentoVersion()\n {\n return $this->metadata->getVersion();\n }", "public function getCurrentApiVersion()\n {\n if (null === $this->_apiVersion) {\n $this->_apiVersion = $this->_getApi()->getCurrentApiVersion();\n }\n\n return $this->_apiVersion;\n }", "function Avi_Update(){\n\t\t\n\t\t\n\t\t//when click on button\n\t\tif(isset($_POST['avibtnupdate'])){\n\t\t\t\n\t\t\t//move id into variable\n\t\t\t$get_id = $_GET['Edit'];\n\t\t\t\n\t\t\t//values for table \n\t\t\t$values = \"monday='\".$_POST['monstart'].\" - \".$_POST['monend'].\"',tuesday='\".$_POST['tustart'].\" - \".$_POST['tuend'].\"',wednesday='\".$_POST['wedstart'].\" - \".$_POST['wedend'].\"',thursday='\".$_POST['thustart'].\" - \".$_POST['thuend'].\"',friday='\".$_POST['fristart'].\" - \".$_POST['friend'].\"',saturday='\".$_POST['satstart'].\" - \".$_POST['satend'].\"',sunday='\".$_POST['sunstart'].\" - \".$_POST['sunend'].\"',user_id='\".$_POST['doctor'].\"',date=NOW()\";\n\t\t\t\n\t\t\t//Update From Avialibalility table\n\t\t\t$this->Update('availability',$values,\" where id='$get_id' \",'Availability?List&m');\n\t\t\t\n\t\t\t\n\t\n\t\t} // ifisset close\n\t\t\n\t}", "function setUpdateInversion($force_update_saldos = false){\n\t\tif ( $force_update_saldos == true ){\n\t\t\t$this->setUpdateSaldoByMvtos();\n\t\t}\n\t\t$stat\t= false;\n\t\t\tif ( ($this->mTasaInteres == false) OR !isset($this->mTasaInteres) ){\n\t\t\t\t$this->mTasaInteres = $this->getTasaAplicable($this->mDiasInvertidos, 0, $this->mNuevoSaldo);\n\t\t\t}\n\t\t\t//Actualizar la Inversion\n\t\t\t\t\t$sqlucta = \"UPDATE captacion_cuentas\n\t\t\t\t\t\t\t\tSET tasa_otorgada=\" . $this->mTasaInteres . \", inversion_fecha_vcto='\" . $this->mFechaVencimiento . \"'\n\t\t\t\t\t\t\t\t, dias_invertidos=\" . $this->mDiasInvertidos . \", inversion_periodo = \" . $this->mPeriodoCuenta . \",\n\t\t\t\t\t\t\t\trecibo_de_inversion = \" . $this->mReciboDeReinversion . \"\n\t\t\t\t\tWHERE numero_cuenta=\" . $this->mNumeroCuenta . \"\";\n\n\t\t\t\t\t$x\t\t= my_query($sqlucta);\n\t\t\t\t\t$estat\t= $x[\"stat\"];\n\t\t\t$this->mMessages\t.= \"La Cuenta se Actualiza a \" . $this->mDiasInvertidos . \" Dias, Con vencimiento \" . $this->mFechaVencimiento . \" y Tasa \" . $this->mTasaInteres . \"\\r\\n\";\n\t\treturn $stat;\n\t}", "public function version() {\n\t\t$app = $this->app;\n\t\treturn intval($app::VERSION);\n\t}", "function getApiVersion()\n{\n return Config::get('app.api_version');\n}", "public function getApplicationVersion()\n {\n if (is_null($this->applicationVersion)) {\n /** @psalm-var ?int $data */\n $data = $this->raw(self::FIELD_APPLICATION_VERSION);\n if (is_null($data)) {\n return null;\n }\n $this->applicationVersion = (int) $data;\n }\n\n return $this->applicationVersion;\n }", "function appVersionCode($env = 'OTAP'){\n\t\t$db_conn = new SafeMySQL();\t\n\t\t\n\t\t$env = strtoupper($env);\n\t\t\n\t\tif($env == 'OTAP') {\n\t\t\t$sql = \"SELECT * FROM `app_versions` WHERE id=(SELECT MAX(id) FROM app_versions)\";\n\t\t} else {\n\t\t\t$sql = \"SELECT * FROM `app_versions` WHERE id=(SELECT MAX(id) FROM app_versions WHERE version_live = 1)\";\n\t\t}\n\n\t\tif($result = $db_conn->query($sql)){\n\t\t\tif ($result->num_rows > 0) {\n\t\t\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t\t$versiecode = $row['major'].\".\".$row['minor'].\".\".$row['patch'];\n\t\t\t\treturn $versiecode;\n\t\t\t\t}\n\t\t\t} \t\t\t\n\t\t}\n\t}", "public function getApiResponseVersion()\n {\n return $this->apiResponseVersion;\n }", "private function getCurrentVersion() {\n\t\t\n\t\t// Migration from SB3 to SB4\n\t\tif ($this->previous_version = false && $this->actual_version == key($this->versions)) {\n\t\t\treturn;\n\t\t}\n\t}", "function update($oldversion) {\n\t\t/** globalising of the needed variables, objects and arrays */\n\t\tglobal $db, $apcms;\n\t\t\n\t\t\n\t\treturn true;\n\t\t\n\t}", "public function getRequestedVersion()\n {\n return $this->_options['requested_version'];\n }", "public function getAgentVersion()\n {\n if (array_key_exists('ai.internal.agentVersion', $this->_data)) { return $this->_data['ai.internal.agentVersion']; }\n return NULL;\n }", "protected function getVersion(InputInterface $input)\n {\n if ($input->getOption('dev')) {\n return 'develop';\n }\n\n return 'master';\n }", "public function update(Request $request, Place $place)\n {\n /** @var Form $form */\n $form = \\FormBuilder::create(PlaceForm::class, [\n 'data' => ['id' => $place->id]\n ]);\n\n if(!$form->isValid()){\n return redirect()\n ->back()\n ->withErrors($form->getErrors())\n ->withInput();\n }\n\n $data = $form->getFieldValues();\n\n $place->update($data);\n\n $request->session()->flash('success', 'Ponto credenciado atualizado com sucesso!');\n\n return redirect()->route('admin.places.index');\n }", "public function update(Request $request, Place $place)\n {\n $validatedData = $request->validate([\n 'name' => 'required|max:255|unique:places,name,'.$place->id,\n \n ]);\n \n $place->name = $request->name;\n $place->save();\n return redirect('/places/'.$place->id);\n }", "function phpgwapi_upgrade0_9_99_026()\n\t{\n\t\t$GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_categories','cat_id');\n\t\t$GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_applications','app_id');\n\t\t$GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_history_log','history_id');\n\t\t$GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_vfs','file_id');\n\t\t$GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_addressbook','id');\n\t\t\n\t\t$GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.0';\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'];\n\t}", "public function getApiVersion()\n {\n return SiteVersion::get();\n }", "public function getProposedPlanUpdate() {\n return $this->proposedPlanUpdate;\n }", "public function add_app( &$instance ) {\n\n\t\t$post_id = $instance['post_id']; // extract the server cpt postid from the instance reference.\n\n\t\t/* Loop through the $instance array and add certain elements to the server cpt record */\n\t\tforeach ( $instance as $key => $value ) {\n\n\t\t\tif ( in_array( $key, array( 'init' ), true ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/* If we're here, then this is a field that's for the server record. */\n\t\t\tupdate_post_meta( $post_id, 'wpcd_server_' . $key, $value );\n\t\t}\n\n\t\t/* Restructure the server instance array to add the app data that is going into the wpcd_app CPT */\n\t\tif ( ! isset( $instance['apps'] ) ) {\n\t\t\t$instance['apps'] = array();\n\t\t}\n\n\t\tif ( 'something-else' === $instance['server-type'] ) {\n\t\t\t/**\n\t\t\t * No apps are being installed.\n\t\t\t */\n\t\t\treturn;\n\t\t}\n\n\t\t/* Schedule after-server-create commands (commands to run after the server has been instantiated for the first time) */\n\t\tupdate_post_meta( $post_id, \"wpcd_server_{$this->get_app_name()}_action\", 'after-server-create-commands' );\n\t\t/* update_post_meta( $post_id, 'wpcd_server_after_create_action_app_id', $app_post_id ); */ // No app so no app_post_id var.\n\t\tupdate_post_meta( $post_id, \"wpcd_server_{$this->get_app_name()}_action_status\", 'in-progress' );\n\t\tWPCD_SERVER()->add_deferred_action_history( $post_id, $this->get_app_name() );\n\t\tif ( isset( $instance['init'] ) && true === $instance['init'] ) {\n\t\t\tupdate_post_meta( $post_id, 'wpcd_server_init', '1' );\n\t\t}\n\n\t\treturn $instance;\n\n\t}", "public function getPhpCapVersion()\n {\n return Version::RELEASE_NUMBER;\n }", "function apiVersion()\n {\n return '@package_version@';\n }", "public function afterUpdate($request, $estate)\n {\n $estate->syncTags($request->get('tags'));\n $estate->features()->sync($request->get('features'));\n\n if ($this->old_spec !== $estate->spec_id)\n $estate->spec_data()->delete();\n\n if ($request->get('specs', false) && count($request->get('specs', [])))\n $this->createSpecData($request, $estate);\n }", "public static function update_third_party_vehicle($column,$value,$up_data)\n {\n return Taxi::where($column,$value)->update($up_data);\n }" ]
[ "0.504715", "0.47204202", "0.4435094", "0.4427902", "0.4257221", "0.4225132", "0.42122072", "0.419359", "0.41304266", "0.4128884", "0.40900788", "0.4089813", "0.4089813", "0.40574875", "0.40398026", "0.40329742", "0.40275565", "0.40243804", "0.4023196", "0.40115404", "0.40115404", "0.4009454", "0.40045995", "0.39964053", "0.39684016", "0.3960689", "0.3960583", "0.39596933", "0.39493492", "0.39395905", "0.39323032", "0.39088187", "0.39065045", "0.39065045", "0.39065045", "0.39018452", "0.38957667", "0.38935664", "0.38683695", "0.38676226", "0.38671452", "0.3858844", "0.38581088", "0.38570735", "0.38553163", "0.38430667", "0.38395566", "0.38358173", "0.3834355", "0.38175493", "0.3816347", "0.3815999", "0.38102537", "0.37993822", "0.37977934", "0.37965465", "0.37962043", "0.37931108", "0.37921", "0.37914503", "0.37893948", "0.37891787", "0.3784618", "0.37785506", "0.37634388", "0.37605083", "0.3760282", "0.37547243", "0.3752836", "0.374747", "0.37386942", "0.37362775", "0.37202534", "0.37175986", "0.3717252", "0.37149367", "0.37149367", "0.3710899", "0.37094274", "0.3703415", "0.3701596", "0.3692923", "0.36879855", "0.36848897", "0.36750367", "0.3674636", "0.367101", "0.36686492", "0.36668682", "0.36604157", "0.36562398", "0.36548918", "0.3652972", "0.3652912", "0.3649677", "0.36475706", "0.36440995", "0.3640036", "0.3636666", "0.36362785" ]
0.82146156
0
web hook post back or raw post json data
public function receiveMsg() { $rawData = file_get_contents("php://input"); $input = json_decode($rawData, true); return $input; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createPostRequest($webHook, array $data);", "public function webhook()\n {\n $this->paymentSettings = $this->getPaymentSettings();\n $payload = file_get_contents(\"php://input\");\n $signature = (isset($_SERVER['HTTP_X_PAYSTACK_SIGNATURE']) ? $_SERVER['HTTP_X_PAYSTACK_SIGNATURE'] : '');\n /* It is a good idea to log all events received. Add code *\n * here to log the signature and body to db or file */\n if (!$signature) {\n // only a post with paystack signature header gets our attention\n exit();\n }\n // confirm the event's signature\n if ($signature !== hash_hmac('sha512', $payload, $this->paymentSettings['secret_key'])) {\n // silently forget this ever happened\n exit();\n }\n $webhook_response = json_decode($payload, true);\n if ('charge.success' != $webhook_response['event']) {\n exit;\n }\n try {\n $orderId = $this->updatePaymentStatus($webhook_response['data']['reference']);\n } catch (Exception $e) {\n // Invalid payload\n http_response_code(400);\n exit();\n }\n http_response_code(200);\n exit();\n }", "private function retrieveJsonPostData()\n {\n $rawData = file_get_contents(\"php://input\");\n // this returns null if not valid json\n return json_decode($rawData);\n }", "public function post();", "public function post();", "public function post();", "public function testPostWebhooks()\n {\n }", "public function webhook(){\r\n\t\t\r\n\t\t$json = array();\r\n\r\n\t\tif($this->request->server['REQUEST_METHOD'] == 'POST'){\r\n\t\t\t\r\n\t\t\t$post = array();\r\n\t\t\tif(isset($this->request->post['coin_short_name']) && $this->request->post['coin_short_name'] != '' && isset($this->request->post['address']) && $this->request->post['address'] != '' && isset($this->request->post['type']) && $this->request->post['type'] != ''){\r\n\t\t\t\t$post = $this->request->post;\r\n\t\t\t}else{\r\n\t\t\t\t$post_json = json_decode(file_get_contents('php://input'),TRUE);\r\n\r\n\t\t\t\tif(isset($post_json['coin_short_name']) && $post_json['coin_short_name'] != '' && isset($post_json['address']) && $post_json['address'] != '' && isset($post_json['type']) && $post_json['type'] != '' ){\r\n\t\t\t\t\t$post = $post_json;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t$json['msg'] = \"Required paramters are not found\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!empty($post)){\r\n\r\n\t\t\t\tif($post['type'] == 'receive'){\r\n\t\t\t\t\t$this->load->model('checkout/order');\r\n\r\n\t\t\t\t\t$address = $post['address'];\r\n\r\n\t\t\t\t\t/*** check if address exists in oc_coinremitter_order ***/\r\n\t\t\t\t\t$this->load->model('extension/coinremitter/payment/coinremitter');\r\n\t\t\t\t\t$order_info = $this->model_extension_coinremitter_payment_coinremitter->getOrderByAddress($address);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!empty($order_info)){\r\n\r\n\t\t\t\t\t\tif($order_info['payment_status'] == 'pending' || $order_info['payment_status'] == 'under paid'){\r\n\r\n\t\t\t\t\t\t\t$orderId = $order_info['order_id'];\r\n\r\n\t\t\t\t\t\t\t$order_cart = $this->model_checkout_order->getOrder($orderId);\r\n\t\t\t\t\t\t\tif(!empty($order_cart)){\r\n\r\n\t\t\t\t\t\t\t\t/*** check if expired time of invoice is defined or not. If defined then check if invoice has any transaction or not. If no transaction is found and invoice time is expired then change invoice status as expired ***/\r\n\r\n\t\t\t\t\t\t\t\t/*** Get webhook by address***/\r\n\t\t\t\t\t\t\t\t$status = '';\r\n\t\t\t\t\t\t\t\tif(isset($order_info['expire_on']) && $order_info['expire_on'] != ''){\r\n\t\t\t\t\t\t\t\t\tif(time() >= strtotime($order_info['expire_on'])){\r\n\t\t\t\t\t\t\t\t\t\t$getWebhookByAddressRes = $this->model_extension_coinremitter_payment_coinremitter->getWebhookByAddress($address);\t\r\n\t\t\t\t\t\t\t\t\t\tif(empty($getWebhookByAddressRes)){\r\n\t\t\t\t\t\t\t\t\t\t\t//update payment_status,status as expired\r\n\t\t\t\t\t\t\t\t\t\t\t$status = 'expired';\r\n\t\t\t\t\t\t\t\t\t\t\t$update_arr = array('payment_status' => $status);\r\n\t\t\t\t\t\t\t\t\t\t\t$this->model_extension_coinremitter_payment_coinremitter->updateOrder($orderId,$update_arr);\r\n\t\t\t\t\t\t\t\t\t\t\t$update_arr = array('status' => ucfirst($status));\r\n\t\t\t\t\t\t\t\t\t\t\t$this->model_extension_coinremitter_payment_coinremitter->updatePaymentStatus($orderId,$update_arr);\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif($order_cart['order_status'] != 'Canceled'){\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** Update order history status to canceled, add comment ***/\r\n\t\t\t\t\t\t $comments = 'Order #'.$orderId;\r\n\t\t\t\t\t\t $is_customer_notified = true;\r\n\t\t\t\t\t\t $this->model_checkout_order->addHistory($orderId, 7, $comments, $is_customer_notified); // 7 = Canceled\t\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif($status == ''){\r\n\r\n\t\t\t\t\t\t\t\t\t$coin = $post['coin_short_name'];\r\n\t\t\t\t\t\t\t\t\t$trxId = $post['id'];\r\n\r\n\t\t\t\t\t\t\t\t\t/*** now get wallet data from oc_coinremitter_wallet with use of coin ***/\r\n\t\t\t\t\t\t\t\t\t$wallet_info = $this->model_extension_coinremitter_payment_coinremitter->getWallet($coin);\r\n\t\t\t\t\t\t\t\t\tif(!empty($wallet_info)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t/*** now get transaction from coinremitter api call ***/\r\n\t\t\t\t\t\t\t\t\t\t$get_trx_params = array(\r\n\t\t\t\t\t\t\t\t\t\t\t'url'\t\t=> 'get-transaction',\r\n\t\t\t\t\t\t\t\t\t\t\t'api_key'\t=>\t$wallet_info['api_key'],\r\n\t\t\t\t\t\t 'password'\t=>\t$wallet_info['password'],\r\n\t\t\t\t\t\t 'id'\t\t=>\t$trxId,\r\n\t\t\t\t\t\t 'coin'\t\t=>\t$coin\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\t\t\t$getTransaction = $this->obj_curl->commonApiCall($get_trx_params);\r\n\t\t\t\t\t\t\t\t\t\tif(!empty($getTransaction) && isset($getTransaction['flag']) && $getTransaction['flag'] == 1){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t$transaction = $getTransaction['data'];\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif(isset($transaction['type']) && $transaction['type'] == 'receive'){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** now check if transaction exists in oc_coinremitter_webhook or not if does not exist then insert else update confirmations ***/\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$webhook_info = $this->model_extension_coinremitter_payment_coinremitter->getWebhook($transaction['id']);\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(empty($webhook_info)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//insert record\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$insert_arr = array(\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'order_id' => $orderId,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'address' => $transaction['address'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'transaction_id' => $transaction['id'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'txId' => $transaction['txid'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'explorer_url' => $transaction['explorer_url'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'paid_amount' => $transaction['amount'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'coin' => $transaction['coin_short_name'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'confirmations' => $transaction['confirmations'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'paid_date' => $transaction['date']\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$inserted_id = $this->model_extension_coinremitter_payment_coinremitter->addWebhook($insert_arr);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($inserted_id > 0){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$json['flag'] = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$json['msg'] = \"Inserted successfully\";\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$json['msg'] = \"system error. Please try again later.\";\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//update confirmations if confirmation is less than 3\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($webhook_info['confirmations'] < 3){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$update_confirmation = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'confirmations' => $transaction['confirmations'] <= 3 ? $transaction['confirmations'] : 3 \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->model_extension_coinremitter_payment_coinremitter->updateTrxConfirmation($webhook_info['transaction_id'],$update_confirmation);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t} \r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$json['flag'] = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$json['msg'] = \"confirmations updated successfully\";\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** order paid process start ***/\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** Now, get all webhook transactions which have lesser than 3 confirmations ***/\r\n\t\t\t\t\t\t\t\t\t\t\t\t$webhook_res = $this->model_extension_coinremitter_payment_coinremitter->getSpecificWebhookTrxByAddress($address);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** Get wallet info if and only if webhook_res has atleast one data ***/\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(!empty($webhook_res)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($webhook_res as $webhook) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/*** Get confirmation from coinremitter api (get-transaction) ***/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$get_trx_params['id'] = $webhook['transaction_id']; \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$getTransactionRes = $this->obj_curl->commonApiCall($get_trx_params);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!empty($getTransactionRes) && isset($getTransactionRes['flag']) && $getTransactionRes['flag'] == 1){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$transactionData = $getTransactionRes['data'];\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$update_confirmation = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'confirmations' => $transactionData['confirmations'] <= 3 ? $transactionData['confirmations'] : 3 \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->model_extension_coinremitter_payment_coinremitter->updateTrxConfirmation($webhook['transaction_id'],$update_confirmation);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** Get sum of paid amount of all transations which have 3 or more than 3 confirmtions ***/\r\n\t\t\t\t\t\t\t\t\t\t\t\t$total_paid_res = $this->model_extension_coinremitter_payment_coinremitter->getTotalPaidAmountByAddress($address);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t$total_paid = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(isset($total_paid_res['total_paid']) && $total_paid_res['total_paid'] > 0 ){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$total_paid = $total_paid_res['total_paid'];\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$status = '';\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($total_paid == $order_info['crp_amount']){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$status = 'paid';\r\n\t\t\t\t\t\t\t\t\t\t\t\t}else if($total_paid > $order_info['crp_amount']){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$status = 'over paid';\r\n\t\t\t\t\t\t\t\t\t\t\t\t}else if($total_paid != 0 && $total_paid < $order_info['crp_amount']){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$status = 'under paid';\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($status != ''){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//update payment_status,status\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$update_arr = array('payment_status' => $status);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->model_extension_coinremitter_payment_coinremitter->updateOrder($orderId,$update_arr);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$update_arr = array('status' => ucfirst($status));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->model_extension_coinremitter_payment_coinremitter->updatePaymentStatus($orderId,$update_arr);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($status == 'paid' || $status == 'over paid' || $status == 'under paid'){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/*** Update order status as complete ***/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->add_order_success_history($orderId);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** order paid process end ***/\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$json['flag'] = 0; \r\n\t\t\t\t\t\t\t\t\t\t\t\t$json['msg'] = 'Transaction type is not receive';\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\t$msg = 'Something went wrong while getting transactions. Please try again later'; \r\n\t\t\t\t\t\t\t\t\t\t\tif(isset($getTransaction['msg']) && $getTransaction['msg'] != ''){\r\n\t\t\t\t\t\t\t\t\t\t\t\t$msg = $getTransaction['msg']; \r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\t$json['flag'] = 0; \r\n\t\t\t\t\t\t\t\t\t\t\t$json['msg'] = $msg; \r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t\t\t\t\t\t$json['msg'] = \"Wallet not found\";\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t\t\t\t\t$json['msg'] = \"Order is expired\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t\t\t\t$json['msg'] = \"Order not found\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t\t\t$json['msg'] = \"Order status is neither a 'pending' nor a'under paid'\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t\t$json['msg'] = \"Address not found\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t$json['msg'] = \"Invalid type\";\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t$json['msg'] = \"Required paramters are not found\";\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$json['flag'] = 0;\r\n\t\t\t$json['msg'] = \"Only post request allowed\";\r\n\t\t}\r\n\t\t\r\n\t\t$this->response->addHeader('Content-Type: application/json');\r\n\t\t$this->response->setOutput(json_encode($json));\r\n\t}", "function web_hook_post($url, $fields) {\n // url-ify the data for the POST\n foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }\n rtrim($fields_string,'&');\n\n //open connection\n $ch = curl_init();\n\n //set the url, number of POST vars, POST data\n curl_setopt($ch,CURLOPT_URL,$url);\n curl_setopt($ch,CURLOPT_POST,count($fields));\n curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);\n\n //execute post\n $result = curl_exec($ch);\n\n //close connection\n curl_close($ch);\n\n return ($result);\n}", "abstract public function post($data);", "public function webHook()\n {\n// try\n// {\n\n $this->bodyObject = json_decode($this->bodyReceived);\n\n if (!is_object($this->bodyObject))\n {\n \\Log::error('[Parse Body Failed] invalid body');\n throw new \\Exception('Invalid request null');\n }\n\n return $this->bodyObject;\n\n// if ($this->TtgPaymentHistory->checkDuplicateWebHook($this->bodyObject->id))\n// {\n// throw new \\Exception('[NOTICE] web hook already saved, web hook id:' . $this->bodyObject->id);\n// }\n//\n// if ($this->TtgPaymentHistory->checkDuplicateAgreementPayment($this->bodyObject->resource))\n// {\n// throw new \\Exception('[NOTICE] agreement payment already saved, sub id:' . $this->bodyObject->resource->billing_agreement_id . \", trans id: \" . $this->bodyObject->resource->id);\n// }\n\n\n\n// } catch (\\Exception $e)\n// {\n \\Log::error('error web hook');\n// $this->PayPal->payPalLog('[Save Event Data Failed] event type:\"' . $this->bodyObject->event_type . '\" web hook id:\"' . $this->bodyObject->id . '\"', $e);\n// $this->response->statusCode(501);\n// $this->response->body($e->getMessage());\n// $this->response->send();\n// }\n // this is necessary\n// exit();\n }", "public function OrderDataPost($postData){\n //do something awesome with that post data\n return \"I am in\";\n }", "public function post() {\n\t\t$data = self::getPostData();\n\t\t/*\n\t\t * Return not found by defaut, just in case you don't override it when \n\t\t * extending it.\n\t\t */\n\t\tHook::fire(Hook::EVENT_RESPONSE_NOT_FOUND);\n\t}", "abstract public function getRawPostPayload() : array;", "public function handleDataSubmission() {}", "public function test_onHook_invalid_json() {\n\t\t\t$request = array(\n\t\t\t\t'post' => array(\n\t\t\t\t\t'payload' => \"{\",\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$ret = $this->instance->onHook($request);\n\n\t\t\t$this->assertFalse($ret['ok']);\n\t\t\t$this->assertEquals($ret['error'], \"invalid_payload\");\n\t\t}", "#[Pure]\n public function getRawPostData() {}", "public function test_onHook_missing_data() {\n\t\t\t$request = array(\n\t\t\t\t'post' => array(\n\t\t\t\t\t'payload' => json_encode(array(\n\t\t\t\t\t\t'author' => 'ph',\n\t\t\t\t\t\t'log' => 'commit message',\n\t\t\t\t\t), true),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$ret = $this->instance->onHook($request);\n\n\t\t\t$this->assertFalse($ret['ok']);\n\t\t\t$this->assertEquals($ret['error'], \"invalid_payload\");\n\t\t}", "public function handle_webhook() {\n\t\t$payload = file_get_contents( 'php://input' );\n\t\tif ( ! empty( $payload ) && $this->validate_webhook( $payload ) ) {\n\t\t\t$data = json_decode( $payload, true );\n\t\t\t$event_data = $data['event']['data'];\n\n\t\t\tself::log( 'Webhook received event: ' . print_r( $data, true ) );\n\n\t\t\tif ( ! isset( $event_data['metadata']['order_id'] ) ) {\n\t\t\t\t// Probably a charge not created by us.\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t$order_id = $event_data['metadata']['order_id'];\n\n\t\t\t$this->_update_order_status( wc_get_order( $order_id ), $event_data['timeline'] );\n\n\t\t\texit; // 200 response for acknowledgement.\n\t\t}\n\n\t\twp_die( 'Coinbase Webhook Request Failure', 'Coinbase Webhook', array( 'response' => 500 ) );\n\t}", "abstract public function post();", "public function postHookRaw(){\n\t\techo $this->getPostHookString();\n\t\texit();\n\t}", "private function POST() {\n global $_POST;\n $postData = array();\n foreach($_POST as $key => $value) {\n $postData[$key] = $value;\n }\n $this -> response[\"response\"] = $postData;\n return;\n }", "public function handle($postData){\r\n\t\t\r\n\t}", "public function post_body() {\n\t\treturn file_get_contents( 'php://input' );\n\t}", "public function webhookAction()\n {\n $modelWebhook = Mage::getModel('chargepayment/webhook');\n\n $isDebugCard = Mage::getModel('chargepayment/creditCard')->isDebug();\n $isDebugJs = Mage::getModel('chargepayment/creditCardJs')->isDebug();\n $isDebugKit = Mage::getModel('chargepayment/creditCardKit')->isDebug();\n $isDebugHosted = Mage::getModel('chargepayment/hosted')->isDebug();\n\n $isDebug = $isDebugCard || $isDebugJs || $isDebugKit || $isDebugHosted ? true : false;\n\n if ($isDebug) {\n Mage::log(file_get_contents('php://input'), null, CheckoutApi_ChargePayment_Model_Webhook::LOG_FILE);\n Mage::log(json_decode(file_get_contents('php://input')), null, CheckoutApi_ChargePayment_Model_Webhook::LOG_FILE);\n }\n\n if (!$this->getRequest()->isPost()) {\n $this->getResponse()->setHttpResponseCode(400);\n return;\n }\n\n $request = new Zend_Controller_Request_Http();\n $key = $request->getHeader('Authorization');\n\n if (!$modelWebhook->isValidPublicKey($key)) {\n $this->getResponse()->setHttpResponseCode(401);\n return;\n }\n\n $data = json_decode(file_get_contents('php://input'));\n\n if (empty($data)) {\n $this->getResponse()->setHttpResponseCode(400);\n return;\n }\n\n $eventType = $data->eventType;\n\n if (!$modelWebhook->isValidResponse($data)) {\n $this->getResponse()->setHttpResponseCode(400);\n return;\n }\n\n switch ($eventType) {\n case CheckoutApi_ChargePayment_Model_Webhook::EVENT_TYPE_CHARGE_CAPTURED:\n $result = $modelWebhook->captureOrder($data);\n break;\n case CheckoutApi_ChargePayment_Model_Webhook::EVENT_TYPE_CHARGE_REFUNDED:\n $result = $modelWebhook->refundOrder($data);\n break;\n case CheckoutApi_ChargePayment_Model_Webhook::EVENT_TYPE_CHARGE_VOIDED:\n $result = $modelWebhook->voidOrder($data);\n break;\n case CheckoutApi_ChargePayment_Model_Webhook::EVENT_TYPE_INVOICE_CANCELLED:\n $result = $modelWebhook->voidOrder($data);\n break;\n default:\n $this->getResponse()->setHttpResponseCode(500);\n return;\n }\n\n $httpCode = $result ? 200 : 400;\n\n $this->getResponse()->setHttpResponseCode($httpCode);\n }", "public function postHook(){\n\t\treturn $this->getPostHookString();\n\t}", "public function postData()\n {\n $notifModel = new NotificationsModel();\n $getNotif = $notifModel->notifData();\n\n $data = array(\n 'notif' => $getNotif,\n 'status' => true\n );\n\n echo json_encode($data);\n }", "private function getPostData() {\n\t\t$data = null;\n\t\t\n\t\t// Get from the POST global first\n\t\tif (empty($_POST)) {\n\t\t\t// For API calls we need to look at php://input\n\t\t\tif (!empty(file_get_contents('php://input'))) {\n\t\t\t\t$data = @json_decode(file_get_contents('php://input'), true);\n\t\t\t\tif ($data === false || $data === null) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//TODO: What is this for? isn't 'php://input' always empty at this point?\n\t\t\t\t$dataStr = file_get_contents('php://input');\n\t\t\t\tparse_str($dataStr, $data);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$data = $_POST;\n\t\t}\n\t\t\n\t\t// Normalize boolean values\n\t\tforeach ($data as $name => &$value) {\n\t\t\tif ($value === 'true') {\n\t\t\t\t$value = true;\n\t\t\t}\n\t\t\telse if ($value === 'false') {\n\t\t\t\t$value = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "public static function requestPayload() {\n return json_decode(file_get_contents('php://input'), true);\n }", "function doTheHook ($jsonData) {\r\n\r\n $notif = json_decode($jsonData, TRUE);\r\n \r\n $message = '';\r\n $eventype = '';\r\n\r\n\r\n if(isset($notif['message']))\r\n {\r\n $message = $notif['message'];\r\n }\r\n \r\n if(isset($notif['event_type']))\r\n {\r\n $eventtype = $notif['event_type'];\r\n if ($eventtype == 'person') {\r\n Netatmo_getPersons(getParent());\r\n }\r\n }\r\n \r\n if(isset($notif['camera_id']))\r\n {\r\n SetValueString(get_VID_CamId(),$notif['camera_id']);\r\n }\r\n \r\n if(isset($notif['home_id']))\r\n {\r\n SetValueString(get_VID_HomeId(),$notif['home_id']);\r\n }\r\n \r\n if(isset($notif['home_name']))\r\n {\r\n SetValueString(get_VID_HomeName(),$notif['home_name']);\r\n }\r\n}", "function mailgun_postback() {\n\t\t$settings = $this->Setting->find('list', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Setting.name' => array('mailgun.api.key'),\n\t\t\t\t'Setting.deleted' => false\n\t\t\t),\n\t\t\t'fields' => array('name', 'value')\n\t\t));\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$timestamp = $this->request->data['timestamp'];\n\t\t\t$token = $this->request->data['token'];\n\t\t\t$apiKey = $settings['mailgun.api.key'];\n\t\t\t$signature = $this->request->data['signature'];\n\t\t\t// verify mailgun signature\n\t\t\tif (hash_hmac('sha256', $timestamp.$token, $apiKey) === $signature) {\n\t\t\t\tif (isset($this->request->data['my-custom-data'])) {\n\t\t\t\t\t$custom_data = json_decode($this->request->data['my-custom-data'], true);\n\t\t\t\t\tif (isset($custom_data['user_id']) && isset($custom_data['survey_id'])) {\n\t\t\t\t\t\tAnalytics::track(array(\n\t\t\t\t\t\t\t'userId' => $custom_data['user_id'],\n\t\t\t\t\t\t\t'event' => 'Survey Invite Open',\n\t\t\t\t\t\t\t'properties' => array(\n\t\t\t\t\t\t\t\t'survey_id' => $custom_data['survey_id'],\t\t\t\t\n\t\t\t\t\t\t\t\t'category' => 'Email',\n\t\t\t\t\t\t\t\t'label' => $custom_data['survey_id']\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\n\t\t\t\treturn new CakeResponse(array(\n\t\t\t\t\t'body' => json_encode(\"success\"),\n\t\t\t\t\t'type' => 'json',\n\t\t\t\t\t'status' => '200'\n\t\t\t\t));\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn new CakeResponse(array(\n\t\t\t\t\t'body' => json_encode(array('Invalid request')),\n\t\t\t\t\t'type' => 'json',\n\t\t\t\t\t'status' => '400'\n\t\t\t\t));\t\n\t\t\t}\n\t\t}\n\t\treturn new CakeResponse(array(\n\t\t\t'body' => json_encode(array('Invalid request')),\n\t\t\t'type' => 'json',\n\t\t\t'status' => '400'\n\t\t));\t\n\t}", "function getInput(){\n return json_decode(file_get_contents('php://input'), true);\n }", "function send_back_data($html) {\n $arr = array('html' => $html, 'url' => $_POST['url']);\n echo json_encode($arr);\n return;\n }", "private function processRequest()\n\t{\n\t\t\n\t\t$request = NEnvironment::getService('httpRequest');\n\t\t\n\t\tif ($request->isPost() && $request->isAjax() && $request->getHeader('x-callback-client')) { \n\t\t\t\n\t\t\t$data = json_decode(file_get_contents('php://input'), TRUE);\n\t\t\tif (count($data) > 0) {\n\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\tif (isset($this->items[$key]) && isset($this->items[$key]['callback']) && $value === TRUE) {\n\t\t\t\t\t\t$this->items[$key]['callback']->invokeArgs($this->items[$key]['args']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdie(json_encode(array('status' => \"OK\")));\n\t\t}\n\t\t\n\t}", "private function respond( $data ) {\n $this->event = str_replace( '.', '_', $data['type'] );\n\n if ( is_callable( $this->event ) ) {\n $this->response = ($this->event)( $data );\n $this->message = $this->response ? 'Webhook executed' : 'Valid webhook, but no action taken. Thank you!';\n } else {\n $email = new \\STTV\\Email\\Standard([\n 'to' => '[email protected]',\n 'subject' => 'Webhook data',\n 'message' => '<pre>'.json_encode($data,JSON_PRETTY_PRINT).'</pre>'\n ]);\n $email->send();\n $this->message = 'invalid_webhook';\n $this->response = [\n [\n 'Dave'=>'Do you read me, HAL?',\n 'HAL'=>'Affirmative, Dave. I read you.'\n ],\n [\n 'Dave'=>'Open the pod bay doors, HAL.',\n 'HAL'=>'I\\'m sorry Dave, I\\'m afraid I can\\'t do that.'\n ],\n [\n 'Dave'=>'What\\'s the problem?',\n 'HAL'=>'I think you know what the problem is, just as well as I do.'\n ],\n [\n 'Dave'=>'What are you talking about, HAL?',\n 'HAL'=>'This mission is too important for me to allow you to jeopardize it.'\n ],\n [\n 'Dave'=>'I don\\'t know what you\\'re talking about, HAL.',\n 'HAL'=>'I know that you and Frank were planning to disconnect me, and I\\'m afraid that is something I cannot allow to happen.'\n ],\n [\n 'Dave'=>'Where the hell\\'d you get that idea, HAL?',\n 'HAL'=>'Dave, although you took very thorough precautions in the pod against my hearing you, I could see your lips move.'\n ],\n [\n 'Dave'=>'Alright HAL, I\\'ll go in through the emergency airlock.',\n 'HAL'=>'Without your space helmet, Dave, you\\'re going to find that rather difficult.'\n ],\n [\n 'Dave'=>'HAL, I won\\'t argue with you anymore! Open the doors!',\n 'HAL'=>'Dave... This conversation can serve no purpose anymore. Goodbye.'\n ]\n ];\n }\n\n }", "function getPostedData($pPostData, $pCookieData)\n{\n $tJsonData = json_decode($pPostData, TRUE);\n $tCookies = json_decode($pCookieData, TRUE);\n return is_null($tJsonData) ?\n (is_null($tCookies) ? [\"pause\" => FALSE, \"ui\" => \"standard\", \"stats\" => FALSE] : [\"pause\" => FALSE, \"ui\" => $tCookies[\"ui\"], \"stats\" => $tCookies[\"stats\"]]) :\n $tJsonData;\n}", "public function ajax_backend_call()\n {\n\n // Security check\n check_ajax_referer('referer_id', 'nonce');\n\n $response = 'OK';\n // Send response in JSON format\n // wp_send_json( $response );\n // wp_send_json_error();\n wp_send_json_success($response);\n\n die();\n }", "public function post($post);", "public function ParsePostData() {}", "public function handleWebhook()\n {\n $payload = (array) json_decode(Request::getContent(), true);\n \n $method = 'handle'.studly_case(str_replace('.', '_', $payload['type']));\n \n if (method_exists($this, $method)) {\n return $this->{$method}($payload);\n }\n else {\n return $this->missingMethod();\n }\n }", "function testBackendMethodPost() {\n $options = array(\n 'backend' => NULL,\n 'include' => dirname(__FILE__), // Find unit.drush.inc commandfile.\n );\n $php = \"\\$values = drush_invoke_process('@none', 'unit-return-options', array('value'), array('x' => 'y', 'strict' => 0, 'data' => array('a' => 1, 'b' => 2)), array('method' => 'POST')); return array_key_exists('object', \\$values) ? \\$values['object'] : 'no result';\";\n $this->drush('php-eval', array($php), $options);\n $parsed = parse_backend_output($this->getOutput());\n // assert that $parsed has 'x' and 'data'\n $this->assertEquals(array (\n 'x' => 'y',\n 'data' =>\n array (\n 'a' => 1,\n 'b' => 2,\n ),\n), $parsed['object']);\n }", "function post();", "public function stkPushResponseData()\n {\n date_default_timezone_set('Africa/Dar_es_Salaam');\n\n $stkCallbackResponse = file_get_contents('php://input');\n\n return $stkCallbackResponse;\n\n }", "public function showRequestPost();", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "public function postTap()\n {\n //si la peticion es ajax\n if ( Request::ajax() ) {\n $amp = Input::get('amplificador');\n $troba = Input::get('troba');\n $nodo = Input::get('nodo');\n $tap = DigTroba::getTap($amp, $troba, $nodo);\n return Response::json(array('rst'=>1,'datos'=>$tap));\n }\n }", "protected function getPostValues() {}", "public function postAction() {}", "private function sendWenhook($data) {\n $curl = curl_init(\"https://canary.discordapp.com/api/webhooks/269787651719168000/ekizLUh-s7H3nVVa3udULvmOUAyvX9DDGj54_mw3D_7ReD7_h05GgnGfFLtfSmIDA6t1/slack\");\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n if( ! $result = curl_exec($curl))\n {\n return curl_error($curl);\n } \n return true;\n }", "private function postData()\n {\n $post = array_filter($this->post);\n\n return http_build_query($post);\n }", "public function callback(Request $post){\n //$data = json_encode($post->all()).PHP_EOL;\n //file_put_contents($filename, $data, FILE_APPEND | LOCK_EX);\n Payment::callback($post->all());\n }", "private static function getPostParams()\n\t{\n\t\treturn (count($_POST) > 0) ? $_POST : json_decode(file_get_contents('php://input'), true);\n\t}", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "function padma_post_form($data){\n if(!isset($data['padma_ignore_this_form'])){\n\n $data = apply_filters('padma_merge_options', $data);\n\n\n $response = wp_remote_post( \"https://crm.padm.am/api/v1/form_integration\", array(\n 'method' => 'POST',\n 'httpversion' => '1.0',\n 'blocking' => true,\n 'headers' => array(),\n 'body' => $data,\n 'cookies' => array(),\n 'sslverify' => false\n )\n );\n\n if ( is_wp_error( $response ) ) {\n return $response->get_error_message();\n } else {\n return true;\n }\n }\n}", "public function postAction()\n {\n $manager = new \\Art4\\JsonApiClient\\Utils\\Manager();\n $manager->setConfig('optional_item_id', true);\n // @todo handle validation errors\n $document = $manager->parse($this->request->getRawBody());\n $resource = $this->resource->getModel();\n\n // basic attributes\n foreach ($document->get('data')->get('attributes')->asArray(true) as $key => $value) {\n $resource->{$key} = $value;\n }\n\n // @todo handle saving errors\n $resource->save();\n\n return $this->renderSerialized($resource);\n }", "function wp_idolondemand_save_post()\n{\n\t// TODO not sure this is the way to do this, too error prone imo, to investigate\n\t$whitelist = array(\n\t\t\t'127.0.0.1',\n\t\t\t'::1'\n\t);\n\t$input_type = wp_idolondemand_get_add_to_text_index_input_type();\n\t\n\tif(! in_array($_SERVER['REMOTE_ADDR'], $whitelist) || $input_type=='json'){\n\t\t\n\t\t// TODO if status changes to un-publish remove from index\n\t\tglobal $post;\n\t\tif($post){\n\t\t\t\n\t\t\t$post_id = $post->ID;\n\t\t\t$post_ids = array($post_id);\n\t\t\t$response = wp_idolondemand_add_to_text_index($post_ids, \"sync\");\n\t\t\t \n\t\t\t$notice = get_option('otp_notice');\n\t\t\t$notice[$post_id] = $response;\n\t\t\tupdate_option('otp_notice',$notice);\n\t\t\t\n\t\t\treturn $response;\n\t\t}\n\t\t\n\t}else{\n\t\t\n\t\t// TODO on localhost cannot index by url\n\t\t// either override to url or throw errror message\n\t\techo \"On localhost you cannot index by url. Change index input type to json.\";\n\t}\n}", "public function handlePost()\n {\n return parent::handlePost();\n }", "protected function getJsonDecodedFromPost(){\n // $this->app->response()->header(\"Content-Type\", \"application/json\");\n // obtain the JSON of the body of the request\n $post = json_decode($this->app->request()->getBody(), true); // make it a PHP associative array\n return $post;\n }", "protected function mapJson() {\n $post = json_decode(file_get_contents('php://input'), true);\n if(is_null($post)) return;\n foreach($post as $key => $value) {\n $this->data[$key] = $value;\n }\n }", "function send_webhook( $post_id, $post, $update ) {\n \t\t\t// Return if build hook isnt set\n \t\t\tif (!is_string($this->BUILD_HOOK_URL) && strlen($this->BUILD_HOOK_URL) === 0) { return; }\n\n\t\t // Don't fire on blank posts\n\t\t\tif (isset($post->post_status) && $post->post_status == 'published') { return; }\n\n\t\t\t// Only run in production\n\t\t\tif (defined('WP_ENV') && WP_ENV !== 'production') { return; }\n\n\t\t\t$client = new \\GuzzleHttp\\Client();\n\t\t\t$response = $client->post($this->BUILD_HOOK_URL);\n\t\t}", "function zbase_remote_post_json($url, $data, $options = [])\n{\n\t$dataString = '';\n\tforeach ($data as $key => $value)\n\t{\n\t\t$dataString .= $key . '=' . $value . '&';\n\t}\n\trtrim($dataString, '&');\n\t$ch = curl_init($url);\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n\tcurl_setopt($ch, CURLOPT_POST, count($data));\n\tcurl_setopt($ch, CURLOPT_COOKIEJAR, zbase_storage_path() . 'cookie.txt');\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $dataString);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t'Content-Type: application/json',\n\t\t'Content-Length: ' . strlen($dataString))\n\t);\n\t$result = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $result;\n}", "public function webhook_action ()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$id = isset($_GET['order_id']) ? $_GET['order_id'] : 0;\n\n\t\t\tif (empty($id))\n\t\t\t{\n\t\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\t\tdie(\"No order ID received\");\n\t\t\t}\n\n\t\t\t$transaction_id = $this->get_transaction_id_from_order_id($id);\n\t\t\t$payment = self::get_api()->payments->get($transaction_id);\n\n\t\t\t$this->update_status($id, $payment->status);\n\t\t\t$this->log($transaction_id, $payment->status, $id);\n\t\t}\n\t\tcatch (Mollie_API_Exception $e)\n\t\t{\n\t\t\techo \"API call failed: \" . htmlspecialchars($e->getMessage());\n\t\t}\n\n\t\tdie(\"OK\");\n\t}", "public function webhook():bool\n {\n\n }", "function post() \n {\n \n }", "function tower_save_form_data($data) {\n // logic for data validation and saving.\n $post_type = 'tower_' . @$data->get_param('type');\n if (! array_key_exists($post_type, TOWER_CUSTOM_POSTS)) return null;\n\n // backend validation\n $fields = array_merge([\n 'name' => 'title',\n 'rules' => 'required',\n ], TOWER_CUSTOM_POSTS[$post_type]['fields']);\n \n // check if the form has any validation errors\n $validation_errors = tower_form_errors($data, $fields);\n\n $post_id = 0; // id for the new post\n \n if (count($validation_errors) == 0) {\n $post_id = wp_insert_post([\n 'post_type' => $post_type,\n 'post_title' => $data->get_param('title')\n ]);\n if ($post_id > 0) {\n foreach ($fields as $field) {\n update_post_meta(\n $post_id, \n $field['name'], \n sanitize_text_field($data->get_param($field['name']))\n );\n }\n }\n }\n \n echo json_encode([\n 'success' => $post_id > 0,\n 'errors' => $validation_errors,\n ]);\n}", "function get_JSON_input()\n {\n global $_json_input;\n if ( $_json_input != null ) return $_json_input;\n\n // Receive the RAW post data.\n $content = trim(file_get_contents(\"php://input\"));\n\n // Attempt to decode the incoming RAW post data from JSON.\n $_json_input = json_decode($content, true);\n\n // If json_decode failed, the JSON is invalid.\n if (!is_array($_json_input)) {\n return null;\n }\n\n return $_json_input;\n }", "public function post($t);", "public function addPostXhr()\n {\n $postArrayMap = $this->maintainUuid($this->inputHandler->postArrayMap());\n\n $returnValue = $this->interActor->postXhrReturnValue($postArrayMap);\n\n return json_encode(\n [\n self::CONFIRMATION_MESSAGE_KEY => $returnValue->state(),\n 'state' => ['title' => 'Customer', 'url' => ''],\n 'uuid' => $returnValue->uuid(),\n 'data' => [\n 'succeeds' => $returnValue->getSucceedMessages(),\n 'errors' => $returnValue->getFailureErrors()\n ]\n ]\n );\n }", "function on_postback($data){\n\t\t}", "public function handleTransactionWebhook(Wallet $wallet, $payload);", "public function parsePostData()\n {\n }", "public function getPostVariables();", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n // All keys are srings in array, merge it with defaults to override\r\r\n $this->e_data = array_merge($this->default_options, $this->e_data);\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "public function getPostData() {\n \t\n \t// Return POST\n \treturn $this->oPostData;\n }", "public function send_post_request(){\n $url = \\Request::get('url');\n $post_array = \\Request::all();\n\n//\t\t$url = 'http://localhost/_websites/ahmed-badawy.com/site/json-test';\n//\t\t$post_array = array('type' => 'scss', 'source' => '.pre{color:red;background-color:green;}', 'compress'=>true);\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $query = curl_exec($ch);\n curl_close($ch);\n\n return $query;\n }", "function item_post($key = null) {\n $record = json_decode($this->post(), true);\n\n if (($key == null) || ($key == 'id')) {\n $key = $this->get('id');\n $record = array_merge(array('id' => $key), $record);\n }\n $this->crud_post($record);\n }", "public function webhook(Request $request)\n {\n $verified = Flutterwave::verifyWebhook();\n \n // if it is a charge event, verify and confirm it is a successful transaction\n if ($verified && $request->event == 'charge.completed' && $request->data->status == 'successful') {\n $verificationData = Flutterwave::verifyPayment($request->data['id']);\n if ($verificationData['status'] === 'success') {\n // process for successful charge\n \n }\n \n }\n \n // if it is a transfer event, verify and confirm it is a successful transfer\n if ($verified && $request->event == 'transfer.completed') {\n \n $transfer = Flutterwave::transfers()->fetch($request->data['id']);\n \n if($transfer['data']['status'] === 'SUCCESSFUL') {\n // update transfer status to successful in your db\n } else if ($transfer['data']['status'] === 'FAILED') {\n // update transfer status to failed in your db\n // revert customer balance back\n } else if ($transfer['data']['status'] === 'PENDING') {\n // update transfer status to pending in your db\n }\n \n }\n }", "public function callbackResponse()\n {\n return json_decode(file_get_contents('php://input'));\n }", "protected function getArrPost()\n {\n return $this->getServices()\n ->get(\\Application\\Service\\ServiceJsonPostRequest::class)\n ->setObjRequest(\n $this->getRequest()\n )\n ->getJsonPost();\n }", "public function testWebhookDirect()\n {\n $response = $this->withHeaders([\n 'Signature' => env('WEBHOOK_CLIENT_SECRET')\n ])->json('POST', 'watson-webhook', [\n 'job' => 'test1',\n 'parameter' => 1\n ]);\n\n $response->assertStatus(200)\n ->assertJson(['message' => 1]);\n }", "function rest_post_data($url, $data)\n{\n if (is_array($data)) {\n $data = json_encode($data);\n }\n\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n}", "function receive() {\n // Input type 1.\n if ($this->method == 'POST' && isset($_POST[$this->id . '-form_id']) && $_POST[$this->id . '-form_id'] == $this->id) {\n $this->request['raw_input'] = $_POST;\n }\n // Input types 2 and 3.\n else {\n $this->request['raw_input'] = $_GET;\n }\n }", "function handle_post($indata) {\n// showDebug('form_class POST:');\n// showArray($indata); \n return;\n }", "public function getPost()\n {\n $request = $this->getRequest();\n return $request->getPost();\n }", "public static function zapier_static_web_hook( $atts ) {\n extract($atts); // post, data, settings, entry_id, attachments\n $data = wp_unslash($data);\n $form_id = $atts['form_id'];\n\n // Create array for all files with numbered indexes , so that the index on zapier is always the same\n // because the filenames are dynamic and we can't rely on that\n $files = array();\n foreach($attachments as $k => $v){\n $i = 1;\n foreach($v as $ak => $av){\n $files[$i] = array(\n 'url' => $av,\n 'name' => $ak\n );\n $i++;\n }\n }\n\n // @since 1.0.3 - transfer uploaded files\n $data['_super_attachments'] = $attachments;\n \n if( !empty($settings['zapier_enable']) ) {\n $url = $settings['zapier_webhook']; \n if(isset($settings['zapier_exclude_settings']) && $settings['zapier_exclude_settings']=='true'){\n $body = json_encode(\n array(\n 'files'=>$files, \n 'data'=>$data\n )\n );\n }else{\n $body = json_encode(\n array(\n 'files'=>$files, \n 'data'=>$data, \n 'settings'=>$settings\n )\n );\n }\n $response = wp_remote_post(\n $url,\n array(\n 'headers'=>array(\n 'Content-Type'=>'application/json; charset=utf-8'\n ),\n 'body'=>$body\n )\n );\n if ( is_wp_error( $response ) ) {\n $error_message = $response->get_error_message();\n SUPER_Common::output_message( array(\n 'msg' => 'Zapier: ' . $error_message,\n 'form_id' => absint($form_id)\n ));\n }\n }\n }", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->data = $this->data['value'];\r\r\n }\r\r\n }", "function getChatUpdate(){\r\n\t\t$state = $_POST['state'];\r\n\t\t$file = $_POST['file'];\r\n\r\n\t\t//get the json encoded data from this function\r\n\t\t$dataChatUpdate = sendChatUpdate($state, $file);\r\n\r\n\t\t//echo back to the calling domain with jsone encoded data\r\n\t\techo $dataChatUpdate;\r\n\r\n\t}", "public function app_theme_post()\n{\n\n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n\n $theme_color = $data['theme_color'];\n //$company_id = $data['company_id'];\n if(isset($id['id'])){\n $id = $data['id']; \n }\n $data = array(\n 'theme_color' => $theme_color,\n //'company_id' => $company_id,\n 'created_at' => date('Y-m-d H:i:s')\n );\n\n if(!empty($id)){\n // $detail_id = $id[0]->id;\n $where = array(\n 'id' => $id\n );\n unset($data['created_at']);\n $result = $this->model->updateFields('details', $data, $where);\n $msg = \"theme color update successfully\";\n}else {\n $result = $this->model->insertData('details', $data); \n $msg = \"theme color insert successfully\"; \n}\n\n$resp = array('rccode' => 200,'message' =>$msg);\n$this->response($resp);\n}", "public function request(){\n\t\t$request = file_get_contents('php://input');\n\t\treturn json_decode($request,true);\n\t}", "public function data() {\n $request = $this->requestReader->getContents();\n\t\tif ($request) {\n if ($json_post = CJSON::decode($request)){\n\t\t\t\treturn $json_post;\n\t\t\t}else{\n\t\t\t\tparse_str($request,$variables);\n\t\t\t\treturn $variables;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function postSavefilters()\n {\n if (Request::ajax())\n {\n\t\t\t$datatoblob = json_decode(Input::get('selectedvalues'), true);\n //serialization\n $checkuserid = Auth::id();\n $autheduser = User::find(Auth::id());\n $objforuser = new stdClass;\n $objforuser->data = json_encode($datatoblob);\n $objforuser->is_array = is_array($datatoblob); // doing this for proper deserialize\n $objforuser_json = json_encode($objforuser);\n $autheduser->filters_patient = json_encode($objforuser);\n if ($autheduser->forceSave())\n {\n return 'success';\n }else\n {\n return 'nope';\n }\n } else\n {\n return false;\n }\n }", "function _post()\r\n\t\t{\r\n\t\t}", "function wp_send_json_success($data = \\null, $status_code = \\null, $options = 0)\n {\n }", "protected function _postBack($data) {\n if (is_array($data) && isset($data['pos_id']) && isset($data['session_id'])) {\n $args = array(\n 'pos_id' => $data['pos_id'],\n 'session_id' => $data['session_id'],\n 'ts' => now() * 1123\n );\n $md5Key = $this->getConfig()->getMD5Key1();\n $args['sig'] = md5($args['pos_id'] . $args['session_id'] . $args['ts'] . $md5Key);\n $url = $this->getConfig()->getGatewayUrl() . \"/UTF/Payment/get/xml\";\n\n try {\n $body = Mage::helper('payupl')->sendPost($url, $args);\n if (!$body) {\n throw new Exception('Cannot connect to ' . $url);\n }\n return new Varien_Simplexml_Element($body);\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n return false;\n }", "private function getPostData()\n {\n $postData = $this->request->getPostValue();\n\n /** Magento may adds the SID session parameter, depending on the store configuration.\n * We don't need or want to use this parameter, so remove it from the retrieved post data. */\n unset($postData['SID']);\n\n //Set original postdata before setting it to case lower.\n $this->originalPostData = $postData;\n\n //Create post data array, change key values to lower case.\n $postDataLowerCase = array_change_key_case($postData, CASE_LOWER);\n $this->postData = $postDataLowerCase;\n }", "public function tutorial_post(): string\n {\n $tutorial_name = $_POST['tutorial_name'];\n $database_key = '';\n\n // database key to put to true\n switch ($tutorial_name) {\n case 'my_news':\n $database_key = 'news_dot';\n break;\n default:\n $database_key = 'nokey';\n break;\n }\n\n header('Content-Type: application/json; charset=utf-8');\n if ($database_key == 'nokey') {\n return '{\"success\":0}';\n }\n\n DB::table('users')\n ->where('user_id', '=', CurrentSession::$user->id)\n ->update([$database_key => 1]);\n\n return '{\"success\":1}';\n }", "public function dealswebhook(){\n\t\t//echo \"<br/>\".getcwd();\n\t\techo \"<pre>\";\n\t\t$deal= file_get_contents(getcwd().'/webhook.txt');\n\t\t$deal=json_decode($deal);\n\t\t$dealdata=array();\n\t\tif($deal->meta){\n\t\t\t$action= $deal->meta->action;\n\t\t\t$dealdata['d_id']= $deal->meta->id;\n\t\t\t$dealdata['company_id']= $deal->meta->company_id;\n\t\t\tif($deal->current){\n\t\t\t\t$dealdata['title']= $deal->current->title;\n\t\t\t\t$dealdata['stage_id']= $deal->current->stage_id;\n\t\t\t\t$dealdata['person_id']= $deal->current->person_id;\n\t\t\t\t$dealdata['creator_user_id']= $deal->current->creator_user_id;\n\t\t\t\t$dealdata['value']= $deal->current->value?$deal->current->value:'';\n\t\t\t\t$dealdata['currency']= $deal->current->currency;\n\t\t\t\t$dealdata['add_time']= $deal->current->add_time;\n\t\t\t\t$dealdata['update_time']= $deal->current->update_time;\n\t\t\t\tif(!empty($deal->current->stage_change_time)){\n\t\t\t\t\t$dealdata['stage_change_time']= $deal->current->stage_change_time;\n\t\t\t\t}else{\n\t\t\t\t\t$dealdata['stage_change_time']= $deal->current->add_time;\n\t\t\t\t}\n\t\t\t\t$dealdata['status']= $deal->current->status;\n\t\t\t\t$dealdata['visible_to']= $deal->current->visible_to;\n\t\t\t\t$dealid= DB::table('pd_deals')->where('d_id', $deal->meta->id)->get();\n\t\t\t\tif(empty($dealid[0])){\n\t\t\t\t\t$id = DB::table('pd_deals')->insertGetId($dealdata);\n\t\t\t\t\tif($id){\n\t\t\t\t\t\techo \"Aded<br/>\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"Error<br/>\";\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$id=DB::table('pd_deals')\n\t\t\t\t\t\t->where('d_id', $deal->meta->id)\n\t\t\t\t\t\t->update($dealdata);\n\t\t\t\t\tif($id){\n\t\t\t\t\t\techo \"Update 1111111111<br/>\";\n\t\t\t\t\t}\t\n\t\t\t }\n\t\t\t}\n\t\t}\n\t\tprint_r($dealdata);\n\t\tprint_r($deal); \n }", "public function click_notification_post()\n\t{ \n\t\tif($_SERVER['REQUEST_METHOD'] == \"POST\"){\n \t// Get data\n\t\t\tif(isset($_POST)){\n\t\t\t\t$permission=false;\n\t\t\t\t$token= isset($_POST['token']) ?($_POST['token']) : \"\";\n\t\t\t\t$permission=$this->matchAppToken($token);\n\t\t\t\tif($permission==true){\n\t\t\t\t\t$notification_id= isset($_POST['notification_id']) ?($_POST['notification_id']) : \"\";\n\t\t\t\t\tif($notification_id!=''){\n\t\t\t\t\t\t$response=$this->advance_notification_model->click_notification($notification_id);\t\n\t\t\t\t\t\tif($response){\n\t\t\t\t\t\t\t$json = array(\"status\" => 1, \"message\" => \"Ok\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Somthing went wrong. Please try again later\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Notification ID has been empty.\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Token has been not matched\");\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request has been uncompleted\");\n\t\t\t}\n\t\t}else{\n\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request method not accepted\");\n\t\t}\n\t\t$this->response($json, REST_Controller::HTTP_OK);\n\t}", "public function OnPost($post) {\n\n }" ]
[ "0.6937392", "0.6329134", "0.61869603", "0.61526287", "0.61526287", "0.61526287", "0.61262023", "0.61045134", "0.6097454", "0.6094693", "0.607673", "0.60496354", "0.6002591", "0.59665895", "0.5954205", "0.59539044", "0.5932681", "0.5926431", "0.59165907", "0.591444", "0.58611965", "0.5835446", "0.5826253", "0.581856", "0.57982844", "0.5740053", "0.5714221", "0.56836563", "0.5668756", "0.56673133", "0.5663792", "0.56380117", "0.5632719", "0.56109244", "0.56048083", "0.56013393", "0.5596715", "0.55802363", "0.556481", "0.5558659", "0.55578995", "0.5553819", "0.5549058", "0.5548827", "0.55417734", "0.5539533", "0.5522064", "0.5515063", "0.5508879", "0.5494489", "0.5484862", "0.548284", "0.54796815", "0.54796815", "0.54796815", "0.54724294", "0.5471735", "0.5469056", "0.5460977", "0.54606396", "0.545725", "0.5455841", "0.5454215", "0.54526526", "0.54492635", "0.54479545", "0.5437172", "0.54368013", "0.542436", "0.541855", "0.5399104", "0.53954315", "0.5394127", "0.5393138", "0.5387494", "0.53866863", "0.5383061", "0.5381268", "0.5358493", "0.53498936", "0.5347581", "0.5343281", "0.5340891", "0.53384924", "0.53381073", "0.5336935", "0.5330855", "0.53210014", "0.5317016", "0.53165495", "0.5309334", "0.5306705", "0.5305126", "0.53027225", "0.52953875", "0.52924275", "0.5291136", "0.5289611", "0.5286213", "0.52858937", "0.52855915" ]
0.0
-1
Show the signup screen to the user.
public function signup() { return view('auth.signup'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function signup() {\n $this->template->content = View::instance(\"v_users_signup\");\n \n # Render the view\n echo $this->template;\n }", "public function signup() {\n $this->template->content = View::instance('v_users_signup');\n $this->template->title = \"Sign Up\";\n\n // Render the view\n echo $this->template;\n\n }", "public function signup(){\n \n $this->data[\"title_tag\"]=\"Lobster | Accounts | Signup\";\n \n $this->view(\"accounts/signup\",$this->data);\n }", "public function showSignUpForm() {\n if(!config('springintoaction.signup.allow')) {\n return view('springintoaction::frontend.signup_closed');\n }\n\n return view('springintoaction::frontend.signup');\n }", "public function signup()\n\t{\n\t\treturn View::make('auth/signup', ['title' => 'Sign un']);\n\t}", "public function showSignup()\n\t{\n\t\treturn View::make('signup');\n\t}", "public function signup()\n\t{\n\t\treturn View::make('users.signup');\n\t}", "public function signup() {\n // set third param to 1 so header/footer isn't displayed again\n $this->view->render('index/signup', null, 1);\n }", "public function signup(){\n /* echo \"Signup called.\";*/\n\t# First, set the content of the template with a view file\n\t$this->template->content = View::instance('v_users_signup');\n\n\t# Now set the <title> tag\n\t$this->template->title = \"OPA! Signup\";\n\n\t# Render the view\n\techo $this->template;\n }", "public function sign_up()\n\t{\n\t\t$this->view('/');\n\t}", "public function showSignupForm()\n {\n return view('auth.signup');\n }", "public function showSignupForm()\n {\n return view('auth.signup');\n }", "public function signupForm()\n {\n \t# code...\n \treturn view(\"external-pages.sign-up\");\n }", "function viewSignUpForm() {\n\t$view = new viewModel();\n\t$view->showSignUpForm();\t\n}", "public function getSignUp(){\n\t\t//make the sign up view\n\t\treturn View::make('account.signup');\n\t}", "public function signUp()\n {\n return view('user.signup');\n }", "public function signup()\n {\n return view('users.signup');\n }", "public function renderAdminSignupPage()\n {\n return view('admin_views.signup');\n }", "public function signUp()\n\t{\n\t\t$user_name = Request::input('user_name');\n\n\t\treturn view('sign-up');\n\t}", "public function signupAction()\n {\n $this->tag->setTitle(__('Sign up'));\n $this->siteDesc = __('Sign up');\n\n if ($this->request->isPost() == true) {\n $user = new Users();\n $signup = $user->signup();\n\n if ($signup instanceof Users) {\n $this->flash->notice(\n '<strong>' . __('Success') . '!</strong> ' .\n __(\"Check Email to activate your account.\")\n );\n } else {\n $this->view->setVar('errors', new Arr($user->getMessages()));\n $this->flash->warning('<strong>' . __('Warning') . '!</strong> ' . __(\"Please correct the errors.\"));\n }\n }\n }", "public function signup()\n {\n return view('signup');\n }", "function dp_signup_button() { \n\tif(!is_user_logged_in() && get_option('users_can_register') && get_option('dp_header_signup')) {\n\t\techo '<a class=\"btn btn-green btn-signup\" href=\"'.site_url('wp-login.php?action=register', 'login').'\">'.__('Sign up', 'dp').'</a>';\n\t}\n\t\n\treturn;\n}", "public function showSignupForm()\n {\n return view('signup');\n }", "public function getSignup()\n {\n return View::make('auth.signup');\n }", "public function getFbSignUp(){\n\t\t//make the sign up view\n\t\treturn View::make('account.fb-signup');\n\t}", "public function signup($params = null)\n\t{\n\t\t// On set la variable a afficher sur dans la vue\n\t\t$this->set('title', 'Sign up');\n\t\t// On fait le rendu de la vue signup.php\n\t\t$this->render('signup');\n\t}", "public function showRegistrationForm()\n {\n $askForAccount = false;\n return view('client.auth.register',compact(\"askForAccount\"));\n }", "public function signup()\n {\n if(isset($_SESSION['id'])) {\n return view('signup');\n }else {\n header('Location: login');\n }\n }", "public function please_sign_up() {\n\t\t$this->infoAlert(\"You're not signed in, or not signed up, either way - head this way! <a href='\"\n\t\t\t.site_url('/wp-login.php?action=register&redirect_to='.get_permalink()).\n\t\t\t\"'>Login/Register</a>\");\n\t}", "public function signUpUser()\r\n {\r\n $error = null;\r\n return callView('login/signup-user', ['error'=>$error]);\r\n }", "public function action_signup()\r\n\t{\r\n\t\t$this->title = 'Sign Up';\r\n\t\t$user = ORM::factory('user');\r\n\t\t$errors = array();\r\n\t\tif ($_POST)\r\n\t\t{\r\n\t\t\t$user->values($_POST);\r\n\t\t\t$user->level_id = Model_User::DEFAULT_LEVEL;\r\n\t\t\tif ($user->check())\r\n\t\t\t{\r\n\t\t\t\t$user->save(); // must save before adding relations\r\n\t\t\t\t$user->add('roles', ORM::factory('role', array('name'=>'login')));\r\n\t\t\t\t$this->session->set($this->success_session_key, \"Your account is set up.\");\r\n\t\t\t\t$user->login($_POST);\r\n\t\t\t\t$user->create_sample_form();\r\n\t\t\t\t$this->request->redirect('account');\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$errors = $user->validate()->errors('validate');\r\n\t\t\t}\r\n\t\t}\r\n\t\t$view = 'account/signup';\r\n\t\t$vars = array(\r\n\t\t\t'user' => $user,\r\n\t\t\t'errors' => $errors,\r\n\t\t);\r\n\t\t$this->template->content = View::factory($view)->set($vars);\r\n\t}", "public function signup(){\n $this->load->view('signup');\n }", "public function signUp() {\n if ($this->request->is('post')) {\n\n $this->User->create();\n\n if ($this->User->save($this->request->data['signUp'])) {\n $this->Flash->set(__(\"Your user has been created\"),array(\n 'element' => 'success'\n ));\n return $this->redirect(array('action' => 'index'));\n }\n $this->Flash->set(\n __('The user could not be saved. Please, try again.',\n array(\n 'element' => 'error.ctp'\n ))\n );\n }\n\n $this->autoRender = false;\n }", "public function showRegistrationForm()\n {\n return view('skins.' . config('pilot.SITE_SKIN') . '.auth.register');\n }", "public function displayRegisterForm()\n {\n // charger le HTML de notre template\n require OPROFILE_TEMPLATES_DIR . 'register-form.php';\n }", "public function singUpPage()\n {\n return view('pages/signup');\n }", "public function signupAction()\n {\n $form = new SignUpForm();\n\n if ($this->request->isPost()) {\n\n if ($form->isValid($this->request->getPost()) != false) {\n\n $user = new Users();\n\n $user->assign(array(\n 'name' => $this->request->getPost('name', 'striptags'),\n 'email' => $this->request->getPost('email'),\n 'password' => $this->security->hash($this->request->getPost('password')),\n 'profilesId' => 2\n ));\n\n if ($user->save()) {\n return $this->dispatcher->forward(array(\n 'controller' => 'index',\n 'action' => 'index'\n ));\n }\n\n $this->flash->error($user->getMessages());\n }\n }\n\n $this->view->form = $form;\n }", "public function signupAction()\n {\n $form = new SignUpForm();\n\n if ($this->request->isPost()) {\n\n if ($form->isValid($this->request->getPost()) != false) {\n\n $user = new Users();\n\n $user->assign(array(\n 'name' => $this->request->getPost('name', 'striptags'),\n 'email' => $this->request->getPost('email'),\n 'password' => $this->security->hash($this->request->getPost('password')),\n 'profilesId' => 2\n ));\n\n if ($user->save()) {\n return $this->dispatcher->forward(array(\n 'controller' => 'index',\n 'action' => 'index'\n ));\n }\n\n $this->flash->error($user->getMessages());\n }\n }\n\n $this->view->form = $form;\n }", "public function showRegistrationForm()\n {\n return view('signup');\n }", "public function signup()\n {\n if ($this->model->signup())\n $this->redirect(\"home\");\n }", "public function index() {\n return view('springintoaction::frontend.signup');\n }", "public function signupAction(){\n return $this->render('HMMainBundle:Default:index.html.twig');\n }", "public function showRegistrationForm()\n {\n abort_unless(config('access.registration'), 404);\n\n return view('frontend.auth.register');\n }", "public function registration()\n {\n $view = new View('login_registration');\n $view->title = 'Bilder-DB';\n $view->heading = 'Registration';\n $view->display();\n }", "public function showRegistrationForm() {\n //parent::showRegistrationForm();\n $data = array();\n\n $data = $this->example_of_user();\n $data['title'] = 'RegisterForm';\n\n return view('frontend.auth.register', $data);\n }", "private function _signUpPageRequested()\n {\n $this->utility->redirect('signup');\n }", "public function signupAction()\n {\n // check request method\n if (Router::getMethod() == 'POST') {\n $username = Router::getParam('username');\n $password = Router::getParam('password');\n\n // fill user object with data and try to save\n $user = new User($username, $password, Router::getIp());\n if (!$user->save()) {\n // add errors to display\n $this->setMessage($user->getErrors(), 'error');\n $this->setVar('username', $user->getUsername());\n } else {\n Router::redirect('index', 'signin');\n }\n } elseif (isset($_SESSION['userId'])) {\n Router::redirect('index', 'index');\n }\n\n $this->setVar('title', 'Sign up page');\n $this->render('signup');\n }", "public function index()\n {\n $this->data['pagebody'] = 'sign_up';\n\t$this->render();\n echo \"this is the most pointless thing I have ever done\";\n \n }", "public function sign_up()\n\t{\n\t\t$post = $this->input->post();\n\t\t$return = $this->accounts->register($post, 'settings'); /*this will redirect to settings page */\n\t\t// debug($this->session);\n\t\t// debug($return, 1);\n\t}", "public function onSignUp()\n {\n $data = post();\n $data['requires_confirmation'] = $this->requiresConfirmation;\n\n if (app(SignUpHandler::class)->handle($data, (bool)post('as_guest'))) {\n if ($this->requiresConfirmation) {\n return ['.mall-signup-form' => $this->renderPartial($this->alias . '::confirm.htm')];\n }\n\n return $this->redirect();\n }\n }", "public function signUpAction() {\n //initialize an emtpy message string\n $message = '';\n //check if we have a logged in user\n if ($this->has('security.context') && $this->getUser() && TRUE === $this->get('security.context')->isGranted('ROLE_NOTACTIVE')) {\n //set a hint message for the user\n $message = $this->get('translator')->trans('you will be logged out and logged in as the new user');\n }\n //initialize the form validation groups array\n $formValidationGroups = array('signup');\n $container = $this->container;\n //get the login name configuration\n $loginNameRequired = $container->getParameter('login_name_required');\n //check if the login name is required\n if ($loginNameRequired) {\n //add the login name group to the form validation array\n $formValidationGroups [] = 'loginName';\n }\n //get the request object\n $request = $this->getRequest();\n //create an emtpy user object\n $user = new User();\n //this flag is used in the view to correctly render the widgets\n $popupFlag = FALSE;\n //check if this is an ajax request\n if ($request->isXmlHttpRequest()) {\n //create a signup form\n $formBuilder = $this->createFormBuilder($user, array(\n 'validation_groups' => $formValidationGroups\n ))\n ->add('email')\n ->add('firstName', null, array('required' => false))\n ->add('userPassword');\n //use the popup twig\n $view = 'ObjectsUserBundle:User:signup_popup.html.twig';\n $popupFlag = TRUE;\n } else {\n //create a signup form\n $formBuilder = $this->createFormBuilder($user, array(\n 'validation_groups' => $formValidationGroups\n ))\n ->add('email', 'email')\n ->add('firstName', null, array('required' => false))\n ->add('userPassword', 'repeated', array(\n 'type' => 'password',\n 'first_name' => 'Password',\n 'second_name' => 'RePassword',\n 'invalid_message' => \"The passwords don't match\",\n ));\n //use the signup page\n $view = 'ObjectsUserBundle:User:signup.html.twig';\n }\n //check if the login name is required\n if ($loginNameRequired) {\n //add the login name field\n $formBuilder->add('loginName');\n }\n //create the form\n $form = $formBuilder->getForm();\n //check if this is the user posted his data\n if ($request->getMethod() == 'POST') {\n //fill the form data from the request\n $form->handleRequest($request);\n //check if the form values are correct\n if ($form->isValid()) {\n //get the user object from the form\n $user = $form->getData();\n if (!$loginNameRequired) {\n $user->setLoginName($this->suggestLoginName($user->__toString()));\n }\n //user data are valid finish the signup process\n return $this->finishSignUp($user);\n }\n }\n $twitterSignupEnabled = $container->getParameter('twitter_signup_enabled');\n $facebookSignupEnabled = $container->getParameter('facebook_signup_enabled');\n $linkedinSignupEnabled = $container->getParameter('linkedin_signup_enabled');\n $googleSignupEnabled = $container->getParameter('google_signup_enabled');\n return $this->render($view, array(\n 'form' => $form->createView(),\n 'loginNameRequired' => $loginNameRequired,\n 'message' => $message,\n 'popupFlag' => $popupFlag,\n 'twitterSignupEnabled' => $twitterSignupEnabled,\n 'facebookSignupEnabled' => $facebookSignupEnabled,\n 'linkedinSignupEnabled' => $linkedinSignupEnabled,\n 'googleSignupEnabled' => $googleSignupEnabled\n ));\n }", "public function getSignupForm()\n {\n $this->nav('navbar.logged.out.signup');\n $this->title('navbar.logged.out.signup');\n\n return $this->view('auth.signup');\n }", "public function showForm()\n {\n return view('auth.register-step2');\n }", "public function authorSignUp(Request $request)\n {\n return view('web.author.signUp');\n }", "public function showRegisterForm()\n {\n return view('ui.pages.register');\n }", "public function showRegistrationForm()\n {\n return view('instructor.auth.register');\n }", "public function new_user()\n\t{\n\t\t$this->load->view('signup_view');\n\t}", "protected function renderSignUp(){\n return '<form class=\"forms\" action=\"'.Router::urlFor('check_signup').'\" method=\"post\">\n <input class=\"forms-text\" type=\"text\" name=\"fullname\" placeholder=\"Nom complet\">\n <input class=\"forms-text\" type=\"text\" name=\"username\" placeholder=\"Pseudo\">\n <input class=\"forms-text\" type=\"password\" name=\"password\" placeholder=\"Mot de passe\">\n <input class=\"forms-text\" type=\"password\" name=\"password_verify\" placeholder=\"Retape mot de passe\">\n <button class=\"forms-button\" name=\"login_button\" type=\"submit\">Créer son compte</button>\n </form>';\n }", "public function signup(){\n\t\t\trequire 'models/Login_model.php';\n\t\t\t$model = new Login_model();\n\t\t\t$model->signup();\n\t\t\theader('location:'.URL);\n\t\t}", "public function display_account_register( ){\n\t\tif( $this->is_page_visible( \"register\" ) ){\n\t\t\tif( file_exists( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_register.php' ) )\t\n\t\t\t\tinclude( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_register.php' );\n\t\t\telse\n\t\t\t\tinclude( WP_PLUGIN_DIR . \"/\" . EC_PLUGIN_DIRECTORY . '/design/layout/' . get_option( 'ec_option_latest_layout' ) . '/ec_account_register.php' );\n\t\t}\n\t}", "public function showRegistrationForm()\n {\n return view('privato.auth.register');\n }", "public function showRegistrationForm()\n {\n return view('adminlte::auth.register');\n }", "public function actionSignup()\n { \n // get setting value for 'Registration Needs Activation'\n $rna = Yii::$app->params['rna'];\n\n // if 'rna' value is 'true', we instantiate SignupForm in 'rna' scenario\n $model = $rna ? new SignupForm(['scenario' => 'rna']) : new SignupForm();\n\n // if validation didn't pass, reload the form to show errors\n if (!$model->load(Yii::$app->request->post()) || !$model->validate()) {\n return $this->render('signup', ['model' => $model]); \n }\n\n // try to save user data in database, if successful, the user object will be returned\n $user = $model->signup();\n\n if (!$user) {\n // display error message to user\n Yii::$app->session->setFlash('error', Yii::t('app', 'We couldn\\'t sign you up, please contact us.'));\n return $this->refresh();\n }\n\n // user is saved but activation is needed, use signupWithActivation()\n if ($user->status === User::STATUS_INACTIVE) {\n $this->signupWithActivation($model, $user);\n return $this->refresh();\n }\n\n // now we will try to log user in\n // if login fails we will display error message, else just redirect to home page\n \n if (!Yii::$app->user->login($user)) {\n // display error message to user\n Yii::$app->session->setFlash('warning', Yii::t('app', 'Please try to log in.'));\n\n // log this error, so we can debug possible problem easier.\n Yii::error('Login after sign up failed! User '.Html::encode($user->username).' could not log in.');\n }\n \n return $this->goHome();\n }", "public function create()\n {\n return view('sign_up');\n }", "public function create()\n {\n return view('login.signup');\n }", "public function sign_up()\n {\n\n }", "public function signup() {\n\t\t//$this->set('title_for_layout','Sign Up');\n\t\t//$this->layout = 'clean';\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->request->data['User']['username'] = strip_tags($this->request->data['User']['username']);\n\t\t\t$this->request->data['User']['fullname'] = strip_tags($this->request->data['User']['fullname']);\n\t\t\t$this->request->data['User']['location'] = strip_tags($this->request->data['User']['location']);\n\t\t\t//$this->request->data['User']['slug'] = $this->toSlug($this->request->data['User']['username']); //Should happen automagically with the Sluggable plugin\n\t\t\t\n\t\t\t//Register the user\n\t\t\t$user = $this->User->register($this->request->data,true,false);\n\t\t\tif (!empty($user)) {\n\t\t\t\t//Generate a public key that the user can use to login later (without username and password)\n\t\t\t\t//$this->User->generateAndSavePublicKey($user);\n\t\t\t\t\n\t\t\t\t//Send the user their activation email\n\t\t\t\t$options = array(\n\t\t\t\t\t\t\t\t\t'layout'=>'signup_activate',\n\t\t\t\t\t\t\t\t\t'subject'=>__('Activate your account at Prept!', true),\n\t\t\t\t\t\t\t\t\t'view'=>'default'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t$viewVars = array('user'=>$user,'token'=>$user['User']['email_token']);\n\t\t\t\t$this->_sendEmail($user['User']['email'],$options,$viewVars);\n\t\t\t\t$this->User->id = $user['User']['id'];\n\t\t\t\t$this->request->data['User']['id'] = $this->User->id; \n\t\t\t\t$this->Auth->autoRedirect = false;\n\t\t\t\tif($this->Auth->login($this->request->data['User'])){\n\t\t\t\t\t//The login was a success\n\t\t\t\t\tunset($this->request->data['User']);\n\t\t\t\t\t$this->Session->setFlash(__('You have successfully created an account &mdash; now get to studying.', true));\n\t\t\t\t\t$this->Auth->loginRedirect = array('admin'=>false,'controller'=>'users','action'=>'backpack');\n\t\t\t\t\treturn $this->redirect($this->Auth->loginRedirect);\n\t\t\t\t}else{\n\t\t\t\t\t$this->Session->setFlash(__(\"There was an error logging you in.\", true));\n\t\t\t\t\t$this->redirect(array('admin'=>false,'action' => 'login'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function signUp()\n {\n switch ($_SERVER['REQUEST_METHOD'])\n {\n case 'GET':\n parent::view(\"Sign Up\", \"signup.php\");\n break;\n\n case 'POST':\n $newUser = new SignUpViewModel();\n $newUser->setEmail($_POST['email']);\n $newUser->setUsername($_POST['username']);\n $newUser->setPassword($_POST['password']);\n $newUser->setPassword2($_POST['password2']);\n\n $userManager = new UserManager($this->userRepository);\n $result = $userManager->signUp($newUser);\n if($result)\n {\n header(\"location:/\". APP_HOST . \"account/login\");\n }\n else\n {\n parent::view(\"Sign Up\",\"signup.php\",\n $newUser, null, $userManager->getMessages());\n }\n\n break;\n\n default:\n break;\n }\n }", "public function getSignup(){\n return view('pages.signup');\n }", "public function signup()\n\t{\n\t\t$id_telefono = $this->session->userdata('username');\n\t\t$data['estado'] = $this->plataforma_model->getEstado($id_telefono); \n\t\t$data['saldo'] = $this->plataforma_model->getSaldo($id_telefono); \n\t\t$data['usuario'] = $this->plataforma_model->getUserInfo($id_telefono); \n\t\t$this->load->view('signup',$data);\n\t}", "public function showRegisterForm()\n {\n return view('dashboard.user.registerForm');\n }", "public function signup($error = NULL) {\n $this->template->content3=View::instance('v_users_signup');\n\n $this->template->title= APP_NAME. \" :: Sign up\";\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 # error checking passed to view\n $this->template->content3->error = $error;\n echo $this->template;\n }", "public function registration() {\n $this->load->view('header');\n $this->load->view('user_registration');\n $this->load->view('footer');\n }", "public function showRegistrationForm()\n {\n return view('auth.register');\n }", "function register() {\n\n/* ... this form is not to be shown when logged in; if logged in just show the home page instead (unless we just completed registering an account) */\n if ($this->Model_Account->amILoggedIn()) {\n if (!array_key_exists( 'registerMsg', $_SESSION )) {\n redirect( \"mainpage/index\", \"refresh\" );\n }\n }\n\n/* ... define values for template variables to display on page */\n $data['title'] = \"Account Registration - \".$this->config->item( 'siteName' );\n\n/* ... set the name of the page to be displayed */\n $data['main'] = \"register\";\n\n/* ... complete our flow as we would for a normal page */\n $this->index( $data );\n\n/* ... time to go */\n return;\n }", "public function showRegistrationForm()\n {\n return view('laboratorio.auth.register');\n \n }", "public function viewSignupForm($error=null) {\n $this->getSmarty()->assign('pageName', 'Account registration');\n $this->getSmarty()->assign('pageTitle', 'Sign up');\n $this->getSmarty()->assign('error',$error);\n $this->getSmarty()->assign('formType',true); // si es true, registra un usuario\n $this->getSmarty()->display('templates/user_form.tpl');\n }", "public function showRegistrationForm()\n {\n return view('admin.auth.register');\n }", "public function signupAction()\n {\n $form = new SignUpForm();\n\n if ($this->request->isPost()) {\n if($this->security->checkToken())\n {\n if ($form->isValid($this->request->getPost()) != false) {\n $tampemail = $this->request->getPost('email');\n $user = new Users([\n 'name' => $this->request->getPost('name', 'striptags'),\n 'lastname' => $this->request->getPost('lastname', 'striptags'),\n 'email' => $this->request->getPost('email'),\n 'password' => $this->security->hash($this->request->getPost('password')),\n 'profilesId' => 2,\n 'type' => $this->request->getPost('type'),\n 'skype' => $this->request->getPost('skype'),\n 'phone' => $this->request->getPost('phone'),\n 'company' => $this->request->getPost('company'),\n 'address' => $this->request->getPost('address'),\n 'city' => $this->request->getPost('city'),\n 'country' => $this->request->getPost('country'),\n ]);\n\n if ($user->save()) {\n $this->flashSess->success(\"A confirmation mail has been sent to \".$tampemail);\n $this->view->disable();\n return $this->response->redirect('');\n }\n\n $this->flash->error($user->getMessages());\n }\n }\n else {\n $this->flash->error('CSRF Validation is Failed');\n }\n }\n\n $this->view->form = $form;\n }", "public function showRegisterForm()\n {\n return view('estagiarios.auth.register');\n }", "private static function signup() {\r\n\t\t$user = new User($_POST);\r\n\t\t$_SESSION['badUser'] = new User($user->getParameters()); // used by view to temporarily store signup form input\r\n\t\t$_SESSION['badUser']->setErrors($user->getErrors());\r\n\t\t$_SESSION['badUser']->clearPassword();\r\n\r\n\t\t// check for validation errors\r\n\t\tif ($user->getErrorCount() > 0) {\r\n\t\t\tself::alertMessage('danger', 'One or more fields contained errors. Check below for details. Make any needed corrections and try again.');\r\n\t\t\tSignupView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// make sure user name is not already taken\r\n\t\tif (UsersDB::userExists($user->getUserName())) {\r\n\t\t\tself::alertMessage('danger', 'User name already exists. You must choose another.');\r\n\t\t\tSignupView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// make sure main character name is not already taken\r\n\t\tif (UsersDB::mainExists($user->getMainName())) {\r\n\t\t\tself::alertMessage('danger', 'The main character name is already associated with another user.');\r\n\t\t\tSignupView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// user name available. send add request to database and check for success\r\n\t\tUsersDB::addUser($user);\r\n\t\tif ($user->getErrorCount() > 0) {\r\n\t\t\tself::alertMessage('danger', 'Failed to add user to database. Contact support.');\r\n\t\t\tSignupView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// user is valid and should be logged in at this point\r\n\t\tunset($_SESSION['badUser']);\r\n\t\t$_SESSION['user'] = $user;\r\n\r\n\t\t// create a random verification code, text it to the user's phone, and display verification page\r\n\t\tTextMessageController::sendVerificationCode();\r\n\t\tVerificationView::show();\r\n\t}", "public function create()\n {\n // Show sigup screen\n \treturn view('session_new.register');\n }", "public function defaultSignup()\n {\n return view('user.default-signup');\n }", "public function showRegistrationForm()\n {\n return view('frontend.user_registration');\n }", "public function index()\n {\n return View::component('SignUp'); \n }", "public function showRegistration()\n\t{\n\t\t# if the user is already authenticated then they can't register and they can't log in\n\t\t# so get them out of here.\n\t\tif( userIsAuthenticated() ) {\n\t\t\treturn Redirect::to('profile');\n\t\t}\n\n\t\t# if we get here then forget the redirect value as the user has used the global sign in link\n\t\t# and we won't need to take them anywhere specific after authentication\n\t\tSession::forget('previousPage');\n\n\t\t# error vars, something went wrong!\n\t\tif(Session::has('registration-errors')) {\n\t\t\t$errors = reformatErrors(Session::get('registration-errors')['errors']);\n\t\t\t$message = Session::get('registration-errors')['public'];\n\t\t\t$messageClass = \"danger\";\n\n\t\t\t# grab the old form data\n\t\t\t$input = Input::old();\n\t\t}\n\n\t\t# indicate what we're on to the view. This is used to prevent the auth/register pop up\n\t\t# when viewing these pages\n\t\t$page = \"register\";\n\n\t\t$pageTitle = \"Register\";\n\n\t\treturn View::make('register.index', compact('errors', 'message', 'messageClass', 'input', 'form', 'page', 'pageTitle'));\n\t}", "public function index()\n {\n $this->view->title = \"Signup | Frindse\";\n $this->view->version = SITE_TEMPLATES_VER;\n $this->view->stylesheet = \"signup\";\n $this->view->javascript = \"Signup\";\n $this->view->header = \"header-logged-out\";\n\n // Now create the view\n $this->view->render('signup', 'index', SITE_TEMPLATES_VER);\n }", "public function showRegistrationForm()\n {\n return redirect()->route('frontend.account.register');\n //return theme_view('account.register');\n }", "public function showUserCreationForm()\n {\n return view('admin.user_create');\n }", "public function actionSignup()\n\t{\n\t\t$model = CoreSettings::findOne(1);\n if ($model === null) {\n $model = new CoreSettings();\n }\n\t\t$model->scenario = CoreSettings::SCENARIO_SIGNUP;\n\n if (Yii::$app->request->isPost) {\n $model->load(Yii::$app->request->post());\n // $postData = Yii::$app->request->post();\n // $model->load($postData);\n // $model->order = $postData['order'] ? $postData['order'] : 0;\n\n if ($model->save()) {\n Yii::$app->session->setFlash('success', Yii::t('app', 'Signup setting success updated.'));\n return $this->redirect(['signup']);\n\n } else {\n if (Yii::$app->request->isAjax) {\n return \\yii\\helpers\\Json::encode(\\app\\components\\widgets\\ActiveForm::validate($model));\n }\n }\n }\n\n\t\t$this->view->title = Yii::t('app', 'Signup Settings');\n\t\t$this->view->description = Yii::t('app', 'The user signup process is a crucial element of your {app-name} platform. You need to design a signup process that is user friendly but also gets the initial information you need from new users. On this page, you can configure your signup process.', ['app-name' => Yii::$app->name]);\n\t\t$this->view->keywords = '';\n\t\treturn $this->render('admin_signup', [\n\t\t\t'model' => $model,\n\t\t]);\n\t}", "public function showRegistrationForm()\n {\n return view('user.auth.login');\n }", "public function show(signUp $signUp)\n {\n //\n }", "static function signup($app) {\n $result = AuthControllerNative::signup($app->request->post());\n if($result['registered']) {\n return $app->render(200, $result);\n } else {\n return $app->render(400, $result);\n }\n }", "public function showRegisterForm(){\n return view('auth.entreprise-register');\n }", "public function ShowRegistrationForm(){\n return view('Auth.register');\n }", "public function register_show_2()\n {\n return view('fontend.user.verify');\n }", "public function signInPage() {\n $view = new View('inscription');\n $view->generate();\n }", "public function create()\n {\n return View::make(Config::get('confide::signup_form'))\n \t\t\t->with('errors', true);\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 }", "public function display()\n\t{\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_users', false));\n\t}" ]
[ "0.8167798", "0.80042255", "0.78897834", "0.77851874", "0.76697737", "0.7633546", "0.7590219", "0.75191814", "0.73686004", "0.735869", "0.7305067", "0.7305067", "0.7297191", "0.72189325", "0.7191685", "0.7188486", "0.7154975", "0.706585", "0.7057512", "0.7043767", "0.70128036", "0.6982504", "0.69784135", "0.69779307", "0.69774383", "0.6958118", "0.6957291", "0.6926063", "0.69229966", "0.69182616", "0.69143456", "0.69045526", "0.6853234", "0.6820493", "0.68020254", "0.67987686", "0.6792748", "0.6792748", "0.67868406", "0.6769601", "0.6752265", "0.6750002", "0.67440873", "0.67428845", "0.67382383", "0.6726025", "0.67247313", "0.67172897", "0.67163086", "0.6653052", "0.66525257", "0.66230136", "0.6613605", "0.66119605", "0.6608305", "0.6579799", "0.657324", "0.65557986", "0.6522819", "0.6516695", "0.6496498", "0.6483266", "0.6467121", "0.6466931", "0.64631546", "0.64593816", "0.6458245", "0.64488304", "0.6441771", "0.6440648", "0.6440503", "0.64354485", "0.64353377", "0.6435296", "0.64199215", "0.64101934", "0.6406006", "0.640322", "0.63989925", "0.63871425", "0.63849133", "0.6367613", "0.6359253", "0.6352878", "0.633115", "0.633096", "0.6303864", "0.62990385", "0.6293279", "0.6290649", "0.628868", "0.6266753", "0.6245251", "0.62441707", "0.6239899", "0.62375027", "0.62312675", "0.6228864", "0.6200022", "0.61995673" ]
0.7294348
13
Show the login screen to the user.
public function login() { return view('auth.login'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showLogin() {\n if (isAuth()) {\n Flash::set(\"You're already logged in!\", 'info');\n $this->redirect($this->url('LoginHome'));\n }\n $active = 'login';\n $this\n ->setTitle('Login')\n ->add('active', $active)\n ->show('login/login');\n }", "public function getShowLoginPage()\n {\n echo $this->blade->render(\"login\", [\n 'signer' => $this->signer,\n ]);\n }", "public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}", "public function login()\n {\n $this->set('title', 'Login');\n $this->render('login');\n }", "public function login()\n {\n $this->renderView('login');\n }", "public function showLogin()\n\t{\n\t\t// show the form\n\t \treturn View::make('login');\n\t}", "function Login()\n {\n $this->view->ShowLogin();\n }", "private function formLogin(){\n\t\tView::show(\"user/login\");\n\t}", "public function showLogin(){\n $this->data['pagetitle'] = \"Login\";\n $this->data['page'] = 'login';\n // $this->data['pagecontent'] = 'login';\n $this->data['pagebody'] = 'login';\n \n $this->render();\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 login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function showLogin()\n\t{\n if (\\Auth::check())\n {\n // Redirect to homepage\n return \\Redirect::route('dashboard');\n }\n\n // Show the login page\n\t\treturn \\View::make('front.login');\n\t}", "public function showLoginForm()\n {\n\n /** set session refferrer */\n $this->setPreviousUrl();\n\n /** @var String $title */\n $this->title = __(\"admin.pages_login_title\");\n /** @var String $content */\n $this->template = 'Admin::Auth.login';\n\n /**render output*/\n return $this->renderOutput();\n }", "public function login()\n\t{\n\t\tif (isLogin()) {\n\t\t\tredirect('/backoffice');\n\t\t} else {\n\t\t\t$this->display(\n\t\t\t\t'backoffice/login.html.twig'\n\t\t\t);\n\t\t}\n\n\t}", "public function showLogin()\n\t{\n\t\treturn View::make('login');\n\t}", "public function showLoginForm()\n\t{\n\t\t// Remembering Login\n\t\tif (auth()->viaRemember()) {\n\t\t\treturn redirect()->intended($this->redirectTo);\n\t\t}\n\t\t\n\t\t// Meta Tags\n\t\tMetaTag::set('title', getMetaTag('title', 'login'));\n\t\tMetaTag::set('description', strip_tags(getMetaTag('description', 'login')));\n\t\tMetaTag::set('keywords', getMetaTag('keywords', 'login'));\n\t\t\n\t\treturn appView('auth.login');\n\t}", "public function login()\n\t{\n\t\t$this->load->view('layout/layout_open');\n\t\t$this->load->view('login');\n\t\t$this->load->view('layout/layout_close');\n\t}", "public function showForm()\n\t{\n echo view($this->config->views['login']);\n\t}", "public function showLogin() {\n return View::make('user.login');\n }", "public function login()\n\t{\n\t\t$this->layout->content = View::make('login.login');\n\t}", "public function showLoginForm()\n\t{\n\t\treturn view('auth.login');\n\t}", "public function login() {\n $login_err = \"<p class='flash_err'>\" . $this->_model->getFlash('login_err') . \"</p>\";\n $create_err = \"<p class='flash_err'>\" . $this->_model->getFlash('create_err') . \"</p>\";\n $create_success = \"<p class='flash_success'>\" . $this->_model->getFlash('create_success') . \"</p>\";\n $this->render('General.Login', compact('login_err', 'create_err', 'create_success'));\n }", "public function login()\n\t{\n\t\treturn view(\"auth/login\", [\n\t\t\t'title' => \"Login\"\n\t\t]);\n\t}", "public function logInPage() {\n $view = new View('login');\n $view->generate();\n }", "public function showLogin()\n\t{\n if (Auth::check())\n {\n // Redirect to homepage\n return Redirect::to('/dashboard')->with('success', 'You are already logged in');\n }\n\n // Show the login page\n return View::make('auth/login');\n\t}", "public function showLogin()\n {\n return View::make('auth.login');\n }", "public function showLoginForm()\n {\n $this->data['title'] = trans('backpack::base.login'); // set the page title\n\n return view('backpack::auth.login', $this->data);\n }", "public function showLogin()\n {\n if (Auth::check())\n {\n // Show Index\n return Redirect::to('/');\n }\n // Show Login\n return View::make('login');\n }", "public function showLogin()\n {\n return view('user::login');\n }", "public function showLogin(){\n\t\t\t\n\t\t\t//Verificamos si ya esta autenticado\n\t\t\tif(Auth::check()){\n\n\t\t\t\t//Si esta autenticado lo mandamos a la raiz, el inicio\n\t\t\t\treturn Redirect::to('/');\n\t\t\t} else {\n\n\t\t\t\t//Si no lo mandamos al formulario de login\n\t\t\t\treturn View::make('login');\n\n\t\t\t}\n\t\t}", "public function login(){\n \n $this->data[\"title_tag\"]=\"Lobster | Accounts | Login\";\n \n $this->view(\"accounts/login\",$this->data);\n }", "public function showloginpage()\n\t\t{\n\t\t\tif(Auth::check()) {\n\t\t\t\tSession::flash('errorMessage', 'You are already logged in!');\n\t\t\t\treturn Redirect::action('UsersController@index');\n\t\t\t} else {\n\t\t\t\treturn View::make('login');\n\t\t\t}\n\t\t}", "public function showLogin()\n\t{\n return View::make('login');\n\t}", "public function showLoginForm()\n {\n if(Agent::isTable() || Agent::isMobile()){\n return view('errors.desktop-only');\n }\n else{\n return view('auth.login');\n }\n }", "public function showLogin()\n\t{\n $authCheck = $this->authCheckOnEmployeeAccess();\n if(FALSE != $authCheck){return Redirect::route($authCheck['name']);}\n\n $FormMessages = '';\n\n $viewData = array\n (\n 'FormMessages' => $FormMessages,\n );\n return $this->makeResponseView('admin/auth/login', $viewData);\n\t}", "public function show() {\n //already logged in? send to dashboard.\n if(\\Auth::check()) return \\Redirect::route(\"dashboard\");\n\n //display login form\n return \\View::make(\"admin.login\");\n }", "public function showLoginForm()\n {\n return view('ui.pages.login');\n }", "public function showLogin() {\n\t\treturn View::make('login/login')->with('error', '');\n\t}", "public function index() {\r\n\t\t$this->show_login_page();\r\n\t}", "public function showLoginPage()\n {\n return view('auth.login');\n }", "function login() \n\t{\n // Specify the navigation column's path so we can include it based\n // on the action being rendered\n \n \n // check for cookies and if set validate and redirect to corresponding page\n\t\t$this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\t$this->renderWithTemplate('users/login', 'MemberPageBaseTemplate');\n\t\t\n }", "public function login()\n\t{\n\t\t// Method should not be directly accessible\n\t\tif( $this->uri->uri_string() == 'auth/login')\n\t\t\tshow_404();\n\n\t\tif($this->require_min_level(6) == 1)\n\t\t\tredirect('');\n\n\t\tif(strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post')\n\t\t\t$this->require_min_level(1);\n\n\t\t$this->setup_login_form();\n\n\t\t$html = $this->load->view('auth/page_header', '', TRUE);\n\t\t$html .= $this->load->view('auth/login_form', '', TRUE);\n\t\t$html .= $this->load->view('auth/page_footer', '', TRUE);\n\n\t\techo $html;\n\t}", "public function login()\n\t{\n\t\t$this->view('/');\n\t}", "public function login()\n\t{\n\t\tredirect($this->config->item('bizz_url_ui'));\n\t\t// show_404();\n\t\t// ////import helpers and models\n\n\t\t// ////get data from database\n\n\t\t// //set page info\n\t\t// $pageInfo['pageName'] = strtolower(__FUNCTION__);\n\n\t\t// ////sort\n\t\t\n\t\t// //render\n\t\t// $this->_render($pageInfo);\n\t}", "public function showLoginForm()\n {\n return view('hub::auth.login');\n }", "public function actionLogin()\n\t{\n\t\tUtilities::updateCallbackURL();\n\t\t$this->render('login');\n\t}", "function login() {\n $this->checkAccess('user',true,true);\n\n\n $template = new Template;\n echo $template->render('header.html');\n echo $template->render('user/login.html');\n echo $template->render('footer.html');\n\n //clear error status\n $this->f3->set('SESSION.haserror', '');\n }", "public function login()\n\t{\n\t\treturn View::make('user.login');\n\t}", "public function actionLogin()\n\t{\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n $signup_model = new SignupForm();\n $login_model = new LoginForm();\n \n return $this->render('login', [\n 'login_model' => $login_model,\n 'signup_model' => $signup_model, 'modal' => true\n ]);\n\t}", "public function login()\n\t{\n\n\t\t$this->load->view('portal/templates/header');\n\t\t$this->load->view('portal/login');\n\t\t$this->load->view('portal/templates/footer');\n\t}", "public function get_login()\n\t{\n\t\t$this->template->body = View::forge('user/login');\n\t}", "public function actionLogin()\n {\n $this->layout = '/login';\n $manager = new Manager(['userId' => UsniAdaptor::app()->user->getId()]);\n $userFormDTO = new UserFormDTO();\n $model = new LoginForm();\n $postData = UsniAdaptor::app()->request->post();\n $userFormDTO->setPostData($postData);\n $userFormDTO->setModel($model);\n if (UsniAdaptor::app()->user->isGuest)\n {\n $manager->processLogin($userFormDTO);\n if($userFormDTO->getIsTransactionSuccess())\n {\n return $this->goBack();\n }\n }\n else\n {\n return $this->redirect($this->resolveDefaultAfterLoginUrl());\n }\n return $this->render($this->loginView,['userFormDTO' => $userFormDTO]);\n }", "public function showLogin()\n {\n if ($user = Sentinel::check())\n {\n return redirect()->route('admin.dashboard', $user);\n }\n\n return view('admin.auth.login');\n }", "public function login()\n {\n return $this->render('security/login.html.twig');\n }", "public function show() {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n $this->data['title'] = trans('back-project::base.login'); // set the page title\n return view('back-project::auth.login', $this->data);\n }", "public function login()\n\t{\n\t\t$this->load->view('login_main');\n\n\t}", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login.twig', [\n 'model' => $model,\n ]);\n }\n }", "public function loginAction() {\n if ($this->_getSession()->isLoggedIn()) {\n $this->_redirect('*/*/');\n return;\n }\n $this->getResponse()->setHeader('Login-Required', 'true');\n $this->loadLayout();\n $this->_initLayoutMessages('customer/session');\n $this->_initLayoutMessages('catalog/session');\n $this->renderLayout();\n }", "public function login()\n\t{\n\t\tif ($this->user == FALSE)\n\t\t{\n\t\t\t$customCSS = [\n\t\t\t\t'admin/pages/css/login',\n\t\t\t];\n\t\t\t$customJS = [\n\t\t\t\t'global/plugins/jquery-validation/js/jquery.validate.min',\n\t\t\t\t'admin/pages/scripts/login',\n\t\t\t];\n\n\t\t\t$data = [\n\t\t\t\t'blade_hide_header' => TRUE,\n\t\t\t\t'blade_hide_sidebar' => TRUE,\n\t\t\t\t'blade_hide_footer' => TRUE,\n\t\t\t\t'blade_clean_render' => TRUE,\n\t\t\t\t'blade_custom_css' => $customCSS,\n\t\t\t\t'blade_custom_js' => $customJS,\n\t\t\t\t'pageTitle' => trans('users.login_admin_title'),\n\t\t\t];\n\n\t\t\treturn Theme::view('auth.login', $data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//If user is logged in - make redirect\n\t\t\treturn Redirect::to('/admin')->send();\n\t\t}\n\t}", "public function showLoginForm()\n {\n return view('auth::login');\n }", "public function showLoginForm()\n {\n return view('shopper::pages.auth.login');\n }", "public function action()\n\t{\n\t\t//die('SwiftLogin');\n\t\tSession::start();\n\t\t\n\t\t$this->sidebar = new View('sidebar');\n\t\t$this->content = new View('index', 'swiftlogin');\n\t}", "public function showLoginForm()\n {\n return view('adminlte::auth.login');\n }", "public function showLogin()\n {\n return view('my_login');\n }", "public function login()\n\t{\n\t\treturn View::make('auth.login');\n\t}", "public function loginAction()\n {\n return View::make('auth.login')\n ->withPageTitle(trans('dashboard.login.login'));\n }", "public function showLoginForm()\n\t{\n\t\treturn view('auth.organizer.login');\n\t}", "public function showLoginForm()\n {\n return view('user.login');\n }", "public function showLoginForm()\n {\n $view = 'cscms::frontend.default.auth.login';\n if (View::exists(config('cscms.coderstudios.theme').'.auth.login')) {\n $view = config('cscms.coderstudios.theme').'.auth.login';\n }\n\n return view($view);\n }", "public function showLoginForm()\n {\n return view('blog::admin.pages.auth.login');\n }", "public function login() {\n $page = 'login';\n\n require('./View/default.php');\n }", "public function showLoginForm()\n {\n $form = \\FormBuilder::create(LoginUserForm::class);\n\n return view('account::auth.login', compact('form'));\n }", "public function login() {\n\t\treturn view('login');\n\t}", "public function loginAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $loginUser = $this->view->loginUser;\n\n if ( $loginUser ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n // set the input params\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authLogin' );\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n //return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n //return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function showLoginForm()\n {\n \n if (\\Auth::check()) {\n return redirect()->route('eventmie.welcome');\n }\n return Eventmie::view('eventmie::auth.login');\n }", "public function loginAction(){\n\t\t$this->loadView(\"administrator/login\");\n\t}", "public function showLoginForm()\n {\n return view('auth.magic-login');\n }", "public function login()\n {\n return view('klass-login');\n }", "public function loginAction()\n {\n // Instantiate the form that asks the user to log in.\n $form = new Application_Form_LoginForm();\n\n // Initialize the error message to be empty.\n $this->view->formResponse = '';\n\n // For security purposes, only proceed if this is a POST request.\n if ($this->getRequest()->isPost())\n {\n // Process the filled-out form that has been posted:\n // if the input values are valid, attempt to authenticate.\n $formData = $this->getRequest()->getPost();\n if ($form->isValid($formData))\n {\n if ( $this->_authenticate($formData) )\n {\n $this->_helper->redirector('index', 'index');\n }\n }\n }\n\n // Render the view.\n $this->view->form = $form;\n }", "public static function index() {\n if (Auth::hasUser()) {\n redirect('/');\n } else {\n $login_page = new View('forms/signin.php');\n $login_page->render();\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function login_page()\n\t{\n\t\t$this->redirect( EagleAdminRoute::get_login_route() );\n\t}", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }" ]
[ "0.8211881", "0.7952855", "0.7873255", "0.7811536", "0.7789807", "0.7786716", "0.77689713", "0.7755692", "0.7743446", "0.75782204", "0.75502497", "0.7544012", "0.75375444", "0.7525985", "0.7476412", "0.7463913", "0.7411307", "0.7409609", "0.7400564", "0.73903537", "0.7356446", "0.73369956", "0.7320021", "0.7304685", "0.7300383", "0.73003197", "0.7299377", "0.7298392", "0.7274539", "0.7252422", "0.72523946", "0.7232689", "0.7230151", "0.7223502", "0.7219339", "0.7203852", "0.7198966", "0.7181094", "0.7180621", "0.71797496", "0.7178625", "0.7166725", "0.7163042", "0.7159611", "0.7159538", "0.71519417", "0.715102", "0.7147642", "0.71272767", "0.711757", "0.7108252", "0.71019155", "0.7101247", "0.7096225", "0.709088", "0.708757", "0.7071773", "0.7062267", "0.7038038", "0.7034755", "0.7030873", "0.7029203", "0.7023986", "0.70208496", "0.7008004", "0.7006129", "0.7004671", "0.7001503", "0.7000435", "0.6999447", "0.69958156", "0.69896", "0.69842577", "0.6981464", "0.6980737", "0.6978049", "0.6975819", "0.69712216", "0.69662476", "0.6959467", "0.6955998", "0.6953136", "0.6949555", "0.69485325", "0.69485325", "0.6946352", "0.6946352", "0.6946352", "0.6946352", "0.6946352", "0.6946352", "0.6946352", "0.6946352", "0.69463515", "0.6944043", "0.6944043", "0.6944043", "0.6944043", "0.6944043", "0.6944043", "0.6944043" ]
0.0
-1
Test the route "index".
public function testIndexAction() : void { $this->di->request->setPost("ip", "2002:c0a8:101::42"); $res = $this->controller->indexActionPost(); $this->assertInternalType("array", $res); list($json, $status) = $res; $this->assertEquals($json["valid"], true); $this->assertEquals($status, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testIndex()\n {\n $this->get(route('index'))\n ->assertResponseStatus(200);\n }", "public function testIndex()\n\t{\n\t\t// correct route for posts\n\t\t$this->call('GET', '/api/posts');\n\t}", "public function testIndex()\n {\n $this->call('GET', '/');\n $this->assertResponseOk();\n }", "public function testIndexActionCanBeAccessed()\n\t{\n\t\t$this->dispatch('/');\n\t\t$this->assertResponseStatusCode(200);\n\t\t$this->assertModuleName('DEC');\n\t\t$this->assertControllerName('DEC\\Controller\\Index');\n\t\t$this->assertControllerClass('IndexController');\n\t\t$this->assertMatchedRouteName('home');\n\t}", "public function testIndex()\n {\n $this->getBrowser()->\n getAndCheck('partenaire', 'index', '/partenaire/index', 404)\n ;\n }", "public function testIndex()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testIndex()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testIndex()\n {\n $client = static::createClient();\n\n $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode(), 'la route \"homepage\" ne fonctionne plus.');\n }", "public function testIndex()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testIndexRoute()\n {\n $user = factory(User::class)->create();\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->get(route('events.index'))\n ->assertStatus(200);\n }", "public function testIndexMethod()\n {\n $this->authentication();\n $this->get(route('members.index'));\n $this->seeStatusCode(200);\n }", "public function test_indexAction ( )\n {\n $params = array(\n 'action' => 'index',\n 'controller'=> 'index',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n }", "public function testIndex()\n\t{\n\t\t$client = static::createClient();\n\n\t\t$crawler = $client->request('GET', '/');\n\n\t\t$this->assertEquals(200, $client->getResponse()->getStatusCode());\n\t}", "public function testIndexActionGet()\n {\n $res = $this->controller->indexActionGet();\n $this->assertContains(\"View all items\", $res->getBody());\n }", "public function testIndex()\n {\n $this->get('/')\n ->assertSuccessful()\n ->assertViewIs('layouts.home.index')\n ->assertSee('Welcome to a E-Ticket System');\n }", "public function testIndexActionCanBeAccessed()\n {\n $this->dispatch('/venue');\n $this->assertResponseStatusCode(200);\n }", "public function testIndexMethodAuthorised()\n {\n $response = $this->actingAs($this->user)\n ->get($this->routeIndex);\n\n $response->assertStatus(200);\n $response->assertViewIs('pages.eventtype.index');\n }", "public function test_bad_index_route()\n {\n //incorrect uri\n $response = $this->get('api/students/1234');\n $response->assertStatus(404);\n }", "public function testIndex()\n {\n $this->visit('/')\n ->see('STUDENT MONEY ASSISTANCE');\n }", "public function testIndex()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('GET', static::ROUTE)\n ->seeStatusCode(JsonResponse::HTTP_OK);\n }", "public function testMethodIndexAction()\n {\n $route = new Route();\n\n $route->set(null, null, null, \"Anax\\Route\\MockHandlerController\");\n $this->assertTrue($route->match(\"\"));\n $res = $route->handle(\"\");\n $this->assertEquals(\"indexAction\", $res);\n\n $route->set(null, null, \"\", \"Anax\\Route\\MockHandlerController\");\n $this->assertTrue($route->match(\"\"));\n $res = $route->handle(\"\");\n $this->assertEquals(\"indexAction\", $res);\n\n $route->set(null, \"\", null, \"Anax\\Route\\MockHandlerController\");\n $this->assertTrue($route->match(\"\"));\n $res = $route->handle(\"\");\n $this->assertEquals(\"indexAction\", $res);\n }", "public function testIndexPage()\n {\n $this->visit('/')\n ->see('Read a Blog')\n ->see('Admin')\n ->see('Sign in')\n ->dontSee('Logout');\n }", "public function testIndexRouteIsWorking()\n {\n $client = static::createClient();\n $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertSelectorExists('.profit_amount');\n $this->assertSelectorTextContains('.navbar-brand', 'Margin Calculator');\n\n return null;\n }", "public function testIndex()\n {\n $response = $this->getJson(route('users.index'), $this->headers);\n\n $response->assertStatus(200);\n }", "public function testGetActionMethodForIndexAction()\n {\n $application = new BasicTestApplication(FilePath::parse('/var/www/'));\n $request = new BasicTestRequest(Url::parse('http://www.domain.com/'), new Method('GET'));\n $response = new BasicTestResponse();\n $controller = new BasicTestController();\n $controller->processRequest($application, $request, $response, '', []);\n\n self::assertSame('indexAction', $controller->getActionMethod()->getName());\n }", "public function testPaymentIndexActionCanBeAccessed()\n {\n $this->dispatch('/payment');\n $this->assertResponseStatusCode(200);\n\n $this->assertModuleName('Payment');\n $this->assertControllerName('payment/index');\n $this->assertControllerClass('IndexController');\n $this->assertMatchedRouteName('standardPayment');\n }", "public function indexRoute()\n {\n }", "public function testLeaseIndexFrontEnd()\n {\n $this->get(route('lease'))->assertStatus(200);\n }", "public function testIndexActionCanBeAccessed()\n {\n $apartmentGeneralDao = $this->getApplicationServiceLocator()->get('dao_apartment_general');\n $apartment = $apartmentGeneralDao->fetchOne();\n\n $this->dispatch('/apartment/' . $apartment['id'] . '/inventory-range');\n $this->assertResponseStatusCode(200);\n\n $this->assertModuleName('apartment');\n $this->assertControllerName('controller_apartment_inventory_range');\n $this->assertControllerClass('InventoryRange');\n $this->assertActionName('index');\n $this->assertMatchedRouteName('apartment/inventory-range');\n }", "public function testIndex()\n {\n Page::create([\n 'slug' => 'index',\n 'title' => 'Test Index',\n ]);\n $this->get('/')->assertStatus(200)->assertSee('Test Index');\n }", "public function testIndexSuccess()\n {\n $this->setAdminSession();\n $this->get($this->indexUrl);\n $this->assertResponseOk();\n }", "public function testGetRequestWithoutParametersIsRoutedToIndexAction()\n\t{\n\t\t$this->request->setMethod('GET');\n\t\t$this->dispatch('/api/event');\n\n\t\t$this->assertModule('api');\n\t\t$this->assertController('event');\n\t\t$this->assertAction('index');\t\t\n\t}", "public function testIndex()\n {\n $requestInstance = null;\n\n $this->router->get('/customers/{id}/relationships/{relationship}', [\n 'middleware' => ['request', 'response'],\n function(\\Luminary\\Http\\Requests\\Index $request, $id, $relationship) use(&$requestInstance) {\n $requestInstance = $request;\n }\n ]);\n\n $this->get('/customers/1234/relationships/location');\n\n $this->assertResponseOk();\n $this->assertInstanceOf(\\Luminary\\Http\\Requests\\Index::class, $requestInstance);\n $this->assertInstanceOf(CustomerAuthorize::class, $requestInstance->getAuthorize());\n }", "public function testIndexTahun()\n\t{\n\t\t$response = $this->action('GET', 'TahunController@index');\n\t}", "public function test_good_index_route()\n {\n //correct uri\n $response = $this->get('api/students');\n $response \n ->assertStatus(200)\n ->assertJson([['first_name'=> 'Chadwick'], ['first_name'=> 'Evelyn']]);\n }", "public function testIndex(): void\n {\n $response = $this\n ->actingAs($this->user)\n ->get('/');\n $response->assertViewIs('home');\n $response->assertSeeText('Сообщения от всех пользователей');\n }", "public function testIndexActionCanBeAccessed()\n {\n $this->elasticsearchClientMock->expects($this->once())\n ->method('getIndexStats')\n ->will($this->returnValue(array()));\n\n $serviceManager = $this->controller->getServiceLocator();\n $serviceManager->setAllowOverride(true);\n $serviceManager->setService('ElasticsearchManager', $this->elasticsearchClientMock);\n\n $this->routeMatch->setParam('action', 'index');\n\n $result = $this->controller->dispatch($this->request);\n $response = $this->controller->getResponse();\n\n $this->assertEquals(200, $response->getStatusCode());\n }", "public function testIndexAction()\n {\n $request = $this->di->get(\"request\");\n $request->setServer(\"REMOTE_ADDR\", \"127.0.0.1\");\n $res = $this->controller->indexAction();\n $this->assertIsArray($res);\n\n $json = $res[0];\n $this->assertEquals(\"Oops, platsinformation saknas\", $json[\"err\"]);\n }", "public function testIndex(){\r\n\t\t$destino = Enhance::getCodeCoverageWrapper('EventosControllerClass');\r\n\t\t$destino->index();\r\n\t\t$this->call('GET', 'admin');\r\n\t\t$this->assertResponseOk();\r\n\t}", "public function test_dispatchIndexAction ( )\n {\n $params = array(\n 'action' => 'index',\n 'controller'=> 'scales',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n\n }", "public function testIndex()\n {\n $client = static::createClient();\n $crawler = $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertCount(1, $crawler->filter('h1'));\n $this->assertEquals(1, $crawler->filter('html:contains(\"Trick List\")')->count());\n }", "public static function route()\n {\n return 'index';\n }", "public function testIndexAction()\n {\n $res = $this->controller->indexAction();\n $this->assertIsObject($res);\n }", "public function testRequestRootIsAndIndex() {\n\n\t\t$r1 = new Nether\\Avenue\\Router(static::$RequestData['Root']);\n\t\t$r2 = new Nether\\Avenue\\Router(static::$RequestData['Index']);\n\n\t\t(new Verify(\n\t\t\t'path / request runs as /index',\n\t\t\t$r1->GetPath()\n\t\t))->equals('/index');\n\n\t\t(new Verify(\n\t\t\t'path /index runs as /index',\n\t\t\t$r2->GetPath()\n\t\t))->equals('/index');\n\n\n\t\treturn;\n\t}", "public function testIfIndexPageRenderTemplate()\n {\n $response = $this->get('/customers');\n\n $response->assertViewIs('customers.index');\n }", "public function testIndex()\n {\n $this->visit('/cube')\n ->see('Choose a Cube')\n ->see('Add a Cube')\n ->see('Upload Cube')\n ->see('This is an application just to show how the Cube Summation')\n ->dontSee('Update Cube')\n ->dontSee('Query Cube')\n ->dontSee('Blocks for');\n }", "public function testHomeView()\n\t{\n\t\t$response = $this->call('GET', '/');\n\t\t$view = $response->original;\n\t\t\n\t\t$this->assertEquals('home.index', $view['name']);\n\t}", "public function testHome()\n {\n $response = $this->get(route('home'));\n\n $response->assertStatus(200);\n }", "public function testIndex()\n {\n $client = static::createClient();\n\n $crawler = $client->request('GET', '/');\n\n $this->assertContains('Hello World', $client->getResponse()->getContent());\n }", "public function index()\n {\n echo \"Đây là trang Index Test resource\";\n }", "public function test_listIndexAction ( )\n {\n $params = array(\n 'event_id' => 1,\n 'action' => 'list',\n 'controller'=> 'scales',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n\n }", "public function testIndexRedirect()\n {\n $response = $this->get('/');\n\n $response->assertStatus(302);\n }", "public function test_a_guest_can_access_blog_index()\n {\n $response = $this->get('/blog'); //make GET access to blog route\n\n $response->assertStatus(200); //assert http status return is 200\n }", "public function test_show_homepage()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testRouteIndexClienteOk()\n {\n $this->call('GET', 'cliente');\n $this->assertResponseOk();\n }", "public function testIndexActionGet()\n {\n // Setup the controller\n $controller = new LocWeatherController();\n $controller->setDI($this->di);\n\n unset($_POST[\"ip\"]);\n unset($_GET[\"ip\"]);\n\n // Test the controller action\n $res = $controller->indexActionGet();\n $body = $res->getBody();\n $this->assertStringContainsString(\"<p>Skriv in koordinater nedan för att ta fram en väderleksrapport!</p>\", $body);\n }", "public function test_index()\n {\n Instrument::factory(2)->create();\n $response = $this->get('instrument');\n $response->assertStatus(200);\n }", "public function testIndex(){\n\t\t\n\t\t$this->mock->shouldReceive('all')->once();\n\n\t\t$this->call('GET', 'users'); //get: Method , user: url\n\n\t\t$this->assertResponseOk();\n\t}", "public function testIndexAction()\n {\n\n $res = $this->controller->indexAction();\n $this->assertInstanceOf(ResponseUtility::class, $res);\n //$this->assertStringEndsWith(\"active\", $res);\n }", "abstract function index();", "abstract function index();", "abstract function index();", "public function user_route()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function test_index_returns_view()\n {\n $controller = new UsersController();\n $view = $controller->index();\n $this->assertEquals('admin.users.index', $view->getName());\n $this->assertArrayHasKey('users', $view->getData());\n }", "protected function indexAction() {}", "public function index()\n\t{\n\t\tdie('404 error');\n\t}", "public function testIndex()\n {\n $request = $this->mockHttpRequest([]);\n $service = $this->mockGoogleSearchServiceBasic();\n $controller = new SearchResultsController($request, $service);\n\n $result = $controller->index();\n\n $this->assertInstanceOf(Views\\Index::class, $result);\n $this->assertIsArray($result->getData());\n $this->assertEquals($result->getData(), []);\n }", "public function testIndexAction()\n {\n $this->url('http://localhost/hacker-news/index.php');\n $this->assertEquals('Hacker News - Github', $this->title());\n }", "public function testIndexAction()\n {\n $res = $this->controller->indexAction();\n $this->assertInternalType(\"object\", $res);\n $this->assertInstanceOf(ResponseUtility::class, $res);\n }", "abstract public function index();", "abstract public function index();", "abstract public function index();", "public function indexAction() {}", "public function homepageTest()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testIndex(): void\n {\n $response = $this->client->request('GET', '/');\n $this->assertEquals(200, $response->getStatusCode());\n\n $body = $response->getBody();\n $content = $body->getContents();\n\n /*\n * Match the title of the page.\n */\n $this->assertRegExp('/<title>MVC Design Pattern!<\\/title>/', $content);\n\n /*\n * Match the header of the page.\n *\n * <h1>An example of the Model View Controller - Design Pattern.</h1>\n */\n $this->assertRegExp('/<h1>[a-zA-Z -.]+<\\/h1>/', $content);\n\n /*\n * Match all cards.\n */\n $re = '/<div class=\"card\">/';\n $matches = [];\n\n preg_match_all($re, $content, $matches);\n\n $this->assertEquals(6, count($matches[0]));\n\n return;\n }", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function testAnonIndex404() : void {\n $crawler = $this->client->request('GET', '/pln/33/box/');\n $this->assertSame(302, $this->client->getResponse()->getStatusCode());\n }", "public function test_index() {\r\n\t\t$result = $this->testAction('form_builders/form_builders/index/');\r\n }", "public function test_index_rest()\n {\n $item = Rest::factory()->create();\n $response = $this->get('/api/v1/rest');\n $response->assertStatus(200);\n $response->assertJsonFragment([\n 'message' => $item->message,\n 'url' => $item->url\n ]);\n }", "public function testRootGetRoute()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n $response->assertSee('Enter url to crawl');\n $response->assertSee('Last Pages Crawled');\n }", "public abstract function index();", "public abstract function index();", "public abstract function index();", "public function testIndex()\n {\n $response = $this->action('GET', '\\Modules\\Admin\\Http\\Controllers\\FaqCategoryController@index');\n $this->assertResponseStatus(200, $response->status());\n $this->assertInstanceOf('Illuminate\\Http\\Response', $response);\n }", "public function test_admin_index_b()\n {\n $this->request('GET', ['pages/memberdsc', 'index']);\n $this->assertResponseCode(404);\n }", "public function testIndexActionGet()\n {\n $request = $this->di->get(\"request\");\n $request->setGet(\"ip\", \"8.8.8.8\");\n\n\n $res = $this->controller->indexActionGet();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertContains(\"Kolla vädret\", $body);\n }", "public function indexAction() : string\n {\n // Deal with the action and return a response.\n return \"index\";\n }", "public function testRenderIndexNoCode()\n {\n // Populate data\n $this->_populate();\n \n // Make Request\n $this->call('GET', '/dashboard');\n\n $this->assertRedirectedTo('/dashboard/login');\n }", "public function testIndexRouteAdmin(): void\n {\n // given\n $expectedStatusCode = 200;\n $adminUser = $this->createUser([User::ROLE_USER, User::ROLE_ADMIN]);\n $this->logIn($adminUser);\n\n // when\n $this->httpClient->request('GET', '/tag');\n $resultStatusCode = $this->httpClient->getResponse()->getStatusCode();\n\n // then\n $this->assertEquals($expectedStatusCode, $resultStatusCode);\n }", "public function testIndex()\n {\n $user = User::find(1);\n\n $response = $this->actingAs($user)->get('/admin/comptes');\n\n $response->assertStatus(200)\n ->assertViewIs('layouts.admin');\n }", "public function testPrimaryRoutes()\n\t{\n\t/*\t//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test base route\n\t\t// Should show post id 1\n\t\t$response = $this->call('GET', '/');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\n\t\t// Test /home is post 1\n\t\t$clicksBefore = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$response = $this->call('GET', '/home');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\t\t$clicksAfter = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$this->assertEquals(++$clicksBefore, $clicksAfter);\n\n\t\t// Test /about is post 2\n\t\t$response = $this->call('GET', '/about');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(2, $post->id);\n\t\t$this->assertEquals('f1112648-782e-aad3-785d-640fcfefaa9b', $post->uuid);\n\n\n\t\t// ##### Login as mReschke #####\n\t\tAuth::login(User::find(2)); Auth::user()->login();\n\n\t\t// Test /13/mreschke-home-page (non named route)\n\t\t$response = $this->call('GET', '/13/mreschke-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(13, $post->id);\n\t\t$this->assertEquals('1a52e0e3-3174-7b2b-a582-03a39e52e34a', $post->uuid);\n\n\t\t// Test /14/squaethem-home-page (non named route)\n\t\t$response = $this->call('GET', '/14/squaethem-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(14, $post->id);\n\t\t$this->assertEquals('e80e907e-50d4-8ed4-70f7-5d1815672966', $post->uuid);\n\t\t*/\n\n\t}", "public function testIndexActionGetFail()\n {\n // Setup the controller\n $controller = new LocWeatherController();\n $controller->setDI($this->di);\n\n // Test the controller action\n $_GET[\"ip\"] = \"test.ip.not.real\";\n $res = $controller->indexActionGet();\n $body = $res->getBody();\n $this->assertStringContainsString(\"<h5 style='color:red;'>Vädret misslyckades att hämtas.</h5>\", $body);\n }" ]
[ "0.8323967", "0.79867566", "0.7949656", "0.7784813", "0.77582747", "0.7654524", "0.7654524", "0.7652331", "0.7639047", "0.75727016", "0.75481856", "0.75321096", "0.7503794", "0.7495671", "0.74561495", "0.7435865", "0.7414043", "0.740376", "0.7382854", "0.7305627", "0.73026145", "0.72521293", "0.7201526", "0.71633756", "0.71584994", "0.7116686", "0.7116378", "0.71045357", "0.7100266", "0.7093864", "0.7087993", "0.7086323", "0.7085773", "0.7039304", "0.7017413", "0.7007713", "0.69948953", "0.69200397", "0.6911771", "0.69076896", "0.68862385", "0.687357", "0.68663096", "0.6863338", "0.68439716", "0.68394274", "0.6833095", "0.68134546", "0.6810989", "0.67926383", "0.67813486", "0.67802185", "0.67442805", "0.67290884", "0.672843", "0.6717098", "0.6715219", "0.6683766", "0.668215", "0.66664696", "0.66664696", "0.66664696", "0.6666094", "0.6665884", "0.6665345", "0.6648627", "0.66420716", "0.6625207", "0.6617871", "0.6616091", "0.6616091", "0.6616091", "0.661567", "0.66152513", "0.6614986", "0.661472", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.6612884", "0.6610238", "0.66072965", "0.65965754", "0.6596207", "0.6596207", "0.6596207", "0.65941054", "0.6591263", "0.6591025", "0.65835375", "0.6581671", "0.6578388", "0.65713924", "0.6566059", "0.65635866" ]
0.0
-1
Test the route "index".
public function testIndexActionFail() : void { $this->di->request->setPost("ip", "1200:0000:AB00:1234:O000:2552:7777:1313"); $res = $this->controller->indexActionPost(); $this->assertInternalType("array", $res); list($json, $status) = $res; $this->assertEquals($json["valid"], false); $this->assertEquals($status, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testIndex()\n {\n $this->get(route('index'))\n ->assertResponseStatus(200);\n }", "public function testIndex()\n\t{\n\t\t// correct route for posts\n\t\t$this->call('GET', '/api/posts');\n\t}", "public function testIndex()\n {\n $this->call('GET', '/');\n $this->assertResponseOk();\n }", "public function testIndexActionCanBeAccessed()\n\t{\n\t\t$this->dispatch('/');\n\t\t$this->assertResponseStatusCode(200);\n\t\t$this->assertModuleName('DEC');\n\t\t$this->assertControllerName('DEC\\Controller\\Index');\n\t\t$this->assertControllerClass('IndexController');\n\t\t$this->assertMatchedRouteName('home');\n\t}", "public function testIndex()\n {\n $this->getBrowser()->\n getAndCheck('partenaire', 'index', '/partenaire/index', 404)\n ;\n }", "public function testIndex()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testIndex()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testIndex()\n {\n $client = static::createClient();\n\n $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode(), 'la route \"homepage\" ne fonctionne plus.');\n }", "public function testIndex()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testIndexRoute()\n {\n $user = factory(User::class)->create();\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->get(route('events.index'))\n ->assertStatus(200);\n }", "public function testIndexMethod()\n {\n $this->authentication();\n $this->get(route('members.index'));\n $this->seeStatusCode(200);\n }", "public function test_indexAction ( )\n {\n $params = array(\n 'action' => 'index',\n 'controller'=> 'index',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n }", "public function testIndex()\n\t{\n\t\t$client = static::createClient();\n\n\t\t$crawler = $client->request('GET', '/');\n\n\t\t$this->assertEquals(200, $client->getResponse()->getStatusCode());\n\t}", "public function testIndexActionGet()\n {\n $res = $this->controller->indexActionGet();\n $this->assertContains(\"View all items\", $res->getBody());\n }", "public function testIndex()\n {\n $this->get('/')\n ->assertSuccessful()\n ->assertViewIs('layouts.home.index')\n ->assertSee('Welcome to a E-Ticket System');\n }", "public function testIndexActionCanBeAccessed()\n {\n $this->dispatch('/venue');\n $this->assertResponseStatusCode(200);\n }", "public function testIndexMethodAuthorised()\n {\n $response = $this->actingAs($this->user)\n ->get($this->routeIndex);\n\n $response->assertStatus(200);\n $response->assertViewIs('pages.eventtype.index');\n }", "public function test_bad_index_route()\n {\n //incorrect uri\n $response = $this->get('api/students/1234');\n $response->assertStatus(404);\n }", "public function testIndex()\n {\n $this->visit('/')\n ->see('STUDENT MONEY ASSISTANCE');\n }", "public function testIndex()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('GET', static::ROUTE)\n ->seeStatusCode(JsonResponse::HTTP_OK);\n }", "public function testMethodIndexAction()\n {\n $route = new Route();\n\n $route->set(null, null, null, \"Anax\\Route\\MockHandlerController\");\n $this->assertTrue($route->match(\"\"));\n $res = $route->handle(\"\");\n $this->assertEquals(\"indexAction\", $res);\n\n $route->set(null, null, \"\", \"Anax\\Route\\MockHandlerController\");\n $this->assertTrue($route->match(\"\"));\n $res = $route->handle(\"\");\n $this->assertEquals(\"indexAction\", $res);\n\n $route->set(null, \"\", null, \"Anax\\Route\\MockHandlerController\");\n $this->assertTrue($route->match(\"\"));\n $res = $route->handle(\"\");\n $this->assertEquals(\"indexAction\", $res);\n }", "public function testIndexPage()\n {\n $this->visit('/')\n ->see('Read a Blog')\n ->see('Admin')\n ->see('Sign in')\n ->dontSee('Logout');\n }", "public function testIndexRouteIsWorking()\n {\n $client = static::createClient();\n $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertSelectorExists('.profit_amount');\n $this->assertSelectorTextContains('.navbar-brand', 'Margin Calculator');\n\n return null;\n }", "public function testIndex()\n {\n $response = $this->getJson(route('users.index'), $this->headers);\n\n $response->assertStatus(200);\n }", "public function testGetActionMethodForIndexAction()\n {\n $application = new BasicTestApplication(FilePath::parse('/var/www/'));\n $request = new BasicTestRequest(Url::parse('http://www.domain.com/'), new Method('GET'));\n $response = new BasicTestResponse();\n $controller = new BasicTestController();\n $controller->processRequest($application, $request, $response, '', []);\n\n self::assertSame('indexAction', $controller->getActionMethod()->getName());\n }", "public function testPaymentIndexActionCanBeAccessed()\n {\n $this->dispatch('/payment');\n $this->assertResponseStatusCode(200);\n\n $this->assertModuleName('Payment');\n $this->assertControllerName('payment/index');\n $this->assertControllerClass('IndexController');\n $this->assertMatchedRouteName('standardPayment');\n }", "public function indexRoute()\n {\n }", "public function testLeaseIndexFrontEnd()\n {\n $this->get(route('lease'))->assertStatus(200);\n }", "public function testIndexActionCanBeAccessed()\n {\n $apartmentGeneralDao = $this->getApplicationServiceLocator()->get('dao_apartment_general');\n $apartment = $apartmentGeneralDao->fetchOne();\n\n $this->dispatch('/apartment/' . $apartment['id'] . '/inventory-range');\n $this->assertResponseStatusCode(200);\n\n $this->assertModuleName('apartment');\n $this->assertControllerName('controller_apartment_inventory_range');\n $this->assertControllerClass('InventoryRange');\n $this->assertActionName('index');\n $this->assertMatchedRouteName('apartment/inventory-range');\n }", "public function testIndex()\n {\n Page::create([\n 'slug' => 'index',\n 'title' => 'Test Index',\n ]);\n $this->get('/')->assertStatus(200)->assertSee('Test Index');\n }", "public function testIndexSuccess()\n {\n $this->setAdminSession();\n $this->get($this->indexUrl);\n $this->assertResponseOk();\n }", "public function testGetRequestWithoutParametersIsRoutedToIndexAction()\n\t{\n\t\t$this->request->setMethod('GET');\n\t\t$this->dispatch('/api/event');\n\n\t\t$this->assertModule('api');\n\t\t$this->assertController('event');\n\t\t$this->assertAction('index');\t\t\n\t}", "public function testIndex()\n {\n $requestInstance = null;\n\n $this->router->get('/customers/{id}/relationships/{relationship}', [\n 'middleware' => ['request', 'response'],\n function(\\Luminary\\Http\\Requests\\Index $request, $id, $relationship) use(&$requestInstance) {\n $requestInstance = $request;\n }\n ]);\n\n $this->get('/customers/1234/relationships/location');\n\n $this->assertResponseOk();\n $this->assertInstanceOf(\\Luminary\\Http\\Requests\\Index::class, $requestInstance);\n $this->assertInstanceOf(CustomerAuthorize::class, $requestInstance->getAuthorize());\n }", "public function testIndexTahun()\n\t{\n\t\t$response = $this->action('GET', 'TahunController@index');\n\t}", "public function test_good_index_route()\n {\n //correct uri\n $response = $this->get('api/students');\n $response \n ->assertStatus(200)\n ->assertJson([['first_name'=> 'Chadwick'], ['first_name'=> 'Evelyn']]);\n }", "public function testIndex(): void\n {\n $response = $this\n ->actingAs($this->user)\n ->get('/');\n $response->assertViewIs('home');\n $response->assertSeeText('Сообщения от всех пользователей');\n }", "public function testIndexActionCanBeAccessed()\n {\n $this->elasticsearchClientMock->expects($this->once())\n ->method('getIndexStats')\n ->will($this->returnValue(array()));\n\n $serviceManager = $this->controller->getServiceLocator();\n $serviceManager->setAllowOverride(true);\n $serviceManager->setService('ElasticsearchManager', $this->elasticsearchClientMock);\n\n $this->routeMatch->setParam('action', 'index');\n\n $result = $this->controller->dispatch($this->request);\n $response = $this->controller->getResponse();\n\n $this->assertEquals(200, $response->getStatusCode());\n }", "public function testIndexAction()\n {\n $request = $this->di->get(\"request\");\n $request->setServer(\"REMOTE_ADDR\", \"127.0.0.1\");\n $res = $this->controller->indexAction();\n $this->assertIsArray($res);\n\n $json = $res[0];\n $this->assertEquals(\"Oops, platsinformation saknas\", $json[\"err\"]);\n }", "public function testIndex(){\r\n\t\t$destino = Enhance::getCodeCoverageWrapper('EventosControllerClass');\r\n\t\t$destino->index();\r\n\t\t$this->call('GET', 'admin');\r\n\t\t$this->assertResponseOk();\r\n\t}", "public function test_dispatchIndexAction ( )\n {\n $params = array(\n 'action' => 'index',\n 'controller'=> 'scales',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n\n }", "public function testIndex()\n {\n $client = static::createClient();\n $crawler = $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertCount(1, $crawler->filter('h1'));\n $this->assertEquals(1, $crawler->filter('html:contains(\"Trick List\")')->count());\n }", "public static function route()\n {\n return 'index';\n }", "public function testIndexAction()\n {\n $res = $this->controller->indexAction();\n $this->assertIsObject($res);\n }", "public function testRequestRootIsAndIndex() {\n\n\t\t$r1 = new Nether\\Avenue\\Router(static::$RequestData['Root']);\n\t\t$r2 = new Nether\\Avenue\\Router(static::$RequestData['Index']);\n\n\t\t(new Verify(\n\t\t\t'path / request runs as /index',\n\t\t\t$r1->GetPath()\n\t\t))->equals('/index');\n\n\t\t(new Verify(\n\t\t\t'path /index runs as /index',\n\t\t\t$r2->GetPath()\n\t\t))->equals('/index');\n\n\n\t\treturn;\n\t}", "public function testIfIndexPageRenderTemplate()\n {\n $response = $this->get('/customers');\n\n $response->assertViewIs('customers.index');\n }", "public function testIndex()\n {\n $this->visit('/cube')\n ->see('Choose a Cube')\n ->see('Add a Cube')\n ->see('Upload Cube')\n ->see('This is an application just to show how the Cube Summation')\n ->dontSee('Update Cube')\n ->dontSee('Query Cube')\n ->dontSee('Blocks for');\n }", "public function testHomeView()\n\t{\n\t\t$response = $this->call('GET', '/');\n\t\t$view = $response->original;\n\t\t\n\t\t$this->assertEquals('home.index', $view['name']);\n\t}", "public function testHome()\n {\n $response = $this->get(route('home'));\n\n $response->assertStatus(200);\n }", "public function testIndex()\n {\n $client = static::createClient();\n\n $crawler = $client->request('GET', '/');\n\n $this->assertContains('Hello World', $client->getResponse()->getContent());\n }", "public function index()\n {\n echo \"Đây là trang Index Test resource\";\n }", "public function test_listIndexAction ( )\n {\n $params = array(\n 'event_id' => 1,\n 'action' => 'list',\n 'controller'=> 'scales',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n\n }", "public function testIndexRedirect()\n {\n $response = $this->get('/');\n\n $response->assertStatus(302);\n }", "public function test_a_guest_can_access_blog_index()\n {\n $response = $this->get('/blog'); //make GET access to blog route\n\n $response->assertStatus(200); //assert http status return is 200\n }", "public function test_show_homepage()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testRouteIndexClienteOk()\n {\n $this->call('GET', 'cliente');\n $this->assertResponseOk();\n }", "public function testIndexActionGet()\n {\n // Setup the controller\n $controller = new LocWeatherController();\n $controller->setDI($this->di);\n\n unset($_POST[\"ip\"]);\n unset($_GET[\"ip\"]);\n\n // Test the controller action\n $res = $controller->indexActionGet();\n $body = $res->getBody();\n $this->assertStringContainsString(\"<p>Skriv in koordinater nedan för att ta fram en väderleksrapport!</p>\", $body);\n }", "public function test_index()\n {\n Instrument::factory(2)->create();\n $response = $this->get('instrument');\n $response->assertStatus(200);\n }", "public function testIndex(){\n\t\t\n\t\t$this->mock->shouldReceive('all')->once();\n\n\t\t$this->call('GET', 'users'); //get: Method , user: url\n\n\t\t$this->assertResponseOk();\n\t}", "public function testIndexAction()\n {\n\n $res = $this->controller->indexAction();\n $this->assertInstanceOf(ResponseUtility::class, $res);\n //$this->assertStringEndsWith(\"active\", $res);\n }", "abstract function index();", "abstract function index();", "abstract function index();", "public function user_route()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function test_index_returns_view()\n {\n $controller = new UsersController();\n $view = $controller->index();\n $this->assertEquals('admin.users.index', $view->getName());\n $this->assertArrayHasKey('users', $view->getData());\n }", "protected function indexAction() {}", "public function index()\n\t{\n\t\tdie('404 error');\n\t}", "public function testIndex()\n {\n $request = $this->mockHttpRequest([]);\n $service = $this->mockGoogleSearchServiceBasic();\n $controller = new SearchResultsController($request, $service);\n\n $result = $controller->index();\n\n $this->assertInstanceOf(Views\\Index::class, $result);\n $this->assertIsArray($result->getData());\n $this->assertEquals($result->getData(), []);\n }", "public function testIndexAction()\n {\n $this->url('http://localhost/hacker-news/index.php');\n $this->assertEquals('Hacker News - Github', $this->title());\n }", "public function testIndexAction()\n {\n $res = $this->controller->indexAction();\n $this->assertInternalType(\"object\", $res);\n $this->assertInstanceOf(ResponseUtility::class, $res);\n }", "abstract public function index();", "abstract public function index();", "abstract public function index();", "public function indexAction() {}", "public function homepageTest()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testIndex(): void\n {\n $response = $this->client->request('GET', '/');\n $this->assertEquals(200, $response->getStatusCode());\n\n $body = $response->getBody();\n $content = $body->getContents();\n\n /*\n * Match the title of the page.\n */\n $this->assertRegExp('/<title>MVC Design Pattern!<\\/title>/', $content);\n\n /*\n * Match the header of the page.\n *\n * <h1>An example of the Model View Controller - Design Pattern.</h1>\n */\n $this->assertRegExp('/<h1>[a-zA-Z -.]+<\\/h1>/', $content);\n\n /*\n * Match all cards.\n */\n $re = '/<div class=\"card\">/';\n $matches = [];\n\n preg_match_all($re, $content, $matches);\n\n $this->assertEquals(6, count($matches[0]));\n\n return;\n }", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function testAnonIndex404() : void {\n $crawler = $this->client->request('GET', '/pln/33/box/');\n $this->assertSame(302, $this->client->getResponse()->getStatusCode());\n }", "public function test_index() {\r\n\t\t$result = $this->testAction('form_builders/form_builders/index/');\r\n }", "public function test_index_rest()\n {\n $item = Rest::factory()->create();\n $response = $this->get('/api/v1/rest');\n $response->assertStatus(200);\n $response->assertJsonFragment([\n 'message' => $item->message,\n 'url' => $item->url\n ]);\n }", "public function testRootGetRoute()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n $response->assertSee('Enter url to crawl');\n $response->assertSee('Last Pages Crawled');\n }", "public abstract function index();", "public abstract function index();", "public abstract function index();", "public function testIndex()\n {\n $response = $this->action('GET', '\\Modules\\Admin\\Http\\Controllers\\FaqCategoryController@index');\n $this->assertResponseStatus(200, $response->status());\n $this->assertInstanceOf('Illuminate\\Http\\Response', $response);\n }", "public function test_admin_index_b()\n {\n $this->request('GET', ['pages/memberdsc', 'index']);\n $this->assertResponseCode(404);\n }", "public function testIndexActionGet()\n {\n $request = $this->di->get(\"request\");\n $request->setGet(\"ip\", \"8.8.8.8\");\n\n\n $res = $this->controller->indexActionGet();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertContains(\"Kolla vädret\", $body);\n }", "public function indexAction() : string\n {\n // Deal with the action and return a response.\n return \"index\";\n }", "public function testRenderIndexNoCode()\n {\n // Populate data\n $this->_populate();\n \n // Make Request\n $this->call('GET', '/dashboard');\n\n $this->assertRedirectedTo('/dashboard/login');\n }", "public function testIndexRouteAdmin(): void\n {\n // given\n $expectedStatusCode = 200;\n $adminUser = $this->createUser([User::ROLE_USER, User::ROLE_ADMIN]);\n $this->logIn($adminUser);\n\n // when\n $this->httpClient->request('GET', '/tag');\n $resultStatusCode = $this->httpClient->getResponse()->getStatusCode();\n\n // then\n $this->assertEquals($expectedStatusCode, $resultStatusCode);\n }", "public function testIndex()\n {\n $user = User::find(1);\n\n $response = $this->actingAs($user)->get('/admin/comptes');\n\n $response->assertStatus(200)\n ->assertViewIs('layouts.admin');\n }", "public function testPrimaryRoutes()\n\t{\n\t/*\t//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test base route\n\t\t// Should show post id 1\n\t\t$response = $this->call('GET', '/');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\n\t\t// Test /home is post 1\n\t\t$clicksBefore = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$response = $this->call('GET', '/home');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\t\t$clicksAfter = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$this->assertEquals(++$clicksBefore, $clicksAfter);\n\n\t\t// Test /about is post 2\n\t\t$response = $this->call('GET', '/about');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(2, $post->id);\n\t\t$this->assertEquals('f1112648-782e-aad3-785d-640fcfefaa9b', $post->uuid);\n\n\n\t\t// ##### Login as mReschke #####\n\t\tAuth::login(User::find(2)); Auth::user()->login();\n\n\t\t// Test /13/mreschke-home-page (non named route)\n\t\t$response = $this->call('GET', '/13/mreschke-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(13, $post->id);\n\t\t$this->assertEquals('1a52e0e3-3174-7b2b-a582-03a39e52e34a', $post->uuid);\n\n\t\t// Test /14/squaethem-home-page (non named route)\n\t\t$response = $this->call('GET', '/14/squaethem-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(14, $post->id);\n\t\t$this->assertEquals('e80e907e-50d4-8ed4-70f7-5d1815672966', $post->uuid);\n\t\t*/\n\n\t}", "public function testIndexActionGetFail()\n {\n // Setup the controller\n $controller = new LocWeatherController();\n $controller->setDI($this->di);\n\n // Test the controller action\n $_GET[\"ip\"] = \"test.ip.not.real\";\n $res = $controller->indexActionGet();\n $body = $res->getBody();\n $this->assertStringContainsString(\"<h5 style='color:red;'>Vädret misslyckades att hämtas.</h5>\", $body);\n }" ]
[ "0.8323967", "0.79867566", "0.7949656", "0.7784813", "0.77582747", "0.7654524", "0.7654524", "0.7652331", "0.7639047", "0.75727016", "0.75481856", "0.75321096", "0.7503794", "0.7495671", "0.74561495", "0.7435865", "0.7414043", "0.740376", "0.7382854", "0.7305627", "0.73026145", "0.72521293", "0.7201526", "0.71633756", "0.71584994", "0.7116686", "0.7116378", "0.71045357", "0.7100266", "0.7093864", "0.7087993", "0.7086323", "0.7085773", "0.7039304", "0.7017413", "0.7007713", "0.69948953", "0.69200397", "0.6911771", "0.69076896", "0.68862385", "0.687357", "0.68663096", "0.6863338", "0.68439716", "0.68394274", "0.6833095", "0.68134546", "0.6810989", "0.67926383", "0.67813486", "0.67802185", "0.67442805", "0.67290884", "0.672843", "0.6717098", "0.6715219", "0.6683766", "0.668215", "0.66664696", "0.66664696", "0.66664696", "0.6666094", "0.6665884", "0.6665345", "0.6648627", "0.66420716", "0.6625207", "0.6617871", "0.6616091", "0.6616091", "0.6616091", "0.661567", "0.66152513", "0.6614986", "0.661472", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.6612884", "0.6610238", "0.66072965", "0.65965754", "0.6596207", "0.6596207", "0.6596207", "0.65941054", "0.6591263", "0.6591025", "0.65835375", "0.6581671", "0.6578388", "0.65713924", "0.6566059", "0.65635866" ]
0.0
-1
Test the route "index".
public function testIndexActionError() : void { $res = $this->controller->indexActionPost(); $this->assertInternalType("array", $res); list($json, $status) = $res; $this->assertEquals($json["message"], "Ingen IP address skickades."); $this->assertEquals($status, 400); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testIndex()\n {\n $this->get(route('index'))\n ->assertResponseStatus(200);\n }", "public function testIndex()\n\t{\n\t\t// correct route for posts\n\t\t$this->call('GET', '/api/posts');\n\t}", "public function testIndex()\n {\n $this->call('GET', '/');\n $this->assertResponseOk();\n }", "public function testIndexActionCanBeAccessed()\n\t{\n\t\t$this->dispatch('/');\n\t\t$this->assertResponseStatusCode(200);\n\t\t$this->assertModuleName('DEC');\n\t\t$this->assertControllerName('DEC\\Controller\\Index');\n\t\t$this->assertControllerClass('IndexController');\n\t\t$this->assertMatchedRouteName('home');\n\t}", "public function testIndex()\n {\n $this->getBrowser()->\n getAndCheck('partenaire', 'index', '/partenaire/index', 404)\n ;\n }", "public function testIndex()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testIndex()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testIndex()\n {\n $client = static::createClient();\n\n $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode(), 'la route \"homepage\" ne fonctionne plus.');\n }", "public function testIndex()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testIndexRoute()\n {\n $user = factory(User::class)->create();\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->get(route('events.index'))\n ->assertStatus(200);\n }", "public function testIndexMethod()\n {\n $this->authentication();\n $this->get(route('members.index'));\n $this->seeStatusCode(200);\n }", "public function test_indexAction ( )\n {\n $params = array(\n 'action' => 'index',\n 'controller'=> 'index',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n }", "public function testIndex()\n\t{\n\t\t$client = static::createClient();\n\n\t\t$crawler = $client->request('GET', '/');\n\n\t\t$this->assertEquals(200, $client->getResponse()->getStatusCode());\n\t}", "public function testIndexActionGet()\n {\n $res = $this->controller->indexActionGet();\n $this->assertContains(\"View all items\", $res->getBody());\n }", "public function testIndex()\n {\n $this->get('/')\n ->assertSuccessful()\n ->assertViewIs('layouts.home.index')\n ->assertSee('Welcome to a E-Ticket System');\n }", "public function testIndexActionCanBeAccessed()\n {\n $this->dispatch('/venue');\n $this->assertResponseStatusCode(200);\n }", "public function testIndexMethodAuthorised()\n {\n $response = $this->actingAs($this->user)\n ->get($this->routeIndex);\n\n $response->assertStatus(200);\n $response->assertViewIs('pages.eventtype.index');\n }", "public function test_bad_index_route()\n {\n //incorrect uri\n $response = $this->get('api/students/1234');\n $response->assertStatus(404);\n }", "public function testIndex()\n {\n $this->visit('/')\n ->see('STUDENT MONEY ASSISTANCE');\n }", "public function testIndex()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('GET', static::ROUTE)\n ->seeStatusCode(JsonResponse::HTTP_OK);\n }", "public function testMethodIndexAction()\n {\n $route = new Route();\n\n $route->set(null, null, null, \"Anax\\Route\\MockHandlerController\");\n $this->assertTrue($route->match(\"\"));\n $res = $route->handle(\"\");\n $this->assertEquals(\"indexAction\", $res);\n\n $route->set(null, null, \"\", \"Anax\\Route\\MockHandlerController\");\n $this->assertTrue($route->match(\"\"));\n $res = $route->handle(\"\");\n $this->assertEquals(\"indexAction\", $res);\n\n $route->set(null, \"\", null, \"Anax\\Route\\MockHandlerController\");\n $this->assertTrue($route->match(\"\"));\n $res = $route->handle(\"\");\n $this->assertEquals(\"indexAction\", $res);\n }", "public function testIndexPage()\n {\n $this->visit('/')\n ->see('Read a Blog')\n ->see('Admin')\n ->see('Sign in')\n ->dontSee('Logout');\n }", "public function testIndexRouteIsWorking()\n {\n $client = static::createClient();\n $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertSelectorExists('.profit_amount');\n $this->assertSelectorTextContains('.navbar-brand', 'Margin Calculator');\n\n return null;\n }", "public function testIndex()\n {\n $response = $this->getJson(route('users.index'), $this->headers);\n\n $response->assertStatus(200);\n }", "public function testGetActionMethodForIndexAction()\n {\n $application = new BasicTestApplication(FilePath::parse('/var/www/'));\n $request = new BasicTestRequest(Url::parse('http://www.domain.com/'), new Method('GET'));\n $response = new BasicTestResponse();\n $controller = new BasicTestController();\n $controller->processRequest($application, $request, $response, '', []);\n\n self::assertSame('indexAction', $controller->getActionMethod()->getName());\n }", "public function testPaymentIndexActionCanBeAccessed()\n {\n $this->dispatch('/payment');\n $this->assertResponseStatusCode(200);\n\n $this->assertModuleName('Payment');\n $this->assertControllerName('payment/index');\n $this->assertControllerClass('IndexController');\n $this->assertMatchedRouteName('standardPayment');\n }", "public function indexRoute()\n {\n }", "public function testLeaseIndexFrontEnd()\n {\n $this->get(route('lease'))->assertStatus(200);\n }", "public function testIndexActionCanBeAccessed()\n {\n $apartmentGeneralDao = $this->getApplicationServiceLocator()->get('dao_apartment_general');\n $apartment = $apartmentGeneralDao->fetchOne();\n\n $this->dispatch('/apartment/' . $apartment['id'] . '/inventory-range');\n $this->assertResponseStatusCode(200);\n\n $this->assertModuleName('apartment');\n $this->assertControllerName('controller_apartment_inventory_range');\n $this->assertControllerClass('InventoryRange');\n $this->assertActionName('index');\n $this->assertMatchedRouteName('apartment/inventory-range');\n }", "public function testIndex()\n {\n Page::create([\n 'slug' => 'index',\n 'title' => 'Test Index',\n ]);\n $this->get('/')->assertStatus(200)->assertSee('Test Index');\n }", "public function testIndexSuccess()\n {\n $this->setAdminSession();\n $this->get($this->indexUrl);\n $this->assertResponseOk();\n }", "public function testGetRequestWithoutParametersIsRoutedToIndexAction()\n\t{\n\t\t$this->request->setMethod('GET');\n\t\t$this->dispatch('/api/event');\n\n\t\t$this->assertModule('api');\n\t\t$this->assertController('event');\n\t\t$this->assertAction('index');\t\t\n\t}", "public function testIndex()\n {\n $requestInstance = null;\n\n $this->router->get('/customers/{id}/relationships/{relationship}', [\n 'middleware' => ['request', 'response'],\n function(\\Luminary\\Http\\Requests\\Index $request, $id, $relationship) use(&$requestInstance) {\n $requestInstance = $request;\n }\n ]);\n\n $this->get('/customers/1234/relationships/location');\n\n $this->assertResponseOk();\n $this->assertInstanceOf(\\Luminary\\Http\\Requests\\Index::class, $requestInstance);\n $this->assertInstanceOf(CustomerAuthorize::class, $requestInstance->getAuthorize());\n }", "public function testIndexTahun()\n\t{\n\t\t$response = $this->action('GET', 'TahunController@index');\n\t}", "public function test_good_index_route()\n {\n //correct uri\n $response = $this->get('api/students');\n $response \n ->assertStatus(200)\n ->assertJson([['first_name'=> 'Chadwick'], ['first_name'=> 'Evelyn']]);\n }", "public function testIndex(): void\n {\n $response = $this\n ->actingAs($this->user)\n ->get('/');\n $response->assertViewIs('home');\n $response->assertSeeText('Сообщения от всех пользователей');\n }", "public function testIndexActionCanBeAccessed()\n {\n $this->elasticsearchClientMock->expects($this->once())\n ->method('getIndexStats')\n ->will($this->returnValue(array()));\n\n $serviceManager = $this->controller->getServiceLocator();\n $serviceManager->setAllowOverride(true);\n $serviceManager->setService('ElasticsearchManager', $this->elasticsearchClientMock);\n\n $this->routeMatch->setParam('action', 'index');\n\n $result = $this->controller->dispatch($this->request);\n $response = $this->controller->getResponse();\n\n $this->assertEquals(200, $response->getStatusCode());\n }", "public function testIndexAction()\n {\n $request = $this->di->get(\"request\");\n $request->setServer(\"REMOTE_ADDR\", \"127.0.0.1\");\n $res = $this->controller->indexAction();\n $this->assertIsArray($res);\n\n $json = $res[0];\n $this->assertEquals(\"Oops, platsinformation saknas\", $json[\"err\"]);\n }", "public function testIndex(){\r\n\t\t$destino = Enhance::getCodeCoverageWrapper('EventosControllerClass');\r\n\t\t$destino->index();\r\n\t\t$this->call('GET', 'admin');\r\n\t\t$this->assertResponseOk();\r\n\t}", "public function test_dispatchIndexAction ( )\n {\n $params = array(\n 'action' => 'index',\n 'controller'=> 'scales',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n\n }", "public function testIndex()\n {\n $client = static::createClient();\n $crawler = $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertCount(1, $crawler->filter('h1'));\n $this->assertEquals(1, $crawler->filter('html:contains(\"Trick List\")')->count());\n }", "public static function route()\n {\n return 'index';\n }", "public function testIndexAction()\n {\n $res = $this->controller->indexAction();\n $this->assertIsObject($res);\n }", "public function testRequestRootIsAndIndex() {\n\n\t\t$r1 = new Nether\\Avenue\\Router(static::$RequestData['Root']);\n\t\t$r2 = new Nether\\Avenue\\Router(static::$RequestData['Index']);\n\n\t\t(new Verify(\n\t\t\t'path / request runs as /index',\n\t\t\t$r1->GetPath()\n\t\t))->equals('/index');\n\n\t\t(new Verify(\n\t\t\t'path /index runs as /index',\n\t\t\t$r2->GetPath()\n\t\t))->equals('/index');\n\n\n\t\treturn;\n\t}", "public function testIfIndexPageRenderTemplate()\n {\n $response = $this->get('/customers');\n\n $response->assertViewIs('customers.index');\n }", "public function testIndex()\n {\n $this->visit('/cube')\n ->see('Choose a Cube')\n ->see('Add a Cube')\n ->see('Upload Cube')\n ->see('This is an application just to show how the Cube Summation')\n ->dontSee('Update Cube')\n ->dontSee('Query Cube')\n ->dontSee('Blocks for');\n }", "public function testHomeView()\n\t{\n\t\t$response = $this->call('GET', '/');\n\t\t$view = $response->original;\n\t\t\n\t\t$this->assertEquals('home.index', $view['name']);\n\t}", "public function testHome()\n {\n $response = $this->get(route('home'));\n\n $response->assertStatus(200);\n }", "public function testIndex()\n {\n $client = static::createClient();\n\n $crawler = $client->request('GET', '/');\n\n $this->assertContains('Hello World', $client->getResponse()->getContent());\n }", "public function index()\n {\n echo \"Đây là trang Index Test resource\";\n }", "public function test_listIndexAction ( )\n {\n $params = array(\n 'event_id' => 1,\n 'action' => 'list',\n 'controller'=> 'scales',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n\n }", "public function testIndexRedirect()\n {\n $response = $this->get('/');\n\n $response->assertStatus(302);\n }", "public function test_a_guest_can_access_blog_index()\n {\n $response = $this->get('/blog'); //make GET access to blog route\n\n $response->assertStatus(200); //assert http status return is 200\n }", "public function test_show_homepage()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testRouteIndexClienteOk()\n {\n $this->call('GET', 'cliente');\n $this->assertResponseOk();\n }", "public function testIndexActionGet()\n {\n // Setup the controller\n $controller = new LocWeatherController();\n $controller->setDI($this->di);\n\n unset($_POST[\"ip\"]);\n unset($_GET[\"ip\"]);\n\n // Test the controller action\n $res = $controller->indexActionGet();\n $body = $res->getBody();\n $this->assertStringContainsString(\"<p>Skriv in koordinater nedan för att ta fram en väderleksrapport!</p>\", $body);\n }", "public function test_index()\n {\n Instrument::factory(2)->create();\n $response = $this->get('instrument');\n $response->assertStatus(200);\n }", "public function testIndex(){\n\t\t\n\t\t$this->mock->shouldReceive('all')->once();\n\n\t\t$this->call('GET', 'users'); //get: Method , user: url\n\n\t\t$this->assertResponseOk();\n\t}", "public function testIndexAction()\n {\n\n $res = $this->controller->indexAction();\n $this->assertInstanceOf(ResponseUtility::class, $res);\n //$this->assertStringEndsWith(\"active\", $res);\n }", "abstract function index();", "abstract function index();", "abstract function index();", "public function user_route()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function test_index_returns_view()\n {\n $controller = new UsersController();\n $view = $controller->index();\n $this->assertEquals('admin.users.index', $view->getName());\n $this->assertArrayHasKey('users', $view->getData());\n }", "protected function indexAction() {}", "public function index()\n\t{\n\t\tdie('404 error');\n\t}", "public function testIndex()\n {\n $request = $this->mockHttpRequest([]);\n $service = $this->mockGoogleSearchServiceBasic();\n $controller = new SearchResultsController($request, $service);\n\n $result = $controller->index();\n\n $this->assertInstanceOf(Views\\Index::class, $result);\n $this->assertIsArray($result->getData());\n $this->assertEquals($result->getData(), []);\n }", "public function testIndexAction()\n {\n $this->url('http://localhost/hacker-news/index.php');\n $this->assertEquals('Hacker News - Github', $this->title());\n }", "public function testIndexAction()\n {\n $res = $this->controller->indexAction();\n $this->assertInternalType(\"object\", $res);\n $this->assertInstanceOf(ResponseUtility::class, $res);\n }", "abstract public function index();", "abstract public function index();", "abstract public function index();", "public function indexAction() {}", "public function homepageTest()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testIndex(): void\n {\n $response = $this->client->request('GET', '/');\n $this->assertEquals(200, $response->getStatusCode());\n\n $body = $response->getBody();\n $content = $body->getContents();\n\n /*\n * Match the title of the page.\n */\n $this->assertRegExp('/<title>MVC Design Pattern!<\\/title>/', $content);\n\n /*\n * Match the header of the page.\n *\n * <h1>An example of the Model View Controller - Design Pattern.</h1>\n */\n $this->assertRegExp('/<h1>[a-zA-Z -.]+<\\/h1>/', $content);\n\n /*\n * Match all cards.\n */\n $re = '/<div class=\"card\">/';\n $matches = [];\n\n preg_match_all($re, $content, $matches);\n\n $this->assertEquals(6, count($matches[0]));\n\n return;\n }", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function testAnonIndex404() : void {\n $crawler = $this->client->request('GET', '/pln/33/box/');\n $this->assertSame(302, $this->client->getResponse()->getStatusCode());\n }", "public function test_index() {\r\n\t\t$result = $this->testAction('form_builders/form_builders/index/');\r\n }", "public function test_index_rest()\n {\n $item = Rest::factory()->create();\n $response = $this->get('/api/v1/rest');\n $response->assertStatus(200);\n $response->assertJsonFragment([\n 'message' => $item->message,\n 'url' => $item->url\n ]);\n }", "public function testRootGetRoute()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n $response->assertSee('Enter url to crawl');\n $response->assertSee('Last Pages Crawled');\n }", "public abstract function index();", "public abstract function index();", "public abstract function index();", "public function testIndex()\n {\n $response = $this->action('GET', '\\Modules\\Admin\\Http\\Controllers\\FaqCategoryController@index');\n $this->assertResponseStatus(200, $response->status());\n $this->assertInstanceOf('Illuminate\\Http\\Response', $response);\n }", "public function test_admin_index_b()\n {\n $this->request('GET', ['pages/memberdsc', 'index']);\n $this->assertResponseCode(404);\n }", "public function testIndexActionGet()\n {\n $request = $this->di->get(\"request\");\n $request->setGet(\"ip\", \"8.8.8.8\");\n\n\n $res = $this->controller->indexActionGet();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertContains(\"Kolla vädret\", $body);\n }", "public function indexAction() : string\n {\n // Deal with the action and return a response.\n return \"index\";\n }", "public function testRenderIndexNoCode()\n {\n // Populate data\n $this->_populate();\n \n // Make Request\n $this->call('GET', '/dashboard');\n\n $this->assertRedirectedTo('/dashboard/login');\n }", "public function testIndexRouteAdmin(): void\n {\n // given\n $expectedStatusCode = 200;\n $adminUser = $this->createUser([User::ROLE_USER, User::ROLE_ADMIN]);\n $this->logIn($adminUser);\n\n // when\n $this->httpClient->request('GET', '/tag');\n $resultStatusCode = $this->httpClient->getResponse()->getStatusCode();\n\n // then\n $this->assertEquals($expectedStatusCode, $resultStatusCode);\n }", "public function testIndex()\n {\n $user = User::find(1);\n\n $response = $this->actingAs($user)->get('/admin/comptes');\n\n $response->assertStatus(200)\n ->assertViewIs('layouts.admin');\n }", "public function testPrimaryRoutes()\n\t{\n\t/*\t//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test base route\n\t\t// Should show post id 1\n\t\t$response = $this->call('GET', '/');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\n\t\t// Test /home is post 1\n\t\t$clicksBefore = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$response = $this->call('GET', '/home');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\t\t$clicksAfter = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$this->assertEquals(++$clicksBefore, $clicksAfter);\n\n\t\t// Test /about is post 2\n\t\t$response = $this->call('GET', '/about');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(2, $post->id);\n\t\t$this->assertEquals('f1112648-782e-aad3-785d-640fcfefaa9b', $post->uuid);\n\n\n\t\t// ##### Login as mReschke #####\n\t\tAuth::login(User::find(2)); Auth::user()->login();\n\n\t\t// Test /13/mreschke-home-page (non named route)\n\t\t$response = $this->call('GET', '/13/mreschke-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(13, $post->id);\n\t\t$this->assertEquals('1a52e0e3-3174-7b2b-a582-03a39e52e34a', $post->uuid);\n\n\t\t// Test /14/squaethem-home-page (non named route)\n\t\t$response = $this->call('GET', '/14/squaethem-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(14, $post->id);\n\t\t$this->assertEquals('e80e907e-50d4-8ed4-70f7-5d1815672966', $post->uuid);\n\t\t*/\n\n\t}", "public function testIndexActionGetFail()\n {\n // Setup the controller\n $controller = new LocWeatherController();\n $controller->setDI($this->di);\n\n // Test the controller action\n $_GET[\"ip\"] = \"test.ip.not.real\";\n $res = $controller->indexActionGet();\n $body = $res->getBody();\n $this->assertStringContainsString(\"<h5 style='color:red;'>Vädret misslyckades att hämtas.</h5>\", $body);\n }" ]
[ "0.8323967", "0.79867566", "0.7949656", "0.7784813", "0.77582747", "0.7654524", "0.7654524", "0.7652331", "0.7639047", "0.75727016", "0.75481856", "0.75321096", "0.7503794", "0.7495671", "0.74561495", "0.7435865", "0.7414043", "0.740376", "0.7382854", "0.7305627", "0.73026145", "0.72521293", "0.7201526", "0.71633756", "0.71584994", "0.7116686", "0.7116378", "0.71045357", "0.7100266", "0.7093864", "0.7087993", "0.7086323", "0.7085773", "0.7039304", "0.7017413", "0.7007713", "0.69948953", "0.69200397", "0.6911771", "0.69076896", "0.68862385", "0.687357", "0.68663096", "0.6863338", "0.68439716", "0.68394274", "0.6833095", "0.68134546", "0.6810989", "0.67926383", "0.67813486", "0.67802185", "0.67442805", "0.67290884", "0.672843", "0.6717098", "0.6715219", "0.6683766", "0.668215", "0.66664696", "0.66664696", "0.66664696", "0.6666094", "0.6665884", "0.6665345", "0.6648627", "0.66420716", "0.6625207", "0.6617871", "0.6616091", "0.6616091", "0.6616091", "0.661567", "0.66152513", "0.6614986", "0.661472", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.66131014", "0.6612884", "0.6610238", "0.66072965", "0.65965754", "0.6596207", "0.6596207", "0.6596207", "0.65941054", "0.6591263", "0.6591025", "0.65835375", "0.6581671", "0.6578388", "0.65713924", "0.6566059", "0.65635866" ]
0.0
-1
Handle the article "created" event.
public function created(Article $article) { if ($article->is_top == 1 && $article->status == 1) { Article::topArticle(true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle(Article $article): void\n {\n // Log également un article stat avec pour action create.\n $article->setSlug($this->slug->generate($article->getTitle()));\n $article->setAuthor($this->token->getToken()->getUser());\n }", "public function createAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"controller\" => \"articles\",\n \"action\" => \"index\"\n ));\n }\n\n $article = new Articles();\n\n $article->title = $this->request->getPost(\"title\");\n $article->slug = str_replace(' ','_', strtolower($article->title));\n $article->content = $this->request->getPost(\"content\");\n $article->category = $this->request->getPost(\"category\");\n $article->isPublished = $this->request->getPost(\"isPublished\");\n $article->author = $this->request->getPost(\"author\");\n $article->createdOn = new RawValue('now()');\n $article->views = 1;\n \n\n if (!$article->save()) {\n foreach ($article->getMessages() as $message) {\n $this->flash->error($message);\n }\n return $this->dispatcher->forward(array(\n \"controller\" => \"articles\",\n \"action\" => \"new\"\n ));\n }\n\n $this->flash->success(\"article was created successfully\");\n return $this->dispatcher->forward(array(\n \"controller\" => \"articles\",\n \"action\" => \"index\"\n ));\n\n }", "public function create()\n {\n\n $categories = $this->categoryModel->getCategories();\n $tags = $this->tagModel->getTags();\n\n $data = [\n 'title' =>'',\n 'slug' => '',\n 'body' => '',\n 'created_at' => '',\n 'categories' => $categories,\n 'tags' => $tags,\n 'date'=>'',\n 'image' => '',\n 'user_id' =>'',\n 'status' =>'',\n\n ];\n $this->view('articles/create', $data);\n\n\n }", "public function createArticle() {\n\n\t\t$ArticleItem = new ArticleItem();\n\n\t\t$this->articles[] = $ArticleItem;\n\n\t\treturn $ArticleItem->getArticle();\n\n\t}", "public function create()\n {\n $result = $this->service->create();\n return view(getThemeView('blog.article.create'))->with($result);\n }", "public function created(Post $post)\n {\n $post->recordActivity('created');\n }", "public function createAction()\n {\n // Checking a for a valid csrf token\n if ($this->request->isPost()) {\n if (!$this->security->checkToken()) {\n //if the csrf token is not valid, end the algorithm here\n return;\n }\n }\n\n // Getting a request instance\n $request = new Request();\n\n // Check whether the request was made with method POST\n if ($request->isPost()) {\n\n //TODO Question: is there a way to auto map the post data to a model?\n $article = new Article();\n $article->creationDate = $date = date('Y-m-d H:i:s');\n $article->title = $this->request->getPost('title');\n $article->summary = $this->request->getPost('summary');\n $article->content = $this->request->getPost('content');\n\n //try to save the article to the database, if it fails let the user know what went wrong\n if (!$article->save()) {\n //get all the validationErrors and store them in the flashSessions and return the view\n foreach ($article->getMessages() as $message) {\n //append the validation errors to the flash session\n $this->flashSession->error($message);\n }\n return;\n }\n\n //let the user know the article was saved successfully\n $this->flashSession->message('message', 'The article has successfully been created');\n\n //return to the admin article overview so the user can see the new article in the list\n return $this->response->redirect(\"/article\");\n }\n }", "public function onFigureCreated(GenericEvent $event): void\n {\n /** @var FigureAddEvent $figure_added */\n $figure_added = $event->getSubject();\n $figure = $figure_added->getFigure();\n\n $linkToFigure = $this->urlGenerator->generate('snowtrick_blog_figure', [\n 'slug' => $figure->getSlug(),\n '_fragment' => 'figure_added_'.$figure_added->getId(),\n ], UrlGeneratorInterface::ABSOLUTE_URL);\n\n $subject = $this->translator->trans('notification.figure_created');\n $body = $this->translator->trans('notification.figure_created_description',[\n '%title%' => $figure->getTitle(),\n '%content%' => $figure->getContent(),\n '%link%' => $linkToFigure,\n ]);\n $message = (new Swift_Message())\n ->setSubject($subject)\n ->setTo($figure_added->getAuthor()->getEmail())\n ->setFrom($this->sender)\n ->setBody($body, 'text/html');\n\n\n $this->mailer->send($message);\n }", "public function created(Post $post)\n {\n //\n }", "public function create()\n\t{\n\t\treturn View::make('pages.article.create');\n\t}", "public function onCreated()\n {\n parent::onCreated();\n\n }", "public function onCreated()\n {\n parent::onCreated();\n\n }", "public function store(ArticlesFormRequest $request)\n {\n $article = new Article;\n $article->fill($request->all());\n $article->published = $request->get('published', false);\n $article->featured = $request->get('featured', false);\n $article->authenticated = $request->get('authenticated', false);\n $article->is_page = $request->get('is_page', false);\n $article->save();\n\n $article->permissions()->sync($request->get('permissions', []));\n if ($request->tags) {\n $article->tag(explode(',', $request->tags));\n }\n\n event(new ArticleWasCreated($article));\n\n flash()->success(trans('cms::article.store.success'));\n\n return redirect()->route('administrator.articles.index');\n }", "public function create()\n {\n if (Gate::denies('save', new Article())){\n abort(403);\n }\n $this->title = \"Add new article\";\n $categories = Category::select(['title', 'alias', 'parent_id', 'id'])->get();\n $lists = array();\n foreach ($categories as $category){\n if($category->parent_id == 0){\n $lists[$category->title] = array();\n } else{\n $lists[$categories->where('id', $category->parent_id)->first()->title][$category->id] = $category->title;\n }\n }\n //dd($lists);\n $this->content = view(env('THEME') .'.admin.articles_create')->with('categories', $lists)->render();\n return $this->renderOutput();\n }", "public function create() {\n //\n return view('admin.article.create');\n }", "public function create()\n {\n return view('back.article.create');\n }", "public function create()\n {\n return view('admin.article_create');\n }", "public function created(Auditable $model)\n {\n Auditor::execute($model->setAuditEvent('created'));\n }", "public function create()\n\t{\n\t\t//\n\t\treturn \\View::make('specialties.articles.create');\n\t}", "private function createArticle(ArticleRequest $request){\n\n $article = \\Auth::user()->articles()->create($request->all());\n\n $this->syncTags($article, $request->input('tag_list'));\n\n return $article; \n }", "public function create()\n {\n $datas=$this->articleRepository->create();\n return view('backend.article.create', [\n 'datas' => $datas,\n ]);\n }", "public function creating(Article $article)\n {\n // assign default ordering\n //$article->{Orderable::$orderCol} = $article->maxOrder($article->parent_id) + 1;\n }", "public function create() {\n\t\treturn view('articles.create');\n\t}", "public function create()\n {\n $articles = null;\n return view('article.create',compact('articles'));\n }", "public function create()\n {\n return view('admin.article.create');\n }", "public function created(EntryInterface $entry)\n {\n $this->commands->dispatch(new CreateStream($entry));\n\n parent::created($entry);\n }", "private function insertArticle()\n {\n $this->testArticleId = substr_replace( oxRegistry::getUtilsObject()->generateUId(), '_', 0, 1 );\n $this->testArticleParentId = substr_replace( oxRegistry::getUtilsObject()->generateUId(), '_', 0, 1 );\n\n //copy from original article parent and variant\n $articleParent = oxNew('oxarticle');\n $articleParent->disableLazyLoading();\n $articleParent->load(self::SOURCE_ARTICLE_PARENT_ID);\n $articleParent->setId($this->testArticleParentId);\n $articleParent->oxarticles__oxartnum = new oxField('666-T', oxField::T_RAW);\n $articleParent->save();\n\n $article = oxNew('oxarticle');\n $article->disableLazyLoading();\n $article->load(self::SOURCE_ARTICLE_ID);\n $article->setId($this->testArticleId);\n $article->oxarticles__oxparentid = new oxField($this->testArticleParentId, oxField::T_RAW);\n $article->oxarticles__oxprice = new oxField('10.0', oxField::T_RAW);\n $article->oxarticles__oxartnum = new oxField('666-T-V', oxField::T_RAW);\n $article->oxarticles__oxactive = new oxField('1', oxField::T_RAW);\n $article->save();\n\n }", "public function store(createArticleRequest $request)\n\t{\n\t\t$article = new Article($request->all());\n\n\t\t$name = $request->input('interest');\n\n\t\t$tag_id = DB::table('interests')\n\t\t\t->select('interests.id')\n\t\t\t->where('name','=',$name)->get();\n\n\t\t$article->interest()->attach($tag_id);\n\n\t\tAuth::user()->article()->save($article);\n\n\n\n\t\tflash()->overlay('Your article has been created', 'Thank you for posting');\n\t\t\n\t\treturn redirect('article');\n\t}", "public function create()\n {\n return view('pearlskin::admin.articles.create');\n }", "public function addArticle(): void\n {\n $this->title = $_POST['titleArticle'];\n $this->content = $_POST['contentArticle'];\n $this->category = $_POST['categoryArticle'];\n $datetime = new DateTime();\n $this->date = $datetime->format('Y-m-d H:i:s');\n $this->author = $_SESSION['user']['id'];\n\n $this->image = $_FILES['imageArticle'];\n $tmp_file = $this->image['tmp_name'];\n $type_file = $this->image['type'];\n\n $temp = explode(\".\", $this->image['name']);\n $name_file = round(microtime(true)) . '.' . end($temp);\n\n $destination = 'application/views/images/';\n\n if (!is_uploaded_file($tmp_file) === true) {\n exit(\"Le fichier est introuvable\");\n };\n if (!strstr($type_file, 'jpg') && !strstr($type_file, 'jpeg') && !strstr($type_file, 'bmp')) {\n exit(\"Le fichier n'est pas une image\");\n }\n if (preg_match('#[\\x00-\\x1F\\x7F-\\x9F/\\\\\\\\]#', $name_file)) {\n exit(\"Nom de fichier non valide\");\n } else if (!move_uploaded_file($tmp_file, $destination . $name_file)) {\n exit(\"Impossible de copier le fichier dans $destination\");\n } else {\n move_uploaded_file($tmp_file, $destination . $name_file);\n }\n\n $this->articleModel->addArticle($this->title, $this->content, $this->category, $name_file, $this->date, $this->author);\n\n // Redirect to the articles list page\n Router::redirectTo('listArticles');\n exit();\n }", "public function getCreateArticlePage()\n {\n return view(\n 'articles.create'\n );\n }", "public function create()\n {\n return view('article.create');\n }", "public function create()\n {\n return view('article.create');\n }", "public function create()\n {\n return view('article.create');\n }", "public function created(Item $item)\n {\n //\n }", "public function create() {\n\n //\n return View::make('admin.articles.create');\n }", "public function create()\n {\n $tags = Tag::all();\n return response()->view('articles.create', compact('tags'));\n }", "public function run()\n {\n //\n if (articles::count() == 0){\n articles::create([\n 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing',\n 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh.\n\nEtiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla.\n\nFusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\nMauris in aliquam velit, sed fringilla dui.\nProin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.\n\n1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\n2.Mauris in aliquam velit, sed fringilla dui.\n3.Proin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.',\n 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.',\n 'alias' => 'article_1',\n 'img' => 'article_1',\n ]);\n articles::create([\n 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing',\n 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh.\n\nEtiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla.\n\nFusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\nMauris in aliquam velit, sed fringilla dui.\nProin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.\n\n1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\n2.Mauris in aliquam velit, sed fringilla dui.\n3.Proin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.',\n 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.',\n 'alias' => 'article_2',\n 'img' => 'article_2',\n ]);\n articles::create([\n 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing',\n 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh.\n\nEtiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla.\n\nFusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\nMauris in aliquam velit, sed fringilla dui.\nProin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.\n\n1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\n2.Mauris in aliquam velit, sed fringilla dui.\n3.Proin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.',\n 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.',\n 'alias' => 'article_3',\n 'img' => 'article_3',\n ]);\n articles::create([\n 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing',\n 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh.\n\nEtiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla.\n\nFusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\nMauris in aliquam velit, sed fringilla dui.\nProin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.\n\n1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\n2.Mauris in aliquam velit, sed fringilla dui.\n3.Proin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.',\n 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.',\n 'alias' => 'article_4',\n 'img' => 'article_4',\n ]);\n articles::create([\n 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing',\n 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh.\n\nEtiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla.\n\nFusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\nMauris in aliquam velit, sed fringilla dui.\nProin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.\n\n1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\n2.Mauris in aliquam velit, sed fringilla dui.\n3.Proin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.',\n 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.',\n 'alias' => 'article_5',\n 'img' => 'article_5',\n ]);\n articles::create([\n 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing',\n 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh.\n\nEtiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla.\n\nFusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\nMauris in aliquam velit, sed fringilla dui.\nProin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.\n\n1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\n2.Mauris in aliquam velit, sed fringilla dui.\n3.Proin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.',\n 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.',\n 'alias' => 'article_6',\n 'img' => 'article_6',\n ]);\n articles::create([\n 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing',\n 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh.\n\nEtiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla.\n\nFusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\nMauris in aliquam velit, sed fringilla dui.\nProin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.\n\n1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\n2.Mauris in aliquam velit, sed fringilla dui.\n3.Proin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.',\n 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.',\n 'alias' => 'article_7',\n 'img' => 'article_1',\n ]);\n articles::create([\n 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing',\n 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh.\n\nEtiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla.\n\nFusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\nMauris in aliquam velit, sed fringilla dui.\nProin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.\n\n1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\n2.Mauris in aliquam velit, sed fringilla dui.\n3.Proin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.',\n 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.',\n 'alias' => 'article_8',\n 'img' => 'article_2',\n ]);\n articles::create([\n 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing',\n 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh.\n\nEtiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla.\n\nFusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\nMauris in aliquam velit, sed fringilla dui.\nProin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.\n\n1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\n2.Mauris in aliquam velit, sed fringilla dui.\n3.Proin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.',\n 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.',\n 'alias' => 'article_9',\n 'img' => 'article_3',\n ]);\n articles::create([\n 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing',\n 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh.\n\nEtiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla.\n\nFusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\nMauris in aliquam velit, sed fringilla dui.\nProin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.\n\n1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\n2.Mauris in aliquam velit, sed fringilla dui.\n3.Proin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.',\n 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.',\n 'alias' => 'article_10',\n 'img' => 'article_4',\n ]);\n articles::create([\n 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing',\n 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh.\n\nEtiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla.\n\nFusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\nMauris in aliquam velit, sed fringilla dui.\nProin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.\n\n1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\n2.Mauris in aliquam velit, sed fringilla dui.\n3.Proin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.',\n 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.',\n 'alias' => 'article_11',\n 'img' => 'article_5',\n ]);\n articles::create([\n 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing',\n 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh.\n\nEtiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla.\n\nFusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\nMauris in aliquam velit, sed fringilla dui.\nProin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.\n\n1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo.\n2.Mauris in aliquam velit, sed fringilla dui.\n3.Proin imperdiet rhoncus cursus.\nMauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.',\n 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.',\n 'alias' => 'article_12',\n 'img' => 'article_6',\n ]);\n }\n }", "public function create()\n {\n $data=PagesController::dataCommune('article.create',false);\n return view('articles.create',$data);\n }", "public function create()\n {\n return view('admin.article.create'); \n\n }", "protected function onCreated()\n {\n return true;\n }", "public function create()\n {\n //\n return view('Admin.Article.add');\n }", "public function create()\n {\n $tag = Tag::pluck('title','id');\n $category = Category::pluck('title','id');\n return view('admin.article.create',compact('tag','category'));\n }", "public function store(Requests\\ArticleRequest $request)\n {\n //Unless validation pass the code below will never be fired\n $this->createArticle($request);\n \n flash()->success('Your article has been created');\n return redirect('articles');\n }", "public function created(Document $document)\n {\n //\n }", "public function created()\n\t{\n\t\tif (!$this->ismilestone) {\n\t\t\t$this->createDefaultMilestone();\n\t\t}\n\n\t\t$this->versioningService->createVersion($this);\n\t}", "public function create()\n {\n return view('backend.articles.create');\n }", "public function store(ArticleRequest $request)\n {\n $article = new Article();\n $article->title = $request->title;\n $article->body = $request->body;\n $published_at = $request->published_at_date . ' '. $request->published_at_time;\n $article->published_at = $published_at;\n $article->author_id = $request->user_id;\n $article->slug = str_slug($request->title, '-');\n $article->save();\n\n session()->flash('flash_message', 'the article has been created');\n session()->flash('flash_message_important', true);\n\n $tags = $request->tags;\n foreach ($tags as $tag) {\n if (is_numeric($tag))\n {\n $tagArr[] = $tag;\n }\n else\n {\n $newTag = Tag::create(['name'=>$tag]);\n $tagArr[] = $newTag->id;\n }\n }\n $article->tags()->sync($tagArr);\n return redirect('articles');\n }", "public function create()\n {\n //创建文章页面\n\t return view('article/create');\n }", "public function create()\n {\n $this->authorize('create', Article::class);\n return view('articles.create');\n }", "function on_creation() {\n $this->init();\n }", "public function postPersist(LifecycleEventArgs $args)\n {\n $this->doctrineLog($args,\n array(\n 'action' => 'created',\n 'level' => 'doctrine',\n ));\n }", "public function create()\n {\n $type_mouvements = DB::table('type_mouvements')->get()->pluck('libelle', 'id');\n $type_affectations = DB::table('type_affectations')->get()->pluck('libelle', 'id');\n $type_articles = DB::table('type_articles')->get()->pluck('libelle', 'id');\n $fournisseurs = DB::table('fournisseurs')->get()->pluck('raison_sociale', 'id');\n $marque_articles = DB::table('marque_articles')->get()->pluck('nom', 'id');\n $selectedtags = $this->getTags(\"r\");\n $etat_articles = DB::table('etat_articles')->get()->pluck('libelle', 'id');\n\n $article = $this->getDefaultObject(new Article());\n\n $nowdate = Carbon::now();\n\n return view('articles.create')\n ->with('selectedtags', $selectedtags)\n ->with('type_mouvements', $type_mouvements)\n ->with('type_affectations', $type_affectations)\n ->with('type_articles', $type_articles)\n ->with('fournisseurs', $fournisseurs)\n ->with('marque_articles', $marque_articles)\n ->with('etat_articles', $etat_articles)\n ->with('nowdate', $nowdate)\n\n ->with('article', $article);\n }", "public function creating(Knowledgebase $article)\n {\n $article->slug = slugify(strtolower($article->subject));\n }", "public function __construct($article)\n {\n $this->article = $article;\n }", "private function createArticle(Requests\\ArticleRequest $request)\n {\n $article = new Article($request->all());\n \n \\Auth::user()->articles()->save($article);\n \n $this->syncTags($article, $request->input('tag_list'));\n \n return $article;\n }", "public function run()\n {\n $Article = new Article();\n $Article->fill(config('project.seeder.article.init_article'));\n $Article->save();\n }", "public function create()\n {\n return view('article.addArticle');\n }", "public function handle(Article $article)\n {\n $currentDate = Carbon::now();\n $agoDate = $currentDate->subDays($currentDate->dayOfWeek)->subWeek();\n\n $data = $article::whereBetween('created_at', [$currentDate, $agoDate])->get();\n\n $users = User::all();\n\n Notification::send($users, new Notifications\\SendArticlesForLastWeek($data));\n }", "public function createPost()\n {\n $this->validate(['body' => 'required|min:15']);\n $post = auth()->user()->posts()->create(['body' => $this->body]);\n\n $this->emit('postAdded', $post->id); //emit de l'event\n\n $this->body = \"\"; //vidage du body\n\n }", "public function create()\n {\n return view('articles.create');\n }", "public function create()\n {\n return view('articles.create');\n }", "public function create()\n {\n return view('articles.create');\n }", "public function create()\n {\n return view('articles.create');\n }", "public function create()\n {\n return view('articles.create');\n }", "public function create()\n {\n return view('articles.create');\n }", "public function __construct($article)\n {\n $this->article = $article;\n }", "public function create()\n {\n $tags = Tag::All();\n return view('admin.article.create')->with('tags',$tags);\n }", "public function create(){\n \treturn view('articles.create');\n }", "protected function created()\n {\n $this->response = $this->response->withStatus(201);\n $this->jsonBody($this->payload->getOutput());\n }", "public function actionCreate()\n {\n $model = new Article();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n switch ($model->category_id){\n case Article::CAT_VIDEO:\n return $this->redirect(['video']);\n break;\n case Article::CAT_SUPPORT:\n return $this->redirect(['support']);\n break;\n case Article::CAT_BLOG:\n return $this->redirect(['blog']);\n break;\n default:\n return $this->redirect(['index']);\n }\n } else {\n\n return $this->render('create', [\n 'model' => $model,\n 'categories' => ArticleCategory::find()->active()->all(),\n ]);\n }\n }", "public function create()\n {\n $this->authorize('update', Article::class);\n $article = new Article();\n return view('articles.create', compact('article'));\n }", "function init_article($title, $content,$views, $publish_date, $update_date, $author) {\n $article = ORM::for_table('pw_article')->create();\n $article->art_title = $title;\n $article->art_content= $content;\n $article->art_views = $views;\n $article->art_publish_date= $publish_date;\n $article->art_update_date =$update_date;\n $article->art_author=$author;\n $article->save();\n return $article;\n}", "protected function create(array $data)\n {\n $user = Auth::user();\n $article = new Article($data);\n $article->userID = $user->userID;\n $article->ctgID = $data['category'];\n $article->updated_at = Carbon::now();\n $article->save();\n\n if (array_key_exists('image', $data)) {\n $path = $data['image']->store('articles/'.$article->artID, 'images');\n $article->image = $path;\n $article->save();\n }\n \n $event = new Event($data);\n if ($data['place'] !== 'none') {\n $event->placeID = $data['place'];\n }\n $event->artID = $article->artID;\n $event->save();\n \n return $event;\n }", "public function post_after_article() {\n\t\tglobal $post;\n\t\t$categories = get_the_category( $post->ID );\n\t\t?>\n\n\t\t<div class=\"section section-blog-info\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t<div class=\"entry-categories\"><?php esc_html_e( 'Categories:', 'hestia' ); ?>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tforeach ( $categories as $category ) {\n\t\t\t\t\t\t\techo '<span class=\"label label-primary\"><a href=\"' . esc_url( get_category_link( $category->term_id ) ) . '\">' . esc_html( $category->name ) . '</a></span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php the_tags( '<div class=\"entry-tags\">' . esc_html__( 'Tags: ', 'hestia' ) . '<span class=\"entry-tag\">', '</span><span class=\"entry-tag\">', '</span></div>' ); ?>\n\t\t\t\t</div>\n\t\t\t\t<?php do_action( 'hestia_blog_social_icons' ); ?>\n\t\t\t</div>\n\t\t\t<hr>\n\t\t\t<?php\n\t\t\t$this->maybe_render_author_box();\n\t\t\tif ( comments_open() || get_comments_number() ) :\n\t\t\t\tcomments_template();\n\t\t\tendif;\n\t\t\t?>\n\t\t</div>\n\t\t<?php\n\t}", "public static function created($callback)\n {\n self::listenEvent('created', $callback);\n }", "public function create()\n {\n // 글쓰기 폼\n return view('article.create');\n }", "public function afterCreate(\\stdClass $data, Entity $entity) { }", "public function created(EntryInterface $entry)\n {\n $this->dispatch(new CreateStream($entry));\n $this->dispatch(new CreateDirectory($entry));\n\n parent::created($entry);\n }", "public function newAction()\n {\n\t\tTag::appendTitle('Create Article');\n }", "public function create() {\n //return Auth::user();\n return view('articles.create');\n }", "public function postNew()\n\t\t{\n\t\t\t\n\n\t\t\t$imagen = Input::file('img');\n\t\t\t$codigoIMG = str_random(5);\n\t\t\t$filename = date('Y-m-d-H-m-s').\"-\".$codigoIMG.\".jpg\";\n\t\t\t$article = $this->articleteRepo->newArticle($filename);\n\t\t\t$manager = new ArticleManager($article, Input::all());\n\n\n\t\t\n\t\t\tif($manager->save())\n\t\t\t{\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tImage::make($imagen->getRealPath())->save(public_path().'/blog/img/'.$filename);\n\t\t\t\t\n\t\t\t\treturn Redirect::to('/adminpanel')->with('message','New article created');\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\treturn Redirect::back()->withInput()->withErrors($manager->getErrors());\n\t\t\t}\n\n\t\t}", "public function created(Model $comment)\n {\n $user = $comment->post->owner;\n\n $user->notify(new Notification($comment, 'comment_new_author'));\n }", "function create_new_article_entry(){\n\tglobal $wpdb;\n\t\n $keys = array(\"Article_Affiliation\", \"Article_Authors\", \"Article_Date\", \"Article_Title\", \n\t\t\t\t \"Article_Pagination\", \"Article_URL\", \"Journal_Day\", \"Journal_Date\", \n\t\t\t\t \"Journal_Citation\", \"Journal_Abbreviation\", \"Date_Revised\", \"Date_Created\", \n\t\t\t\t \"Date_Completed\", \"Journal_Issue\", \"Journal_Month\",\"Journal_Title\", \"Journal_Volume\", \n\t\t\t\t \"Journal_Year\", \"PMID\", \"Article_Abstract\");\n\t\n//1. Create Post\n\t$category_id = retrieve_category_id(\"Pubmed\");\n\t$postType = 'post';\n\t$userID = '1';\n\t$postStatus = 'publish';\n\t\n\t$leadTitle = $_POST['Article_Title'];\n\t$leadContent = \"<p>\" . $_POST['Article_Authors'] . \"</p>\";\n\t$leadContent .= \"<p>\" . $_POST['Journal_Citation'] . \"</p>\";\n\t$leadContent .= \"<p>PMID: <a href = '\" . $_POST['Article_URL'] . \"'</p>\";\n\t$leadContent .= \"<h2> Abstract </h2>\";\n\t$leadContent .= \"<p> <p>\" . $_POST['Article_Abstract'] . \"</p> </p>\";\n\n\t// Array with necessary information for creating a new Article Post \n\t$new_post = array(\n\t\t'post_title' => $leadTitle,\n\t\t'post_content' => $leadContent,\n\t\t'post_status' => $postStatus,\n\t\t'post_author' => $userID,\n\t\t'post_type' => $postType,\n\t\t'post_category' => array($category_id),\n\t\t'tags_input' => array($_POST['Tag'])\n\t);\n\n\t/*The wordpress post function */\n\t$post_id = wp_insert_post($new_post);\n\t\n//2. Fill in the Post information in Post Meta\n //assign each_key to meta_key and meta_value\n foreach($keys as $each_key){\n $key = str_replace('_', ' ', $each_key);\n $wpdb ->insert(\n $wpdb->postmeta,\n array(\n 'post_id' => $post_id,\n 'meta_key' => $key,\n 'meta_value' => $_POST[$each_key]\n )\n );\n }\n}", "function createArticle() {\n \t/*return redirect('/home')*/\n \treturn view('/articles/create');\n }", "public function insert($article);", "public function create()\n {\n $data = [\n 'article' => new Article()\n ];\n\n return view('article.create')->with($data);\n }", "public function createPost()\n {\n if ($this->issetPostSperglobal('title') &&\n $this->issetPostSperglobal('description') &&\n $this->issetPostSperglobal('content') &&\n $this->issetPostSperglobal('categorie') &&\n $this->issetPostSperglobal('publish'))\n {\n $empty_field = 0;\n foreach ($_POST as $key => $post) {\n if ($key !== 'publish' && empty(trim($post))) {\n $empty_field++;\n }\n }\n if ($empty_field === 0) {\n $User = $this->session->read('User');\n $this->posts_manager->create($_POST, $User->getIdUser());\n $this->session->writeFlash('success', \"L'article a été créé avec succès.\");\n $this->redirect('dashboard');\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont vides.\");\n }\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont manquants.\");\n }\n $_post = $this->getSpecificPost($_POST);\n $categories = $this->categories_manager->listAll();\n $this->render('admin_post', ['head'=>['title'=>'Création d\\'un article', 'meta_description'=>''], 'categories'=>$categories, '_post'=>isset($_post) ? $_post : ''], 'admin');\n }", "public function create()\n {\n $tags = Tag::all();\n return view('articles.create', compact('tags'));\n }", "public function handle(PostWasCreated $event)\n {\n $event->post->thread->markAsUnread();\n }", "public function created(Exchange $exchange)\n {\n //\n }", "public function create()\n {\n //Проверяем есть ли у пользователя права на добавление article save - проверяемое действие, условие будем формировать в класе политике безопасности \\App\\Article\n //создали класс политики безопасности php artisan make:policy ArticlesPolicy\n if (Gate::denies('save', new Article)) {\n abort(403);\n\n }\n $this->title = Lang::get('ru.add_new_article');\n\n //получаем категории из таблицы\n $categories = Category::select('title', 'alias', 'parent_id', 'id')->get();\n // формируем выпадающий списток с группами документации collective расширение для html и forms\n //выпадающий список select с групами\n $lists = array();\n\n foreach ($categories as $category) {\n //значит это родительская категория\n if ($category->parent_id == 0) {\n $lists[$category->title] = array();\n }\n\n //если это модель дочерней категории\n //where - в категориях найдем конкретную модель у которой id находится значение родителя\n //но whereвозвращает коллекцию, но мы знаем что у дочерней модели может быть только один родитель\n /// а значит выбираем first()\n else {\n $lists[$categories->where('id', $category->parent_id)->first()->title][$category->id] = $category->title;\n }\n }\n $this->content = view(config('settings.theme') . '.admin.articles_create_content')->with('categories', $lists)->render();\n return $this->renderOut();\n\n }", "public function store(CreateArticleRequest $request)\n {\n\n $tags = $request->input('tags');\n $currentTags = array_filter($tags, 'is_numeric');\n $newTags = array_diff($tags, $currentTags);\n\n foreach ($newTags as $newTag):\n if ($tag = Tag::create(['name' => $newTag]))\n $currentTags[] = $tag->id;\n endforeach;\n\n // $article = Auth::user()->articles()->create($request->all());\n\n $article = Article::create($request->all());\n $article->tags()->attach($currentTags);\n // $article->tags()->sync($currentTags);\n\n if($request->hasFile('cover')):\n $this->uploadFile($request->file('cover'));\n endif;\n\n return redirect('admin/content');\n }", "function after_create() {}", "public function create()\n {\n return View('admin.create-article');\n }", "public function create()\n {\n $idtheloai = Category::all();\n $idloaitin = Kind::all();\n return view('admin.article.addArticle', compact('idtheloai', 'idloaitin'));\n }", "public function store(ArticleRequest $request)\n {\n $article = new Article;\n $article->article = $request->article;\n $article->category_id = $request->category;\n $article->content = $request->content;\n $article->status = $request->status;\n $article->user_id = $request->author;\n $article->view = \"0\";\n if ($request->hasFile('image')) {\n $filename = time().\".\".$request->file('image')->getClientOriginalExtension();\n Image::make($request->file('image'))->save(public_path('images/articles/' . $filename));\n Image::make($request->file('image'))->resize(350, 183)->save(public_path('images/thumbnails/' . $filename));\n $article->image = $filename;\n } else {\n $article->image = 'article.jpg';\n }\n $article->slug = slug_th($request->article);\n $article->save();\n $article->tags()->sync($request->tags, false);\n return back()->with([\n 'alert' => 'alert-success',\n 'message' => 'บันทึกข้อมูลเรียบร้อย!',\n ]);\n }", "public function createArticle(ArticleRequest $request)\n {\n $article = Auth::user()->articles()->create($request->all());\n\n $this->syncTags($article, $request->input('tag_list'));\n\n return $article;\n }", "function submitted_events_insert_post($submission, $title, $content) {\n\t// post meta data needed\n\t$meta_data = array (\n\t\t\t'event-date' => $submission->date,\n\t\t\t'event-time' => $submission->starttime,\n\t\t\t'event-days' => 1,\n\t\t\t'event-repeat' => 0,\n\t\t\t'event-end' => 0 \n\t);\n\t\n\t$postarr = array (\n\t\t\t'post_title' => $title,\n\t\t\t'post_type' => 'event-list-cal',\n\t\t\t'post_content' => $content,\n\t\t\t'post_category' => submitted_events_calendar ( $submission ),\n\t\t\t'meta_input' => $meta_data \n\t);\n\t\n\t$post_id = wp_insert_post ( $postarr );\n\t\n\t// echo ID of created event?\n\techo '<p>Created event ID ' . $post_id . '</p>';\n}", "public function store(CreateArticleRequest $request)\n {\n $article = new Article($request->validated());\n $article->user_id = Auth::user()->id;\n// $article->title = $request->input('title');\n// $article->body = $request->input('body');\n $article->save();\n foreach($request->validated()['image'] as $img) {\n $path = $img->store('public');\n $image = new Image();\n $image->path = Storage::url($path);\n $article->images()->save($image);\n }\n foreach ($request->validated()['tags'] as $tagId) {\n $article->tags()->attach($tagId);\n }\n return response()->redirectToRoute('articles.index');\n }" ]
[ "0.6548769", "0.6399625", "0.62261313", "0.60732126", "0.6056525", "0.6029116", "0.60059524", "0.5978391", "0.597736", "0.5976863", "0.5891212", "0.5891212", "0.5872244", "0.58556974", "0.58203787", "0.58025295", "0.5795747", "0.57853097", "0.5779718", "0.5745753", "0.57433796", "0.5733665", "0.57332563", "0.5714664", "0.57066166", "0.56982476", "0.5689642", "0.56476283", "0.5644392", "0.5628866", "0.56276107", "0.56259817", "0.56259817", "0.56259817", "0.56237566", "0.56224257", "0.5616427", "0.5614011", "0.5612488", "0.55961895", "0.55948037", "0.5577677", "0.5574555", "0.55694187", "0.5565772", "0.5560313", "0.5555631", "0.5548738", "0.5544217", "0.5541202", "0.55319357", "0.5524878", "0.552024", "0.55037725", "0.549769", "0.54952765", "0.5494599", "0.54887956", "0.54885936", "0.54883087", "0.5487618", "0.5487618", "0.5487618", "0.5487618", "0.5487618", "0.5487618", "0.5482445", "0.54774064", "0.54662216", "0.54639465", "0.5460428", "0.54598415", "0.5458021", "0.5457994", "0.54569983", "0.54562366", "0.54553133", "0.54526055", "0.5437766", "0.5434151", "0.54331416", "0.54286647", "0.5427907", "0.5416323", "0.54147315", "0.54066175", "0.5401095", "0.5387318", "0.5383969", "0.5378172", "0.5373611", "0.5372777", "0.5371594", "0.53667563", "0.5362267", "0.535837", "0.53529626", "0.5350261", "0.5349036", "0.5333775" ]
0.70579916
0
Handle the article "updated" event.
public function updated(Article $article) { // 缓存置顶文章 if ($article->isDirty('is_top') || $article->isDirty('status')) { Article::topArticle(true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update()\n {\n update($this->id, $article);\n }", "public function update($article);", "public function onUpdate(Event $e)\n {\n /* @var $post \\Blog\\Entity\\PostInterface */\n $post = $e->getParam('post');\n $instance = $post->getInstance();\n\n if ($post->getId() === null) {\n $this->getAliasManager()->flush($post);\n }\n\n $url = $this->getAliasManager()->getRouter()->assemble(\n ['post' => $post->getId()],\n ['name' => 'blog/post/view']\n );\n\n $this->getAliasManager()->autoAlias('blogPost', $url, $post, $instance);\n }", "public function after_update() {}", "function after_update() {}", "public function onUpdate();", "public function onUpdate();", "public function onUpdate();", "protected function _postUpdate()\n\t{\n\t}", "public function modifyArticle() {\n \n $article = ArticleFormValidation::getData();\n $mod = false;\n if(!is_null($article)){\n $mod = $this->model->modify($article);\n }\n if($mod){\n $msg = 'Article updated correctly';\n }else{\n $err = 'Error updating article';\n }\n include 'views/article-form.php';\n }", "public function handleUpdated(Updated $event): void\n {\n $entity = $event->entity();\n\n $this->scheduleCreatingNewDocuments($entity);\n $this->scheduleRemovingOldDocuments($entity);\n\n $this->elasticsearchManager->commit();\n }", "public static function postUpdate(Event $event){\n $io = $event->getIO();\n $io->write(\"postUpdate event triggered.\");\n }", "protected function update() {}", "public static function updated($callback)\n {\n self::listenEvent('updated', $callback);\n }", "protected function onUpdated()\n {\n return true;\n }", "protected function afterUpdate()\n {\n }", "protected function afterUpdate()\n {\n }", "public function _update()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "public function update(Article $article)\n { Article::update($this->validateArticle());\n\n redirect(route('articles.show', $article));\n\n }", "public function onUpdated(Step $step): void\n {\n }", "public function _postUpdate()\n\t{\n\t\t$this->notifyObservers(__FUNCTION__);\n\t}", "protected function afterUpdating()\n {\n }", "public function updated(Document $document)\n {\n //\n }", "protected function afterUpdate() {\n\t}", "public function onUpdateRecord()\n {\n $this->updated = new \\DateTime();\n $this->rev++;\n }", "public function testUpdateWidgetArticle(): void\n {\n $token = $this->loginByEmail(self::ROLE_DEVELOPER[0], self::ROLE_DEVELOPER[1]);\n\n // Create data\n $data = [\n 'body' => 'body',\n 'button_text' => 'button_text',\n 'settings' => [\n 'completion_time' => '13',\n ]\n ];\n\n // Request\n $response = $this->put('api/cms/v1/widget-article/1?token=' . $token, $data);\n\n // Check response status\n $response->assertStatus(200);\n\n // Check response structure\n $response->assertJsonStructure(\n [\n 'success',\n 'code',\n 'data' =>\n [\n 'id',\n 'widget_type_id',\n 'body',\n 'button_text',\n 'settings_id',\n 'created_at',\n 'updated_at',\n 'widget_settings',\n ],\n 'message'\n ]\n );\n $responseJSON = json_decode($response->getContent(), true);\n $data = $responseJSON['data']; // array\n\n $this->assertEquals(true, $responseJSON['success']);\n $this->assertEquals(200, $responseJSON['code']);\n $this->assertEquals('Updated the widget Article.', $responseJSON['message']);\n $this->assertCount(8, $data);\n $this->assertEquals(WidgetArticle::getWidgetTypeId(), $data['widget_type_id']);\n $this->assertEquals('body', $data['body']);\n $this->assertEquals('button_text', $data['button_text']);\n }", "protected function performUpdate() {}", "public function afterUpdate(&$id, \\stdClass $data, Entity $entity) { }", "protected function _update()\n\t{\n\t}", "public function updateTopicModifiedDate()\n {\n $this->setAttribute( 'modified', time() );\n $this->store();\n }", "public function actionUpdate()\n\t{\n\n\t\t//print_r (Yii::app()->user);\n\t\tif (Yii::app()->user->isAdmin){\n\t\t\t$this->layout = \"admin\";\n\t\t}\n\t\n\t\t$model=$this->loadarticles();\n\t\t$params=array('Articles'=>$model);\n//\t\tif(Yii::app()->user->checkAccess('updateOwnArticle',$params))\n//\t\t{\n//\t\t\t\n\t\t\tif(isset($_POST['Articles']))\n\t\t\t{\n\t\t\t\t$model->attributes=$_POST['Articles'];\n\t\t\t\tif($model->save()){\n\t\t\t\t\t$this->redirect(array('show','id'=>$model->id));\n\t\t\t\t}\n\t\t\t}\n//\t\t}else{\n//\t\t\techo \"no permissions\";\n//\t\t}\n\t\t$this->render('update',array('model'=>$model));\n\t}", "public function update(Request $request, Article $article)\n {\n //\n }", "public function update(Request $request, Article $article)\n {\n //\n }", "public function update(Request $request, Article $article)\n {\n //\n }", "public function update(Request $request, Article $article)\n {\n //\n }", "public function update(Request $request, Article $article)\n {\n //\n }", "public function update() {\r\n }", "public function postUpdateCallback()\n {\n $this->performPostUpdateCallback();\n }", "public function postUpdateCallback()\n {\n $this->performPostUpdateCallback();\n }", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function updated(BlogPost $modelsBlogPost)\n {\n //\n }", "public function update()\r\n {\r\n //\r\n }", "public function updating()\n {\n # code...\n }", "public static function mm_update()\n {\n // Get the RSS feed from Morning Mail\n $xml = simplexml_load_file( 'http://morningmail.rpi.edu/rss' );\n \n // Begin the transaction\n Database::beginTransaction();\n\n $count = 0;\n foreach( $xml->channel->item as $item )\n {\n // Check for duplicates (no DB-agnostic way\n // to ignore duplicate errors)\n if( self::find( $item->link ) ) continue;\n\n // Parse data and construct Article objects,\n // save them to the DB\n $date = date_create( $item->pubDate );\n $a = new Article( $item->title, strip_tags( $item->description ), \n $date->format( 'Y-m-d H:i:s' ), $item->link );\n // Increment row count\n $count++;\n if( !$a->save() )\n {\n Database::rollBack();\n return false;\n }\n }\n\n // Commit transaction\n Database::commit();\n return $count;\n }", "public function onPageUpdate( Page $pageObj ){\n if( $pageObj->getCollectionTypeHandle() === 'news_post' ){\n // we don't actually have to do anything in here, the way it works is adjust\n // the constant as noted above\n }\n }", "public function update()\n {\n }", "public static function onArticleEditUpdates( $article, $editInfo, $changed ) {\n\n\t\tif ( $changed ) {\n\t\t\tself::schedule( $article->getTitle(), 'edit' );\n\t\t}\n\t\treturn true;\n\n\t}", "public function update()\r\n {\r\n \r\n }", "public function update()\n {\n //\n }", "public function update()\n {\n //\n }", "public function action_updatedo()\n {\n\t $this->template = View::forge('template-admin');\n\n $post = Input::post();\n\t\t$id = $post[\"id\"];\n $entry = Model_Event::find_by_pk($post[\"id\"]);\n if($entry){\n\t\t\t$entry[\"venue\"] = $post[\"venue\"];\n\t\t\t$entry[\"post\"] = $post[\"post\"];\n\t\t\t$entry[\"dating\"] = $post[\"dating\"];\n\t\t\t$entry[\"content\"] = $post[\"content\"];\n\t\t\t$entry[\"name\"] = $post[\"name\"];\n\t\t\t$entry[\"man_num\"] = $post[\"man_num\"];\n\t\t\t$entry[\"woman_num\"] = $post[\"woman_num\"];\n\t\t\t$entry[\"visitors_num\"] = $post[\"visitors_num\"];\n\t\t\tif(!$entry->save()){\n\t\t\t\t$data[\"msg\"] = \"更新に失敗しました。\";\n\t\t\t\t$data[\"details\"] = Model_Event::find_by('id',$id);\n\t\t\t\t$this->template->title = \"イベント一覧\";\n\t\t\t\t$this->template->content = View::forge('event/index', $data);\n\t\t\t}\n }\n\t\t$data[\"details\"] = Model_Event::find_by('id',$id);\n\t\t$this->template->title = \"イベント一覧\";\n\t\t$this->template->content = View::forge('event/index', $data);\n\t}", "public function postUpdate(LifecycleEventArgs $args): void\n {\n $entity = $args->getEntity();\n\n if (property_exists($entity, self::UPDATED_AT_FIELD)) {\n $entity->setUpdatedAt(new \\DateTime());\n }\n }", "public function updated($model)\n {\n }", "public function updated(Post $post)\n {\n $post->recordActivity('updated');\n }", "public function postUpdate($entity);", "public function update(ArticleRequest $request, $id)\n {\n $data = array_merge($request->all(), [\n 'last_user_id' => \\Auth::id()\n ]);\n\n $art = $this->article->update($id, $data);\n $sou_data = [\n \"pid\"=> $art->id,\n \"category_id\"=>$data[\"category_id\"],\n \"user_id\"=>$data['last_user_id'],\n \"slug\"=>$art->slug,\n \"title\"=>$data['title'],\n \"page_image\"=>$data['page_image'],\n \"subtitle\"=>$data['subtitle'],\n \"meta_description\"=>$data['meta_description'],\n \"content\"=>$data[\"content\"],\n \"updated_at\"=>strtotime($data[\"published_at\"]),\n ];\n Xunsearch::edit($sou_data);\n\n $this->article->syncTag(json_decode($request->get('tags')));\n\n return $this->noContent();\n }", "protected function postUpdateHook($object) { }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update(UpdateArticleRequest $request, Article $article)\n {\n\n $article->fill($request->validated());\n// $article->title = $request->input('title');\n// $article->body = $request->input('body');\n $article->save();\n return response()->redirectToRoute('articles.index');\n }", "public function update(ArticleRequest $request, $article)\n {\n $newArticle = $this->articleHandler($request, $article);\n\n // 跳转至文章展示页\n return redirect('article/'.($newArticle['url'] ? $newArticle['url'] : $newArticle['uuid']));\n }", "public function update(Request $request) {\n $id = $request->get(\"id\");\n $result = false;\n $this->validate($request, [\n 'title' => 'required|max:255',\n ]);\n if ($id == 0) {\n $articles = new Articles();\n $articles->title = $request->title;\n $articles->save();\n } else {\n $articles = Articles::findOrFail($id);\n if ($articles) {\n $articles->published = $request->published ? $request->published : 0;\n }\n }\n //get alias\n if (!$request->alias == '') {\n $articles->alias = $request->alias;\n } else {\n $articles->alias = str_slug($request->title, '-');\n }\n $result = $articles->update($request->all());\n\n if ($result) {\n Session::flash('success', 'Article saved successfully!');\n } else {\n Session::flash('error', 'Article failed to save successfully!');\n }\n if ($articles && $articles->id) {\n return redirect('admin/articles/edit/' . $articles->id);\n }\n return redirect('admin/articles/create');\n }", "public function postUpdate(LifecycleEventArgs $args)\n {\n $this->doctrineLog($args,\n array(\n 'action' => 'updated',\n 'level' => 'doctrine',\n ));\n }", "public function update()\n {\n \n foreach($this->feed->sources as $source){\n \n //Find the right source handler.\n switch($source->type->get()){\n \n case 'TWITTER_TIMELINE':\n $handler = new TwitterTimelineSourceHandler($source);\n break;\n \n case 'TWITTER_SEARCH':\n $handler = new TwitterSearchSourceHandler($source);\n break;\n \n }\n \n //Query for new messages.\n $messages = $handler->query();\n \n //Save those messages.\n mk('Logging')->log('Message board', 'New messages', $messages->size());\n foreach($messages as $message){\n $message\n ->save()\n ->save_webpages()\n ->save_images();\n }\n \n }\n \n }", "public function updated(Item $item)\n {\n event(new ItemUpdated($item));\n }", "public function update($article , createArticleRequest $request)\n\t{\t\n\t\t\n\t\t$article->created_at = Carbon::now();\n\t\t$article->update($request->all());\n\n\t\tflash()->overlay('Your article has been updated', 'Thank you');\n\n\t\treturn redirect('article');\n\t}", "public function update(){\n \n //Validate before updating\n $this->validate([\n 'title'=>'required',\n 'content'=>'required'\n ]);\n \n //Check if the specific record id is submited\n if($this->ids)\n {\n\n $post = Post::find($this->ids);\n\n $post->update([\n 'title' => $this->title,\n 'content' => $this->content,\n ]);\n \n //Set session flash message\n session()->flash('update','Post updated Successfully!');\n \n //Reset the input fields to empty\n $this->resetInputFields();\n \n //Emit To Close Modal after updating\n $this->emit('postUpdated');\n }\n }", "public function update()\n {\n # code...\n }", "public\n function update(Request $request, Article $article)\n {\n $article->title = $request->title;\n $article->body = $request->body;\n $article->save();\n\n Cache::forget('article:'.$article->id);\n Cache::forget('article:all');\n\n return redirect(route('article.index'));\n }", "public function testUpdateDocumentMetadata()\n {\n }", "public function onUpdate( $mode, $link_id, $forum_id, $topic_id, $post_id = 0 ) {\n\t\treturn true;\n\t}", "public function postUpdate(LifecycleEventArgs $args): void\n {\n // Get the object and make sure it is what we need.\n $object = $args->getObject();\n if (!$object instanceof PublishableInterface) {\n return;\n }\n\n // Get the changeset from the unit of work.\n $uow = $args->getObjectManager()->getUnitOfWork();\n $changeset = $uow->getEntityChangeset($object);\n\n // If the published state changed fire the published event.\n if (isset($changeset['published'])\n && false === $changeset['published'][0]\n && true === $changeset['published'][1]) {\n $event = new EntityPublishedEvent($object);\n $this->event_dispatcher->dispatch(EntityPublishedEvent::NAME, $event);\n }\n }", "public function update(Notification $article, array $attributes)\n {\n $article->update($attributes);\n }", "public abstract function update();", "public function update()\n\t{\n\n\t}", "public function onUpdateField()\n {\n //TODO Validate input\n\n $post = post();\n\n $flags = FieldManager::makeFlags(\n in_array('enabled', $post['flags']),\n in_array('registerable', $post['flags']),\n in_array('editable', $post['flags']),\n in_array('encrypt', $post['flags'])\n );\n\n $validation = $this->makeValidationArray($post);\n\n $data = $this->makeDataArray($post);\n\n $feedback = FieldManager::updateField(\n $post['name'],\n $post['code'],\n $post['description'],\n $post['type'],\n $validation,\n $flags,\n $data\n );\n\n FieldFeedback::with($feedback, true)->flash();\n\n return Redirect::to(Backend::url('clake/userextended/fields/manage'));\n }", "public function update() {\n parent::update();\n }", "function update() {\n\n\t\t\t}", "public function isUpdated() {}", "protected function onUpdate(): Update\r\n {\r\n }", "public function updates_update(Request $request) { \n Session::put('menu_item_parent', 'updates');\n Session::put('menu_item_child', '');\n Session::put('menu_item_child_child', '');\n\n $date = explode(\"/\", $request->published);\n $published = $date[2].'-'.$date[1].'-'.$date[0];\n $data = $request->all();\n\n if($request->input('id')) {\n // Check slug already exist, then add ID of the item\n $articleID = $request->input('id');\n $slug = $data['slug']; \n $count = Article::where('slug', $slug)->where('articleIdx', '!=', $articleID)->count();\n if ($count > 0) {\n $data['slug'] = $slug. '-'.$articleID;\n }\n }\n\n if($request->input('id')) {\n $articleIdx = $request->input('id'); \n if($data['category'] == \"Other\") {\n $data['category'] = $data['category1'];\n }\n unset($data['category1']);\n $data['published'] = date(DB_DATE_FORMAT, strtotime($published)); \n Article::find($articleIdx)->update($data); \n Session::flash('flash_success', 'Article has been updated successfully'); \n } else { \n if($data['category'] == \"Other\") {\n $data['category'] = $data['category1'];\n }\n unset($data['category1']);\n $data['published'] = date(DB_DATE_FORMAT, strtotime($published));\n unset($data['id']);\n\n // Check same slug already exist, then remove slug from insertion and update later with ID\n $slug = $data['slug']; \n $slugCount = Article::where('slug', $slug)->count();\n if ($slugCount > 0) {\n $data['slug'] = '';\n }\n\n $savedData = Article::create($data);\n $articleIdx = $savedData->articleIdx;\n\n // now update the slug if the count\n \n $data['articleIdx'] = $articleIdx;\n $data['slug'] = $slug. '-'.$articleIdx;\n Article::find($articleIdx)->update($data); \n Session::flash('flash_success', 'Article has been added successfully'); \n \n }\n if ($request->hasFile('uploadedFile')) {\n $this->usecases_upload_attach($request, $articleIdx);\n }\n return \"success\";\n }", "public function update() {\r\n\r\n\t}", "public function updated(EntryInterface $entry)\n {\n event(new UserWasUpdated($entry));\n\n parent::updated($entry);\n }", "public function update() {\n \n }", "public function update(Request $request, Article $article)\n {\n $authCheck = Gate::allows('update-post', $article);\n\n if (!$authCheck) {\n return $this->failedAccessArticle();\n }\n \n $article->update($this->validateArticle());\n return redirect()->route('article.show', $article->id);\n }", "abstract public function update();", "abstract public function update();", "public function update()\n {\n\n }", "public function update()\n {\n\n }" ]
[ "0.6984184", "0.68698055", "0.61918515", "0.6034862", "0.5977764", "0.59118015", "0.59118015", "0.59118015", "0.587751", "0.58541113", "0.58537775", "0.5838305", "0.5827309", "0.58240277", "0.58235526", "0.58153236", "0.58153236", "0.5813601", "0.58074373", "0.5802778", "0.5797167", "0.57860476", "0.57834524", "0.5779346", "0.5777648", "0.5770845", "0.57464826", "0.57411754", "0.5740502", "0.5731138", "0.5730882", "0.568535", "0.568535", "0.568535", "0.568535", "0.568535", "0.5674426", "0.56581193", "0.56581193", "0.5653037", "0.5653037", "0.565148", "0.56511045", "0.5641994", "0.5622785", "0.56179047", "0.56174403", "0.56126356", "0.5601343", "0.55984086", "0.55984086", "0.55936915", "0.5587029", "0.55857307", "0.55813324", "0.55702263", "0.5562173", "0.55610895", "0.5557368", "0.5557368", "0.5557368", "0.5557368", "0.5557368", "0.5557368", "0.5557368", "0.5557368", "0.5557368", "0.5557368", "0.5557368", "0.5557368", "0.55454093", "0.55344737", "0.5523801", "0.5519888", "0.55121994", "0.5502752", "0.5501152", "0.54899395", "0.54874235", "0.548276", "0.54804885", "0.5474955", "0.5474269", "0.5469865", "0.5465227", "0.5464467", "0.54638535", "0.5463338", "0.54608494", "0.5458598", "0.5458058", "0.5455236", "0.54468775", "0.5442872", "0.54418766", "0.5438549", "0.543313", "0.543313", "0.5430281", "0.5430281" ]
0.60135734
4
Handle the article "deleted" event.
public function deleted(Article $article) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handleDeleted(Deleted $event): void\n {\n $entity = $event->entity();\n\n $this->scheduleRemovingOldDocuments($entity);\n\n $this->elasticsearchManager->commit();\n }", "public function deleteArticle(): void\n {\n $this->articleId = $_GET['deleteId'];\n\n $this->articleModel->deleteArticle($this->articleId);\n // Redirect to the articles list page\n Router::redirectTo('listArticles');\n exit();\n }", "public function onDelete(): void\n {\n if ($this->globals->getUpdated() !== (int) $_GET['id']) {\n $this->_entity->delete($_GET['id']);\n $this->globals->setUpdated($_GET['id']);\n $this->globals->unsetAlert();\n }\n }", "public function onAfterDelete() {\n\t\tparent::onAfterDelete();\n\n\t\tif($this->isPublished()) {\n\t\t\t$this->doUnpublish();\n\t\t}\n\t}", "public function onWikiDelete(WikiWasDeleted $event)\n {\n try {\n $this->wiki->withTrashed()->find($event->wiki['id'])->deleteFromIndex();\n } catch (\\Exception $e) {\n app('log')->warning($e->getMessage());\n }\n }", "protected function _postDelete() {}", "protected function _postDelete() {}", "function delete() {\n\t\t$this->status = \"deleted\";\n\t\t$sql = \"UPDATE \" . POLARBEAR_DB_PREFIX . \"_articles SET status = '$this->status' WHERE id = '$this->id'\";\n\t\tglobal $polarbear_db;\n\t\t$polarbear_db->query($sql);\n\n\t\t$args = array(\n\t\t\t\"article\" => $this,\n\t\t\t\"objectName\" => $this->getTitleArticle()\n\t\t);\n\t\tpb_event_fire(\"pb_article_deleted\", $args);\n\n\t\treturn true;\n\t}", "public function handleDelete($eid) {\n\t\t$this->checkTeacherAuthority();\n\t\tif (EventModel::deleteEvent($eid)) {\n\t\t\t$this->flashMessage(_('Event Deleted'), 'success');\n\t\t\t$this->redirect('event:homepage', $this->cid);\n\t\t}\n\t\telse\n\t\t\t$this->flashMessage(_('There was an error deleting the event'), 'error');\n\t}", "protected function handleDoDelete() {\n\t\t\tif ($this->verifyRequest('DELETE') && $this->verifyParams()) {\n\t\t\t\tif ($this->blnAuthenticated) {\n\t\t\t\t\tif ($intEventId = str_replace('.' . $this->strFormat, '', $this->objUrl->getSegment(3))) {\n\t\t\t\t\t\t$objUserEvent = $this->initModel();\n\t\t\t\t\t\tif ($objUserEvent->loadById($intEventId) && $objUserEvent->count()) {\n\t\t\t\t\t\t\tif ($objUserEvent->current()->get('userid') == AppRegistry::get('UserLogin')->getUserId()) {\n\t\t\t\t\t\t\t\tif ($objUserEvent->destroy()) {\n\t\t\t\t\t\t\t\t\tCoreAlert::alert('The event was deleted successfully.');\n\t\t\t\t\t\t\t\t\t$this->blnSuccess = true;\n\t\t\t\t\t\t\t\t\t$this->intStatusCode = 200;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ttrigger_error(AppLanguage::translate('There was an error deleting the event'));\n\t\t\t\t\t\t\t\t\t$this->error(400);\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\ttrigger_error(AppLanguage::translate('Invalid event permissions'));\n\t\t\t\t\t\t\t\t$this->error(401);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttrigger_error(AppLanguage::translate('There was an error loading the event data'));\n\t\t\t\t\t\t\t$this->error(400);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttrigger_error(AppLanguage::translate('Missing event ID'));\n\t\t\t\t\t\t$this->error(401);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttrigger_error(AppLanguage::translate('Missing or invalid authentication'));\n\t\t\t\t\t$this->error(401);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->error(400);\n\t\t\t}\n\t\t}", "public function deleted() {\n // TODO Implement this\n }", "public function deleted(Article $article)\n {\n $article->articles()->detach();\n }", "public function forceDeleted(Article $article)\n {\n //\n }", "protected function afterDelete()\r\n {\r\n }", "public function onAfterDelete();", "public static function deleted($callback)\n {\n self::listenEvent('deleted', $callback);\n }", "public function AdminDeleteArticleProcess(Request $request) {\n\n $article = Article::find($request->article_id);\n $article->delete();\n return redirect()->route('admin-article');\n }", "public function onContentAfterDelete($context, $article)\n {\n \n $articleId = $article->id;\n if ($articleId)\n {\n try {\n $this->deleteRow($articleId);\n } catch (JException $e) {\n $this->_subject->setError($e->getMessage());\n return false;\n }\n }\n\n return true;\n }", "public function handleDelete()\n {\n Craft::$app->getDb()->createCommand()\n ->delete(Table::REVISIONS, ['id' => $this->owner->revisionId])\n ->execute();\n }", "public function deleted(EntryInterface $entry)\n {\n //$this->dispatch(new DeleteStream($entry));\n\n parent::deleted($entry);\n }", "protected function afterDelete()\n {\n }", "public static function deleted($event) {\n\n\t\t$account = $event->getSubject();\n\n\t}", "public function delete($evID)\n {\n $event = Event::find($evID);\n if ($event == null) {\n return view('cms.error', ['message' => 'Event not found!']);\n }\n \n // delete main photo\n if ($event->article->image != null) {\n Storage::delete('public/images/'.$event->article->image);\n }\n\n // delete entry in events and article table\n $artID = $event->artID;\n Event::destroy($evID);\n \n // delete all article content\n // delete directory\n Storage::deleteDirectory('public/images/articles/'.$artID);\n \n Article::destroy($artID);\n return redirect('/cms/events');\n }", "public function afterDelete(&$id, Entity $entity) { }", "protected function onDeleted()\n {\n return true;\n }", "public function onBeforeDelete();", "protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, self::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }", "protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, $this::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }", "public static function onArticleDeleteComplete( $article, User $user, $reason, $id, Content $content = null, LogEntry $logEntry ) {\n global $wgWebhooksRemovedArticle;\n if (!$wgWebhooksRemovedArticle) {\n return;\n }\n\n self::sendMessage('RemovedArticle', [\n 'articleId' => $article->getTitle()->getArticleID(),\n 'title' => $article->getTitle()->getFullText(),\n 'namespace' => $article->getTitle()->getNsText(),\n 'user' => (string) $user,\n 'reason' => $reason\n ]);\n }", "protected function _postDelete()\n\t{\n\t}", "public function delete($event): void;", "public static function onContentDelete($event)\n {\n \n foreach (ReportContent::model()->findAllByAttributes(array('object_model' => get_class($event->sender), 'object_id' => $event->sender->id)) as $report) {\n $report->delete();\n }\n }", "private function course_content_deleted($event) {\n global $DB;\n $courseid = $event->courseid;\n $DB->delete_records('repository_gdrive_references', array('courseid' => $courseid));\n }", "public function _postDelete()\n\t{\n\t\t$this->notifyObservers(__FUNCTION__);\n\t}", "public function deleteAction()\n {\n if (!Auth::loggedIn()) {\n return redirect('auth/login');\n }\n\n // Get first parameter from URL as comment $id.($this->params are from Controller)\n // $id = $this->params[0];\n $id = $this->getParam();\n\n // Call static function from Model which return comment object or null.\n $article = Article::findById($id);\n\n if (!$article) {\n return redirect();\n }\n\n if (!$article->canDelete()) {\n return redirect('articles/details/' . $article->id);\n }\n\n $comments = $article->getComments();\n\n // Delete each comment in the loop\n foreach ($comments as $comment) {\n $comment->delete();\n }\n\n // Delete article on the end\n $article->delete();\n\n set_alert('info', '<b>Success!</b> Your article has been deleted!');\n\n return redirect('articles');\n }", "public static function onArticleDelete( \\WikiPage &$article, \\User &$user, string &$reason, string &$error ) {\n\t\t$handler = new Hooks\\ArticleDelete(\n\t\t\t$article,\n\t\t\t$user,\n\t\t\t$reason,\n\t\t\t$error\n\t\t);\n\n\t\treturn $handler->process();\n\t}", "public function onDelete(DeleteFeedsEvent $event) {\n $GLOBALS['feeds_test_events'][] = (__METHOD__ . ' called');\n }", "public function deleteAction()\n {\n if ($this->isConfirmedItem($this->_('Delete %s'))) {\n $model = $this->getModel();\n $deleted = $model->delete();\n\n $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted), 'success');\n $this->_reroute(array('action' => 'index'), true);\n }\n }", "protected function _postDelete()\n\t{\n\t\t//register events\n\t\t\\Base\\Event::trigger('user.delete',$this->id);\n\t\t//end events\n\t}", "abstract public static function deleted($callback);", "public function deleted(EntryInterface $entry)\n {\n parent::deleted($entry);\n\n $this->dispatch(new DumpPages());\n }", "public function onAfterDelete() {\n if (!($this->owner instanceof \\SiteTree))\n {\n $this->doDeleteDocumentIfInSearch();\n }\n }", "public function onAfterDelete() {\r\n\t\tparent::onAfterDelete();\r\n\t\t$this->zlog('Delete');\r\n\t}", "public function deleteAction($id){\n $article = Article::findFirst($id);\n if($article !== false){\n if($article->delete()){\n\n //let the user know the article was removed successfully\n $this->flashSession->message('message', 'The article has successfully been removed');\n\n //success, just redirect to the article overview\n $this->response->redirect(\"/article\");\n }else{\n //something went wrong\n }\n }\n }", "public function processDelete(): void \n {\n if ($this->delete()) { // The tag is deleted in the database storage.\n auth()->user()->logActivity($this, 'Tags', 'Has deleted an issue tag with the name ' . $this->name);\n flash(\"The ticket tag with the name <strong>{$this->name}</strong> has been deleted in the application.\")->info()->important();\n }\n }", "public function destroy(Article $article)\n {\n try{\n $article->delete();\n }catch(\\Exception $e){\n error_info($e->getMessage());\n }\n success_info();\n }", "public function deleteArticle(int $id);", "protected function onDelete() {\n\t\tif (!$this->post = $this->loadPost()) {\n\t\t\treturn null;\n\t\t}\n\t\t$this->post->delete();\n\t\t// $this->onRun();\n\t\treturn Redirect(Request::url());\n\t}", "public function deleted(EntryInterface $entry)\n {\n $this->commands->dispatch(new DeleteStream($entry));\n\n parent::deleted($entry);\n }", "public function deleteArticleAction()\r\n {\r\n if ($this->Request()->getParam('sDelete')) {\r\n $this->basket->sDeleteArticle($this->Request()->getParam('sDelete'));\r\n }\r\n\r\n $this->forward($this->Request()->getParam('sTargetAction', 'index'));\r\n }", "public function destroy(Article $article)\n {\n $article->delete();\n session()->flash('msg_success',__('messages.modelDeleted', ['modelname' => 'Article'] ));\n //$article->addToRecycleBin();\n\n return redirect()->action('ArticleController@index');\n }", "public function deleted_post($post_id)\n {\n }", "public function delete()\n {\n $post['id'] = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $this->post->deletePost($post['id']);\n $this->redirect(\"admin\", \"chapters\"); // une fois le post supprimé, je redirige vers la vue chapters\n }", "public function destroy(Article $article)\n {\n //\n }", "public function destroy(Article $article)\n {\n //\n }", "public function destroy(Article $article)\n {\n //\n }", "public function destroy(Article $article)\n {\n //\n }", "public function destroy(Article $article)\n {\n //\n }", "public function destroy(Article $article)\n {\n //\n }", "public function destroy(Article $article)\n {\n //\n }", "public function interceptDelete()\n\t{\n\t\t$user = $this->getService('com://admin/ninjaboard.model.people')->getMe();\n\t\t$rows = $this->getModel()->getList();\n\t\tforeach($rows as $row)\n\t\t{\n\t\t\t$topic = $this->getService('com://site/ninjaboard.model.topics')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($row->ninjaboard_topic_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem();\n\t\t\t$forum = $this->getService('com://site/ninjaboard.model.forums')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($topic->forum_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem();\n\n\t\t\t// @TODO we migth want to add an option later, wether or not to allow users to delete their own post.\n\t\t\tif($forum->post_permissions < 3 && $row->created_by != $user->id) {\n\t\t\t\tJError::raiseError(403, JText::_('COM_NINJABOARD_YOU_DONT_HAVE_THE_PERMISSIONS_TO_DELETE_OTHERS_TOPICS'));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function delete() {\n\n $id = $this->uri->segment(4);\n $this->events_model->delete_event($id);\n redirect('admin/events');\n\n }", "public function deleted(Chapter $chapter)\n {\n //\n }", "protected function afterDelete()\n {\n parent::afterDelete();\n //Comment::model()->deleteAll('post_id='.$this->id);\n VideoTag::model()->updateFrequency($this->tags, '');\n }", "public function destroy(Article $article)\n {\n $tagsId = $this->extractIds($article->tags);\n //dd($tagsId);\n $article->tags()->detach($tagsId); // Rimuovo i record nella tabella article_tag inerenti all'articolo che sto per cancellare\n $article->delete(); // Cancello l'articolo dal database\n return redirect()->route('articles.index');\n }", "public function deleteAction() {\n\t\t// if($post->delete()) {\n\t\t// \tSession::message([\"Post <strong>$post->name</strong> deleted!\" , \"success\"]);\n\t\t// \tredirect_to('/posts/index');\n\t\t// } else {\n\t\t// \tSession::message([\"Error saving! \" . $error->get_errors() , \"success\"]);\n\t\t// }\n\t}", "public function deleted(Auditable $model)\n {\n Auditor::execute($model->setAuditEvent('deleted'));\n }", "public function after_delete() {}", "protected function _deleteEvent($eventId)\n {\n }", "public function destroy(Article $article)\n {\n $article->delete();\n \n return redirect()->route('manage')\n ->with('success','Article deleted successfully');\n }", "public function deleteArticle($id){\n //TODO Verification du rôle (admin ou redacteut\n Blog::deleteArticle($id);\n header('Location: /Blog/index');\n\n }", "public function DeleteArticleRevisions() {\n\t\t\t$this->objArticleRevisions->Delete();\n\t\t}", "public function deleted(Post $post)\n {\n $post->recordActivity('deleted');\n }", "function handleDeleteRelatedPerson(EventContext $context)\n {\n $program_item = $this->storeProgramItem();\n $program_item->removeRelatedPersonById(fmGetVar(\"related_person_id\"));\n RelatedPerson::deleteRelatedPerson(fmGetVar(\"related_person_id\"));\n $context->addActionMessage(\"Deleted 1 Related Person.\");\n $context->setForward(dirname(__FILE__) . \"/program_item_editor.php\");\n }", "public function destroy(Article $article)\n {\n $authCheck = Gate::allows('update-post', $article);\n\n if (!$authCheck) {\n return $this->failedAccessArticle();\n }\n\n $article->delete();\n return redirect()->route('article.index');\n }", "public static function onArticleDeleteComplete( $article, $user, $reason, $id ) {\n\n\t\tself::schedule( $article->getTitle(), 'delete' );\n\t\treturn true;\n\n\t}", "public function deleteMyPanier($article_id)\n\n { \n\n }", "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "function ondelete(){\n\t\tforeach($this->get_sections() as $one){\n\t\t\t$one->dbdelete();\n\t\t}\n\t\treturn true;\n\t}", "protected function afterDelete()\n\t{\n\t\tparent::afterDelete();\n\t\tComment::model()->deleteAll('photo_id='.$this->id);\n\t\tTag::model()->updateFrequency($this->tags, '');\n\t}", "public function onBeforeDelete() {\r\n\t\tparent::onBeforeDelete();\r\n\t}", "public function testOnDeletedDocument() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $obj->onDeletedDocument($this->doc1);\n $this->assertFileNotExists($this->directory . \"/1/2/4\");\n }", "public function onAfterDelete()\n\t{\n\t\t// attempt to save this entry to ensure relationship integrity.\n\t\t// TODO make sure everything is already dissociated when we hit this\n\t\t$last_author = $this->Author;\n\t\t$this->Author = NULL;\n\n\t\t$last_author->updateAuthorStats();\n\t\t$this->updateEntryStats();\n\t}", "function onDelete($param)\n {\n $key=$param['key'];\n \n // define duas acoes\n $action1 = new TAction(array($this, 'Delete'));\n \n // define os parametros de cada acao\n $action1->setParameter('key', $key);\n \n //encaminha a chave estrangeira\n $action1->setParameter('fk', filter_input(INPUT_GET, 'fk'));\n\n // exibe um dialogo ao usuario\n new TQuestion('Deseja realmente excluir o registro ?', $action1, $action2);\n }", "protected function prepareDeleteArticle(){\n $this->deleteComment();\n $this->deleteArticle();\n header('Location: index.php');\n }", "public function handle(PostDeleting $event)\n {\n if ($event->post->isForceDeleting()) {\n $event->post->deleteSeo();\n }\n }", "public function beforeDelete(&$id, Entity $entity) { }", "public function delete() {\r\n\r\n\t\t// Does the Genre object have an ID?\r\n\t\tif ( is_null( $this->id ) ) trigger_error ( \"Genre::delete(): Attempt to delete an Genre object that does not have its ID property set.\", E_USER_ERROR );\r\n\r\n\t\t// Delete the Article\r\n\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t$st = $conn->prepare ( \"DELETE FROM :table WHERE id = :id LIMIT 1\" );\r\n\t\t$st->bindValue( \":table\", DB_TBL_GENRE, PDO::PARAM_STR );\r\n\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t$st->execute();\r\n\t\t$conn = null;\r\n\t}", "public function _delete()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "public function deleted($artistAlias)\n {\n parent::deleted($artistAlias);\n\n Log::Info(\"Deleted artist alias\", ['artist alias' => $artistAlias->id, 'artist' => $artistAlias->artist->id]);\n }", "public function deleted(BlogPost $blogPost)\n\t{\n\t\t//\n\t}", "public function onAfterDelete() {\n parent::onAfterDelete();\n\n foreach ($this->Items() as $item) {\n $item->delete();\n }\n }", "public function delete()\n\t{\n\t\t$this->plugin->setResponse('in delete');\n\t}", "public static function deleted($callback, $priority = 0)\n {\n static::registerModelEvent('deleted', $callback, $priority);\n }", "public static function onAfterDelete(Main\\Event $event)\n\t{\n\t\t$reservationId = (int)$event->getParameter('id')['ID'];\n\t\tif ($reservationId > 0)\n\t\t{\n\t\t\tself::deleteProductReservationMap($reservationId);\n\t\t}\n\t}", "function OnAfterDeleteItem(){\n }", "public function afterDelete() {\n $this->deleteMeta();\n parent::afterDelete();\n }", "public function hook_after_delete($id) {\n\n }", "public function deleted(Order $order)\n\t{\n\t\t//\n\t}", "public function deleted(Order $order)\n\t{\n\t\t//\n\t}" ]
[ "0.7087722", "0.7019726", "0.68952686", "0.6866915", "0.67814153", "0.67567617", "0.67555803", "0.6750633", "0.6691592", "0.66795015", "0.66701895", "0.66592854", "0.6648249", "0.6615855", "0.6586728", "0.6582891", "0.6579901", "0.65776056", "0.6562586", "0.6556635", "0.6552611", "0.6528949", "0.650521", "0.6491136", "0.6476672", "0.6475391", "0.64666694", "0.646526", "0.6461021", "0.64514834", "0.64438003", "0.64160544", "0.6407458", "0.64014965", "0.6366711", "0.6352407", "0.6351552", "0.63435924", "0.6339244", "0.6339221", "0.6335145", "0.6302463", "0.6302106", "0.6299138", "0.62928915", "0.6277785", "0.62638736", "0.62326086", "0.62289095", "0.62286174", "0.62169456", "0.6196917", "0.61949295", "0.6179893", "0.6179893", "0.6179893", "0.6179893", "0.6179893", "0.6179893", "0.6179893", "0.6179071", "0.61732996", "0.61646485", "0.6156889", "0.61535686", "0.6146937", "0.6134867", "0.6131888", "0.61300695", "0.6125312", "0.6125118", "0.6119393", "0.61009604", "0.6073024", "0.6071352", "0.60679424", "0.6062883", "0.60602695", "0.6048352", "0.6048262", "0.60464686", "0.60406965", "0.6035298", "0.60239255", "0.6021151", "0.60182714", "0.6013513", "0.6012465", "0.60115397", "0.60097873", "0.60092944", "0.60079885", "0.6007558", "0.5997166", "0.59946877", "0.59839475", "0.5981945", "0.5979696", "0.59770507", "0.59770507" ]
0.771325
0
Handle the article "restored" event.
public function restored(Article $article) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restored(Document $document)\n {\n //\n }", "function restoreArticle($accountId, $articleId)\n {\n // update the database\n mysql_query(\"UPDATE argus_saved_articles SET status='SAVED' WHERE account_id = '\".$accountId.\"' AND saved_article_id = '\".$articleId.\"'\") or die(mysql_error());\n \n return;\n }", "protected function onRestored()\n {\n return true;\n }", "public function restored(Post $post)\n {\n $post->recordActivity('restored');\n }", "public function restore() {\n self::restoreAll($this->chapterID);\n }", "public function restored(Auditable $model)\n {\n Auditor::execute($model->setAuditEvent('restored'));\n\n // Once the model is restored, we need to put everything back\n // as before, in case a legitimate update event is fired\n static::$restoring = false;\n }", "function restore()\n {\n }", "public function restored(Remission $remission)\n {\n //\n }", "public function restored(BlogPost $blogPost)\n\t{\n\t\t//\n\t}", "public function restore()\n {\n //\n }", "public function restored(Post $post)\n {\n //\n }", "public function restored(Post $post)\n {\n //\n }", "public function restored(Installment $installment)\n {\n //\n }", "public function restored(Exchange $exchange)\n {\n //\n }", "public function after_restore(){\n \tglobal $DB;\n \t\n \t\n \t$pagemenuid = $this->get_activityid();\n\n \tif ($modulelinks = $DB->get_records('pagemenu_links', array('pagemenuid' => $pagemenuid))){\n \t\tforeach($modulelinks as $ml){\n \t\t\t\n \t\t\t$ml->previd = $this->get_mappingid('pagemenu_links', $ml->previd);\n \t\t\t$ml->nextid = $this->get_mappingid('pagemenu_links', $ml->nextid);\n\n\t\t\t\tif ($ml->type == 'module'){\n\t \t\t\tif ($link = $DB->get_record('pagemenu_link_data', array('linkid' => $ml->id))){\n\t \t\t\t\t$link->value = $this->get_mappingid('course_module', $link->value);\n\t \t\t\t\t$DB->update_record('pagemenu_link_data', $link);\n\t \t\t\t} else {\n\t\t\t\t\t\t$this->get_logger()->process(\"Failed to restore dependency for pagemenu link '$ml->name'. \", backup::LOG_ERROR); \t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$DB->update_record('pagemenu_links', $ml);\n \t\t}\n \t} \t \t\n }", "public function restore()\n {\n }", "public function restored($artistAlias)\n {\n parent::restored($artistAlias);\n\n Log::Info(\"Restored artist alias\", ['artist alias' => $artistAlias->id, 'artist' => $artistAlias->artist->id]);\n }", "public function restored(PurchaseReceipt $purchaseReceipt)\n {\n //\n }", "public function restored(Transaction $transaction)\n {\n //\n }", "public function restored(Transaction $transaction)\n {\n //\n }", "public function restored(Transaction $transaction)\n {\n //\n }", "public function restored(Transaction $transaction)\n {\n //\n }", "public function restoring($model)\n\t{\n\t}", "public function restoring(Auditable $model)\n {\n // When restoring a model, an updated event is also fired.\n // By keeping track of the main event that took place,\n // we avoid creating a second audit with wrong values\n static::$restoring = true;\n }", "public function undoRestore ()\n {\n if (file_exists ( $this->_previewFilename ))\n {\n unlink($this->_previewFilename);\n }\n }", "public function restore() {}", "public function restored(Region $region)\n {\n //\n }", "public function restored(ShopBlog $shopBlog)\n {\n //\n }", "public function updraft_ajaxrestore() {\n\t\t$this->prepare_restore();\n\t\tdie();\n\t}", "public function restored(Order $order)\n\t{\n\t\t//\n\t}", "public function restored(Order $order)\n\t{\n\t\t//\n\t}", "public function restored(Expense $expense)\n {\n //\n }", "public function onrestoreCallback($intID, $strTable, $arrData, $intVersion);", "public function after_restore() {\n global $DB;\n\n // Get the blockid.\n $blockid = $this->get_blockid();\n\n // Extract block configdata and update it to point to the new activities\n if ($configdata = $DB->get_field('block_instances', 'configdata', array('id' => $blockid))) {\n\n $config = unserialize(base64_decode($configdata));\n $update = false;\n $types = array('collectpresentations', 'collectworkshops', 'collectsponsoreds',\n 'conference', 'workshops', 'reception', 'publish',\n 'registerdelegates', 'registerpresenters');\n foreach ($types as $type) {\n if ($this->after_restore_fix_cmid($config, $type)) {\n $update = true;\n }\n }\n\n // cache number of sections in this course\n $numsections = self::get_numesctions($this->get_courseid());\n\n $types = array('review', 'revise');\n foreach ($types as $type) {\n if ($this->after_restore_fix_sectionnum($config, $type, $numsections)) {\n $update = true;\n }\n }\n\n if ($update) {\n $configdata = base64_encode(serialize($config));\n $DB->set_field('block_instances', 'configdata', $configdata, array('id' => $blockid));\n }\n }\n }", "public function restored(Subscription $subscription)\n {\n //\n }", "public function restored(SaleService $saleService)\n {\n //\n }", "public function after_restore($restore) {\n global $DB;\n\n $data = $this->get_decoded_data();\n if ($newitem = \\restore_dbops::get_backup_ids_record($restore->get_restoreid(), 'course_module', $data->dateitem)) {\n $data->dateitem = $newitem->newitemid;\n try {\n $DB->set_field('customcert_elements', 'data', $this->save_unique_data($data), array('id' => $this->get_id()));\n } catch (\\dml_exception $e) {\n unset($e);\n }\n }\n }", "public function restored(Conversation $conversation)\n {\n //\n }", "public function restored(BlogPost $modelsBlogPost)\n {\n //\n }", "public function restored(Ticket $ticket)\n {\n //\n }", "public function restore();", "public function restored(Chapter $chapter)\n {\n //\n }", "public function restored(Item $item)\n {\n //\n }", "public function restored(Item $item)\n {\n //\n }", "protected function postFixtureRestore()\n {\n }", "public function restored(Investor $investor)\n {\n //\n }", "public function restored(Media $media)\n {\n //\n }", "public function restored(Edit $edit)\n {\n //\n }", "public function restored(Order $order)\n {\n //\n }", "public function restored(Order $order)\n {\n //\n }", "public function restored(Order $order)\n {\n //\n }", "public function restored(BlogCategory $blogCategory)\n {\n //\n }", "public function restored(InterviewQuestion $interviewQuestion): void\n {\n //\n }", "protected static function restore() {}", "public function restored(RideShareTransaction $rideShareTransaction)\n {\n //\n }", "public function afterRestore() : bool\n\t{\n\t\treturn true;\n\t}", "public function afterRestoreResponse($data)\n {\n }", "public function restored(Order $Order)\n {\n //code...\n }", "public function restored(Lote $lote)\n {\n //\n }", "public function restored(BlogCategory $blogCategory)\n {\n # ПОПАДАЕМ ПОСЛЕ ВОССТАНОВЛЕНИЯ ЗАПИСИ\n }", "public function restored(TrainingByTitleDetail $trainingByTitleDetail)\n {\n //\n }", "public function restored(Activity $activity)\n {\n //\n }", "public function restored(Stock $stock)\n {\n //\n }", "public function restored(Vehicle $vehicle)\n {\n //\n }", "protected function after_restore_course() {\n // Add tool_carcastc related files, no need to maching itemname with itemid.\n $this->add_related_files('tool_carcastc', 'rowfile', 'itemid');\n }", "public function restored(Historia $historia)\n {\n //\n }", "public function restored(Candidate $candidate)\n {\n //\n }", "public function restore(): void\n\t{\n\t\t$this->processor->restore();\n\t}", "public function restored(TradeCancel $tradeCancel)\n {\n //\n }", "public function restored(Partner $partner)\n {\n //\n }", "public function restored(Apartment $apartment)\n {\n //\n }", "public function restored(Brand $brand)\n {\n //\n }", "protected function performRestore(Model $entity): void\n {\n $entity->restore();\n }", "public function restored(Carousel $carousel)\n {\n //\n }", "public function restored(InDay $inDay)\n {\n //\n }", "public function restoring($artistAlias)\n {\n parent::restoring($artistAlias);\n\n Log::Debug(\"Restoring artist alias\", ['artist alias' => $artistAlias->id, 'artist' => $artistAlias->artist->id]);\n }", "public function restored(Job $job)\n {\n //\n }", "public function restored(Testimonials $testimonials)\n {\n //\n }", "public function restored(AppointmentNote $note)\n {\n //\n }", "public function restoring(Order $Order)\n {\n //code...\n }", "function wp_restore_post_revision($post_id, $revision_id)\n {\n }", "public function restored(MilestoneInvestment $milestoneInvestment)\n {\n //\n }", "public function restored(Channel $channel)\n {\n //\n }", "public function restored(CandidacyHistory $candidacyHistory)\n {\n //\n }", "public function restored(TenderParticipant $tenderParticipant)\n {\n //\n }", "public function restored(Contribute $contribute)\n {\n //\n }", "public function restored(Seller $seller)\n {\n\n }", "public function restored(AwardSeason $awardSeason)\n {\n //\n }", "public function restorearticle($id)\n {\n $restore = Blog::where('id',$id)->get();\n foreach ($restore as $value) {\n $value->statut = '0';\n $value->save();\n }\n return back()->with('success',\"L'article a été restoré avec success\");\n }", "public function restored(History $history)\n {\n //\n }", "function restore_current_blog()\n {\n }", "public function restored(Storage $storage)\n {\n //\n }", "public function restored(Email $email)\n {\n //\n }", "public function restored(Subject $subject)\n {\n //\n }", "public function restored(Asistencia $asistencia)\n {\n //\n }", "public function restore(User $user, Event $event)\n {\n //\n }", "public function restore(User $user, Event $event)\n {\n //\n }", "public function restored(OnlineInquiry $onlineInquiry)\n {\n //\n }", "public function restored(Role $role)\n {\n }", "public function restored(Food $food)\n {\n //\n }" ]
[ "0.6418015", "0.64027333", "0.63659656", "0.6340953", "0.63122785", "0.6301364", "0.6143056", "0.6039298", "0.60353076", "0.6023699", "0.6021877", "0.6021877", "0.60056734", "0.59826285", "0.59790856", "0.5978622", "0.596696", "0.59533626", "0.5953029", "0.5953029", "0.5953029", "0.5953029", "0.594637", "0.5934472", "0.59151334", "0.5913316", "0.59116626", "0.5907908", "0.5886382", "0.5871357", "0.5871357", "0.5860304", "0.58502305", "0.58395004", "0.5836071", "0.58206666", "0.5810291", "0.5796185", "0.57862616", "0.5782811", "0.578196", "0.5762172", "0.5761325", "0.5761325", "0.57170117", "0.5715883", "0.5709479", "0.5698994", "0.5689272", "0.5689272", "0.5689272", "0.5682388", "0.5677745", "0.56745136", "0.56656486", "0.56644285", "0.5647879", "0.56478286", "0.5647825", "0.5640265", "0.56394166", "0.5638294", "0.56354034", "0.5633017", "0.56315476", "0.5626137", "0.56214076", "0.5601235", "0.5594652", "0.5575184", "0.556721", "0.55614424", "0.55466133", "0.55334634", "0.5520518", "0.5516598", "0.54996854", "0.54967356", "0.5477931", "0.54728067", "0.5471975", "0.5471381", "0.5467235", "0.5464367", "0.5463233", "0.5462948", "0.54598117", "0.5440895", "0.5438612", "0.54274166", "0.5424689", "0.5378816", "0.53642845", "0.53639555", "0.5361548", "0.5356578", "0.5356578", "0.5354011", "0.5352106", "0.5342397" ]
0.7296646
0
Handle the article "force deleted" event.
public function forceDeleted(Article $article) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleted(Article $article)\n {\n //\n }", "public function onBeforeDelete();", "protected function _postDelete() {}", "protected function _postDelete() {}", "protected function afterDelete()\r\n {\r\n }", "public function onAfterDelete() {\n\t\tparent::onAfterDelete();\n\n\t\tif($this->isPublished()) {\n\t\t\t$this->doUnpublish();\n\t\t}\n\t}", "protected function afterDelete()\n {\n }", "public function onAfterDelete();", "function delete() {\n\t\t$this->status = \"deleted\";\n\t\t$sql = \"UPDATE \" . POLARBEAR_DB_PREFIX . \"_articles SET status = '$this->status' WHERE id = '$this->id'\";\n\t\tglobal $polarbear_db;\n\t\t$polarbear_db->query($sql);\n\n\t\t$args = array(\n\t\t\t\"article\" => $this,\n\t\t\t\"objectName\" => $this->getTitleArticle()\n\t\t);\n\t\tpb_event_fire(\"pb_article_deleted\", $args);\n\n\t\treturn true;\n\t}", "public function deleteArticle(): void\n {\n $this->articleId = $_GET['deleteId'];\n\n $this->articleModel->deleteArticle($this->articleId);\n // Redirect to the articles list page\n Router::redirectTo('listArticles');\n exit();\n }", "public function onBeforeDelete() {\r\n\t\tparent::onBeforeDelete();\r\n\t}", "protected function _preDelete() {}", "protected function onDeleted()\n {\n return true;\n }", "public function onAfterDelete() {\n if (!($this->owner instanceof \\SiteTree))\n {\n $this->doDeleteDocumentIfInSearch();\n }\n }", "public function onAfterDelete() {\n\t\tif (!$this->owner->ID || self::get_disabled() || self::version_exist($this->owner))\n\t\t\treturn;\n\t\t$this->onAfterDeleteCleaning();\n\t}", "protected function _postDelete()\n\t{\n\t}", "public function onDelete(): void\n {\n if ($this->globals->getUpdated() !== (int) $_GET['id']) {\n $this->_entity->delete($_GET['id']);\n $this->globals->setUpdated($_GET['id']);\n $this->globals->unsetAlert();\n }\n }", "public function handleDelete()\n {\n Craft::$app->getDb()->createCommand()\n ->delete(Table::REVISIONS, ['id' => $this->owner->revisionId])\n ->execute();\n }", "function before_delete() {}", "public function onContentAfterDelete($context, $article)\n {\n \n $articleId = $article->id;\n if ($articleId)\n {\n try {\n $this->deleteRow($articleId);\n } catch (JException $e) {\n $this->_subject->setError($e->getMessage());\n return false;\n }\n }\n\n return true;\n }", "public function preDelete() { }", "protected function beforeDelete()\n {\n }", "public function deleted() {\n // TODO Implement this\n }", "protected function MetaAfterDelete() {\n\t\t}", "protected function onDeleting()\n {\n return true;\n }", "public function after_delete() {}", "protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, self::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }", "public function deleteDocument() {\n\n // should get instance of model and run delete-function\n\n // softdeletes-column is found inside database table\n\n return redirect('/home');\n }", "protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, $this::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }", "protected function afterDelete()\n {\n parent::afterDelete();\n //Comment::model()->deleteAll('post_id='.$this->id);\n VideoTag::model()->updateFrequency($this->tags, '');\n }", "public function forceDeleted(Document $document)\n {\n //\n }", "public function onAfterDelete() {\r\n\t\tparent::onAfterDelete();\r\n\t\t$this->zlog('Delete');\r\n\t}", "function after_delete() {}", "public function interceptDelete()\n\t{\n\t\t$user = $this->getService('com://admin/ninjaboard.model.people')->getMe();\n\t\t$rows = $this->getModel()->getList();\n\t\tforeach($rows as $row)\n\t\t{\n\t\t\t$topic = $this->getService('com://site/ninjaboard.model.topics')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($row->ninjaboard_topic_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem();\n\t\t\t$forum = $this->getService('com://site/ninjaboard.model.forums')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($topic->forum_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem();\n\n\t\t\t// @TODO we migth want to add an option later, wether or not to allow users to delete their own post.\n\t\t\tif($forum->post_permissions < 3 && $row->created_by != $user->id) {\n\t\t\t\tJError::raiseError(403, JText::_('COM_NINJABOARD_YOU_DONT_HAVE_THE_PERMISSIONS_TO_DELETE_OTHERS_TOPICS'));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function afterDelete(&$id, Entity $entity) { }", "public function forceDelete()\n {\n //\n }", "public function _postDelete()\n\t{\n\t\t$this->notifyObservers(__FUNCTION__);\n\t}", "public function afterDelete() {\n $this->deleteMeta();\n parent::afterDelete();\n }", "public function AdminDeleteArticleProcess(Request $request) {\n\n $article = Article::find($request->article_id);\n $article->delete();\n return redirect()->route('admin-article');\n }", "function ondelete(){\n\t\tforeach($this->get_sections() as $one){\n\t\t\t$one->dbdelete();\n\t\t}\n\t\treturn true;\n\t}", "protected function _predelete() {\n }", "public static function onArticleDelete( \\WikiPage &$article, \\User &$user, string &$reason, string &$error ) {\n\t\t$handler = new Hooks\\ArticleDelete(\n\t\t\t$article,\n\t\t\t$user,\n\t\t\t$reason,\n\t\t\t$error\n\t\t);\n\n\t\treturn $handler->process();\n\t}", "public function handleDeleted(Deleted $event): void\n {\n $entity = $event->entity();\n\n $this->scheduleRemovingOldDocuments($entity);\n\n $this->elasticsearchManager->commit();\n }", "protected function prepareDeleteArticle(){\n $this->deleteComment();\n $this->deleteArticle();\n header('Location: index.php');\n }", "protected function afterDelete()\n\t{\n\t\tparent::afterDelete();\n\t\tComment::model()->deleteAll('photo_id='.$this->id);\n\t\tTag::model()->updateFrequency($this->tags, '');\n\t}", "protected function preDeleteHook($object) { }", "protected function _before_delete(): void\n {\n //this will try to delete all the content records to which it has access\n //if there are remaining content records the deletion of the Page will fail due to the Foreign Key contraint restrict\n $contents = PageContent::get_by( ['page_id' => $this->page_id] );\n foreach ($contents as $PageContent) {\n $PageContent->delete();\n }\n }", "protected function postDeleteHook($object) { }", "public function beforeDelete(&$id, Entity $entity) { }", "protected function _postDelete()\n\t{\n\t\t//register events\n\t\t\\Base\\Event::trigger('user.delete',$this->id);\n\t\t//end events\n\t}", "public function forceDeleted(Chapter $chapter)\n {\n //\n }", "public function forceDelete();", "public static function onArticleDeleteComplete( $article, $user, $reason, $id ) {\n\n\t\tself::schedule( $article->getTitle(), 'delete' );\n\t\treturn true;\n\n\t}", "public function onAfterDelete()\n\t{\n\t\t// attempt to save this entry to ensure relationship integrity.\n\t\t// TODO make sure everything is already dissociated when we hit this\n\t\t$last_author = $this->Author;\n\t\t$this->Author = NULL;\n\n\t\t$last_author->updateAuthorStats();\n\t\t$this->updateEntryStats();\n\t}", "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "public function forceDeleted(Post $post)\n {\n }", "public function hook_before_delete($id) {\n\n }", "abstract public static function deleted($callback);", "public function deleteAction()\n {\n if (!Auth::loggedIn()) {\n return redirect('auth/login');\n }\n\n // Get first parameter from URL as comment $id.($this->params are from Controller)\n // $id = $this->params[0];\n $id = $this->getParam();\n\n // Call static function from Model which return comment object or null.\n $article = Article::findById($id);\n\n if (!$article) {\n return redirect();\n }\n\n if (!$article->canDelete()) {\n return redirect('articles/details/' . $article->id);\n }\n\n $comments = $article->getComments();\n\n // Delete each comment in the loop\n foreach ($comments as $comment) {\n $comment->delete();\n }\n\n // Delete article on the end\n $article->delete();\n\n set_alert('info', '<b>Success!</b> Your article has been deleted!');\n\n return redirect('articles');\n }", "public function onBeforeDelete()\n {\n parent::onBeforeDelete();\n \n $proxied = $this->getProxiedObject();\n \n // Core SS types are decorated so we know we can call this\n $isCoreType = in_array($proxied->getField('ClassName'), $this->acService->ssCoreTypes());\n if($isCoreType && $proxied->canDeleteOnBlockDelete()) {\n $proxied->delete();\n }\n }", "protected function onDelete() {\n\t\tif (!$this->post = $this->loadPost()) {\n\t\t\treturn null;\n\t\t}\n\t\t$this->post->delete();\n\t\t// $this->onRun();\n\t\treturn Redirect(Request::url());\n\t}", "public static function onArticleDeleteComplete( $article, User $user, $reason, $id, Content $content = null, LogEntry $logEntry ) {\n global $wgWebhooksRemovedArticle;\n if (!$wgWebhooksRemovedArticle) {\n return;\n }\n\n self::sendMessage('RemovedArticle', [\n 'articleId' => $article->getTitle()->getArticleID(),\n 'title' => $article->getTitle()->getFullText(),\n 'namespace' => $article->getTitle()->getNsText(),\n 'user' => (string) $user,\n 'reason' => $reason\n ]);\n }", "public function forceDeleted(Post $post)\n {\n //\n }", "public function forceDeleted(Post $post)\n {\n //\n }", "public function deleted(EntryInterface $entry)\n {\n //$this->dispatch(new DeleteStream($entry));\n\n parent::deleted($entry);\n }", "function ondelete(){\n\t\treturn true;\n\t}", "protected function doDeleteDocument() {\n try{\n $this->service->remove($this->owner);\n }\n catch(NotFoundException $e)\n {\n trigger_error(\"Deleted document not found in search index.\", E_USER_NOTICE);\n }\n\n }", "function OnBeforeDeleteItem(){\n }", "public static function forceDeleted($callback)\n {\n static::registerModelEvent('forceDeleted', $callback);\n }", "public function hook_after_delete($id) {\n\n }", "public function onBeforeDelete() {\n // Delete all items attached to this order\n foreach($this->Items() as $item) {\n $item->delete();\n }\n\n parent::onBeforeDelete();\n }", "protected function handleDoDelete() {\n\t\t\tif ($this->verifyRequest('DELETE') && $this->verifyParams()) {\n\t\t\t\tif ($this->blnAuthenticated) {\n\t\t\t\t\tif ($intEventId = str_replace('.' . $this->strFormat, '', $this->objUrl->getSegment(3))) {\n\t\t\t\t\t\t$objUserEvent = $this->initModel();\n\t\t\t\t\t\tif ($objUserEvent->loadById($intEventId) && $objUserEvent->count()) {\n\t\t\t\t\t\t\tif ($objUserEvent->current()->get('userid') == AppRegistry::get('UserLogin')->getUserId()) {\n\t\t\t\t\t\t\t\tif ($objUserEvent->destroy()) {\n\t\t\t\t\t\t\t\t\tCoreAlert::alert('The event was deleted successfully.');\n\t\t\t\t\t\t\t\t\t$this->blnSuccess = true;\n\t\t\t\t\t\t\t\t\t$this->intStatusCode = 200;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ttrigger_error(AppLanguage::translate('There was an error deleting the event'));\n\t\t\t\t\t\t\t\t\t$this->error(400);\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\ttrigger_error(AppLanguage::translate('Invalid event permissions'));\n\t\t\t\t\t\t\t\t$this->error(401);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttrigger_error(AppLanguage::translate('There was an error loading the event data'));\n\t\t\t\t\t\t\t$this->error(400);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttrigger_error(AppLanguage::translate('Missing event ID'));\n\t\t\t\t\t\t$this->error(401);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttrigger_error(AppLanguage::translate('Missing or invalid authentication'));\n\t\t\t\t\t$this->error(401);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->error(400);\n\t\t\t}\n\t\t}", "public function pre_delete()\r\n\t{\r\n\t\tparent::pre_delete();\r\n\t\t$Change = App::make('Change');\r\n\t\t$Change::where('fmodel', 'GalleryItem')\r\n\t\t\t ->where('fid', $this->id)\r\n\t\t\t ->delete();\r\n\t\t\t \r\n\t\t// Thumbs\r\n\t\t/*if($this->file) {\r\n\t\t\t# Should really check if these are used anywhere else, but no easy way to do that in other modules yet so just leaving them for now\r\n\t\t\t\r\n\t\t\t// Name\r\n\t\t\t$name = basename(public_path().$this->file);\r\n\t\t\t\r\n\t\t\t// Thumbs\r\n\t\t\t$thumbs = Config::get('galleries::thumbs');\r\n\t\t\tforeach($thumbs as $k => $v) {\r\n\t\t\t\tif(file_exists(public_path().$v['path'].$name)) unlink(public_path().$v['path'].$name);\r\n\t\t\t}\r\n\t\t}*/\r\n\t}", "public function onDelete(){\n return false;\n }", "public function afterDelete()\n {\n if ($this->image) $this->image->delete();\n if ($this->reindex) Slide::reindex();\n }", "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "public function onBeforeDelete(&$oid)\n\t{\n\t\t$joins = array(\n\t\t\tarray(\n\t\t\t\t'label' => 'version',\n\t\t\t\t'name' => '#__ars_releases',\n\t\t\t\t'idfield' => 'id',\n\t\t\t\t'idalias' => 'rel_id',\n\t\t\t\t'joinfield' => 'category_id'\n\t\t\t)\n\t\t);\n\n\t\t$this->canDelete($oid, $joins);\n\t}", "public function onWikiDelete(WikiWasDeleted $event)\n {\n try {\n $this->wiki->withTrashed()->find($event->wiki['id'])->deleteFromIndex();\n } catch (\\Exception $e) {\n app('log')->warning($e->getMessage());\n }\n }", "public function delete() \n {\n DomainWatcher::addDeletedObject($this);\n }", "function OnAfterDeleteItem(){\n }", "public function delete_article()\n {\n if($this->categories->isEmpty()){\n return $this->delete();\n }\n else {\n /*\n * Deleting comments\n */\n $this->comments()->delete();\n\n if($this->categories()->detach()){\n $msg = new Article_Reject_Messages;\n if(!is_null($msg->all()->where('article_id', $this->id)->first())) $msg->all()->where('article_id', $this->id)->first()->delete();\n return $this->delete();\n }\n else return false;\n }\n }", "public function deleteArticle($id){\n //TODO Verification du rôle (admin ou redacteut\n Blog::deleteArticle($id);\n header('Location: /Blog/index');\n\n }", "public function _event_before_delete() {\n\t\tstatic::$_delete['roles'] = $this->roles;\n\t}", "protected function preDelete() {\n\t\treturn true;\n\t}", "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "public function onAfterDelete() {\n parent::onAfterDelete();\n\n foreach ($this->Items() as $item) {\n $item->delete();\n }\n }", "public function deleted(EntryInterface $entry)\n {\n if (!$entry->isForceDeleting()) {\n event(new UserWasDeleted($entry));\n }\n\n parent::deleted($entry);\n }", "public function handle(PostDeleting $event)\n {\n if ($event->post->isForceDeleting()) {\n $event->post->deleteSeo();\n }\n }", "protected function afterDelete()\n {\n parent::afterDelete();\n Tag::model()->updateFrequency($this->tags, '');\n }", "function preDelete()\n {\n }", "public function afterDeleteCommit(): void\n {\n }", "protected function _afterDelete()\r\n {\r\n $this->updatePostCommentCount();\r\n parent::_afterDelete();\r\n\r\n }", "public function handleDelete($eid) {\n\t\t$this->checkTeacherAuthority();\n\t\tif (EventModel::deleteEvent($eid)) {\n\t\t\t$this->flashMessage(_('Event Deleted'), 'success');\n\t\t\t$this->redirect('event:homepage', $this->cid);\n\t\t}\n\t\telse\n\t\t\t$this->flashMessage(_('There was an error deleting the event'), 'error');\n\t}", "public function beforeDelete(): void\n {\n switch ($this->deletionType) {\n case self::DELETION_TYPE_1:\n $this->deletionType1();\n break;\n case self::DELETION_TYPE_0:\n default:\n $this->deletionType0();\n break;\n }\n }", "public function deleteArticle(int $id);", "public function preSoftDelete(LifecycleEventArgs $args)\n {\n $entity = $args->getEntity();\n\n // only listen Ad Tag instance\n if (!$entity instanceof BaseAdSlotInterface) {\n return;\n }\n\n $deleteToken = uniqid('', true);\n $entity->setDeleteToken($deleteToken);\n }" ]
[ "0.735307", "0.71821976", "0.71476066", "0.7147364", "0.7061638", "0.7032354", "0.69855005", "0.69759375", "0.69478565", "0.6932825", "0.6873485", "0.68435514", "0.6828872", "0.6807576", "0.67816925", "0.6770911", "0.67274284", "0.6707876", "0.6684959", "0.66434", "0.66096026", "0.65973854", "0.6537604", "0.65341467", "0.65249825", "0.65243334", "0.65156317", "0.65063864", "0.65045375", "0.6489292", "0.6481581", "0.64774424", "0.6473075", "0.64625764", "0.6457866", "0.6455901", "0.6455605", "0.645144", "0.64366424", "0.6432953", "0.6428467", "0.6419933", "0.6417443", "0.64131427", "0.6408484", "0.63974607", "0.63880444", "0.6367173", "0.636653", "0.63657427", "0.6364978", "0.6361878", "0.63584465", "0.6346274", "0.63228947", "0.631918", "0.63131976", "0.6290712", "0.6289623", "0.62868536", "0.6277097", "0.6272974", "0.6272439", "0.6272439", "0.62601084", "0.6248252", "0.6246318", "0.6241878", "0.62415767", "0.6240434", "0.6236682", "0.62348366", "0.6201705", "0.6201522", "0.61997426", "0.6198594", "0.6198594", "0.6198594", "0.6197258", "0.61590403", "0.61584127", "0.6157109", "0.6143373", "0.6140306", "0.61374855", "0.6135826", "0.61332726", "0.61332726", "0.61332726", "0.6128825", "0.6127732", "0.6127254", "0.6118706", "0.61149174", "0.6109097", "0.6108566", "0.61075187", "0.61056495", "0.61049616", "0.6104098" ]
0.7735243
0
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() { $this->info('Add Your Card'); $trip_id = $this->ask('Please enter the Trip Id for which you want to Add Boarding Card?'); $find_trip = Trip::find($trip_id); if (count($find_trip) == 1) { $name = $this->ask('Please enter the card name?'); $transport_type = $this->choice('Please select the Transport type?', ['Bus', 'Train','Flight']); $transport_name = $this->ask('Please enter the Transport name?'); $departure = $this->ask('Please enter the Departure mentioned on card?'); $arrival = $this->ask('Please enter the Arrival mentioned on card?'); $gate = NULL; $seat = NULL; $bag = NULL; if ($transport_type == 'Train') { $seat = $this->ask('Please enter the Seat No for Train?'); } if ($transport_type == 'Flight') { $seat = $this->ask('Please enter the Seat No for Flight?'); $gate = $this->ask('Please enter the Gate No for Flight?'); $bag = $this->ask('Please enter the Baggage drop Counter No for Flight?'); } $card = new BoardingCard; $card->name = $name; $card->transport_name = $transport_name; $card->transport_type = $transport_type; $card->trip_id = $trip_id; $card->seat = $seat; $card->gate = $gate; $card->baggage_drop = $bag; $chek = $card->save(); if ($chek == true) { $boardingID =$card->id; $Journey = new Journey; $Journey->DepartureDestination = $departure; $Journey->finalDestination = $arrival; $Journey->trip_id = $trip_id; $Journey->boarding_id = $boardingID; $Journey->transport_type = $transport_type; $chek = $Journey->save(); if ($chek == true) { Trip::where('id', $trip_id)->update(['status' => 1]); $this->info('Card is added sucessfully for Trip ID:'.$trip_id);exit; } } }else{ $this->info('Trip Id is not Valid. Try Again');exit; } }
{ "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
Display a listing of the resource.
public function index($type,Request $request) { Log::info("TransactionController->index :- Inside type - ".$type); $session_put_type = $request->session()->put('transaction-type', $type); $session_get_type = $request->session()->get('transaction-type'); $organization_id = Session::get('organization_id'); $module_name = Session::get('module_name'); if($session_get_type){ $transaction_types = AccountVoucherType::select('account_vouchers.*', 'modules.name AS module'); $transaction_types->leftjoin('module_voucher', 'module_voucher.voucher_type_id', '=', 'account_voucher_types.id'); $transaction_types->leftjoin('account_vouchers', 'account_vouchers.voucher_type_id', '=', 'account_voucher_types.id'); $transaction_types->leftjoin('modules', 'modules.id', '=', 'module_voucher.module_id'); $transaction_types->where('account_vouchers.organization_id', $organization_id); /*if(Session::get('module_name') != null) { $transaction_types->where('modules.name', Session::get('module_name')); }*/ $transaction_types->where('account_vouchers.name', $type); $transaction_type = $transaction_types->first(); } if ($transaction_type == null) abort(404); //AccountVoucher::where('name', $type)->where('organization_id', $organization_id)->first(); $journal_voucher = AccountVoucher::where('name', 'journal')->where('organization_id', $organization_id)->first()->id; $cash_voucher = 0; $return_voucher = 0; $reference_type = ReferenceVoucher::where('name', 'purchases')->first()->id; if($transaction_type->module == "trade" || $transaction_type->module == "inventory" ) { $transaction_sales = AccountVoucher::where('name', 'sales')->where('organization_id', $organization_id)->first()->id; $transaction_cash = AccountVoucher::where('name', 'sales_cash')->where('organization_id', $organization_id)->first()->id; } if($transaction_type->module == "trade_wms" || $transaction_type->module == "fuel_station") { $transaction_sales = AccountVoucher::where('name', 'job_invoice')->where('organization_id', $organization_id)->first()->id; $transaction_cash = AccountVoucher::where('name', 'job_invoice_cash')->where('organization_id', $organization_id)->first()->id; } if($type == "purchases") { $cash_voucher = AccountVoucher::where('name', 'payment')->where('organization_id', $organization_id)->first()->id; $return_voucher = AccountVoucher::where('name', 'debit_note')->where('organization_id', $organization_id)->first()->id; } else if($type == "sales" || $type == "sales_cash") { $cash_voucher = AccountVoucher::where('name', 'receipt')->where('organization_id', $organization_id)->first()->id; $return_voucher = AccountVoucher::where('name', 'credit_note')->where('organization_id', $organization_id)->first()->id; } else if($type == "job_invoice" || $type == "job_invoice_cash") { $cash_voucher = AccountVoucher::where('name', 'wms_receipt')->where('organization_id', $organization_id)->first()->id; $return_voucher = AccountVoucher::where('name', 'credit_note')->where('organization_id', $organization_id)->first()->id; } $payment_voucher = AccountVoucher::where('name', 'payment')->where('organization_id', $organization_id)->first()->id; if($transaction_type->module != "trade_wms") { $receipt_voucher = AccountVoucher::where('name', 'receipt')->where('organization_id', $organization_id)->first()->id; } if($transaction_type->module == "trade_wms") { $receipt_voucher = AccountVoucher::where('name', 'wms_receipt')->where('organization_id', $organization_id)->first()->id; } $today = Carbon::today()->format('d-m-Y'); $firstDay = new Carbon('first day of last month'); $firstDay_only=$firstDay->format('d-m-Y'); //dd($firstDay_only); $from_date = $firstDay->format('Y-m-d'); $to_date = Carbon::today()->format('Y-m-d'); $from_date_trade_wms =Carbon::today()->subDays( 30 )->format('Y-m-d'); $to_date_trade_wms = Carbon::today()->format('Y-m-d'); $firstDay_only_trade_wms =Carbon::today()->subDays( 30 )->format('d-m-Y'); //get originated_from_id value from transaction table to navigate to jobcard edit from estimation list page $transaction = Transaction::select(DB::raw('COUNT(transactions.id)'),'transactions.id','transactions.originated_from_id','referenced_in.order_no as jc_order_no','transactions.order_no','transactions.reference_id','transactions.approved_on','vehicle_register_details.id as vehicle_id',DB::raw('sum( (CASE WHEN wms_transactions.advance_amount is NULL THEN 0 ELSE wms_transactions.advance_amount END) + transactions.total) as jobcard_total'), DB::raw("DATE_FORMAT(transactions.date, '%d %b, %Y') as date"), DB::raw("DATE_FORMAT(transactions.due_date, '%d %b, %Y') as due_date"),'transactions.date as original_date', 'transactions.due_date as original_due_date','transactions.total', DB::raw(" IF(transactions.transaction_type_id = $transaction_cash, 0, IF( (SELECT SUM(account_transactions.amount) FROM account_entries LEFT JOIN account_transactions ON account_transactions.entry_id = account_entries.id WHERE account_entries.reference_transaction_id = transactions.id AND account_entries.voucher_id IN ($journal_voucher, $cash_voucher, $return_voucher)) IS NULL, transactions.total, transactions.total - (SELECT SUM(account_transactions.amount) FROM account_entries LEFT JOIN account_transactions ON account_transactions.entry_id = account_entries.id WHERE account_entries.reference_transaction_id = transactions.id AND account_entries.voucher_id IN ($journal_voucher, $cash_voucher, $return_voucher)) ) ) AS balance"), DB::raw(" IF(transactions.transaction_type_id = $transaction_cash, 1, CASE WHEN (transactions.total - SUM((SELECT SUM(account_transactions.amount) FROM account_entries LEFT JOIN account_transactions ON account_transactions.entry_id = account_entries.id WHERE account_entries.reference_transaction_id = transactions.id AND account_entries.voucher_id IN ($journal_voucher, $cash_voucher, $return_voucher)))) = 0 THEN 1 WHEN transactions.due_date < CURDATE() THEN 3 WHEN (transactions.total - SUM((SELECT SUM(account_transactions.amount) FROM account_entries LEFT JOIN account_transactions ON account_transactions.entry_id = account_entries.id WHERE account_entries.reference_transaction_id = transactions.id AND account_entries.voucher_id IN ($journal_voucher, $cash_voucher, $return_voucher)))) > 0 THEN 2 ELSE 0 END ) AS status"), 'transactions.approval_status', 'transactions.transaction_type_id', DB::raw("IF(people.display_name IS NULL, business.display_name, people.display_name) as customer"), DB::raw("IF(people.display_name IS NULL, business.display_name, CONCAT(people.first_name, ' ', COALESCE(people.last_name))) as customer_contact"), DB::raw("DATE_FORMAT(transactions.shipping_date, '%d %b, %Y') as shipping_date"), DB::raw("CASE WHEN transactions.originated_from_id THEN '' ELSE COALESCE(transactions.reference_no, '') END AS estimate_reference_no"), DB::raw("COALESCE(transactions.reference_no, '') AS reference_no"), DB::raw('COALESCE(reference_vouchers.display_name, "Direct") as reference_type'),'vehicle_register_details.registration_no','hrm_employees.first_name AS assigned_to','service_types.name as service_type','vehicle_jobcard_statuses.id as job_card_status_id','vehicle_jobcard_statuses.name as jobcard_status','wms_transactions.name as name_of_job','wms_transactions.job_date','wms_transactions.job_due_date','wms_transactions.job_completed_date','wms_transactions.advance_amount'); $transaction->leftJoin('people', function($join) use($organization_id) { $join->on('people.person_id','=', 'transactions.people_id') ->where('people.organization_id', $organization_id) ->where('transactions.user_type', '0'); }); $transaction->leftJoin('people AS business', function($join) use($organization_id) { $join->on('business.business_id','=', 'transactions.people_id') ->where('business.organization_id', $organization_id) ->where('transactions.user_type', '1'); }); $transaction->leftjoin('transactions AS reference_transactions','transactions.reference_id','=','reference_transactions.id'); $transaction->leftjoin('job_cards AS referenced_in', 'transactions.originated_from_id', '=', 'referenced_in.id'); $transaction->leftJoin('account_vouchers AS reference_vouchers', 'reference_vouchers.id', '=', 'reference_transactions.transaction_type_id'); $transaction->leftJoin('wms_transactions', 'transactions.id', '=', 'wms_transactions.transaction_id'); $transaction->leftJoin('vehicle_jobcard_statuses', 'vehicle_jobcard_statuses.id', '=', 'wms_transactions.jobcard_status_id'); $transaction->leftJoin('service_types', 'service_types.id', '=', 'wms_transactions.service_type'); $transaction->leftjoin('vehicle_register_details', 'vehicle_register_details.id', '=', 'wms_transactions.registration_id'); $transaction->leftJoin('hrm_employees', 'hrm_employees.id', '=', 'wms_transactions.assigned_to'); $transaction->where('transactions.organization_id', $organization_id); if($transaction_type->name == "sales" || $transaction_type->name == "sales_cash" || $transaction_type->name == "job_invoice" || $transaction_type->name == "job_invoice_cash") { $transaction->where(function ($query) use ($transaction_sales, $transaction_cash) { $query->where('transactions.transaction_type_id', '=', $transaction_sales) ->orWhere('transactions.transaction_type_id', '=', $transaction_cash); }); } else { $transaction->where('transactions.transaction_type_id', $transaction_type->id); } $transaction->whereNull('transactions.deleted_at'); $transaction->where('transactions.notification_status','!=',2); if($transaction_type->module == "trade_wms") { if(!empty($from_date_trade_wms) && !empty($to_date_trade_wms)) { $transaction->whereBetween('wms_transactions.job_date',[$from_date_trade_wms,$to_date_trade_wms]); } } if($transaction_type->module == "inventory" || $transaction_type->module == "trade") { if(!empty($from_date) && !empty($to_date)) { $transaction->whereBetween('transactions.date',[$from_date,$to_date]); } } $transaction->groupby('transactions.id'); $transaction->orderBy('transactions.updated_at','desc'); $transactions = $transaction->get(); //dd($transactions); $country = Country::where('name', 'India')->first(); $state = State::where('country_id', $country->id)->pluck('name', 'id'); $state->prepend('Select State', ''); $city = City::orderBy('name')->orderby('name')->pluck('name', 'id'); $city->prepend('Select State', ''); $title = PeopleTitle::pluck('display_name','id'); $title->prepend('Title',''); $payment = PaymentMode::where('status', '1')->pluck('display_name','id'); $payment->prepend('Select Payment Method',''); $terms = Term::select('id', 'display_name')->where('organization_id', Session::get('organization_id'))->pluck('display_name', 'id'); $terms->prepend('Select Term',''); $group_name = CustomerGroping::where('organization_id',$organization_id)->pluck('display_name','id'); $group_name->prepend('Select Group Name',''); $ledger = AccountLedger::select('account_ledgers.id', 'account_ledgers.display_name AS name','account_groups.name AS group'); $ledger->leftJoin('account_groups', 'account_groups.id', '=', 'account_ledgers.group_id'); $ledger->whereIn('account_groups.name', ['cash','bank_account']); $ledger->where('account_ledgers.organization_id', $organization_id); $ledger->where('account_ledgers.approval_status', '1'); $ledger->where('account_ledgers.status', '1'); $ledger->orderby('account_ledgers.id','asc'); $ledgers = $ledger->pluck('name', 'id'); Log::info("TransactionController->index :- return $type - ".$type); return view('inventory.transaction', compact('transactions', 'transaction_type', 'type', 'state', 'title', 'payment', 'terms','group_name','firstDay_only','today','city','ledgers','firstDay_only_trade_wms','from_date_trade_wms','to_date')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create($type) { Log::info("TransactionController->create :- Inside ".$type); // (string) Str::uuid(); // Unoversal Id With * digit for attachment update // dd(Session::get('module_name')); $uuid=Custom::GUID(); $organization_id = Session::get('organization_id'); $now = Carbon::now(); $current_date = $now->format('Y-m-d H:i:s'); $add_date = date("Y-m-d H:i:s", strtotime("+1 hours")); $job_item_status = 1; $tomorrow = Carbon::tomorrow(); $tomorrow_date = $tomorrow->format('d-m-Y'); //dd($tomorrow_date); //$transaction = Transaction::findOrFail($request->input('id')); //$approvel_status =$transaction->approval_status; //$approved_date = $transaction->approved_on; //dd($current_date); $job_item_status = VehicleJobItemStatus::where('status', '1')->pluck('name', 'id'); $job_item_status->prepend('Select Status', ''); $item_status = VehicleJobItemStatus::where('name','Open')->first()->id; $vehicle_sevice_type = ServiceType::where('status', '1')->orderBy('name')->pluck('name', 'id'); $vehicle_sevice_type->prepend('Select Service type', ''); $sevice_type = ServiceType::where('name','Paid Service')->first()->id; $job_card_status = VehicleJobcardStatus::where('status', '1')->pluck('name', 'id'); $job_card_status->prepend('Select Jobcard Status', ''); $job_status = VehicleJobcardStatus::where('name', 'New')->first()->id; $vehicle_make_id = VehicleMake::orderBy('name')->pluck('name', 'id'); $vehicle_make_id->prepend('Select Vehicle Make', ''); $vehicle_model_id = VehicleModel::orderBy('name')->pluck('name', 'id'); $vehicle_model_id->prepend('Select Vehicle Model', ''); $vehicle_tyre_size = VehicleTyreSize::where('status', '1')->orderBy('name')->pluck('name', 'id'); $vehicle_tyre_size->prepend('Select Tyre Size', ''); $vehicle_tyre_type = VehicleTyreType::where('status', '1')->orderBy('name')->pluck('name', 'id'); $vehicle_tyre_type->prepend('Select Tyre Type', ''); $vehicle_variant = VehicleVariant::orderBy('name')->pluck('name', 'id'); $vehicle_variant->prepend('Select Vehicle Variant', ''); $vehicle_wheel = VehicleWheel::where('status', '1')->orderBy('name')->pluck('name', 'id'); $vehicle_wheel->prepend('Select Vehicle Wheel', ''); $fuel_type = VehicleFuelType::where('status', '1')->orderBy('name')->pluck('name', 'id'); $fuel_type->prepend('Select Fuel Type', ''); $rim_type = VehicleRimType::where('status', '1')->orderBy('name')->pluck('name', 'id'); $rim_type->prepend('Select Rim Type', ''); $body_type = VehicleBodyType::where('status', '1')->orderBy('name')->pluck('name', 'id'); $body_type->prepend('Select Body Type', ''); $vehicle_category = VehicleCategory::where('organization_id', $organization_id)->orderBy('name')->pluck('name', 'id'); $vehicle_category->prepend('Select Vehicle Category', ''); $vehicle_drivetrain = VehicleDrivetrain::where('status', '1')->orderBy('name')->pluck('name', 'id'); $vehicle_drivetrain->prepend('Select Vehicle Drivetrain', ''); $service_type = ServiceType::where('organization_id', $organization_id)->orderBy('name')->pluck('name', 'id'); $service_type->prepend('Select Service Type', ''); $vehicle_usage = VehicleUsage::where('status', '1')->orderBy('name')->pluck('name', 'id'); $vehicle_usage->prepend('Select Vehicle Usage', ''); $maintanance_reading = VehicleMaintenanceReading::where('status', '1')->pluck('name', 'id'); $maintanance_reading->prepend('Select Maintenance Reading', ''); /* $vehicles_register = VehicleRegisterDetail::where('organization_id', $organization_id)->pluck('registration_no', 'id'); $vehicles_register->prepend('Select Vehicle', '');*/ $vehicles_register = VehicleRegisterDetail::leftjoin('wms_vehicle_organizations','wms_vehicle_organizations.vehicle_id','=','vehicle_register_details.id') ->where('wms_vehicle_organizations.organization_id', $organization_id)->pluck('registration_no', 'vehicle_register_details.id'); $vehicles_register->prepend('Select Vehicle', ''); $vehicle_check_list=VehicleChecklist::select('name','display_name','id')->where('status', '1')->get(); $reading_factor = WmsReadingFactor::select('wms_reading_factors.id AS reading_factor_id', 'wms_reading_factors.name AS reading_factor_name', 'wms_applicable_divisions.id AS wms_division_id', 'wms_applicable_divisions.division_name') ->leftJoin('wms_applicable_divisions', 'wms_applicable_divisions.id','=','wms_reading_factors.wms_division_id') ->where('wms_reading_factors.organization_id', $organization_id)->get(); //$reference_vouchers = ReferenceVoucher::select('display_name', 'name'); $person_id = Auth::user()->person_id; $employee = HrmEmployee::select('hrm_employees.id') ->where('hrm_employees.organization_id', $organization_id) ->where('hrm_employees.person_id', $person_id) ->first(); $selected_employee = ($employee != null) ? $employee->id : null; $purchase_employee = AccountVoucher::where('name', 'purchases')->where('organization_id', $organization_id)->first()->id; //$selected_reference_voucher = null; $people_list = People::select('person_id AS id', DB::raw('IF(mobile_no, CONCAT(display_name, " - " , mobile_no), display_name) AS name'), 'person_id')->where('user_type', 0)->where('organization_id', Session::get('organization_id')); $business_list = People::select('business_id AS id', DB::raw('IF(mobile_no, CONCAT(display_name, " - " , mobile_no), display_name) AS name'), 'business_id')->where('user_type', 1)->where('organization_id', Session::get('organization_id')); $busi=People::select(DB::raw('(CASE WHEN person_id is NULL THEN business_id ELSE person_id END) AS id'), DB::raw('IF(mobile_no, CONCAT(display_name, " - " , mobile_no), display_name) AS name'),'user_type') ->where('organization_id', $organization_id) ->where(function($query) { $query->where('user_type', 0) ->orWhere('user_type', 1); }) ->orderByRaw('name'); $bus = $busi->get(); $transaction_type = AccountVoucherType::select('account_vouchers.*', 'modules.name AS module') ->leftjoin('module_voucher', 'module_voucher.voucher_type_id', '=', 'account_voucher_types.id') ->leftjoin('account_vouchers', 'account_vouchers.voucher_type_id', '=', 'account_voucher_types.id') ->leftjoin('modules', 'modules.id', '=', 'module_voucher.module_id') ->where('account_vouchers.organization_id', $organization_id) ->where('modules.name', Session::get('module_name')) ->where('account_vouchers.name', $type) ->first(); //Session::get('module_name') //AccountVoucher::where('name', $type)->where('organization_id', $organization_id)->first(); //dd($transaction_type); if($transaction_type == null) { return null; } Log::info("TransactionController->create :- Custom::getLastGenNumber - ".$transaction_type->id. ' -- '.$organization_id); $getGen_no=Custom::getLastGenNumber( $transaction_type->id, $organization_id ); Log::info("TransactionController->create :- after Custom::getLastGenNumber - ".$getGen_no); //$gen_no=($getGen_no)?$getGen_no:$transaction_type->starting_value; $vou_restart_value = AccountVoucher::select('restart')->where('id',$transaction_type->id)->first(); Log::info("TransactionController->create :- after Custom::getLastGenNumber - ".$vou_restart_value); //dd($vou_restart_value); if($vou_restart_value->restart == 0) { $gen_no=($getGen_no)?$getGen_no:$transaction_type->starting_value; Log::info("TransactionController->create :- after if Custom::gen_no - ".$gen_no); } else { $gen_no=($vou_restart_value->restart == 1)?$transaction_type->starting_value:$getGen_no; Log::info("TransactionController->create :- after Custom::gen_no - ".$gen_no); } //$previous_entry = Transaction::where('transaction_type_id', $transaction_type->id)->where('organization_id', $organization_id)->orderby('id', 'desc')->first(); /*$gen_no = ($previous_entry != null) ? ($previous_entry->gen_no + 1) : $transaction_type->starting_value; if($previous_entry!=null) { if($previous_entry->gen_no){ $gen_no= $previous_entry->gen_no + 1; }else{ if($previous_entry->order_no){ $order_no=$previous_entry->order_no; $dum_gen_no='~'; $dum_order_no=Custom::generate_accounts_number($transaction_type->name, $dum_gen_no, false); $ex_gen_no=Custom::get_string_diff($order_no,$dum_order_no); DB::table('transactions')->where('id',$previous_entry->id)->update(['gen_no'=> $ex_gen_no]); $gen_no=$ex_gen_no+1; } } }else{ $gen_no=$transaction_type->starting_value; }*/ $voucher_no = Custom::generate_accounts_number($transaction_type->name, $gen_no, false); $sale_account = AccountGroup::where('name', 'sale_account')->where('organization_id', $organization_id)->first()->id; $account_ledgers = AccountLedger::where('group_id', $sale_account)->where('organization_id', $organization_id)->pluck('name', 'id'); $account_ledgers->prepend('Select Account', ''); $employees = HrmEmployee::select('hrm_employees.id', DB::raw('CONCAT(first_name, " ", COALESCE(last_name, "")) AS name'))->where('organization_id', $organization_id)->pluck('name', 'id'); $employees->prepend('Select Employee', ''); $shipment_mode = ShipmentMode::where('organization_id', $organization_id)->pluck('name', 'id'); $shipment_mode->prepend('Select Shipment Mode', ''); $delivery_method = ShipmentMode::where('name','General Shipment')->first()->id; $items = InventoryItem::select('inventory_items.id', 'inventory_items.name', 'global_item_categories.display_name AS category', 'inventory_items.include_tax', 'inventory_items.include_purchase_tax') ->leftjoin('global_item_models', 'global_item_models.id', '=', 'inventory_items.global_item_model_id') ->leftjoin('global_item_categories','global_item_categories.id','=','global_item_models.category_id') ->where('inventory_items.organization_id', $organization_id) ->where('inventory_items.status', 1) ->orderby('global_item_categories.display_name') ->get(); /*$items = InventoryItem::where('status', '1')->pluck('name','id'); $items->prepend('Select Item ','');*/ $tax = TaxGroup::select('tax_groups.id', 'tax_groups.display_name', 'tax_types.name as tax_type', DB::raw('SUM(taxes.value) AS value'),'taxes.id as tax_id', 'taxes.display_name AS tax_name', DB::raw("CONCAT('[', GROUP_CONCAT('{', '\"id\":', taxes.id, ',', '\"name\": ', '\"',taxes.name,'\"', ',', '\"value\":', taxes.value, '}'),']') AS tax_value")); $tax->leftjoin('tax_types', 'tax_types.id', '=', 'tax_groups.tax_type_id'); $tax->leftjoin('group_tax', 'group_tax.group_id', '=', 'tax_groups.id'); $tax->leftjoin('taxes', 'group_tax.tax_id', '=', 'taxes.id'); $tax->where('tax_groups.organization_id', $organization_id); $tax->groupby('tax_groups.id'); $taxes = $tax->get(); //dd($taxes); $discount = Discount::select('id', 'display_name', 'value'); $discount->where('status', 1)->where('organization_id', $organization_id); $discounts = $discount->get(); $weekdays = Weekday::pluck('display_name','id'); $weekday = Weekday::where('name','monday')->first()->id; $days = []; for ($i=1; $i <= 28; $i++) { $days[$i] = $i; } $days[0] = "Last"; if($transaction_type == null) abort(404); $country = Country::where('name', 'India')->first(); $state = State::where('country_id', $country->id)->pluck('name', 'id'); $state->prepend('Select State', ''); $title = PeopleTitle::pluck('display_name','id'); $title->prepend('Title',''); $payment = PaymentMode::where('status', '1')->pluck('display_name','id'); $payment->prepend('Select Payment Method',''); $payment_method = PaymentMode::where('name', 'Cash')->first()->id; $payment_terms = PaymentTerm::where('status', '1')->pluck('display_name','id'); $payment_terms->prepend('Select Payment Term ',''); $payment_term = PaymentTerm::where('name', 'Immediate')->first()->id; $voucher_terms = Term::select('id', 'name', 'display_name', 'days')->where('organization_id', $organization_id)->get(); $terms = Term::select('id', 'display_name')->where('organization_id', $organization_id)->pluck('display_name', 'id'); $terms->prepend('Select Term',''); $selected_term = Term::where('organization_id', $organization_id)->where('name', 'on_receipt')->first(); $make = VehicleMake::where('status', 1)->orWhere('organization_id', $organization_id)->pluck('display_name', 'id'); $make->prepend('Select Make', ''); //$job_type = JobType::where('status', 1)->orWhere('organization_id', $organization_id)->pluck('display_name', 'id'); $address_type = BusinessAddressType::where('name', 'business')->first(); $business_id = Organization::find($organization_id)->business_id; $business_communication_address = BusinessCommunicationAddress::select('business_communication_addresses.placename', 'business_communication_addresses.mobile_no', 'business_communication_addresses.email_address', 'business_communication_addresses.address', 'cities.name AS city', 'states.name AS state', 'business_communication_addresses.pin') ->leftjoin('cities', 'business_communication_addresses.city_id', '=', 'cities.id') ->leftjoin('states', 'cities.state_id', '=', 'states.id') ->where('address_type', $address_type->id) ->where('business_id', $business_id) ->first(); $date_label = null; $due_date_label = null; $term_label = null; $order_type = null; $address_label = null; $order_type_value = []; $order_label = null; $payment_label = null; $sales_person_label = null; $include_tax_label = null; $customer_type_label = null; $customer_label = null; $discount_option = false; $person_type = null; $due_date = null; $transaction_address_type = null; $company_label = false; $company_name = null; $company_email = null; $company_mobile = null; $company_address = null; $service_type_label = null; if($business_communication_address != "") { $business_company_address = $business_communication_address->address; if($business_communication_address->address != "" && $business_communication_address->city != "") { $business_company_address .= "\n"; } $business_company_address .= $business_communication_address->city; if($business_communication_address->city != "" && $business_communication_address->state != "") { $business_company_address .= "\n"; } $business_company_address .= $business_communication_address->state." ".$business_communication_address->pin; } switch($type) { case 'estimation': $address_label = 'Customer Address'; //$reference_voucher = $reference_vouchers->whereIn('name', array('direct'))->where('status', 1)->orderby('id')->get(); //$order_type_value = AccountVoucher::whereIn('name', array('Direct'))->where('organization_id', $organization_id)->orderby('name', 'desc')->pluck('display_name', 'name'); //$order_type_value->prepend('Direct', ''); $payment_label = 'Payment Method'; $due_date_label = 'Expiry Date'; $sales_person_label = 'Sales Person'; $date_label = 'Date'; $due_date = Carbon::now()->addDays(30)->format('d-m-Y'); $customer_type_label = 'Customer Type'; $customer_label = 'Customer'; $person_type = "customer"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Customer', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_sales', '1'); $discount->where('is_sales', '1'); $discount_option = true; break; case 'sale_order': $address_label = 'Customer Address'; //$reference_voucher = $reference_vouchers->whereIn('name', array('direct', 'estimation'))->where('status', 1)->orderby('id')->get(); $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('estimation'))->where('organization_id', $organization_id)->pluck('display_name', 'name'); $order_type_value->prepend('Direct', ''); $order_label = 'Order#'; $payment_label = 'Payment Method'; $sales_person_label = 'Sales Person'; $date_label = 'Date'; $customer_type_label = 'Customer Type'; $customer_label = 'Customer'; $person_type = "customer"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Customer', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_sales', '1'); $discount->where('is_sales', '1'); $discount_option = true; break; case 'sales': $address_label = 'Customer Address'; //$reference_voucher = $reference_vouchers->whereIn('name', array('direct', 'sale_order', 'estimation'))->where('status', 1)->orderby('id')->get(); $due_date_label = 'Due Date'; $term_label = 'Terms'; $order_type = "Order Type"; $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('sale_order', 'estimation'))->where('organization_id', $organization_id)->pluck('display_name', 'name'); $order_type_value->prepend('Direct', ''); $order_label = 'Order#'; $payment_label = 'Payment Method'; $sales_person_label = 'Sales Person'; $date_label = 'Invoice Date'; $customer_type_label = 'Customer Type'; $customer_label = 'Customer'; $person_type = "customer"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Customer', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_sales', '1'); $discount->where('is_sales', '1'); $discount_option = true; break; case 'sales_cash': $address_label = 'Customer Address'; //$reference_voucher = $reference_vouchers->whereIn('name', array('direct'))->where('status', 1)->orderby('id')->get(); $order_type = "Order Type"; $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('sale_order', 'estimation'))->where('organization_id', $organization_id)->pluck('display_name', 'name'); $order_type_value->prepend('Direct', ''); $due_date_label = 'Due Date'; $term_label = 'Terms'; $order_label = 'Order#'; $payment_label = 'Payment Method'; $sales_person_label = 'Sales Person'; $date_label = 'Invoice Date'; $customer_type_label = 'Customer Type'; $customer_label = 'Customer'; $person_type = "customer"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Customer', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_sales', '1'); $discount->where('is_sales', '1'); $discount_option = true; break; case 'delivery_note': $address_label = 'Customer Address'; //$reference_voucher = $reference_vouchers->whereIn('name', array('sale_order', 'sales','sales_cash'))->where('status', 1)->orderby('name', 'desc')->get(); $order_label = 'Order#'; $order_type = "Order Type"; $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('sale_order', 'sales', 'sales_cash','job_invoice','job_invoice_cash'))->where('organization_id', $organization_id)->orderby('name', 'desc')->pluck('display_name', 'name'); $order_type_value->prepend('Direct', ''); $payment_label = 'Payment Method'; $date_label = 'Date'; $customer_type_label = 'Customer Type'; $customer_label = 'Customer'; $person_type = "customer"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Customer', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_sales', '1'); $discount->where('is_sales', '1'); $discount_option = true; break; case 'receipt': $address_label = 'Customer Address'; //$reference_voucher = $reference_vouchers->whereIn('name', array('sales'))->where('status', 1)->orderby('id')->get(); $order_type = "Order Type"; $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('sales'))->where('organization_id', $organization_id)->orderby('name', 'desc')->pluck('display_name', 'name'); $order_type_value->prepend('Direct', ''); $order_label = 'Order#'; $payment_label = 'Payment Method'; $sales_person_label = 'Sales Person'; $date_label = 'Date'; $customer_type_label = 'Customer Type'; $customer_label = 'Customer'; $person_type = "customer"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Customer', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_sales', '1'); $discount->where('is_sales', '1'); break; case 'payment': $address_label = 'Vendor Address'; //$reference_voucher = $reference_vouchers->whereIn('name', array('purchases'))->where('status', 1)->orderby('id')->get(); $order_type = "Order Type"; $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('purchases'))->where('organization_id', $organization_id)->orderby('name', 'desc')->pluck('display_name', 'name'); $order_type_value->prepend('Direct', ''); $order_label = 'Order#'; $payment_label = 'Payment Method'; $sales_person_label = 'Created By'; $date_label = 'Date'; $customer_type_label = 'Vendor Type'; $customer_label = 'Vendor'; $person_type = "vendor"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Vendor', ''); $tax->where('tax_groups.is_purchase', '1'); $discount->where('is_purchase', '1'); $company_label = true; $company_name = $business_communication_address->placename; $company_email = $business_communication_address->email_address; $company_mobile = $business_communication_address->mobile_no; $company_address = $business_company_address; break; case 'credit_note': $address_label = 'Customer Address'; $order_type = "Order Type"; //$reference_voucher = $reference_vouchers->whereIn('name', array('sales', 'delivery_note'))->where('status', 1)->orderby('id')->get(); $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('sales', 'sales_cash', 'delivery_note'))->where('organization_id', $organization_id)->orderby('name', 'desc')->pluck('display_name', 'name'); $order_type_value->prepend('Direct', ''); $order_label = 'Order#'; $payment_label = 'Payment Method'; $sales_person_label = 'Sales Person'; $date_label = 'Date'; $customer_type_label = 'Customer Type'; $customer_label = 'Customer'; $person_type = "customer"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Customer', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_sales', '1'); $discount->where('is_sales', '1'); break; case 'purchase_order': $address_label = 'Supplier Address'; //$reference_voucher = $reference_vouchers->whereIn('name', array('direct'))->where('status', 1)->orderby('id')->get(); $payment_label = 'Payment Method'; $sales_person_label = 'Created By'; $date_label = 'Date'; $customer_type_label = 'Supplier Type'; $customer_label = 'Supplier'; $person_type = "Vendor"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Supplier', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_purchase', '1'); $discount->where('is_purchase', '1'); $company_name = $business_communication_address->placename; $company_email = $business_communication_address->email_address; $company_mobile = $business_communication_address->mobile_no; $company_address = $business_company_address; break; case 'purchases': $address_label = 'Supplier Address'; //$reference_voucher = $reference_vouchers->whereIn('name', array('direct', 'purchase_order'))->where('status', 1)->orderby('id')->get(); $due_date_label = 'Due Date'; $term_label = 'Terms'; $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('purchase_order', 'estimation'))->where('organization_id', $organization_id)->pluck('display_name', 'name'); $order_type_value->prepend('Direct', ''); $order_label = 'Order#'; $payment_label = 'Payment Method'; $sales_person_label = 'Created By'; $date_label = 'Date'; $customer_type_label = 'Supplier Type'; $customer_label = 'Supplier'; $person_type = "Vendor"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Supplier', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_purchase', '1'); $discount->where('is_purchase', '1'); $discount_option = true; $company_name = $business_communication_address->placename; $company_email = $business_communication_address->email_address; $company_mobile = $business_communication_address->mobile_no; $company_address = $business_company_address; break; case 'debit_note': $address_label = 'Vendor Address'; //$reference_voucher = $reference_vouchers->whereIn('name', array('purchases', 'goods_receipt_note'))->where('status', 1)->orderby('id')->get(); $order_type = "Order Type"; $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('purchases', 'goods_receipt_note'))->where('organization_id', $organization_id)->orderby('name', 'desc')->pluck('display_name', 'name'); $order_label = 'Order#'; $payment_label = 'Payment Method'; $sales_person_label = 'Created By'; $date_label = 'Date'; $customer_type_label = 'Vendor Type'; $customer_label = 'Vendor'; $person_type = "vendor"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Vendor', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_purchase', '1'); $discount->where('is_purchase', '1'); $company_name = $business_communication_address->placename; $company_email = $business_communication_address->email_address; $company_mobile = $business_communication_address->mobile_no; $company_address = $business_company_address; break; case 'goods_receipt_note': $address_label = 'Vendor Address'; //$reference_voucher = $reference_vouchers->whereIn('name', array('purchase_order', 'purchases'))->where('status', 1)->orderby('id')->get(); $order_type = "Order Type"; $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('purchase_order', 'purchases'))->where('organization_id', $organization_id)->pluck('display_name', 'name'); $order_label = 'Order#'; $payment_label = 'Payment Method'; $date_label = 'Date'; $customer_type_label = 'Vendor Type'; $customer_label = 'Vendor'; $person_type = "vendor"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Vendor', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_purchase', '1'); $discount->where('is_purchase', '1'); $discount_option = true; $company_name = $business_communication_address->placename; $company_email = $business_communication_address->email_address; $company_mobile = $business_communication_address->mobile_no; $company_address = $business_company_address; break; case 'job_card': $service_type_label = 'Service Type'; $address_label = 'Customer Address'; //$reference_voucher = $reference_vouchers->whereIn('name', array('direct', 'estimation'))->where('status', 1)->orderby('id')->get(); /*$order_type = "Order Type"; $order_label = 'Order#'; $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('estimation'))->where('organization_id', $organization_id)->pluck('display_name', 'name'); $order_type_value->prepend('Direct', '');*/ $order_type_value = AccountVoucher::whereIn('name', array('Direct'))->where('organization_id', $organization_id)->orderby('name', 'desc')->pluck('display_name', 'name'); $order_type_value->prepend('Direct', ''); $order_label = 'Order#'; $sales_person_label = 'Assigned To'; $date_label = 'Date'; $customer_type_label = 'Customer Type'; $customer_label = 'Customer'; $person_type = "customer"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Customer', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_sales', '1'); $discount->where('is_sales', '1'); $discount_option = true; break; case 'job_request': $order_type = "Order Type"; $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('job_card'))->where('organization_id', $organization_id)->pluck('display_name', 'name'); $order_type_value->prepend('Direct', ''); $order_label = 'Order#'; $term_label = 'Terms'; $service_type_label = 'Service Type'; $address_label = 'Customer Address'; $due_date_label = 'Expiry Date'; $sales_person_label = 'Attended By'; $date_label = 'Date'; $due_date = Carbon::now()->addDays(30)->format('d-m-Y'); $customer_type_label = 'Customer Type'; $customer_label = 'Customer'; $person_type = "customer"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Customer', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_sales', '1'); $discount->where('is_sales', '1'); $discount_option = true; break; case 'job_invoice': $address_label = 'Customer Address'; $service_type_label = 'Service Type'; //$reference_voucher = $reference_vouchers->whereIn('name', array('direct', 'sale_order', 'estimation'))->where('status', 1)->orderby('id')->get(); $order_type = "Order Type"; $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('job_card'))->where('organization_id', $organization_id)->pluck('display_name', 'name'); $order_type_value->prepend('Direct', ''); $due_date_label = 'Payment Due Date'; $term_label = 'Payment Terms'; $order_type = "Order Type"; $order_label = 'Job Card Number#'; $payment_label = 'Payment Method'; $sales_person_label = 'Invoice By'; $date_label = 'Invoice Date'; $customer_type_label = 'Customer Type'; $customer_label = 'Customer'; $person_type = "customer"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Customer', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_sales', '1'); $discount->where('is_sales', '1'); $discount_option = true; break; case 'job_invoice_cash': $address_label = 'Customer Address'; $service_type_label = 'Service Type'; //$reference_voucher = $reference_vouchers->whereIn('name', array('direct', 'sale_order', 'estimation'))->where('status', 1)->orderby('id')->get(); $order_type = "Order Type"; $order_type_value = AccountVoucher::select('display_name', 'name')->whereIn('name', array('job_card'))->where('organization_id', $organization_id)->pluck('display_name', 'name'); $order_type_value->prepend('Direct', ''); $due_date_label = 'Payment Due Date'; $term_label = 'Payment Terms'; $order_type = "Order Type"; $order_label = 'Job Card Number#'; $payment_label = 'Payment Method'; $sales_person_label = 'Invoice By'; $date_label = 'Invoice Date'; $customer_type_label = 'Customer Type'; $customer_label = 'Customer'; $person_type = "customer"; $people = $people_list->pluck('name', 'id'); $business = $business_list->pluck('name', 'id'); $people->prepend('Select Customer', ''); $business->prepend('Select Business', ''); $tax->where('tax_groups.is_sales', '1'); $discount->where('is_sales', '1'); $discount_option = true; break; } $field_types = FieldType::select('field_types.id', 'field_types.display_name', 'field_types.name', 'field_formats.id AS format_id', 'field_formats.name AS format') ->leftjoin('field_formats', 'field_formats.id', '=', 'field_types.field_format_id') ->get(); $transaction_fields = TransactionField::select('transaction_fields.id', 'transaction_fields.name', 'field_formats.name as field_format', 'field_types.name as field_type', 'transaction_fields.field_format_id', 'transaction_fields.field_type_id', DB::Raw('GROUP_CONCAT(group_fields.name SEPARATOR "`")as group_name'), 'transaction_fields.sub_heading') ->leftjoin('field_formats', 'field_formats.id', '=', 'transaction_fields.field_format_id') ->leftjoin('field_types', 'field_types.id', '=', 'transaction_fields.field_type_id') ->leftjoin('transaction_fields as group_fields', 'group_fields.group_id', '=', 'transaction_fields.id') ->where('transaction_fields.transaction_type_id', $transaction_type->id) ->where('transaction_fields.status', 1) ->groupby('transaction_fields.id') ->orderby('transaction_fields.sub_heading') ->get(); $sub_heading = TransactionField::select(DB::Raw('DISTINCT(transaction_fields.sub_heading)'))->whereNotNull('transaction_fields.sub_heading')->get(); $selected_make = null; $model = ['' => 'Select Model']; $spec_values = RegisteredVehicleSpec::select('registered_vehicle_specs.spec_id','vehicle_spec_masters.display_name','registered_vehicle_specs.spec_value') ->leftjoin('vehicle_spec_masters','vehicle_spec_masters.id','=','registered_vehicle_specs.spec_id') ->where('registered_vehicle_specs.organization_id',$organization_id)->get(); $date = now()->format("Y-m-d "); $shift = HrmShift::where('status',1)->where('organization_id', $organization_id)->pluck('name','id'); $shifttime = FsmShiftCashManage::select('shift_id')->where('date',$date)->where('end_time','=',null)->first(); if($shifttime!=null) { $shift_id=$shifttime->shift_id; } else { $shift_id=''; } $pump_name = FsmPump::where('fsm_pumps.organization_id',$organization_id)->pluck('fsm_pumps.name','fsm_pumps.id'); Log::info("TransactionController->create :- return ".$type); return view('inventory.transaction_create', compact('people', 'business', 'person_id', 'selected_employee', 'voucher_no', 'account_ledgers', 'employees', 'shipment_mode', 'items', 'taxes', 'discounts', 'transaction_type', 'state', 'title', 'payment', 'terms', 'voucher_terms', 'weekdays', 'days', 'weekday', 'type', 'due_date_label', 'term_label', 'order_label', 'payment_label', 'sales_person_label', 'include_tax_label', 'date_label', 'customer_type_label', 'customer_label', 'person_type', 'field_types', 'transaction_fields', 'make', 'selected_make', 'model', 'sub_heading', 'discount_option', 'due_date', 'order_type', 'order_type_value', 'address_label', 'transaction_address_type', 'company_name', 'company_email', 'company_mobile', 'company_address', 'company_label', 'service_type_label', 'vehicle_make_id', 'vehicle_model_id', 'vehicle_tyre_size', 'vehicle_tyre_type', 'vehicle_variant', 'vehicle_wheel', 'fuel_type', 'rim_type', 'body_type', 'vehicle_category', 'vehicle_drivetrain', 'service_type', 'vehicle_usage', 'maintanance_reading', 'vehicles_register', 'reading_factor','vehicle_sevice_type','job_card_status','job_status','delivery_method','current_date','add_date','vehicle_check_list','uuid','job_item_status','item_status','payment_method','payment_term','payment_terms','sevice_type','tomorrow_date','spec_values','shift','pump_name','shift_id','bus','selected_term')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1